Project

General

Profile

Reading Seasonal Grib Data from Global Wildfire fails

Added by Chris Barnard about 1 month ago

cdo infov 20170101_12.grib
ECCODES ERROR : Invalid unit: -1 (Unit not found _Map_base::at). Available units are: s,m,15m,30m,h,3h,6h,12h,D,M,Y,10Y,30Y,C
!!! failed call to grib_set_long( grib_handle* h, "stepUnits", -1) !!!
/etc/ecmwf/ssd/ssd1/tmpdirs/deploy.36546842/eci-builds/cdo-2.3.0-build-GNU8.5/cdo-2.3.0/libcdi/src/stream_gribapi.c at line 91: my_grib_set_long(gh, "stepUnits", unitsOfTime) failed: Invalid argument

The stepUnits is set in the grib file so not sure why CDO is attempting to grib_set this value?

grib_dump 20170101_12.grib | grep step # Hour (stepUnits.table)
stepUnits = 1;


Replies (3)

RE: Reading Seasonal Grib Data from Global Wildfire fails - Added by Chris Barnard about 1 month ago

https://github.com/AZed/cdo/blob/214cb1461beba2dba9848e393427d34f403caec4/libcdi/src/stream_gribapi.c#L177

int gribapiGetTimeUnits(grib_handle *gh) {
int timeunits = -1;
long unitsOfTime = -1;
grib_get_long(gh, "indicatorOfUnitOfTimeRange", &unitsOfTime);
GRIB_CHECK(my_grib_set_long(gh, "stepUnits", unitsOfTime), 0);
timeunits = getTimeunits(unitsOfTime);
return (timeunits);
}

The Template used for this product does not contain indicatorOfUnitOfTimeRange as it is using a local time template.
So it retrieves -1 and -1 attempts to be set into the grib file. But it should not.

RE: Reading Seasonal Grib Data from Global Wildfire fails - Added by Uwe Schulzweida about 1 month ago

Thanks for this report! We will fix the problem in the next CDO release.

RE: Reading Seasonal Grib Data from Global Wildfire fails - Added by jh f sdfs 1 day ago

Beyond their utilitarian function, cowboy boots symbolize a connection to history and a reverence for the rugged spirit of the West https://mencowboyboots.co.uk/. By embracing cowboy boots, individuals can embrace a sense of nostalgia and belonging, honoring the timeless traditions of the cowboy way of life.

    (1-3/3)