I think that the version on "copper" is not correct.
On "tramhill" ......
%> ncl
ncl 0> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
ncl 2> f = addfile ("camaqua.cam2.h1.1985-09-01-00000.nc", "r")
ncl 3> u = f->U
ncl 4> printVarSummary( u )
Variable: u
Type: float
Total Size: 29491200 bytes
7372800 values
Number of Dimensions: 4
Dimensions and sizes: [time | 30] x [lev | 30] x [lat | 64] x [lon | 128]
Coordinates:
time: [ 0.. 29]
lev: [3.64346569404006..992.556095123291]
lat: [-87.86379883923262..87.86379883923262]
lon: [ 0..357.1875]
Number Of Attributes: 3
units : m/s
long_name : Zonal wind
cell_method : time: mean
================================================
ncl 5> uZon = dim_avg_Wrap( u )
ncl 6> printVarSummary( uZon )
Variable: uZon
Type: float
Total Size: 230400 bytes
57600 values
Number of Dimensions: 3
Dimensions and sizes: [time | 30] x [lev | 30] x [lat | 64]
Coordinates:
time: [ 0.. 29]
lev: [3.64346569404006..992.556095123291]
lat: [-87.86379883923262..87.86379883923262]
Number Of Attributes: 1
average_op_ncl : dim_avg over dimension(s): lon
=================================
ncl 7> uTime = dim_avg_n_Wrap( u, 0)
ncl 8> printVarSummary(uTime)
Variable: uTime
Type: float
Total Size: 983040 bytes
245760 values
Number of Dimensions: 3
Dimensions and sizes: [lev | 30] x [lat | 64] x [lon | 128]
Coordinates:
lev: [3.64346569404006..992.556095123291]
lat: [-87.86379883923262..87.86379883923262]
lon: [ 0..357.1875]
Number Of Attributes: 4
cell_method : time: mean
long_name : Zonal wind
units : m/s
Richard Neale wrote:
> Hi,
>
> I am using ncl 5.1.1 on CGD systems (copper) and I think dim_avg_Wrap,
> in 5.1.1, no longer retains all the metadata in the derived variable.
> This breaks the AMWG diagnostics as it is expecting units and long_name
> attributes to be retained and it also doesn't work for the new
> dim_avg_n_Wrap routine.
> Thanks, Rich
>
> *** Example code:
>
> printVarSummary(tmp)
> lhflx = dim_avg_Wrap (tmp)
> printVarSummary(lhflx)
>
> *** Gives:
>
> Variable: tmp
> Type: float
> Total Size: 55296 bytes
> 13824 values
> Number of Dimensions: 2
> Dimensions and sizes: [lat | 96] x [lon | 144]
> Coordinates:
> lat: [ -90..89.99999999999999]
> lon: [ 0..357.5]
> Number Of Attributes: 5
> derive_op : (Lv+Lf)*qflx-Lf*(prect-precsc-precl)
> cell_method : time: mean
> long_name : Surf latent heat flux
> units : W/m~S~2~N~
> time : 149.8191795945168
>
>
> Variable: lhflx
> Type: float
> Total Size: 384 bytes
> 96 values
> Number of Dimensions: 1
> Dimensions and sizes: [lat | 96]
> Coordinates:
> lat: [ -90..89.99999999999999]
> Number Of Attributes: 1
> average_op_ncl : dim_avg over dimension(s): lon
>
>
-- ====================================================== Dennis J. Shea tel: 303-497-1361 | P.O. Box 3000 fax: 303-497-1333 | Climate Analysis Section | Climate & Global Dynamics Div. | National Center for Atmospheric Research | Boulder, CO 80307 | USA email: shea 'at' ucar.edu | ====================================================== _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Mon Nov 9 13:23:37 2009
This archive was generated by hypermail 2.1.8 : Wed Nov 11 2009 - 12:48:56 MST