View source: R/simpleDailyWater.R
simpleDailyWater | R Documentation |
Calculates daily values of the CRHM outputs of water storages and fluxes, for models without sub-basins, for each HRU by its area, and calculates the net fluxes for the basin and each sub-basin. Note that this function requires a built-in dataframe CRHM_vars
which contains information about CRHM
variables. If your model uses a variable which is not in the dataframe, then you will get an error message.
simpleDailyWater(
CRHMoutput,
vars = "all",
prjFile = "",
basinMean = TRUE,
summarize = TRUE,
units = "mm",
quiet = TRUE,
logfile = ""
)
CRHMoutput |
Required. The CRHM model output as a standard CRHMr dataframe (obs, export or output data) |
vars |
Optional. Variable column numbers to be used (not including the |
prjFile |
Required. The CRHM .prj file. |
basinMean |
Optional. If |
summarize |
Optional. If |
units |
Optional. The units for output. The default is mm, but m3/s can also be specified. |
quiet |
Optional. Suppresses display of messages, except for errors. The default is TRUE. 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. |
If successful returns a data frame containing the daily values of all of the water fluxes and storages.
Kevin Shook
cumulDailyWater
## Not run:
b <- readOutputFile('Bologna1984_30y_output.txt', timezone='MST')
# get daily values without aggregation; values calculated w.r.t the HRU area
dailyHRU <- simpleDailyWater(b, prjFile='Bologna1984_02.prj', basinMean=FALSE)
# get daily values without aggregation; values calculated w.r.t the basin area
dailyHRU_per_basin <- simpleDailyWater(b, prjFile='Bologna1984_02.prj', basinMean=TRUE)
get daily basin values
daily_basin <- simpleDailyWater(b, prjFile='Bologna1984_02.prj', basinMean=TRUE, summarize=TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.