# Define a test case for the miscanthus model and save the model output to a
# temporary directory
miscanthus_test_case <- model_test_case(
'miscanthus_x_giganteus',
miscanthus_x_giganteus,
get_growing_season_climate(weather$'2005'),
TRUE,
tempdir()
)
update_stored_model_results(miscanthus_test_case)
# Now we can use `compare_model_output` to compare the saved result to a new one
comparison_df <- compare_model_output(miscanthus_test_case)
# This will be a boring example because the new and stored results will be
# exactly the same
lattice::xyplot(
Leaf + Stem + Root ~ time,
group = version,
data = comparison_df,
type = 'l',
auto = TRUE,
grid = TRUE
)
Run the code above in your browser using DataLab