Fix arctic_hydrology climatology Blaskey-adjusted JSON vs. original GCM CSV discrepancies - #737
Merged
Conversation
cstephen
marked this pull request as draft
July 31, 2026 19:36
cstephen
marked this pull request as ready for review
August 4, 2026 20:25
charparr
self-requested a review
August 11, 2026 18:20
charparr
approved these changes
Aug 11, 2026
charparr
left a comment
Member
There was a problem hiding this comment.
I've tested the JSON and CSV routes for a few different IDs, both CONUS and AK, and can verify they are aligned in terms or structure, numerical content, and associated metadata.
Member
|
Note the test failures here are just referencing missing env vars for kuti, so can disregard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the discrepancy in values between outputs of these two URLs (for example):
http://localhost:5000/arctic_hydrology/modeled_climatology/81009008
http://localhost:5000/arctic_hydrology/modeled_climatology/81009008?format=csv
The problem was that the
gcm_diff_applied_to_blaskeyadjustment was being done after the CSV export code, not before, for both themodeled_climatologyandwt_modeled_climatologyendpoints.I've also added a couple chunks of code to move the "historical" model above the projected models in the CSVs to make them more intuitive and consistent with our other CSVs.
To test, I pointed the hydroviz webapp at this
json_csv_discrepancyData API branch and disabled LOWESS smoothing + enabled hovermode to cross reference values from the hydrographs & water temperature hydrographs with their corresponding CSVs to make sure that the same values appear on the same dates. I also cross-referenced a handful of flow & temperature stat table values against their corresponding CSVs. Everything is as expected!