Share streamflow statistics table and add climate model tables to hydrology docs - #736
Conversation
Replace the two separately maintained "Available Streamflow Statistics" tables in the CONUS and Arctic hydrology documentation with a single shared Jinja fragment (streamflow_stats_table.html) included by both pages. The shared table incorporates the full statistic definitions from the hydroviz preprocessing stat_vars_dict: complete descriptions, category (duration/frequency/magnitude/rate of change/timing), difference method (ratio vs. absolute, relevant to interpreting ?source=gcm_diff output), and units. The ma99 row, which is served by the API but absent from stat_vars_dict, is retained using its description from the CSV metadata. Two source-text glitches were fixed in passing: a duplicated sentence in the dh4 description and a copy/paste error in spr_mag that referred to MH20. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Relocate the shared streamflow statistics table (and the Arctic water temperature statistics table) from the bottom of the page to directly after the introduction, ahead of the endpoint and output documentation. Also reformats both templates with prettier. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a fragment listing the 13 CMIP5 GCMs used for the CONUS hydrology dataset, included directly above the shared streamflow statistics table. Model names, modeling centers, and available RCP scenarios come from the gcm_metadata_dict in the hydroviz preprocessing pipeline (the Maurer historical baseline is described in the page intro and is not listed as a climate model). Two typos in the source dict were fixed in passing (Administration, Geophysical). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a fragment listing the six downscaled model runs used for the Arctic hydrology dataset (four CESM2 Large Ensemble members under SSP3-7.0 and two pseudo-global warming runs derived from SSP2-4.5), included directly above the shared streamflow statistics table, mirroring the CONUS docs page structure. Run names and descriptions come from the model axis metadata of the ak_hydro_segments rasdaman coverages. The ERA5-forced Blaskey hindcast (the "historical" model key) is described in the fragment intro rather than listed as a climate model. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
cstephen
left a comment
There was a problem hiding this comment.
I added a commit to replace - with a comma in the stat table unit descriptions. Since these descriptions often describe the math involved in calculating each statistic, the - used as a separator can easily be mistaken for a subtraction operation. These were lifted from the CSV metadata descriptions where we need to be careful about using commas, but there's no such problem for the HTML documentation.
For example, this:
(number of days/year - temporal)
Was changed to this:
(number of days/year, temporal)
I also spot checked the new information about models, scenarios, etc. that were added to the documentation vs. the source of this new information (as described in the PR description) to make sure it was correct. I found no errors. This new information looks good and is valuable for the people who want to know it, without cluttering the hydroviz webapp itself.
Summary
Documentation-only changes to the
/conus_hydrologyand/arctic_hydrologydocs pages:templates/documentation/streamflow_stats_table.html) included by both pages. The table incorporates the full statistic definitions from the hydroviz preprocessingstat_vars_dict: complete descriptions plus new Category and Difference method columns (the latter tells users whether?source=gcm_diffvalues are ratios or absolute differences, previously only findable in the source data release).conus_models_table.html): the 13 CMIP5 GCMs with modeling center and available RCP scenarios, from the hydrovizgcm_metadata_dict. ACCESS1-0 and BNU-ESM only have RCP 4.5/8.5.arctic_models_table.html): the six downscaled runs (CESM2-LE members 2/4/7/9 under SSP3-7.0; PGWh/PGWm derived from SSP2-4.5), from theak_hydro_segmentsrasdaman coverage model-axis metadata.Notes
ma99is kept in the stats table (served by the API but absent fromstat_vars_dict), using its description from the CSV metadata incsv_functions.py.dh4description,spr_magreferring to MH20, and two typos ("Adminstration", "Gephysical").Manual testing
dh2,ma99,spr_mag) against the JSON metadata returned by/conus_hydrology/stats/50563and/arctic_hydrology/stats/81000004.🤖 Generated with Claude Code