I am doing the following in a loop:
mon_avg_obs(m,:,:) = where(mon_avg_obs(m,:,:).eq.0, -2222,
mon_avg_obs(m,:,:))
factors(a*12+m,:,:) = data_all(a*12+m,:,:)/mon_avg_20c(m,:,:)
print("1. "+num(ismissing(factors(a*12+m,:,:))))
factors(a*12+m,:,:) = where(.not.ismissing(mon_avg_obs(m,:,:)),
dvar(a*12+m,:,:)/mon_avg_obs(m,:,:), factors(a*12+m,:,:))
print("2. "+num(ismissing(factors(a*12+m,:,:))))
factors(a*12+m,:,:) =
where(.not.ismissing(mon_avg_obs(m,:,:)).and.mon_avg_obs(m,:,:).eq.-2222,
0., factors(a*12+m,:,:))
print("3. "+num(ismissing(factors(a*12+m,:,:))))
The output on the screen says:
(0) 1. 0
(0) 2. 0
(0) 3. 11753
Why is the last where statement inserting a fill value? I've tried it with
and without the .not.ismissing() part, as well as some other things, but all
yield the same result.
-Bridget
-- Bridget Thrasher, PhD Postdoctoral Researcher Climate Central www.climatecentral.org
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Oct 20 10:31:53 2009
This archive was generated by hypermail 2.1.8 : Thu Oct 22 2009 - 13:09:30 MDT