Skip to content

Conversation

@nate-kean
Copy link
Contributor

@nate-kean nate-kean commented Aug 7, 2025

Description

Fixes code in the GMAO class to allow GMAO.load() to run successfully/without exceptions again.

Motivation and Context

Resolves #755.

How Has This Been Tested?

Makes GMAO pass for the test_scenario_1 end-to-end test introduced in #751.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I have added an explanation of what your changes do and why you'd like us to include them.
  • I have written new tests for your core changes, as applicable.
  • I have successfully ran tests with your changes locally.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

nate-kean and others added 20 commits July 31, 2025 14:00
- `utilFcns.write_weather_vars_to_ds`: annotate number of dimensions
- types: Add generic version of the numpy array helper types so you can annotate an array of booleans as `Array1D[np.bool]`
- Add type annotations to `models.hrrr.get_bounds_indices`
Add tests:
- Reintroduce test_scenario_1
- Parametrize test_scenario_4 for all models
- Finish plumbing out dir arg to AOI classes
- The test in test_HRRR_ztd.py had to be renamed to prevent a name collision

Rename warpedDEM.dem to .rdr, fix test_scenario_1:
There are actually height files in RADAR coordinates, not DEMs in satellite coordinates. "A DEM that has been warped into a height file". This makes that more clear by giving them the file extension typically used for files in RADAR coordinates.

Remove NCMR support, cleanup

Fix type annotation
Incredibly perplexing that this was not failing long ago with an error saying that .bbox does not exist, because it shouldn't. There is nowhere in the problem that sets `.bbox` on a WeatherModel object except in this one line in this function. That one line is the only possibly place it could be set, and yet I observed weather model objects _indeed_ having a .bbox property, and it _wasn't_ (-180, -90, 180, 90).
No idea what to make of that. The program is haunted. But this change makes this function use the property I believe it intended to use.
A weird trick allows you to do this on standard file servers (like portal.nccs.nasa.gov). Without this, the file server has to have extra features installed (a THREADS server).
Found here: pydata/xarray#3653 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] GMAO failing to load data: KeyError f.variables['x']

1 participant