[Thread Prev][Thread Next][Index]

Re: Percent signs in strings...



> Have a look at the Ferret FAQ:
> http://ferret.wrc.noaa.gov/Ferret/FAQ/data_management/equal_months.html
> That particular FAQ deals with years of length 360 days, but the
> techniques work as well for 365 day years.

Worked great:
!
set mem/size=64
use 1990-2139_sst.cdf
show data
!
! Define grid of 150 years each exactly 365 days long
!
define axis/t=30:54780:365/unit=days tmodel
define grid/t=tmodel gmodel
!
! Define grid of 1801 "months"
define axis/t=15-jan-1990:15-jan-2139/npoints=1801 tcalendar
define grid/like=gmodel/t=tcalendar gcalendar
!
! Assign SST data to new grid - since there's only 1800 points
! (despite grid being set to 1801 points) it uses only the
! actual data
!
let sstf = sst[g=gcalendar@asn,l=1:450]
save/clobber/file=sstf.nc sstf
let sstf = sst[g=gcalendar@asn,l=451:900]
save/append/file=sstf.nc sstf
let sstf = sst[g=gcalendar@asn,l=901:1350]
save/append/file=sstf.nc sstf
let sstf = sst[g=gcalendar@asn,l=1351:1800]
save/append/file=sstf.nc sstf
quit

Thanks muchly, as always, Steve!

--
Gary Strand
strandwg@ucar.edu                              http://www.cgd.ucar.edu/ccr/gary


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement