[Thread Prev][Thread Next][Index]

[ferret_users] IF-THEN commands and merging variables

Hi all,

I'm quite new to Ferret so sorry if this is a rather rudimentary
problem, but can't seem to find a solution in the manual.

I'm using a series of IF-THEN commands to define a variable SFRAC
(Snow Fraction) based on input Air Temperature (AIR variable) data.
Along the lines of:

let SFRAC1 = IF AIR LE 253 THEN 1
let SFRAC4 = IF AIR GT 281 THEN 0

This gives me a series of SFRAC variables which, when overlain with
one another (using the /OVERLAY qualifer) can be plotted on the same
grid.  However, what I want is to build a single netCDF file with all
these variables combined into one SFRAC for all different LE/GT type
conditions of Air Temperature.

So my question is this: is there a way of (a) using multi-line IF-THEN
commands to define one SFRAC variable for all different Air
Temperature conditions in the first place or (b) merging the different
SFRACX variables as defined above so that I might output them all as a
single SFRAC variable in a new netCDF file.

I hope the problem is clear enough and would appreciate any advice you
might have.

Many thanks,

Oliver D Andrews
PhD student
School of Environmental Sciences
University of East Anglia
Norwich NR4 7TJ, UK

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

Privacy Policy | Disclaimer | Accessibility Statement