Re: dim_avg_n_Wrap and dim_avg_Wrap do not transfer all meta data

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Nov 09 2009 - 14:40:18 MST

Hi Rich,

Dennis and I discussed this offline, and I think you have found a
bug. It will be fixed immediately if so.

Meanwhile, I believe you can fix this yourself by editing (or making
a copy of) $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl,
searching for "function dim_avg_Wrap" and adding the line:

  copy_VarAtts (x, xave) ; copy attributes

right after:

  xave = dim_avg(x) ; arithmetic ave [no meta data]

--Mary

On Nov 9, 2009, at 11:18 AM, 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
>
> --
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> =-=-
> Richard Neale - rneale_at_ucar.edu - http://www.cgd.ucar.edu/cms/
> rneale -
> Atmospheric Modelling & Predictability, CGD, NCAR =-=-=-=-=-=-=-=-
> =-=-
> P.O. Box 3000, Boulder, CO 80307-3000 =-=-=-=-=-=-=-=-=-=-=-=-=-=-
> =-=-
> Tel (303) 497-1380 Fax (303) 497-1324 =-=-=-=-=-=-=-=-=-=-=-=-=-=-
> =-=-
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> =-=-
>
> _______________________________________________
> 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 Mon Nov 9 14:39:46 2009

This archive was generated by hypermail 2.1.8 : Wed Nov 11 2009 - 12:48:56 MST