Re: Missing values not recognized

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu, 19 Jul 2007 10:25:35 -0600

Hi Anthony,

Scott is correct, set w@_FillValue = w_at_missing_value and you should be
good to go. You can read about _FillValue/missing_value and how NCL
interprets them at:
http://www.ncl.ucar.edu/Document/Language/fillval.shtml
Adam

Anthony C. Didlake, Jr. wrote:
> Hello,
>
> I'm having a problem with missing values in my NCL script. I'm reading
> in a NetCDF file and grabbing variables with them that have their
> missing value set to -999. However, when I apply NCL functions to these
> variables, it does not recognize the number -999 as missing, but rather
> as a data entry value. For instance, when I use the min function, it
> always returns -999 (even though all the values are not missing.) I also
> used the num and ismissing functions to count the number of missing
> values, and it always returns 0 (even though some values are missing.)
> Below is my script. Are there any reasons that this could happen?
>
> Thanks,
> Anthony
>
>
>
> load "/usr/local/ncarg/lib/ncarg/nclex/gsun/gsn_code.ncl"
>
> begin
>
> filename = "200508282031.nc"
> nc_file = addfile(filename,"r")
>
> w = nc_file->WVAR(0,:,:,:)
>
> min_w = min(w)
> x = num(ismissing(w(0,0,:)))
>
> print(min_w)
> print(x)
> print(w_at_missing_value)
>
> end
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
--------------------------------------------------------------
Adam Phillips			             asphilli_at_ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
ESSL/CGD/CAS                               fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000	  http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jul 19 2007 - 10:25:35 MDT

This archive was generated by hypermail 2.2.0 : Thu Jul 19 2007 - 10:40:48 MDT