liz,
you can use dim_avg twice to do what you want, but you will have to
reorder your data. in order to reorder, your dimensions much be named
e.g. ts(time,lev,lat,lon)
ave1 = dim_avg_Wrap(ts(lev|:,lat|:,lon|:,time|:))
note i used the wrapper version of dim_avg which you can get by loading
contributed.ncl at the top of your script. the wrapper function preserves
the variable meta data including the named dimensions. you'll need these
to reorder again for phase II.
ave2 = dim_avg_Wrap(ave1(lat|:,lon|:,lev|:))
ave2 should now be a two dimensional array dimensioned lat x lon
cheers,
sylvia
On Wed, 14 Apr 2004, lzhang wrote:
> One more question:
>
> I got this data set ts(365,4,73,144). Is there any way to average data
> on first two dimensions? I found this function dim_avg only for
> right-most dimension.
>
> --
> Thank you,
> Liz
>
> ***********************
> Liangying (Liz) Zhang
> ATD/NCAR
> Email: lzhang AT ucar.edu
> Phone: 303-497-2025
> Fax : 303-497-8770
> ***********************
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk AT ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
******************************************************
Sylvia Murphy EML: murphys AT ucar.edu
NCAR CGD/CSEG PHN: 303-497-1720
1850 Table Mesa Drive FAX: 303-497-1333
Boulder CO 80305
WEB: http://www.cgd.ucar.edu/csm/support/
http://www.cgd.ucar.edu/csm/support/CSM_Graphics/
******************************************************
_______________________________________________
ncl-talk mailing list
ncl-talk AT ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2b29 : Wed Apr 14 2004 - 14:07:09 MDT