[Thread Prev][Thread Next][Index]
[ferret_users] Wrong time issue with T0="01-jan-0001 00:00" ?
Hi,
I use Ferret V6.08 and I have a strange issue with time axis when T0 is
like "01-jan-0001 00:00".
I use a netcdf field LANDSFC from NCEP Reanalysis and I would like to copy
and shift in time the field with ferret.
In the original NCEP field, Torigin is "01-jan-0001 00:00", Tunits="days"
and i keep the same Torigin and Tunits for the new time shifted axis
definition.
But If I check out with "ncdump -v TIME", i found a 2 days shift.
I try CALENDAR options in DEFINE AXIS/T but without success.
Should I take some special care when i play with data field with
T0="01-jan-0001 00:00" from NCEP ?
Many thanks
J. Lefevre
Please find below how to reproduct my trouble :
CA/ALL DA
CA/ALL VA
CA/ALL REGION
SET DATA
"http://nomad1.ncep.noaa.gov:9090/dods/reanalyses/reanalysis-2/6hr/flx/flx"
LIST/FORMAT=CDF/FILE="LANDSFC_20070103_00z.cdf"/x=160E:163E/y=25S:23S/t="03-jan-2007
00:00" LANDSFC
sp ncdump -v TIME LANDSFC_20070103_00z.cdf
! you should see :
! double TIME(TIME) ;
! TIME:units = "days since 0001-01-01 00:00:00" ;
! TIME:long_name = "time" ;
! TIME:time_origin = "01-JAN-0001 00:00:00" ;
! TIME:axis = "T" ;
! // snipped //
! data:
! TIME = 732680 ;
!}
CA/ALL DA
! Load again LANDSFC and do 7 days shift
DEFINE SYMBOL my_NEW_DATE = "10-jan-2007 00:00"
SET DATA LANDSFC_20070103_00z.cdf
DEFINE SYMBOL UNITS = `LANDSFC,return=tunits`
DEFINE SYMBOL T0 = `LANDSFC,return=t0`
DEFINE AXIS/T/T0="($T0)"/T=($my_NEW_DATE)/NPOINT=1/unit="($UNITS)" T_AXE
LET LANDSFC_RG =
reshape(LANDSFC[d=1],x[gx=LANDSFC,d=1]+y[gy=LANDSFC,d=1]+t[gt=T_AXE])
LIST/CLOBBER/FORMAT=CDF/FILE="LANDSFC_20070110_00z.cdf" LANDSFC_RG
SP ncrename -d T_AXE,TIME -v T_AXE,TIME -v LANDSFC_RG,LANDSFC
LANDSFC_20070110_00z.cdf
SP ncdump -v TIME LANDSFC_20070104_00z.cdf
! you should see :
! double TIME(TIME) ;
! TIME:units = "DAYS since 0001-01-01 00:00:00" ;
! TIME:axis = "T" ;
! TIME:time_origin = "01-JAN-0001 00:00:00" ;
! // snipped //
! data:
! TIME = 732685 ; < - WRONG, SHOULD BE 732687 !
!}
PAUSE
CA/ALL DA
CA/ALL VA
USE LANDSFC_20070103_00z.cdf
USE LANDSFC_20070110_00z.cdf
sho grid LANDSFC[d=1]
! TIME TIME 1 r 03-JAN-2007 00:00 03-JAN-2007 00:00
sho grid LANDSFC[d=2]
! TIME1 TIME 1 r 08-JAN-2007 00:00 08-JAN-2007 00:00
??
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Privacy Policy | Disclaimer | Accessibility Statement