[Thread Prev][Thread Next][Index]
[ferret_users] IF-THEN commands and merging variables
- To: ferret_users@xxxxxxxx
- Subject: [ferret_users] IF-THEN commands and merging variables
- From: Oliver Andrews <O.Andrews@xxxxxxxxx>
- Date: Wed, 06 Apr 2011 11:57:15 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:sender:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=80zbjEhIwK8hUrCbkvngBs6/IwnFfqJkSuWOa+SyxlU=; b=vmE7LDCnlDros8yWJ7FcdPdBqIWZtgY6SU9R+8k013dw7vGgvGYpfMKXikDg5m7NpT 3DnHjZt5zwdpWsyegPl3s2CkDG6KcKs9B3IZtk4octqiYM0bW+/Lu3lGJzuD3aRIitRI qHkzARFAkrmGDnioLtjxkDlgygppL6IfMbgRw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; b=oUiVONgAvwJz3RN7dqZE+BqgKCBIqqHifotchsUdiIZpAW+CcooSLM64iahegV4dLo QjQGYVUEJYQ+ueNh+42Jq6bv3X3Psdpb7kNcoUTqlw5sW5UKgbHOJTnUkUfcKG6vrWLM ARtlWpQfpblrWQU9Jbw878S6PljLeskt44Iwg=
- Sender: owner-ferret_users@xxxxxxxx
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
--
Oliver D Andrews
PhD student
LGMAC
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