I download a GRIB2 file from NOAA's National Blend of Models from NOMADS and plotted some fields. It looks like the data is written backwards in some rows! Can cfgrib fix this and read the lines correctly? Here is an example of 2-m temperature
import xarray as xr
import cfgrib
import urllib
# to reproduce, you'll need to change the URL to a recent path from
# https://nomads.ncep.noaa.gov/pub/data/nccf/com/blend/prod/
url = 'https://nomads.ncep.noaa.gov/pub/data/nccf/com/blend/prod/blend.20210728/00/core/blend.t00z.core.f001.co.grib2'
file = url.split('/')[-1]
urllib.request.urlretrieve(url, file)
z = xr.open_dataset(
file,
engine='cfgrib',
backend_kwargs={'filter_by_keys': {'shortName': '2t', 'typeOfLevel': 'heightAboveGround'}}
)
z.t2m.plot(x='longitude', y='latitude')
z.t2m.plot()
I download a GRIB2 file from NOAA's National Blend of Models from NOMADS and plotted some fields. It looks like the data is written backwards in some rows! Can cfgrib fix this and read the lines correctly? Here is an example of 2-m temperature