[Thread Prev][Thread Next][Index]

Re: [ferret_users] Writting a sample netcdf file with Julian calendar (unit=days)



After working with this outside of the Ferret List, I've found a way to add the Julian calendar to the script  def_monthaxis_days.jnl, which Patrick Brockmann contributed some time ago, and which previously worked with all of the calendars except for Julian.  The idea is to start with the 4-year cycle of month lengths in the Julian calendar, and use that to set up a sequence of coordinates that starts in the requested year. This updated script will be part of future Ferret releases, and if you would like to try it now, it's attached here.

For example,

yes? go/help def_monthaxis_days.jnl

!**************************************************************
! Description: Define a time axis in days in specific calendar 
!              Each grid cell begins at first of the month
!              Axis coordinates are at the middle of each month
!
! Usage: go def_monthaxis_days.jnl calendar year_start year_end [axis_name] [year_ref]
!
...

yes? go def_monthaxis_days  Julian 1850 2013 time 1800

 name       axis              # pts   start                end
 TIME      TIME              1968 i   16-JAN-1850 12:00    16-DEC-2013 12:00
T0 = 1-JAN-1800:00:00
CALENDAR = JULIAN
   Axis span (to cell edges) = 59901

yes? list/prec=7/t=1-jan-2012:31-dec-2013 t[gt=time]
             VARIABLE : T
                        axis TIME
             SUBSET   : 24 points (TIME)
             CALENDAR : JULIAN
 16-JAN-2012 12 / 1945:  77448.50
 15-FEB-2012 12 / 1946:  77478.50
 16-MAR-2012 12 / 1947:  77508.50
 16-APR-2012 00 / 1948:  77539.00
 16-MAY-2012 12 / 1949:  77569.50
 16-JUN-2012 00 / 1950:  77600.00
 16-JUL-2012 12 / 1951:  77630.50
 16-AUG-2012 12 / 1952:  77661.50
 16-SEP-2012 00 / 1953:  77692.00
 16-OCT-2012 12 / 1954:  77722.50
 16-NOV-2012 00 / 1955:  77753.00
 16-DEC-2012 12 / 1956:  77783.50
 16-JAN-2013 12 / 1957:  77814.50
 15-FEB-2013 00 / 1958:  77844.00
 16-MAR-2013 12 / 1959:  77873.50
 16-APR-2013 00 / 1960:  77904.00
 16-MAY-2013 12 / 1961:  77934.50
 16-JUN-2013 00 / 1962:  77965.00
 16-JUL-2013 12 / 1963:  77995.50
 16-AUG-2013 12 / 1964:  78026.50
 16-SEP-2013 00 / 1965:  78057.00
 16-OCT-2013 12 / 1966:  78087.50
 16-NOV-2013 00 / 1967:  78118.00
 16-DEC-2013 12 / 1968:  78148.50


Attachment: def_monthaxis_days.jnl
Description: Binary data


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement