Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove pygrib as a dependency; manually parse coordinate reference system from eccodes keys #403

Merged
merged 18 commits into from
Feb 5, 2025

Conversation

blaylockbk
Copy link
Owner

@blaylockbk blaylockbk commented Jan 16, 2025

I was having issues with pygrib after its latest release (something to do with numpy 2+ releases). Pygrib was working fine on my personal computer, but I was getting segmentation faults in my GitHub Actions tests. I decided to drop pygrib as a dependency since I was only using it to parse the coordinate reference system (CRS) when loading the data into xarray. It's not too painful to just parse the CRS info (in CF-compliant form) from what cfgrib can provide. I wish cfgrib would handle the CF grid specification itself (ecmwf/cfgrib#251) but I can let Herbie do it for now. Maybe I'll contribute to cfgrib if I have some free time.

  • Remove pygrib as a dependency.
  • Manually parse coordinate reference system (CRS) details for pyproj, then convert to CF convention.
  • Am I getting enough data needed to parse crs from all the models Herbie supports???
  • Updated pinned dependencies (e.g., numpy>=2.2.1). I don't know if this is a good thing yet. I could relax if people complain. It may make using xesmf un-usable until development on numba catches up to the latest numpy releases.

Also, fixed the GitHub Actions tests!

@blaylockbk blaylockbk linked an issue Jan 16, 2025 that may be closed by this pull request
@blaylockbk blaylockbk merged commit a96cbf5 into main Feb 5, 2025
8 checks passed
@conbrad
Copy link

conbrad commented Feb 5, 2025

Thank you for addressing this, we ran into this issue too running on Linux containers and would have contributed but were just as puzzled. Likely a memory issue in pygrib so I like this solution!

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.

CI: Why are tests failing
2 participants