[Thread Prev][Thread Next][Index]

Re: bad data rejection



On Mon, 22 Nov 2004, Sudheer Joseph wrote:
>                            I have a dataset which is having some -ve values 
> in a netcdf file with depth and time axis . I would like to set all -ve 
> values as bad data. Is there any way to do it ? can the set  var/bad =  
> command be used to specify this? if so please let me know how to specify in 
> this particular case  set  variable/bad = all -ve values

Try a masking expression:

   let v_non_negative = IF v GE 0 THEN v

As there's no "ELSE" in this expression, values of v that don't fit the
conditional (v GE 0) will be set to missing.  This is equivalent to

   let v_non_negative = IF v GE 0 THEN v ELSE v/0

--Andrew




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement