You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe what needs to be done here.
The Pygrib python package has been having build and install problems so we need to find out if cfgrib is better supported and works as well. This is a blocker for the ingest work.
The text was updated successfully, but these errors were encountered:
Reference repo https://github.com/ecmwf/cfgrib. This is very possible and now work is proceeding on making this happen per our discussion in the vxIngest meeting July 25th.
Here are a few notes for processing a test model output file with xarray engine='cfgrib'...
python
import xarray
import cfgrib
# how to get surface variables (level 2 meter typeOfLevel heightAboveGround)...
# ds2 = xr.open_dataset('/opt/data/grib2_to_cb/input_files/2125214000000', engine='cfgrib',backend_kwargs={'filter_by_keys':{'typeOfLevel': 'heightAboveGround', 'stepType':'instant', 'level':2}})
# >>> sorted(ds2.variables ['d2m', 'heightAboveGround', 'latitude', 'longitude', 'pt', 'r2', 'sh2', 'step', 't2m', 'time', 'valid_time']
# ds2.variables['r2']
# ds2.variables['r2'].values
# How to get wind data at 10 m
# >>> dsh = xr.open_dataset('/opt/data/grib2_to_cb/input_files/2125214000000', engine='cfgrib',backend_kwargs={'filter_by_keys':{'typeOfLevel': 'heightAboveGround', 'stepType':'instant', 'level':10}})
# how to get ceiling data
# >>> dsc = xr.open_dataset('/opt/data/grib2_to_cb/input_files/2125214000000', engine='cfgrib',backend_kwargs={'filter_by_keys':{'typeOfLevel': 'cloudCeiling', 'stepType':'instant'}})
# sorted(dsc.variables)
# dsc.variables['cloudCeiling'].dims
# dsc.variables['cloudCeiling'].data
# dsc.coords['latitude']
# dsc.coords['longitude']
Describe what needs to be done here.
The Pygrib python package has been having build and install problems so we need to find out if cfgrib is better supported and works as well. This is a blocker for the ingest work.
The text was updated successfully, but these errors were encountered: