Hi David,
Thanks for writing. First, we should add PROLEPTIC_GREGORIAN as one of
the calendars Ferret recognizes, as the default calendar Ferret uses IS
a Proleptic Gregorian calendar!
Unfortunately, the way Ferret currently treats this calendar, we can't
fix up the axis quite as simply as you suggest, but we can do it. When
Ferret reads in the header of the file, it saves the attributes of the
coordinate variable TIME, and we can use these to
redefine the axis
correctly.
yes? sh att/all (time)
attributes for dataset:
http://esgcet.llnl.gov/cgi-bin/dap-cgi.py/ipcc4/20c3m/giss_aom/pcmdi.ipcc4.giss_aom.20c3m.run1.atm.mo.xml
(time).units = DAYS since 1-JAN-1850:00:00
(time).bounds = time_bnds
(time).orig_file_axname = time
(time).time_origin = 1-JAN-1850:00:00
yes? define axis/t/units=days/t0="1-jan-1850:00:00"
`tauu,return=taxis` = t[gt=time]
yes? sh grid tauu
GRID GJJ3
name axis # pts start end
LON LONGITUDE 90mr 2E 2W
LAT LATITUDE 60 r 88.5S 88.5N
normal Z
TIME TIME 1812 r 02-JAN-1850 00:00 18-DEC-1854
00:00
Now, notice that when we say the time origin is 'days since
1-jan-1850', then the first time step of 1 represents 2-jan-1850. If
you think that the intent was for the first step to be on 1-jan-1850,
then you could use (t[gt=time]-1) in the right hand side of the
definition above.
David Wang wrote:
Hi
Ferreters,
I was accessing a
remote opendap dataset whose calendar attribute is not compatible with
Ferret (PROLEPTIC_GREGORIAN). I was trying to set the calendar
attribute ad hoc by using SET AXIS/CALENDAR but with no luck. Before
going ahead with manually defining a new time axis, I wonder if there
is a quick and dirty trick for this. Here is an illustrative example:
yes? use "http://esgcet.llnl.gov/cgi-bin/dap-cgi.py/ipcc4/20c3m/giss_aom/pcmdi.ipcc4.giss_aom.20c3m.run1.atm.mo.xml"
*** NOTE: calendar
attribute on axis "TIME" is not recognized: PROLEPTIC_GREGORIAN
*** NOTE: Valid
calendars are GREGORIAN NOLEAP JULIAN 360_DAY ALL_LEAP
*** NOTE: A dummy
axis of subscripts will be used
*** NOTE: Units on
axis "plev" are not recognized: Pa
*** NOTE: They
will not be convertible:
*** NOTE: netCDF
bounds variable definition error
*** NOTE: Bounds
"lat_bnds" must be 2x dimension of lat_59
*** NOTE: Ignoring
BOUNDS attribute
*** NOTE:
unsupported ordering of axes in variable lon_bnds_180
*** NOTE: The
default ordering will be used
yes? set
axis/calendar=gregorian `tauu,return=taxis`
!-> set
axis/calendar=gregorian TIME
yes? show grid tauu
GRID GJJ3
name
axis # pts start end
LON
LONGITUDE 90mr 2E 2W
LAT
LATITUDE 60 r 88.5S 88.5N
normal Z
time
T 1812 r 1 1812
Thanks,
David