Write parameters to RS Minerve parameter file
Arguments
- parameters
Tibble with parameters for each RS Minerve object. Multiple parameter sets may be possible. See Details & Examples for more info on the column requirements.
- outfilepath
Character string with path to file to be written.
Details
`parameters` contains 5 columns:
`Object` (character) identifying the RSMinerve object type (e.g. Station).
See Vignette Parameters for more information on the objects available in
RSMinerveR.
`Name` is the user specified name of the object in the RSMinerve model
(e.g. Meteo station A).
`Parameters` names all parameters for each object (e.g. Zone, X \[m\],
Y \[m\], etc.). See Vignette Parameters for more information on the
parameters of the available objects in RSMinerveR.
`Values` contains the parameter values (e.g. "A", 4500, 3000).
`Parameter set` (optional) is used to differentiate between multiple
parameter sets. The function will write
length(unique(parameters$`Parameter set`)) parameter files, appending the
value of Parameter set to the base file name.
The outfilepath is edited in the case where several parameter sets are written
See also
Other RS Minerve IO:
getChunkSize()
,
load_minerve_input_csv()
,
readDBCSV()
,
readForcingCSV()
,
readForcingSTR()
,
readRSMParameters()
,
readResultCSV()
,
readResultDST()
,
readSelectionCHK()
,
translateCSVtoDST()
,
writeSelectionCHK()
Examples
if (FALSE) {
filepath <- normalizePath(file.path("Tutorial_Parameters.txt"))
params <- readRSMParameters(filepath)
params <- params |>
mutate(Values = ifelse((Object == "GSM" & Parameters == "Kgl [1/d]"),
Values/2, Values))
writeRSMParameters(params, filepath)
}