[ncl-talk] stat_dispersion
jbuzan
jbuzan at purdue.edu
Fri Sep 26 15:30:42 MDT 2014
I am having some issues with stat_dispersion.
Perhaps my code ‘fixes’ cause the issue. I am not sure.
I have 2 datasets:
time: 1460 lat: 192, lon 288
time: 2920 lat: 192, lon 288
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.
The data is partitioned by Temperature and by a difference field.
Here is a snippet of the code that does the partitioning:
do k = 0, dimsizes(numvar)-1
;do k = 16, 16
thresholdstart = k*5.d + 200.d
print(thresholdstart)
thresholdend = k*5.d + 205.d
print(thresholdend)
; location = ind(temperature1d.lt.thresholdend)
location = ind(temperature1d.lt.thresholdend.and.temperature1d.ge.thresholdstart)
; printVarSummary(location)
; print(location)
if(.not.all(ismissing(location)))
tbin = wetbulb1d(location)
else
tbin = value
tbin at _FillValue = value
end if
; print(tbin)
if(.not.all(ismissing(tbin)))
tbin at _FillValue = -999.d
delete(tbin at _FillValue)
numarray(:,k) = stat_dispersion(tbin,opt)
else
numarray(:,k) = value
end if
delete(tbin)
delete(location)
; print(numarray)
end do
numarray = where(numarray.eq.-999.d,value,numarray)
replace_ieeenan (numarray, value, 0)
numarray at _FillValue = value
numarray at missing_value = numarray at _FillValue
numarray!0 = "stat"
numarray!1 = "bin"
numarray&bin = numvar
printVarSummary(numarray)
Here is a snippet of the code that grabs the values:
box_var = numvar
box_var at long_name = longnamea
box_var at units = unitsa
;box_var(:,0) = field1c(22,:)
box_var(:,0) = field1c(2,:)
box_var(:,1) = field1c(24,:)
box_var(:,2) = field1c(8,:)
box_var(:,3) = field1c(25,:)
box_var(:,4) = field1c(14,:)
;box_var(:,4) = field1c(26,:)
field1c of 14 and 2 are the maximum and minimums from Stat_Dispersion.
I think the issue is that stat_dispersion field becomes too large, and drops something. It might be how I characterize the missing values.
Any help would be appreciated.
-Jonathan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2920-1460_time_steps.pdf
Type: application/pdf
Size: 59597 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140926/3c83d9e6/attachment.pdf
More information about the ncl-talk
mailing list