setPrjParameters: Sets the parameter values in a CRHM model '.prj' file

View source: R/setPrjParameters.R

setPrjParametersR Documentation

Sets the parameter values in a CRHM model .prj file

Description

Replaces the existing values of a single parameter, for all HRUs, in a .prj file.

Usage

setPrjParameters(
  inputPrjFile = "",
  paramName = "",
  paramVals = "",
  outputPrjFile = "",
  quiet = TRUE,
  logfile = ""
)

Arguments

inputPrjFile

Required. Name of the .prj file.

paramName

Required. Name of parameter to set.

paramVals

Required. Vector containing new parameter values. There must be at least as many values in this vector as parameter values in the orginal .prj file.

outputPrjFile

Optional. If omitted, the input .prj file will be overwritten.

quiet

Optional. Suppresses display of messages, except for errors. If you are calling this function in an R script, you will usually leave quiet=TRUE (i.e. the default). If you are working interactively, you will probably want to set quiet=FALSE.

logfile

Optional. Name of the file to be used for logging the action. Normally not used.

Value

If successful, returns TRUE. If unsuccessful, returns FALSE.

Note

Currently, this function has only been tested on simple .prj files, i.e. without REW Grp parameters. It might work for complex files if the REW Grp specification is included in the parameter name.

Author(s)

Kevin Shook

See Also

runCRHM setPrjDates

Examples

## Not run: 
result <- setPrjParameters('c:/CRHM/Bad74_Frozen.prj',
'fetch', c(1500, 1500, 1500))
## End(Not run)

CentreForHydrology/CRHMr documentation built on April 6, 2024, 5:27 p.m.