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

Bad gridlengthXDirection when reading gaussian grid #123

Closed
alcoat opened this issue Jan 17, 2024 · 2 comments · Fixed by #124
Closed

Bad gridlengthXDirection when reading gaussian grid #123

alcoat opened this issue Jan 17, 2024 · 2 comments · Fixed by #124
Assignees
Labels
bug Something isn't working

Comments

@alcoat
Copy link
Contributor

alcoat commented Jan 17, 2024

Input files could be CSFR V2 or any CFS forecast or may be any files with a gaussian grid

import grib2io
file = "flxf2024011700.01.2024011700.grb2"
g = grib2io.open(file)
msg = g.select(shortName='UGRD')[0]
print(msg.gridlengthXDirection)
  • Problem description: the result is 938.0 !
  • Expected output : 0.938
  • Plateform: Linux / conda
  • Versions:
    • Python 3.11.7
    • grib2io 2.1.2

This issue is leading to an error in the xarray backend as the dimension of longitude is not correct using the msg.grid() method.

@EricEngle-NOAA EricEngle-NOAA self-assigned this Jan 17, 2024
@EricEngle-NOAA EricEngle-NOAA added the bug Something isn't working label Jan 17, 2024
@EricEngle-NOAA
Copy link
Collaborator

Thanks for reporting. I can confirm the issue. I have identified the issue and a solution is working. This also led me to discover a missing attribute for messages with Gaussian grids and is a fairly important one, the number of parallels.

v2.1.3 coming in the next few hours with this fix.

EricEngle-NOAA added a commit that referenced this issue Jan 17, 2024
Thie commit fixes an issue generating lats/lons for Gaussian grids and
also adds a missing attribute 'numberOfParallels'.

This commit references issue #123
@EricEngle-NOAA EricEngle-NOAA linked a pull request Jan 17, 2024 that will close this issue
EricEngle-NOAA added a commit that referenced this issue Jan 17, 2024
Thie commit fixes an issue generating lats/lons for Gaussian grids and
also adds a missing attribute 'numberOfParallels'.

This commit references issue #123

Co-authored-by: Eric Engle <[email protected]>
@EricEngle-NOAA
Copy link
Collaborator

v2.1.3 released with the fix for this. It is now available on PyPI and will be available on conda-forge in a few hours.

EricEngle-NOAA added a commit that referenced this issue Jan 17, 2024
Thie commit fixes an issue generating lats/lons for Gaussian grids and
also adds a missing attribute 'numberOfParallels'.

This commit references issue #123

Co-authored-by: Eric Engle <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants