[Thread Prev][Thread Next][Index]

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

Dear Ferret users,

I am trying to create a sample file for temperature and zonal velocity by using Julian calendar with units as days. Follwing script works fine but there is a small issue. I need the increment (delta) in define statement to be exact number of days (Jan=31, Feb=28 or 29 and so on) instead of fixed 31 that I am using currently. Can you please help me to modify my script in order to fulfil the requirement.



!********************************Script to create a dummy netcdf file

define the axes and grids
! temperature axes
define axis/x=130e:80w:2/unit="degrees" xt
define axis/y=20s:20n:2/unit="degrees" yt

! velocity axes (staggered relative to temperature)
define axis/x=131e:79w:2/unit="degrees" xu
define axis/y=19s:21n:2/unit="degrees" yu

! time axis
define axis/t="16-jan-1850:00:00":"16-dec-2013:00:00":31/calendar=julian/unit="days" time
! define the grids
define grid/x=xt/y=yt/t=time gt
define grid/x=xu/y=yu/t=time gu

! define the (dummy) variables
let u = SIN((x[g=gu]+y[g=gu]+t[g=gu])/100)
let temp = SIN((x[g=gt]+y[g=gt]+t[g=gt])/100)
set variable/title="Temperature"/units="centigrade" temp
set variable/title="Zonal Velocity"/units="m/sec" u
! create the template NetCDF file
save/file=template.cdf temp,u

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

Privacy Policy | Disclaimer | Accessibility Statement