Project

General

Profile

problems with selname/seldate (bug?)

Added by alberto maurizi about 10 years ago

I've found this strange behaviour: if I execute

cdo seldate,2014-03-03T12:00:00,2014-04-03T00:00:00 -selname,param8.1.0 00/globo_2014030200_00.grib2 qaz.grib2

I obtain something different from

cdo seldate,2014-03-03T12:00:00,2014-04-03T00:00:00 00/globo_2014030200_00.grib2 qq.grib2
cdo selname,param8.1.0 qq.grib2 zaq.grib2

in particular, the second seems correct while the first gives wrong dates.
Although selected dates are between 2014-03-03T12:00:00 and 2014-04-03T00:00:00, resulting dates are:

cdo sinfo qaz.nc
[...]
RefTime = 2014-03-02 00:00:00 Units = minutes Calendar = proleptic_gregorian
YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss
2014-05-31 00:00:00 2014-06-30 00:00:00 2014-07-30 00:00:00 2014-08-29 00:00:00
2014-09-28 00:00:00 2014-10-28 00:00:00 2014-11-27 00:00:00 2014-12-27 00:00:00
2015-01-26 00:00:00 2015-02-25 00:00:00 2015-03-27 00:00:00 2015-04-26 00:00:00
2015-05-26 00:00:00 2015-06-25 00:00:00 2015-07-25 00:00:00 2015-08-24 00:00:00
2015-09-23 00:00:00 2015-10-23 00:00:00 2015-11-22 00:00:00 2015-12-22 00:00:00
2016-01-21 00:00:00 2016-02-20 00:00:00 2016-03-21 00:00:00 2016-04-20 00:00:00
2016-05-20 00:00:00 2016-06-19 00:00:00 2016-07-19 00:00:00 2016-08-18 00:00:00
2016-09-17 00:00:00 2016-10-17 00:00:00 2016-11-16 00:00:00 2016-12-16 00:00:00
2017-01-15 00:00:00 2017-02-14 00:00:00 2017-03-16 00:00:00 2017-04-15 00:00:00
2017-05-15 00:00:00 2017-06-14 00:00:00 2017-07-14 00:00:00 2017-08-13 00:00:00
2017-09-12 00:00:00 2017-10-12 00:00:00 2017-11-11 00:00:00 2017-12-11 00:00:00
2018-01-10 00:00:00 2018-02-09 00:00:00 2018-03-11 00:00:00 2018-04-10 00:00:00
2018-05-10 00:00:00 2018-06-09 00:00:00 2018-07-09 00:00:00 2018-08-08 00:00:00
2018-09-07 00:00:00 2018-10-07 00:00:00 2018-11-06 00:00:00 2018-12-06 00:00:00
2019-01-05 00:00:00 2019-02-04 00:00:00 2019-03-06 00:00:00 2019-04-05 00:00:00
2019-05-05 00:00:00 2019-06-04 00:00:00

BTW, the original file only contains days between february and april 2014


Replies (1)

RE: problems with selname/seldate (bug?) - Added by Uwe Schulzweida about 10 years ago

CDO does not change any bit of a GRIB record if you are using one of the CDO select operator. This is totally different if you combine CDO operators. In this case the all GRIB records are decoded and encode. This could change some of the metadata because CDO does not support the full GRIB standard. The wrong dates in your results are a bug in the GRIB2 encoding of dates where the units are not hours. This bug is already fixed for the next CDO release.

    (1-1/1)