Re: bug in dim_sum_wgt function

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon, 30 Jun 2008 18:06:19 -0600

[1] The weights should not contain a missing value.

      Set it to zero if you always want some positional

      value to be excluded from the sum.

[2] For future reference, yhe "missing_value" attribute

      is not recognixed by NCL.

[3] Hopefully, [1] is "useful" and [2] is 'informational'

Good luck

jun wrote:
> Hi
>
> When I use following script to test the function of dim_sum_wgt, but I
> found that missing value setting not work for this function, we always
> got the same result as red one following, regardless opt = 0 or 1.
> Please give me some useful suggestion, thanks.
>
> Jun
>
> ;============================================================================;
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> ;============================================================================;
> begin
>
> x = (/(/2, 4, 6/),(/9.96921e+36, 2, 3/)/)
> y = (/1, 2, 9.96921e+36/)
>
> x_at_missing_value = 9.96921e+36
> x@_FillValue = 9.96921e+36
> y@_FillValue = 9.96921e+36
> y_at_missing_value = 9.96921e+36
>
> z = dim_sum_wgt(x, y, 1)
>
> print(x)
> print(y)
> print(z)
> end
>
> Variable: z
> Type: float
> Total Size: 8 bytes
> 2 values
> Number of Dimensions: 1
> Dimensions and sizes: [2]
> Coordinates:
> Number Of Attributes: 1
> _FillValue : 9.96921e+36
> (0) 5.981526e+37
> (1) 2.990763e+37
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

-- 
======================================================
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
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jun 30 2008 - 18:06:19 MDT

This archive was generated by hypermail 2.2.0 : Sun Jul 06 2008 - 17:04:16 MDT