ceff-tech / ffc_api_client

An R client for the online Functional Flows Calculator API
https://ceff-tech.github.io/ffc_api_client
9 stars 3 forks source link

Create function to create dimensionless observed hydrograph from observed gage or model data #52

Open kristaniguchi opened 4 years ago

kristaniguchi commented 4 years ago

Step 5 of CEFF: assess alteration asks the user to compare DRHs to dimensionless observed hydrograph. It would be great to have a function that plots DOH from observed flow timerseries as in Figure 9 of CEFF comparing DRH from reference gage (left) to DOH (right). image

nickrsan commented 4 years ago

Hey Kris,

Thanks for filing all of these - your use of the package and feedback keeps improving this! For this one, I like the idea, but I'm not sure how we'd do it reliably in practice. The thing we're missing is something that maps COMIDs to their reference gages so we could pull the DRH. If we had that, we could do it, but I'm reluctant to develop it myself. Do you know if that information exists somewhere? I'm tagging @ryanpeek and @alyssaobester here too in case they have thoughts or know anything that would help here.

ryanpeek commented 4 years ago

in theory this wouldn't be too terrible to implement...similar to the lookup table we used for the "reference gages". But currently we don't have this...and just to be clear, this could be any COMID, not one specifically in the location of a reference gage? We'd need to use a reference gage dataset and then join all comid's to nearest reference gage (not too hard but would take a little bit of compute time) then save that table or provide it in a function.

nickrsan commented 4 years ago

Yeah, I was thinking we'd need it for any comid. It just feels like there might be per-hydrogeologic stream class type considerations with how we join COMIDs to their reference gage. As in, do we do nearest while looking within the same HUC8 drainage network first, then nearest outside of that if it doesn't exist? Closest distance along the stream network? I might be overthinking it though

kristaniguchi commented 4 years ago

Let me clarify, if the user has their own gage data can we produce this plot? Take uploaded discharge timeseries divide by mean annual flow to non-dimensionalize it and for every water year date calc 10th, 25th, 50th, 75th, 90th percentiles. Use these percentiles to create DOH plot. Would that be doable? I don't think it would be necessary to try to do this for every COMID

kristaniguchi commented 4 years ago

User can compare their DOH with DRH from stream class that is automatically generated or from ref gage that they have timeseries data from