[ncl-talk] how to get the real lat/lon value after areal calculation?

Guido Cioni guidocioni at gmail.com
Thu Jun 2 03:15:53 MDT 2016


Hey,
I would suggest to use dim_avg_n instead of dim_avg, so that you can have the control on what you are exactly doing. I think (but maybe I’m wrong) that with your syntax you only get a zonal average, while you want to have a full lat/lon average: is this correct? In order to keep metadata I also suggest to use the _Wrap option. 

T_new=dim_avg_n_Wrap(T(:,{minlat:maxlat},{minlon:maxlon}), (/1,2/) ) 

The (/1,2/) specifies that you are averaging over coordinates lat and lon, on the subset defined by extents {minlat:maxlat},{minlon:maxlon}. Please note that in the output you will get a variable with only time dimension. Thus, I don’t really understand your second question: lat/lon coordinates are not available anymore, since you took a mean over a square. 
Cheers

Guido Cioni
http://guidocioni.altervista.org <http://guidocioni.altervista.org/> 

> On 02 Jun 2016, at 10:16, dyjbean at 163.com wrote:
> 
> hi,
>    i have a variable named T with dimension (lev,lat,lon), and i gave the minlat,maxlat,minlon,maxlon for some zone, 
> after i have used function dim_avg with  T_new=dim_avg(T(:,{minlat:maxlat},{minlon:maxlon}))),i obtained the required new variable T_new , 
> but how can i  know the real lat/lon value in T_new, the start and end points are equal to minlat,maxlat or adjacent value from them?
> 
> 
> dyjbean at 163.com <mailto:dyjbean at 163.com>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160602/6c582372/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bg.jpg
Type: image/jpeg
Size: 20365 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160602/6c582372/attachment.jpg 


More information about the ncl-talk mailing list