Possible bug in bin_sum

From: Chad Herman <chad.scott.herman_at_nyahnyahspammersnyahnyah>
Date: Thu Jul 05 2012 - 14:43:12 MDT

Hi,

I was recently using NCL to interpolate some economic data. NCL's
interpolation functions compute weighted averages, but I need weighted
sums. I initially used bin_sum. The output made no sense. I looked at
the range of the data and the lower limit was very nearly the missing
value (-999). This data set contained missing values and I suspected
that bin_sum was failing to recognize and ignore these missing values.
To my surprise, it even appears in the absence of missing values. I
wrote up a small script to illustrate the problem. Attached is my script
with the output.

Chad

 Copyright (C) 1995-2012 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 6.1.0-beta
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.

Variable: data_in
Type: float
Total Size: 64800 bytes
            16200 values
Number of Dimensions: 2
Dimensions and sizes: [lat | 90] x [lon | 180]
Coordinates:
            lat: [-89..89]
            lon: [ 1..359]
Number Of Attributes: 1
  _FillValue : -999

Variable: data_out
Type: float
Total Size: 41472 bytes
            10368 values
Number of Dimensions: 2
Dimensions and sizes: [lat | 144] x [lon | 72]
Coordinates:
            lat: [-89.375..89.375]
            lon: [2.5..357.5]
Number Of Attributes: 1
  _FillValue : -999
(0) min=-42.8553 max=40.2627
(0) min=-1063.25 max=-931.461

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

bin_sum_bug.png
Received on Thu Jul 5 14:43:46 2012

This archive was generated by hypermail 2.1.8 : Mon Jul 09 2012 - 10:45:32 MDT