Re: sst-standardize problem

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Jul 10 2012 - 09:40:49 MDT

"ismissing" is an NCL function. I can't tell if you were trying to use it as a variable name below, or if you didn't show the full script.

Instead of the double do loop, you can simply do this:

uwnd = where(uwnd.eq.-1.8,uwnd@_FillValue,uwnd)

This assumes that "uwnd" already has a _FillValue attribute assigned. If not, then you can do this:

uwnd@_FillValue = default_fillvalue(typeof(uwnd)) ; will use default missing value for the type of uwnd
uwnd = where(uwnd.eq.-1.8,uwnd@_FillValue,uwnd)

--Mary

On Jul 10, 2012, at 2:54 AM, ren.whc wrote:

> Hi There:
> I'm new in using NCL,When I want to standardizing the HadiSST data,here's a problem
> Because some gird values -1.8 in winter ,like grid(118,239)in "sst-std.ncl",so when I want to get the standard deviation of the data, the result of stdMonTLL shows 0 value(jan or feb) in such grid.,and ncl returns error "divid 0".When I try to change such value to _Fillvalue or -1.8,I use follow command and It always returns
> "fatal:the result of the conditional expression yields a missing value.NCL cannot determine branch,see ismissing function"
> ;do ii=0,timelong-1
> ; do jj=0,nlat-1
> ; do kk=0,nlon-1
> ; if(uwnd(ii,jj,kk).eq.(-1.8))then
> ; uwnd(ii,jj,kk)=ismissing
> ; end if
> ; end do
> ; end do
> ;end do
> Would please help me to handle such problem
> PS:I do not use "dim_standardize_n" function to standardize data because I want to make the average value to be averaged between year 1971 and year 2000
>
> Respect
> ren.whc
>
> <sst-std.ncl>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jul 10 09:40:55 2012

This archive was generated by hypermail 2.1.8 : Thu Jul 12 2012 - 10:16:50 MDT