[Thread Prev][Thread Next][Index]

Re: [ferret_users] erratic IF masking behaviour



Not sure exactly,

I tested like this


[akshay@aix ~]$ f
     NOAA/PMEL TMAP
     FERRET v6.85 
     Linux 2.6.18-371.1.2.el5 64-bit - 11/12/13
     11-Dec-13 09:34    

yes? let  ifhf = 0.5000
yes? let hd = 36.75
yes? ! assume that hdhf is 55
yes? let hdhf = 55
yes? let hdf= IF ifhf eq 1 then hdhf else hd
yes? list ifhf,hd,hdhf,hdf
 Column  1: IFHF is 0.5000
 Column  2: HD is 36.75
 Column  3: HDHF is 55
 Column  4: HDF is IF IFHF EQ 1 THEN HDHF ELSE HD
            IFHF    HD    HDHF    HDF
I / *:     0.5000  36.75  55.00  36.75


Akshay




On Wed, Dec 11, 2013 at 9:38 AM, Akshay Hegde <akshay.k.hegde@xxxxxxxxx> wrote:
What's hdhf ?

-Akshay


On Wed, Dec 11, 2013 at 9:05 AM, Lev Tarasov <lev@xxxxxx> wrote:
Why does the IF condition not work in the
masking below and how do I fix this:
(ie CONDITION should be false, but hdf doesn't take on
the ELSE value of hd)

let hdf= IF ifhf eq 1 then hdhf else hd

yes? list ifhf
             VARIABLE : IF HFB GT HDG THEN 1 ELSE 0
             FILENAME : idHhpt.nn9927
             LONGITUDE: 69W (interpolated)
             LATITUDE : 41.5N (interpolated)
             T        : -20
          0.5000

yes? list hd
...
             LONGITUDE: 69W (interpolated)
             LATITUDE : 41.5N (interpolated)
          36.75
yes? list hdf
...
             LONGITUDE: 69W (interpolated)
             LATITUDE : 41.5N (interpolated)
          35.50

note using
        NOAA/PMEL TMAP
        FERRET v6.401
        Linux(g77) 2.6.9-89.ELsmp - 12/09/09
        11-Dec-13 00:05


Cheers,

lev

Lev Tarasov -   Dept of Physics and Physical Oceanography,
                Memorial University of Newfoundland.
                email: lev@xxxxxx
                http://www.physics.mun.ca/~lev/
                Currently at Antarctic Research Centre,
                Victoria University of Wellington




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

Privacy Policy | Disclaimer | Accessibility Statement