Re: Is there any difference between zonalAve and dim_avg_Wrap?

From: <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Sep 22 2011 - 06:24:10 MDT

"zonalAve" is a historical function. I should be deprecated.
It assumes that the rightmost dimension is 'longitude' (lon)'

If your array is: us(lat,lon,time) and you want a zonal average:
                     0 1 2
(1) us_zave = dim_avg_n_Wrap(us,,1) ; recommended

(2) us_zave = dim_avg(us(us(time|:,lat|;lon|:)) ;make lon rightmost

Good luck

> Hi, all
>
> I used "zonalAve" to calculate the zonal mean for a array of
> us(lat|:,lon|:,time|:), Here below
> is my script:
>
> ..... .................
> printVarSummary(us)
> uzm = zonalAve(us)
> printVarSummary(uzm)
> .........................
>
> and I get the following :
>
> Variable: us
> Type: float
> Total Size: 2004480 bytes
> 501120 values
> Number of Dimensions: 3
> Dimensions and sizes: [lat | 5] x [lon | 144] x [time | 696]
>
> Variable: uzm
> Type: float
> Total Size: 2880 bytes
> 720 values
> Number of Dimensions: 2
> Dimensions and sizes: [lat | 5] x [lon | 144]
>
> Is it necessary to set the longitude as the rightmost dimension for the
> function of
> "zonalAve" ? Is there any difference between zonalAve and dim_avg_Wrap?
> Shoule the instruction in the URL
> http://www.ncl.ucar.edu/Document/Functions/Contributed/zonalAve.shtml
> be updated?
>
>
>
> Thanks!
>
>
> Leo
> _______________________________________________
> 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 Sep 22 08:24:14 2011

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2011 - 17:12:44 MDT