-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Script to Export river h5s #312
Comments
Suggestions From HSPF Manual: I'm most unsure about ps_mgd . The IVOL variable is the only one in the HYDR table that has anything to do with water entering the river segment. These are also in the HYDR/table: O1 - zeros
OVOL1 - zeros
|
Data Harvesting Script for River SegmentsSeparate harvesting script created for river segments: batch_harvest_river.bat Use: H5 file path = $CBP_EXPORT_DIR/river/$scenario_name/h5/$basin'.h5' Ex:
Found in:
|
@juliabruneau can you paste a sample of the first few lines of the output CSV file into the issue main body, so we can see the columns available and sample data? The Also, I think:
|
Findings about point source in river h5 file
|
Ok, there but empty us good. One thing we'll need to do is insure that we have a segment that SHOULD have point sources, or withdrawals for that matter. I'll try to find one! For now, get the aliases in there and focus on batch script. |
Testing our R script which will perform analysis and send exports from hydr table to VAhydroScript: hsp_hydr.R https://github.com/HARPgroup/HARParchive/blob/master/HARP-2022-Summer/AutomatedScripts/hsp_hydr.R
It appears this happens before the hydr data table is created and any analysis performed. Any ideas/ suggestions? @rburghol |
Two thjngs:
Keep me posted! |
We have our hsp_hydr.R script working and theoretically sending constants and graphs soon to VAhydro, but aren't sure where to check on these because we don't see an existing river feature in VAHydro for OR1_7700_7980. This was why we'd thought to save the river segment originally @rburghol |
Awesome work today. To find the River segment OR1_7700_7980, check with @megpritch and @nicoledarling as they just went through this process. Since we have to wait to get the point source abd withdrawals sorted out, let's move forward on the flow analysis -- if you haven't already done that! The R script above, "waterSupplyModelNode.R" has many metrics that it calculates as a function of the Qout variable. If you can replicate all of those that would be excellent. |
Update on hsp_hydr.R flow analysis:Based on waterSupplyModelNode.R: Exported Constants: Planned Exported Plots: Potential Exported Constants (after calculating wd/ps_cumulative):
|
We added a container for Qout in VAhydro for better organization: |
@rburghol
|
Updated use for script to analyze river seg hydr files:Script: hsp_hydr.R https://github.com/HARPgroup/HARParchive/blob/master/HARP-2022-Summer/AutomatedScripts/hsp_hydr.R |
@juliabruneau @glenncampagna
The separate scripts ask is cause I'd like the Qout and other columns to always be there for any script to operate on, and thus we wont have to do multiple conversions if we access then with different analytical routines. |
Working on creating the two scripts - one for creating the aliases and one for the analysis. Just to clarify @rburghol :
|
Two Rscripts for River Segments:Name:
Name: |
Hey @glenncampagna @juliabruneau I am trying to run the summary script for river segments, but this is not working for Rockfish. I want to integrate these into the run_river.csh script, but will hold off until I can get this to work. I have pulled the HARP Archvie repository at 9:15 AM, so I think it is the most recent code. Tried:
Help? Integrated:
|
We ran the Rscript like you did, and found the error 'no rows to aggregate'. This is because we want to do our analysis script in cfs, and that means that we use the conversion script that generates Qout (cfs). The river seg didn't have the conversion script ran on it for some reason. We ran the conversion on the hydr.csv now and that should fix the issue. Note: the way the scripts are structured, the hydr conversion script should be run before the hydr analysis script is run |
Oh!
That's cause I didn't include that in the run_river.csh work flow - thanks! |
Note: This has been updated to a generic script: export_hsp_h5.R
Rscript HARParchive/HARP-2022-Summer/AutomatedScripts/hsp_hydr.R OR1_7700_7980 hsp2_2022 /media/model/p532/out/river/hsp2_2022
/media/model/[model_version]/out/river/[scenario]/h5/
$CBP_EXPORT_DIR/river/[scenario]/h5/
/media/model/p532/out/river/hsp2_2022/h5/
Qout
,wd_mgd
(withdrawal),ps_mgd
(point source) related analyses only.wd_mgd
andps_mgd
. See the hspf manual and the sample uci toom
repo to to see fn_get_runfile codevahydro_post_metric_to_scenprop()
might be useful since it is very concise.The text was updated successfully, but these errors were encountered: