Add 500 hPa geopotential height variable to GEFS datasets#490
Merged
Conversation
…d across all GEFS data periods https://claude.ai/code/session_01LBd3sDwYwxRihWA2hLLnPj
6 tasks
6 tasks
- Add geopotential_height_500hpa data variable to shared GEFS template config
with gefs_file_type="a" (a-files only; 500 hPa not in s-files), correct
grib_description using Pascal units ('50000[Pa] ISBL="Isobaric surface"'),
and index_position=31
- Add "500 mb": "pres_abv700mb" to GEFS_REFORECAST_LEVELS_SHORT so reforecast
URLs resolve to the hgt_pres_abv700mb_* files (500 hPa is not in hgt_pres_*)
- Regenerate zarr templates for both datasets
- Replace single-variable slow tests with 4 comprehensive all-vars integration
tests per dataset: reforecast, pre-v12, current early lead, current later
lead (forecast only); uses source_groups() with full groups per test,
skipping vars absent from the reforecast archive via FileNotFoundError
https://claude.ai/code/session_01LBd3sDwYwxRihWA2hLLnPj
Some variables aren't present in pre-v12 or reforecast GRIB files (e.g. cloud ceiling HGT, PRMSL). Catch FileNotFoundError, ValueError, and AssertionError to skip missing vars rather than failing the test. https://claude.ai/code/session_01LBd3sDwYwxRihWA2hLLnPj
read_rasterio: reforecast pressure-level files (e.g. hgt_pres_abv700mb) are 0.5deg while surface files are 0.25deg. When the reforecast file resolution doesn't match the output grid, reproject it the same way as a/b-files instead of asserting equal shape. This fixes geopotential_ height_500hpa in the GEFSv12 reforecast period (2000-2019). Tests: replace broad exception catches with explicit frozenset allow-lists (_REFORECAST_MISSING_VARS, _PRE_V12_MISSING_VARS) so unexpected failures are caught rather than silently skipped. https://claude.ai/code/session_01LBd3sDwYwxRihWA2hLLnPj
aldenks
commented
Mar 6, 2026
aldenks
commented
Mar 6, 2026
aldenks
commented
Mar 6, 2026
aldenks
commented
Mar 6, 2026
- DRY read_data.py: merge "a"|"b"|"reforecast" into one case with a single reproject block; separate "s" case with assert reader.shape == out_spatial_shape restored - Remove reforecast and pre-v12 forecast download/read tests (dataset starts 2020-10-01 with GEFSv12) - Consolidate current early/later lead forecast tests into one parametrized test with ThreadPoolExecutor over source groups - Add ThreadPoolExecutor parallelism to all analysis download/read tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
This PR adds support for the 500 hPa geopotential height variable to both the GEFS forecast (35-day) and analysis datasets.
Key Changes
Added geopotential_height_500hpa variable configuration in
common_gefs_template_config.pywith:Updated Zarr metadata templates for both datasets:
Extended GRIB level mapping in
gefs_config_models.pyto recognize "500 mb" as a pressure level identifierImplementation Details
https://claude.ai/code/session_01LBd3sDwYwxRihWA2hLLnPj