The riversystem.commandline.exe provides a mechanism to run existing projects without the Source interface. It is possible to modify or change the behaviour of the project from the command line, by changing the values of global expressions. Results can be returned for recorded items or global expressions within the project.
riversystem.commandline.exe is included with Source.
...
Anchor | ||||
---|---|---|---|---|
|
Display option commands | Function | Example | |||||||
---|---|---|---|---|---|---|---|---|---|
-a, --address | Address for server to create, or client to connect. | -a "net.pipe://localhost/PipeReverse" or "net.tcp://localhost:8523/eWater/Services/RiverSystemService" | |||||||
-b, -baseSIUnits | Ignore units set within project and output base SI units | --baseSIUnits | |||||||
-c, --recording | File to load state from when in when in client mode or file to save state in when in server mode. | -c "c:\StateFiles\state.txt" | |||||||
-d, --directory | Directory in which to look for projects in. | -d "c:\ProjectFiles" | |||||||
-e, --timeout | Operation timeout for WCF service in seconds. | -e 2000 | |||||||
-f, --settingFile | File to merge command-line settings from. | -f "settings.txt" | |||||||
-g, --getProjectDescription | Write the xml description of the project to the specified file name. If the -g parameter exists use the xpath to query and return a subset of the project description. The string arguement is the file name to the write the project details into. If used without the -x arguement all the project details are written | -g "projectdescription.xml" | |||||||
-p, --project | Path to project, or project name on server followed by these optional parameters: scenario within that project, start and end times, name of data input set | -p "projectName.rsproj" or -p "c:\somePath\projectName.rsproj;someScenarioName;1/1/2011;31/12/2011;dry" | |||||||
-m, --mode | Application mode Client/Server/InProcess. | -m Client or -m Server | |||||||
-d, --directory | Directory in which to look for projects. | -d "c:\ProjectFiles" | |||||||
-o, --output | File to save output into. The extension selects the output format based on the standard TIME I/O formats. A directory of the name specifed will be created if the format only supports a single time series. | -o "output.res.csv" for CSV or -o "output.nc" for NetCDF etc. | |||||||
-r, --results | Which results to return. This can appear multiple times.
| -r "someResult" -r "someOtherResult"-l, --loadPlugin | File load as a plugin. Plugins saved in the project file are always loaded by default; this option allows a plugin that the project has not been saved with to be loaded for this run only using default options. | -l "plugin.dll" | |||||
-m, --mode | Application mode Client/Server/InProcess. | -m Client or -m Server | |||||||
-o, --output | File to save output into. The extension selects the output format based on the standard TIME I/O formats. A directory of the name specified will be created if the format only supports a single time series. | -o "output.res.csv" for CSV or -o "output.nc" for NetCDF etc. | |||||||
-p, --project | Path to project, or project name on server and optional scenario within that project, DateTime values to override the default start and end times of the loaded scenario and data source input set to run. | -p "projectName.rsproj" or -p "c:\somePath\projectName.rsproj;someScena | |||||||
-r, --results | Which results to return. This can appear multiple times.
| -r "someResult" -r "someOtherResult" | |||||||
-s, --step | Number of time-steps to run. | --step 1 | |||||||
-t, --reset | Reset the loaded project. | --reset | |||||||
-u, --current | Return only the current time-step's value for the specified results | --current | |||||||
-v, --value | Set value of meta-parameter or internal setting. | -v "$metaparam=25", or -v "$anotherMetaParam=2.3" | |||||||
-s, --step | Number of time-steps to run. | --step 1 | |||||||
-t, --reset | Reset the loaded project. | ||||||||
-e, --timeout | Operation timeout for WCF service in seconds. | -e 2000 | |||||||
-b, -baseSIUnits | Ignore units set within project and output base SI units | ||||||||
-a, --address | Address for server to create, or client to connect. | -a "net.pipe://localhost/PipeReverse" or "net.tcp://localhost:8523/eWater/Services/RiverSystemService" | |||||||
-x, --xPathProjectDescription | An optional xpath used to query and return a subset of the project description. The string arguement can be empty in which case the full descripiton is returned. Data is written to file name specified with the -g arguement or a default file (ProjectDescription.xml). | -x "" or -x "//entity@name='Node'" |
PEST calibration using the command line
PEST (Parameter ESTimation and uncertainty analysis) allows analysis of complex environmental models, and can be used in Source for calibration of catchments. You can use the command line to do calibration and uncertainty in a catchments model. The steps to do the calibration are as follows:
- Starting with a Source Catchment project file, use the new calibration tool to set up ‘global expressions’ for the parameters of the rainfall runoff models. When defining the metaparameters in the Calibration Wizard, the list of Existing Metaparameters will be used in the parameter file for invoking riversystem.commandline;
- Turn on any recorders for the hydrological quantities that will be used in the objective function. In step 4 of the Calibration Wizard, choose Manual optimisation and enable Create global expressions for use from an external tool;
- Save the project;
- Set up the Riversystem.Commandline input file;
- Setup the PEST input and template files;
- Prepare a batch file to invoke the commandline and pre-processors; and
- Run PEST.
Once the Calibration wizard has been set up, start the command line server (riversystem.commandline -p projectname.rsproj -m server) and then PEST (pest pestcontrolfile.pst).
Batch running using the command line
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Please see Batch running using the command line in the Source community for details and an example.