-
Notifications
You must be signed in to change notification settings - Fork 11
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
Using teehr
to support event-based evaluations
#247
Comments
@jarq6c to address your second question first, we have tools to fetch and process the gridded precipitation data that is available with the retrospective (which as I understand is the AORC data). Everything in this post is referencing the latest release version from main (v0.3.28). The process is a two step process whereby, first you have to create a weights file that specifies the fraction of that each grid cell is of the entire basin. There is an example here: https://rtiinternational.github.io/teehr/user_guide/notebooks/loading/grid_loading_example.html#generate-the-weights-file (for weights file generation) and here for retro gridded data processing https://rtiinternational.github.io/teehr/user_guide/notebooks/loading/load_gridded_retrospective.html Does this help or were you looking at a different source? As far as comparing AORC to a rain gauge, this should work but one would need to be defined as the |
@jarq6c As for the first part of your question regarding the event-based evaluation steps, I think in v0.4-beta, with the merge of #250 which allows the chaining of metric calculations, we sort of have everything except the event detection piece. Basically we can now do something like the following (note, the month field is a stand-in for an event id). This exact setup is untested, but we have tested that the chaining works, so this should work.
A few other notes and comments on the specific numbered items:
|
bs = Bootstrappers.ClassicalBootstrap(
seed=50,
reps=2000,
quantiles=[0.025, 0.975]
)
med_bs = metrics.Median(bootstrap=bs)
med_bs.output_field_name = "med_bs"
# Add 'event_id' column
add_event_id_column(algorithm="Eckhardt", field_name="event_id")
eval.metrics.query(
order_by=["primary_location_id", "event_id"],
group_by=["primary_location_id", "event_id"],
include_metrics=[
metrics.RelativeBias()
]
).query(
order_by=["primary_location_id"],
group_by=["primary_location_id"],
include_metrics=[med_bs]
).to_pandas() |
This issue is also related to "Add 'event_id` column" #227 |
Here's an example of a single site evaluation of rainfall-driven runoff events: https://github.com/jarq6c/little_hope/blob/main/teehr-events/single_site.ipynb
The goal of this evaluation was to isolate likely periods of streamflow rise and recession associated with discrete rainfall events (i.e. not snowmelt, reservoir releases, glacial dam breaks, effluent releases, etc), and compute the median event peak streamflow bias (signed error) of the retrospective simulation.
The steps were as follows:
teehr
to retrieve NWM v3.0 simulation data and USGS observationshydrotools
event detection to generate a dataframe of start and end times for each event in the observationsI was planning to use the NLDI to get basin boundaries to compute mean areal precipitation from AORC. I'm also interested in comparing the AORC MAP to the data from the USGS rain gauge that's in this catchment (351104080521845). The ultimate goal of acquiring the rain data is to compute storm total precipitation and event based runoff efficiencies.
I'm still trying to figure out how to use
teehr
to acquire AORC data. Any insight or recommendations on how to improve this process would be welcome.The text was updated successfully, but these errors were encountered: