[Thread Prev][Thread Next][Index]
Re: [ferret_users] if then masking inconsistency
Hi Lev,
Zero values evaluate to FALSE in Ferret.
>From the documentation
http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/commands-reference/IF
>From V6.71 there is a new way of masking which allows zeros to be
evaluated as true IFV
http://ferret.pmel.noaa.gov/Ferret/documentation/release-notes/users-guide/variables-xpressions/XPRESSIONS#_VPID_181
If you need to use your old version I suppose
let B7 = IF ( B6 OR B6 EQ 0 ) THEN B6 ELSE ((BEDTC-1)/2)^NTC
or
let B7 = IF ( B6 NE `B,RETURN=bad` ) THEN B6 ELSE ((BEDTC-1)/2)^NTC
Will work.
Russ
On Sun, 2012-05-06 at 02:48 +1000, Lev Tarasov wrote:
> Hi;
> IF THEN masking seems to be breaking down in certain small
> regions of my field: my intermediate variable b7 doesn't retain
> the B6 value everywhere B6 is defined:
>
> yes? show var b7
> B7 = IF B6 THEN B6 ELSE ((BEDTC-1)/2)^NTC
>
>
> yes? go digitize b6 nearest
> VARIABLE : DGTEXPR[X=357.8092 ,Y=51.61662 ]
> FILENAME : bedmBergscat255.nc
> LONGITUDE: 2.2W
> LATITUDE : 51.6N
> 0.0000000
> yes? go digitize b7 nearest
> VARIABLE : DGTEXPR[X=357.8092 ,Y=51.61662 ]
> FILENAME : bedmBergscat255.nc
> LONGITUDE: 2.2W
> LATITUDE : 51.6N
> ....
>
> NOAA/PMEL TMAP
> FERRET v6.1
> Linux(g77) 2.6.9-22. - 03/26/08
> 5-May-12 12:48
>
> What gives?
>
> cheers,
>
> lev
>
> Lev Tarasov - Dept of Physics and Physical Oceanography,
> Memorial University of Newfoundland.
> email: lev@xxxxxx
> http://www.physics.mun.ca/~lev/
> Tel (709)-864-2675
> Fax (709)-864-8739
>
>
> This electronic communication is governed by the terms and conditions at
> http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
Ferret
Privacy Policy | Disclaimer | Accessibility Statement