ecmwf/cfgrib

Get Time 1 not 2 from GFS APCP

support2019mp opened this issue · 1 comments

Hi! I'm trying to get data from a GFS APCP (Total Precipitation 'tp' accum),
but only can access to time 2.
Time 1 have the accumulated precipitation from RUN hour to the forecast hour.
For example for 06Z , time 1 shows tha acumulated precipitation from 00 to 06.
Time 2 have the accumulated fomr the sinoptic hour until the forecast hour.
For example, 17Z have the precipitation from 12 to 17.
With:
backend_kwargs = {'filter_by_keys': {'stepType':'accum'},'indexpath': ''}
ds = xr.open_dataset(file_path , engine="cfgrib" , backend_kwargs=backend_kwargs)
only can be read time 2, not time 1.
Please, how could I read time 1 grib?
Thank you

Hi @support2019mp,

Perhaps the time_dims argument could help you? Try experimenting with it!
See https://github.com/ecmwf/cfgrib/blob/master/CHANGELOG.rst#0973-2019-11-04

Cheers,
Iain