Re: clmMon2clmDay

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Sat Sep 28 2013 - 10:27:22 MDT

The function uses the day of the year. It does not use
calendar date. ie: It does not look for 29 Feb

X [day | 365] x [lat | 64] x [lon | 128]

If you want

XX [day | 366] x [lat | 64] x [lon | 128]

    dimX = dimsizes( X )
    dimXX = dimX
    dimXX(0) = 366

    rankX = dimsizes(dimX))

    XX = new ( dimXX, typeof(X), getFillValue(XX) )

    if (rankX.eq.3) then
        XX(0:364,:,:) = (/ X /)
        XX( 365,:,:) = (X(0,:,:) + X(364,:,:))*0.5
        copy_VarCoords(X(0,:,:), XX(0,:,:))
    end if

    if (rankX.eq.4) then
        XX(0:364,:,:,:) = (/ X /)
        XX( 365,:,:,:) = (X(0,:,:,:) + X(364,:,:,:))*0.5
        copy_VarCoords(X(0,:,:,:), XX(0,:,:,:))
    end if

    delete(X)

On 9/28/13 8:13 AM, 戴国锟 wrote:
> hello,
> I'm calculating the daily geopotential height anomaly using the function
> clmMon2clmDay, but this function returns a year with 365 days. What to do
> with the leap year?
> Thank you.
>
> Dai Guokun
>
>
>
> _______________________________________________
> 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 Sat Sep 28 10:27:29 2013

This archive was generated by hypermail 2.1.8 : Tue Oct 01 2013 - 14:41:43 MDT