Re: To create 3-hourly time array

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Oct 25 2012 - 09:19:55 MDT

Did you load contributed.ncl ?

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"

I think it has been in contributed.ncl for ' awhile '

If not, I'll send you the script offline.

D

On 10/25/12 9:16 AM, Noel Aloysius wrote:
> Hi Dennis,
>
> This function is not available in 6.1.0 beta version. Is it possible to
> get a copy of contributed.ncl with this function. Or is there a way around?
>
> Thanks,
> Noel
>
>
>
> On Thu, Oct 25, 2012 at 10:54 AM, Dennis Shea <shea@ucar.edu
> <mailto:shea@ucar.edu>> wrote:
>
> There is an undocumented function in contributed.ncl
>
> function yyyymmddhh_time (yrStrt[1]:integer, yrLast[1]:integer,
> hrStep[1]:integer, TYPE:string)
>
> date1 = yyyymmddhh_time( start_year1, end_year1, 3, "integer")
>
> Cheers
>
>
> On 10/25/12 8:18 AM, Noel Aloysius wrote:
>
> 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
> <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Oct 25 09:20:17 2012

This archive was generated by hypermail 2.1.8 : Wed Oct 31 2012 - 09:14:12 MDT