<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Mary,<div><br></div><div>Sorry for the delayed response!</div><div><br></div><div>I realized there was a two problems:</div><div>1) I had an error in the original dataset.</div><div>2) I figured out how to use IND to feed only non-missing values to the exceedance (the original issue). &nbsp;</div><div><br></div><div>I did have a problem with dim_stat4. &nbsp; When it was trying to calculate kurtosis and skewness for stat_dispersion (dim_stat4 2,3), the contributed file would blow up saying it cannot find dim_stat4. &nbsp;I turned it off, but I can’t seem to figure out why dim_stat4 bombed.</div><div><br></div><div>-Jonathan</div><div><br></div><div><br></div><div><br></div><div><br><div><div>On Oct 9, 2014, at 6:38 PM, Mary Haley &lt;<a href="mailto:haley@ucar.edu">haley@ucar.edu</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><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? &nbsp;</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 class="Apple-converted-space">&nbsp;</span><span dir="ltr">&lt;<a href="mailto:jbuzan@purdue.edu" target="_blank">jbuzan@purdue.edu</a>&gt;</span><span class="Apple-converted-space">&nbsp;</span>wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">I am having some issues with stat_dispersion.<br>Perhaps my code ‘fixes’ cause the issue.&nbsp; 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).&nbsp; 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>&nbsp; &nbsp;thresholdstart = k*5.d + 200.d<br>&nbsp; &nbsp;print(thresholdstart)<br>&nbsp; &nbsp;thresholdend = k*5.d + 205.d<br>&nbsp; &nbsp;print(thresholdend)<br>;&nbsp; &nbsp;location = ind(temperature1d.lt.thresholdend)<br>&nbsp; &nbsp;location = ind(temperature1d.lt.thresholdend.and.temperature1d.ge.thresholdstart)<br>;&nbsp; &nbsp;printVarSummary(location)<br>;&nbsp; &nbsp;print(location)<br>&nbsp; &nbsp;if(.not.all(ismissing(location)))<br>&nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span>tbin = wetbulb1d(location)<br>&nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span>else<br>&nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span>tbin = value<br>&nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span>tbin@_FillValue = value<br>&nbsp; &nbsp;end if<br>&nbsp;;&nbsp; print(tbin)<br><br>&nbsp; &nbsp;if(.not.all(ismissing(tbin)))<br>&nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span>tbin@_FillValue = -999.d<br>&nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span>delete(tbin@_FillValue)<br>&nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span>numarray(:,k) = stat_dispersion(tbin,opt)<br>&nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span>else<br>&nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span>numarray(:,k) = value<br>&nbsp; &nbsp;end if<br>&nbsp; &nbsp;delete(tbin)<br>&nbsp; &nbsp;delete(location)<br>&nbsp;<span class="Apple-converted-space">&nbsp;</span>; 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 = "stat"<br>numarray!1 = "bin"<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.&nbsp; 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></blockquote></div></div></div></blockquote></div><br></div></body></html>