<div dir="ltr"><div class="gmail_default" style="font-size:small">Jonathan,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Did anybody ever respond to this one?  </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If not, the code is quite complex, and it would be useful if you could provide a full script and data.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 26, 2014 at 3:30 PM, jbuzan <span dir="ltr">&lt;<a href="mailto:jbuzan@purdue.edu" target="_blank">jbuzan@purdue.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am having some issues with stat_dispersion.<br>
Perhaps my code ‘fixes’ cause the issue.  I am not sure.<br>
<br>
I have 2 datasets:<br>
time: 1460 lat: 192, lon 288<br>
time: 2920 lat: 192, lon 288<br>
I have added a second year to the original year (both 1460 time steps).  The stat_dispersion, in theory, should have the same minimum and maximum values.<br>
<br>
The data is partitioned by Temperature and by a difference field.<br>
Here is a snippet of the code that does the partitioning:<br>
do k = 0, dimsizes(numvar)-1<br>
;do k = 16, 16<br>
   thresholdstart = k*5.d + 200.d<br>
   print(thresholdstart)<br>
   thresholdend = k*5.d + 205.d<br>
   print(thresholdend)<br>
;   location = ind(temperature1d.lt.thresholdend)<br>
   location = ind(temperature1d.lt.thresholdend.and.temperature1d.ge.thresholdstart)<br>
;   printVarSummary(location)<br>
;   print(location)<br>
   if(.not.all(ismissing(location)))<br>
        tbin = wetbulb1d(location)<br>
        else<br>
        tbin = value<br>
        tbin@_FillValue = value<br>
   end if<br>
 ;  print(tbin)<br>
<br>
   if(.not.all(ismissing(tbin)))<br>
        tbin@_FillValue = -999.d<br>
        delete(tbin@_FillValue)<br>
        numarray(:,k) = stat_dispersion(tbin,opt)<br>
        else<br>
        numarray(:,k) = value<br>
   end if<br>
   delete(tbin)<br>
   delete(location)<br>
  ; print(numarray)<br>
end do<br>
numarray = where(numarray.eq.-999.d,value,numarray)<br>
<br>
replace_ieeenan (numarray, value, 0)<br>
numarray@_FillValue = value<br>
numarray@missing_value = numarray@_FillValue<br>
numarray!0 = &quot;stat&quot;<br>
numarray!1 = &quot;bin&quot;<br>
numarray&amp;bin = numvar<br>
printVarSummary(numarray)<br>
<br>
Here is a snippet of the code that grabs the values:<br>
box_var = numvar<br>
box_var@long_name = longnamea<br>
box_var@units = unitsa<br>
;box_var(:,0) = field1c(22,:)<br>
box_var(:,0) = field1c(2,:)<br>
box_var(:,1) = field1c(24,:)<br>
box_var(:,2) = field1c(8,:)<br>
box_var(:,3) = field1c(25,:)<br>
box_var(:,4) = field1c(14,:)<br>
;box_var(:,4) = field1c(26,:)<br>
<br>
field1c of 14 and 2 are the maximum and minimums from Stat_Dispersion.<br>
I think the issue is that stat_dispersion field becomes too large, and drops something.  It might be how I characterize the missing values.<br>
<br>
Any help would be appreciated.<br>
<br>
-Jonathan<br>
<br>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>