[ncl-talk] Find the seasonal mean

Dennis Shea shea at ucar.edu
Wed May 17 22:44:50 MDT 2017


http://www.ncl.ucar.edu/Document/Functions/Contributed/runave_n_Wrap.shtml

        let x(time,lat,lon)   ->dimension numbers (0,1,2)    .
.            x(time,lev,lat,lon)   ->(0,1,2,3)

   ; compute unweighted seasonal means

    nave = 5   ; 5 months
    opt =  0
    ndim = 0   ; time dimension


    x = *runave_n_Wrap* (x, nave, opt, 3) ; overwrite 'x'
    printVarSummary(x)

    or

    xSea = *runave_n_Wrap* (x, nave, opt, 3) ; new variable
    printVarSummary(xSea)

  ; print source months and seasonal averages

    LAT = ...   ; arbitrary grid point
    LON = ...
    print(x(:,{LAT},{LON})+"   "+xSea(:,{LAT},{LON}) )

---

Assuming the monthly data start in Jan ...

Say you want the M(arch)A(pril)M(ay)J(une)J(uly) means:
Months: Jan=0; Feb=1, Mar=2, April=3, May=4, ....

    x_MAMJJ = xSea(4::12,:,:)   ; extract all M(arch)AMJJ
    printVarSummary(x_MAMJJ)
    print("---")
    print(x_MAMJJ)


On Wed, May 17, 2017 at 10:02 PM, Priyanka Silva <
priyankakeraminiya6 at gmail.com> wrote:

> Hello,
> How can I calculate five month seasonal mean. Month_to_season computes
>  three-month seasonal mean. Is there any other function to calculate 5
> month seasonal mean
>
> Thank you.
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170517/10127e73/attachment.html 


More information about the ncl-talk mailing list