[gradsusr] Conditional handling of terms
Stefan Gofferje
stefan at saakeskus.fi
Sun Jul 8 12:37:19 EDT 2012
Hi,
I'm just working on plotting a few new indices and I am wondering if and
how the conditional handling of terms is possible in grads somehow.
E.g.: SWEAT index...
The definition says
SWEAT= 12(850Td) + 20(TT - 49) + 2(V850) + (V500) + 125(sin(dd500 -
dd850) + 0.2)
*If TT less than 49, then that term of the equation is set to zero
*If any term is negative then that term is set to zero
*Winds must be veering with height or that term is set to zero
How would I do something like this. The only thing I could think of
would be, going through the grid with two while loops, calculating the
values with a couple of "if" clauses, then output them to a new grid and
plot this new grid. But that seems a bit overkill, doesn't it? :)
-Stefan
--
Suomen Sääkeskus - Hyvä sää on makuasia
Stefan Gofferje
Haukantie 2 B 5
FIN-37600 Valkeakoski
GSM: +358 (41) 7290730
http://www.saakeskus.fi/
stefan at saakeskus.fi
--------------------------------------------------------------------------------
This mail was scanned for malware by ClamAV (http://www.clamav.net/)
--------------------------------------------------------------------------------
More information about the gradsusr
mailing list