We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi all, I am experiencing interesting behavior when opening a GEM global 25km resolution grib files using pynio.
ds=xr.open_dataset('CMC_glb_TMP_ISBL_700_latlon.24x.24_2020050600_P198.grb',engine='pynio') print(ds)
<xarray.Dataset> Dimensions: (lat_0: 751, lon_0: 1500) Coordinates: lat_0 (lat_0) float32 -90.0 -89.76 -89.52 ... 89.52 89.76 90.0 lon_0 (lon_0) float32 180.0 180.24 180.48 ... 539.52 539.76 Data variables: TMP_P0_L100_GLL0 (lat_0, lon_0) float32 ... print(ds['lon_0']) <xarray.DataArray 'lon_0' (lon_0: 1500)> array([180. , 180.24, 180.48, ..., 539.28, 539.52, 539.76], dtype=float32) Coordinates: lon_0 (lon_0) float32 180.0 180.24 180.48 180.72 ... 539.28 539.52 539.76 Attributes: long_name: longitude grid_type: Latitude/Longitude units: degrees_east Dj: [0.24] Di: [0.24000001] Lo2: [179.76] La2: [90.] Lo1: [180.] La1: [-90.]
Notice that the range for lon_0 is 180->539.76. When I open using cfgrib as the xarray engine:
ds=xr.open_dataset('CMC_glb_TMP_ISBL_700_latlon.24x.24_2020050600_P198.grb',engine='cfgrib') print(ds['longitude'])
<xarray.DataArray 'longitude' (longitude: 1500)> array([-180. , -179.76, -179.52, ..., 179.28, 179.52, 179.76]) Coordinates: time datetime64[ns] ... step timedelta64[ns] ... isobaricInhPa int64 ... longitude (longitude) float64 -180.0 -179.8 -179.5 ... 179.5 179.8 valid_time datetime64[ns] ... Attributes: units: degrees_east standard_name: longitude long_name: longitude
Therefore, it appears 'cgfrib' shows the longitude correctly while 'pynio' does not.
# Your code here
The text was updated successfully, but these errors were encountered:
Can you check if the file is read properly using only pynio? i.e. remove xarray from the equation here.
pynio
Sorry, something went wrong.
Good question, actually it appears that this is occurring in pynio without the use of xarray:
ds=Nio.open_file('CMC_glb_TMP_ISBL_700_latlon.24x.24_2020050600_P198.grb') ds.variables['lon_0'].get_value()
gives a result of:
array([180. , 180.24, 180.48, ..., 539.28, 539.52, 539.76], dtype=float32)
Ah thanks for checking. I would raise an issue over at pynio then.
Will do, thanks!
No branches or pull requests
Hi all, I am experiencing interesting behavior when opening a GEM global 25km resolution grib files using pynio.
Notice that the range for lon_0 is 180->539.76. When I open using cfgrib as the xarray engine:
Therefore, it appears 'cgfrib' shows the longitude correctly while 'pynio' does not.
MCVE Code Sample
# Your code here
Expected Output
Problem Description
Versions
Output of xr.show_versions()
The text was updated successfully, but these errors were encountered: