fix(usgs_glm): fix ScienceBase User-Agent and URL field (Spike 4)#48
Merged
Conversation
ScienceBase blocks requests without a User-Agent and returns 503 -- this was the root cause of the Spike 4 failures on 2026-06-06. Also corrects the URL field lookup: ScienceBase returns download URLs in the 'url' field, not 'downloadUrl' or 'uri' as the code assumed. All three request sites (manifest, crosswalk, NetCDF zip) are updated. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
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.
Summary
AprovanLabs-DataScience/1.0 (requests)to fix the root cause of Spike 4 failuresurlfield, notdownloadUrloruri— all three call sites updated (manifest fetch, crosswalk CSV, NetCDF zip)Spike 4 findings (APR-181)
ScienceBase status: API catalog endpoint is now reachable (HTTP 200 with proper User-Agent). File downloads are currently returning 503 (separate, transient service issue — not the same as the missing header bug).
Dataset confirmed:
lake_id_crosswalk.csvhasMNDOW_IDcolumn → maps MN DOW IDs to USGSsite_id(NHD format)lake_temp_preds_GLM_NLDAS.zip(~3.9 GB) contains depth-resolved daily predictions 1979–2022Comparison — ScienceBase GLM vs Planetary Computer STAC:
Recommendation: Use ScienceBase GLM for historical trend charts (complete, no gaps, depth-resolved). Continue using STAC for recent/live surface temperature observations. These are complementary, not competing.
Test plan
fetch_from_sciencebase()reaches ScienceBase catalog without 503🤖 Generated with Claude Code