View source: R/modelSetupRun.R
call_cwatm | R Documentation |
This function calls a CWatM simulation from within R.
call_cwatm(modelpath = NULL, settingsfile, overwrite = FALSE, ...)
modelpath |
character. defines the path to the folder with CWatM (see details) |
settingsfile |
character. defines the path to an MS Excel settings spreadsheet or to a |
overwrite |
logical. Currently out of use |
... |
additional arguments passed to the |
The function uses the system()
function to call a CWatM simulation.
In case the function receives a settings file as an MS Excel file (.xlsx),
the function calls createSettingsFile()
,
and saves the output in the same folder with a combination of file name and a unique date-time identifier (E.g., cwatm_settings_20212904102753.ini
).
The function automatically uses this settings.ini
file for the call.
The modelpath
argument indicates where are the CWatM files located (e.g., run_cwatm.py). If set to NULL
the function assumes that they are located in
the parent directory of the PathRoot folder.
CWatM outputs
## Not run: call_cwatm(settingsfile = "C:/IIASA/cwatm/cwatm_settings/cwatm_settings.xlsx", intern = TRUE) # for `intern` see `?system` call_cwatm(settingsfile = "C:/IIASA/cwatm/cwatm_settings/cwatm_settings_sorekBasin.ini") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.