Read in the WatershedStorage.csv file produced by Raven.
rvn_watershed_read(ff = NA, tzone = "UTC")full file path to the WatershedStorage.csv file
string indicating the timezone of the data in ff
data frame from the file with standardized names
vector corresponding to units of each column
Expects a full file path to the WatershedStorage.csv file, then reads in the file using read.csv. The main advantage of this functon is renaming the columns to nicer names and extracting the units into something much easier to read.
ff is the full file path of the WatershedStorage.csv file. If the file is located in the current working directory, then simply the name of the file is sufficient.
The timezone is provided by the tzone argument as "UTC" by default, and should be adjusted by the user to the local time zone as needed, based on the model run.
rvn_hyd_read for reading in the Hydrographs.csv file
rvn_watershedmeb_read for reading in the
WatershedMassEnergyBalance.csv file
# locate in RavenR Watershed storage file
ff <- system.file("extdata","run1_WatershedStorage.csv", package="RavenR")
# create full file path and read in file
mywshd <- rvn_watershed_read(ff)
# check data
head(mywshd$watershed_storage)
#>            rainfall snowfall Channel.Storage Reservoir.Storage Rivulet.Storage
#> 2002-10-01       NA       NA        0.494463                 0        1.056200
#> 2002-10-02 3.468690        0        0.906826                 0        2.330950
#> 2002-10-03 1.189180        0        0.964977                 0        1.342180
#> 2002-10-04 2.083260        0        0.495393                 0        0.940287
#> 2002-10-05 6.474310        0        0.405887                 0        0.911627
#> 2002-10-06 0.125591        0        0.403366                 0        0.853097
#>            Surface.Water Cum..Losses.to.Atmosphere..mm. Ponded.Water
#> 2002-10-01             0                        0.00000  0.00000e+00
#> 2002-10-02             0                        5.65641  0.00000e+00
#> 2002-10-03             0                       10.22230  1.01511e-17
#> 2002-10-04             0                       12.83760 -9.44248e-18
#> 2002-10-05             0                       18.72080 -7.13371e-17
#> 2002-10-06             0                       21.40350  3.30391e-18
#>            Soil.Water.0 Soil.Water.1 Soil.Water.2 Snow.Melt..Liquid..mm. Snow
#> 2002-10-01     10.00000   10.0000000      10.0000                      0    0
#> 2002-10-02      7.05032    6.5490500      10.9424                      0    0
#> 2002-10-03      4.15461    3.9050700      11.8432                      0    0
#> 2002-10-04      4.12491    1.8214000      12.7045                      0    0
#> 2002-10-05      3.79521    1.1999900      13.5278                      0    0
#> 2002-10-06      2.12754    0.0917699      13.1340                      0    0
#>            Canopy Canopy.Snow   Total Cum..Inputs..mm. Cum..Outflow..mm.
#> 2002-10-01      0           0 31.5507          0.00000           0.00000
#> 2002-10-02      0           0 33.4359          3.46869           1.58344
#> 2002-10-03      0           0 32.4324          4.65787           3.77617
#> 2002-10-04      0           0 32.9241          6.74113           5.36774
#> 2002-10-05      0           0 38.5614         13.21540           6.20469
#> 2002-10-06      0           0 38.0133         13.34100           6.87838
#>                MB.Error
#> 2002-10-01  3.55271e-15
#> 2002-10-02 -8.88178e-16
#> 2002-10-03  2.66454e-15
#> 2002-10-04  1.15463e-14
#> 2002-10-05  1.42109e-14
#> 2002-10-06  8.88178e-15