Description Usage Arguments Details Value Examples
View source: R/check_rw_output.R
check_rw_output()
takes RiverWare output (csv or rdf) and uses logic
written in yaml rule(s) to check the RiverWare output for errors.
This function was created to be run within RiverWare using the
Rplugin event with the available predefined arguments.
1 2 3 4 5 6 7 8 | check_rw_output(
scenarios,
yaml_rule_files,
scenario_dir,
output_dir,
yaml_dir,
out_fl_nm = "verification_output"
)
|
scenarios |
A character vector of folder names inside the scenario_dir, which stores the scenario output. |
yaml_rule_files |
A vector of yaml files. |
scenario_dir |
Directory where scenarios are stored. |
output_dir |
Directory where summary and log files are saved. |
yaml_dir |
Directory where yaml files are stored. |
out_fl_nm |
The name of the output files, default to verification_output. |
The function needs the base directory of the scenarios,
which is normally automatically output when running RiverWare models in
RiverSMART. The scenario_dir
contains subdirectories,
each representing an individual scenario. These individual scenario
directories are input to this function as a character vector,
scenarios
. The other directories necessary in this function are the
location of the yaml file(s) yaml_dir
, and desired output
directory, output_dir
.
Writes passes and fails to summary verification file and outputs details to log_file.txt.
1 2 3 4 5 6 7 8 9 10 11 | scenarios <- c("MRM_Avg,ModelBase,RulesBase,Run-2019-10",
"MRM_Avg,ModelBase,RulesBase,Run-2019-11")
yaml_rule_files <- c("check_lb_res.yaml", "check_ub_outflow.yaml")
scenario_dir <- "C:/User/Project/Scenario/"
output_dir <- "C:/User/Project/ScenarioSet/allScenarios/basicChecks"
yaml_dir <- "C:/User/Project/Code/"
## Not run:
check_rw_output(scenarios, yaml_rule_files, scenario_dir, output_dir, yaml_dir)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.