[Thread Prev][Thread Next][Index]

[ferret_users] masking using and/or



I am trying to create a lat/lon mask using if statements.  I create two overlapping masks and then want to combine them.  I would assume I should use ?or? to combine the two regions.  However, using either ?and? or ?or? in the masking definition, I get the same result.  Is this a bug or am I doing something wrong?  I am using Ferret v6.65.

 

See the following script for a quick example:

 

use coads_climatology

sh d

let mask1=if y[gy=sst] lt 20 then 1

let mask2=if y[gy=sst] gt 0 then 1

let mask3 = if (mask1 and mask2) then 1

let mask4 = if (mask1 or mask2) then 1

 

fill/l=1 sst*mask1

pause

fill/l=1 sst*mask2

pause

fill/l=1 sst*mask3

pause

fill/l=1 sst*mask4

q

 

Thanks.

Carol


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement