a(365,nlat,mlon)
b = new( (/366,nlat,mlon/),typeof(a))
b(0:364,:,:) = (/ a /)
b(365,:,:) = (a(0,:,:) + a(364,:,:))*0.5
b!0 = "time"
b&time = ispan(1,366,1) ; or ispan(0,365,1)
copy_VarCoords(a(0,:,:), b(0,:,:))
printVarSummary(b)
On 6/20/12 5:00 AM, 김인원 wrote:
> hello. Dennis
>
> I'm trying to crate a daily climatology from a monthly climatology using
> the clmMpn2clmDay.
>
> I have to consider leap year (366 days).
>
> But returned array has the fixed dimension as size 365 in case of
> clmMon2clmDay.
>
> How do I modified the code to make the dimension as size 366?
>
> ====================================================
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>
> begin
>
> fP = addfile("./amipobs_sst_360x180_1992.nc
> <http://amipobs_sst_360x180_1992.nc/>","r")
>
> xMon = fP->tos
> xDay = clmMon2clmDay(xMon, 0, 0)
>
> printVarSummary (xMon)
> printVarSummary (xDay)
>
> end
>
> --
> --
> In-Won Kim
> Intergrated Climate System Modeling Lab.
> Department of Environmental Atmospheric Sciences
> 599-1 Daeyeon-dong, Nam-gu
> Pukyong National University,
> Busan, S.Korea
>
> Tel. +82-51-629-6643
> Fax +82-51-629-7991
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jun 20 07:56:12 2012
This archive was generated by hypermail 2.1.8 : Mon Jun 25 2012 - 09:57:23 MDT