We are using WRF-Hydro to predict streamflow for Fourmile Creek at the Orodell USGS gage for the 2013 snowmelt period. We ran WRF-Hydro with NoahMP as the LSM for a 3-year spinup period and then did a daily run for 5 months starting March 1, 2013. We want to evaluate the predicted water budget partitioning over this snowmelt period.
Load the rwrfhydro package.
library("rwrfhydro")
## To check rwrfhydro updates run: CheckForUpdates()
Set a data path to the Fourmile Creek test case.
dataPath <- '~/wrfHydroTestCases/Fourmile_Creek'
Calculate basin-averaged LSM water fluxes. The LSM was run at 1km resolution and the high-res hydro grid was 100m resolution, so our aggregation factor is 10. We only have 1 basin in our model domain, and our basin ID is 1. We are going to use R’s multi-core capability (make sure doMC is installed) and run this summary over 8 cores.
modLdasoutWb1h.allrt.fc <- ReadLdasoutWb(paste0(dataPath, '/RUN.RTTESTS/OUTPUT_ALLRT_DAILY'),
paste0(dataPath, '/DOMAIN/hydro_OrodellBasin_100m.nc'),
mskvar="basn_msk", basid=1, aggfact=10, ncores=8)
Calculate basin-averaged routing water fluxes.
modRtout1h.allrt.fc <- ReadRtout(paste0(dataPath, '/RUN.RTTESTS/OUTPUT_ALLRT_DAILY'),
paste0(dataPath, '/DOMAIN/hydro_OrodellBasin_100m.nc'),
mskvar="basn_msk", basid=1, ncores=8)
Import groundwater outflow model output.
modGwout.allrt.fc <- ReadGwOut(paste0(dataPath, '/RUN.RTTESTS/OUTPUT_ALLRT_DAILY/GW_outflow.txt'))
Calculate a water budget for the basin. Our modelled soil depths were 100, 300, 600, and 1000 mm, which match the defaults (therefore we do not need to specify). This model run had all routing options (subsurface, overland, groundwater, and channel) turned on, so we are providing rtout and gwout dataframes and switching sfcrt to TRUE. Our basin area is 63.1 km2.
wb.allrt.fc <- CalcNoahmpWatBudg(modLdasoutWb1h.allrt.fc, rtoutDf=modRtout1h.allrt.fc,
gwoutDf=modGwout.allrt.fc, sfcrt=TRUE, basarea=63.1)
Take a look at the results. All output values are in mm.
wb.allrt.fc
LSM_PRCP | LSM_ECAN | LSM_ETRAN | LSM_EDIR | LSM_DELSWE |
---|---|---|---|---|
378.1 | 38.99 | 130.5 | 152.3 | -31.43 |
LSM_DELCANWAT | LSM_SFCRNOFF | LSM_UGDRNOFF | LSM_DELSOILM |
---|---|---|---|
-0.1834 | 27.95 | 83.34 | 2.146 |
HYD_QSTRMVOL | HYD_DELSFCHEAD | HYD_QBDRY | HYD_GWOUT |
---|---|---|---|
2.93 | -0.009596 | 0 | 80.76 |
HYD_DELGWSTOR | WB_SFCRNOFF | WB_GWOUT | ERROR | RUN_FRAC |
---|---|---|---|---|
2.582 | 2.93 | 80.76 | -0.5238 | 0.2214 |
EVAP_FRAC | STOR_FRAC |
---|---|
0.8512 | -0.07113 |
Plot the water budget as a pie chart.
PlotWatBudg(wb.allrt.fc)
Plot the water budget as a bar chart.
PlotWatBudg(wb.allrt.fc, "bar")