setPrjDates | R Documentation |
.prj
fileSets the model run start and end dates in a CRHM model .prj
file
setPrjDates(
inputPrjFile = "",
startDate = "",
endDate = "",
outputPrjFile = "",
initialStateFile = "",
finalStateFile = "",
logfile = ""
)
inputPrjFile |
Required. Name of the |
startDate |
Required. Model run starting date in format YYYY MM DD. |
endDate |
Required. Model run ending date in format YYYY MM DD. |
outputPrjFile |
Optional. If omitted, the input |
initialStateFile |
Optional. If specified, the specified file will be set as the initial state file, i.e. the state variables to be read in at the beginning of the model run. |
finalStateFile |
Optional. If specified, the specified file will be set as the final state file, i.e. the state variables to be exported at the end of the model run. |
logfile |
Optional. Name of the file to be used for logging the action. Normally not used. |
If successful, returns TRUE
. If unsuccessful, returns FALSE
.
If you are using Windows, the paths for the state files must use \\ instead of \ for the directory delimiter. The reason is that R, like many programming languages, interprets \ as an escape code. This is different from the file path set in inputPrjFile, which must be an R path using the / symbol. See the example below.
Kevin Shook
runCRHM
setPrjObs
setPrjParameters
## Not run:
result <- setPrjDates('c:/CRHM/Bad Lake 1974-1975.prj',
'1974 10 1', '1975 10 1', initialStateFile='c:\\CRHM\\Model_Initial_State.int',
finalStateFile='c:\\CRHM\\Model_Final_State.int')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.