I would like to extract at
ISO 8601 format start date and end date of a netcdf file.
Here are simplified lines that illustrate a problem of precision.
yes? define axis/t=1998:2009:1/units=years tyear
yes? let a=t[gt=tyear]
yes? say `a, return=tstart`
!-> MESSAGE/CONTINUE 1998
1998
---> ok
yes? define axis/t=1998:2009:1/units=years/t0=01-JAN-0000 tyear
yes? let a=t[gt=tyear]
yes? say `a, return=tstart`
!-> MESSAGE/CONTINUE 1997-12-31 12:21:36
1997-12-31 12:21:36
---> why this 1997-12-31 ???
Attached a netcdf file where the problem exists.
yes? use toto.nc
yes? let a=t[gt=var]
yes? say `a, return=tstart`
!-> MESSAGE/CONTINUE 31-DEC-1949 21:00:00
31-DEC-1949 21:00:00
PS: tested with last 7.6 release
Regards
Patrick
--
Data Analytics and Visualization Engineer / Project Manager
LSCE/IPSL, CEA-CNRS-UVSQ laboratory
LSCE - Climate and Environment Sciences Laboratory
IPSL - Institut Pierre Simon Laplace
--