Hi NCL,
I want to create a 3-hourly time array for the period 1948-2099. I wrote a
script, appended below, that creates daily time step. Could you help to
extend this to 3-hourly series.
Thanks,
Noel
;************************************************************************
start_year1 = 1948
end_year1 = 2099
nyears1 = (end_year1 - start_year1) + 1 ; no. of sim. years
years1 = ispan(start_year1,end_year1,1) ; sim. years sequence
nleap1 = num(isleapyear(ispan(start_year1,end_year1,1))) ; no. of leap
years
ntim1 = ((nleap1*366) +(nyears1-nleap1)*365) * 8 ; no. of time steps
date1 = new (ntim1, integer, "No_FillValue")
nmos = 12 ; no. of months
hrs = (/03,06,09,12,15,18,21,24/)
n = 0
do ny=start_year1,end_year1
do nmo=1,nmos
YRM = ny*10000 + nmo*100
ndm = days_in_month(ny,nmo)
date1(n:n+ndm-1) = YRM + ispan(1,ndm,1)
n = n + ndm
end do
end do
;************************************************************************
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Oct 25 08:19:09 2012
This archive was generated by hypermail 2.1.8 : Wed Oct 31 2012 - 09:14:12 MDT