<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). </div><div><br></div><div>I did have a problem with dim_stat4. 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. 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 <<a href="mailto:haley@ucar.edu">haley@ucar.edu</a>> 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? </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"> </span><span dir="ltr"><<a href="mailto:jbuzan@purdue.edu" target="_blank">jbuzan@purdue.edu</a>></span><span class="Apple-converted-space"> </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. 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> <span class="Apple-converted-space"> </span>tbin = wetbulb1d(location)<br> <span class="Apple-converted-space"> </span>else<br> <span class="Apple-converted-space"> </span>tbin = value<br> <span class="Apple-converted-space"> </span>tbin@_FillValue = value<br> end if<br> ; print(tbin)<br><br> if(.not.all(ismissing(tbin)))<br> <span class="Apple-converted-space"> </span>tbin@_FillValue = -999.d<br> <span class="Apple-converted-space"> </span>delete(tbin@_FillValue)<br> <span class="Apple-converted-space"> </span>numarray(:,k) = stat_dispersion(tbin,opt)<br> <span class="Apple-converted-space"> </span>else<br> <span class="Apple-converted-space"> </span>numarray(:,k) = value<br> end if<br> delete(tbin)<br> delete(location)<br> <span class="Apple-converted-space"> </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&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></blockquote></div></div></div></blockquote></div><br></div></body></html>