Open glenncampagna opened 1 year ago
Glenn - thanks for doing this! I added general Water Supply onboarding on top for review/edit. This morning, let's prioritize for this week.
15 May Onboarding
Ella (with tag-teaming)
Context Previous research has shown that the amount of winter recharge, that is precipitation that infiltrates into groundwater, is an indicator of the subsequent summer streamflow. Thus, low winter recharge (indicated by streamflow between Dec-March) is a warning indicator for potential summer drought conditions. While Joey/DEQ have tools at the ready for drought prediction, the casual hydrologist may wonder things like seems like the hiking trails are dry this time year, is this just me or backed up with data? or I had to mow my grass before April the year...I wonder if the early leaf-on will result in sustained evapotranspiration that reduces water storage to the point of impacting summer streamflow?
Megan and Glenn: tracked in #819
Office of Water Supply
Permissions for Ella
The chunks Julia had started for model performance scatterplots and percent differences are not yet functioning, and had to be skipped in order to run the Rmd. This was done by putting {r, eval=FALSE}
in those chunk headers.
I was able to run the Rmd using the following render command:
rmarkdown::render('C:/aa_HARP/aa_GitHub/HARParchive/HARP-2022-Summer/AutomatedScripts/ws_model_summary.Rmd',
output_file = 'C:/aa_HARP/MarkdownSummaryTest',
params = list(doc_title = "Test HSP2 Model Summary",
rseg.file.path = c("/media/model/p6/out/river/hsp2_2022/hydr/JA4_7280_7340_hydrd_wy.csv", "/media/model/p6/out/river/subsheds/hydr/JA4_7280_7340_hydrd_wy.csv"),
rseg.hydrocode = c("JA4_7280_7340","vahydrosw_wshed_JA4_7280_7340"),
rseg.ftype = c("cbp60","vahydro"),
rseg.model.version = c("cbp-6.0","cbp-6.1"),
runid.list = c("hsp2_2022","subsheds"),
rseg.metric.list = c("Qout","l90_Qout","l30_Qout","l07_Qout","l01_Qout","consumptive_use_frac","wd_cumulative_mgd","ps_cumulative_mgd","wd_mgd","ps_mgd")
)
)
The output can be downloaded here to view.
Ella read through the Rmd and feels acquainted with it, but her and Glenn had trouble trying to render it earlier, so tomorrow we hope to have everyone able to generate the document.
Additionally, there is no "0. River Channel"
property, nor a "local_channel"
property for the cbp-6.0 and cbp-6.1 models, (at least for this segment), so to generate the FTABLE visuals the code is temporarily pulling the channel length from the vahydro-1.0 model:
rseg<- RomFeature$new(ds,list(
hydrocode= rseg.hydrocode[2],
ftype= rseg.ftype[2],
bundle='watershed'),
TRUE)
model <- RomProperty$new(ds,list(
varkey="om_water_model_node",
featureid=rseg$hydroid,
entity_type="dh_feature",
propcode='vahydro-1.0'), #can't be cbp-6.1 or cbp-6.0 b/c it won't have a '0. River Channel'
TRUE)
channel_prop <- RomProperty$new(ds,list(
#varkey="om_USGSChannelGeomObject", #for local_channel it needs _sub added to end
featureid=model$pid,
entity_type='dh_properties',
propname = '0. River Channel'),
TRUE)
length <- RomProperty$new(channel_prop[["datasource"]],list(
varkey="om_class_Constant",
featureid=channel_prop$pid,
entity_type='dh_properties',
propname='length'),
TRUE)
clength <- length$propvalue
@megpritch -- thanks for the updates - I saw your Rappahannock doc and it looks great!!
Note: For the FTABLE location -- we do not want to pull the FTABLE from vahydro, instead, we need to get them from the model directory. Recall, we may be looking at any manner of HSPF model and thus we need to be able to read the text file with FTABLE inside of it,we definitely had code to do that as we reviewed how to parse the file and eliminate comments lines, etc. in a group session. All ftables are stored in the model directory, with the following path formulat:
${CBP_ROOT}/input/param/river/${PARAMETERS}/ftables/${riverseg}.ftable
CBP_ROOT
, and PARAMETERS
can be obtained with the cbp
helper script that we use for many things.For a demo of how to get the CBP_ROOT
and PARAMETERS
variables, see the code below which can find any ftable location:
cd /opt/model/p6/vadeq/
# Load the model config
. hspf_config
# this loads CBP_ROOT, to see where the root is
echo $CBP_ROOT
# Get the PARAMETERS variable for the model in question, for example, the "subsheds" scenario:
PARAMETERS=`cbp get_config subsheds river PARAMETERS`
riverseg="RU4_5640_6030"
ftable_path=${CBP_ROOT}/input/param/river/${PARAMETERS}/ftables/${riverseg}.ftable
echo $ftable_path
cat $ftable_path
Thanks again, and @megpritch & @glenncampagna can you all make sure that @EllaF21 is all trained up on how to run, understand and use the bash/shell code snippet above?
online ftable: http://deq1.bse.vt.edu:81/p6/vadeq/input/param/river/vahydro_2022/ftables/JA4_7280_7340.ftable Online HYDR.csv (has channel LEN parameter, in miles): http://deq1.bse.vt.edu:81/p6/vadeq/input/param/river/vahydro_2022/HYDR.csv
FTABLEs Online: http://deq1.bse.vt.edu:81/p6/vadeq/input/param/river/vahydro_2022/ftables/ http://deq1.bse.vt.edu:81/p6/vadeq/input/param/river/P620171001WQgFTAB/ http://deq1.bse.vt.edu:81/p532/input/param/river/hsp2_2022/ftables/ http://deq1.bse.vt.edu:81/p532/input/param/river/p532cal_062211/ftables/
This issue will be for listing tasks/goals, tracking progress, and linking information for onboarding Ella
Beneficial Water Use in Virginia
General important topics to cover:
hsp2
model and difference from originalhspf
,h5/hdf5
file structure, meta-model organization and our data harvesting and analysis routines within