[Thread Prev][Thread Next][Index]

Re: [ferret_users] addition in ferret



Hi Nitin,
In Ferret, missing + variable = missing.  (This is true for all operations, and it's probably more intuitive if you think, what should be the result if you were multiplying or dividing the variables? Missing*2 = ?)

If you want to have the sum contain any values that do exist then you'll need to fill in any missing data with zero's.  Either define new variables with an IF statement like
let gp1var = if gp1  then gp1 else 0
let gp2var = if gp2  then gp2 else 0
and add those, or you could use the MISSING function to substitute 0 where either variable is missing.
let sum = MISSING(gp1, 0) + MISSING(gp2, 0)

Ansley

On 8/19/2014 1:33 AM, Nitin Patil wrote:
Dear ferret users,

I am adding simply 2 defined variables in my script (attached) but it is not doing addition, any idea (output is also attached).

It is not accepting "...." in output file in one of the column for addition.
--
Regards,
Nitin Patil


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

Privacy Policy | Disclaimer | Accessibility Statement