validate_sim | R Documentation |
Run diagnostics on model results vs observations
validate_sim(
nc_file,
field_file,
nml_file,
metrics,
fig_path = NULL,
report = FALSE,
...
)
nc_file |
a string with the path to the netcdf output from GLM |
field_file |
a string with the path to the field observation file |
nml_file |
a string with the path to the glm3.nml file |
metrics |
a string or vector of strings representing physical metrics. Should be a rLakeAnalyzer function or other valid function. |
fig_path |
Default is NULL (only plots to screen). Enter string path to save as output file. File type can be anything supported by |
report |
default as FALSE, so no stats are returned. If TRUE, return summary stats for each metric used. |
... |
additional arguments passed to |
A report or figures comparing modeled results to observations.
Jordan S. Read, Hilary A. Dugan
compare_to_field, resample_to_field, read_nml, sim_metrics
## Not run:
sim_folder <- run_example_sim(verbose = FALSE)
nc_file <- file.path(sim_folder, 'output/output.nc')
nml_file <- file.path(sim_folder, 'glm3.nml')
field_file <- file.path(sim_folder, 'LakeMendota_field_data_hours.csv')
#create a multiple metric diagnostic fig within R:
validate_sim(nc_file, field_file, nml_file = nml_file,
metrics = c('thermo.depth', 'schmidt.stability'),
fig_path = NULL)
# write the fig out to file:
validate_sim(nc_file, field_file, nml_file = nml_file, fig_path = 'test_fig.png',
metrics = c('thermo.depth', 'schmidt.stability'))
# return the diagnostic info but avoid the plot:
validate_sim(nc_file, field_file, nml_file = nml_file, report = TRUE,
metrics = c('thermo.depth', 'schmidt.stability'))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.