Andrew,<div>Is it critical to have the resulting defined field as integers? If not, you could do something like this, if your GrADS has the "if" conditional UDF (such as in the opengrads version):</div><div><br>
</div><div>'define MinCAPE=1.4*hgt0deg-5400'</div><div>'define MinCAPE=if(MinCAPE,<,200,200,MinCAPE)'</div><div><br></div><div>Then, when you display MinCAPE, all areas < 200 from first define should show up as 200.</div>
<div><br></div><div>Steve Mc<br><br><div class="gmail_quote">On Fri, Oct 22, 2010 at 12:08 AM, Andrew Revering <span dir="ltr"><<a href="mailto:andy@f5data.com">andy@f5data.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal">This is a simple but annoying problem… I have an
equation in a script…</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">'define MinCAPE = math_int(1.4 * hgt0deg - 5400)'</p>
<p class="MsoNormal">if (MinCAPE < 200) ; MinCAPE = 200 ; endif</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I get an error saying math_int() is not a valid function….
</p>
<p class="MsoNormal">also the whole IF statement is completely ignored. No matter
what I do, I still get negative values for MinCAPE.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">BTW…this is a unconventional method for me to
determine if there is 'enough' CAPE to support a severe thunderstorm given the
freezing level height in case anyone is wondering.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Andrew Revering</p>
<p class="MsoNormal">Convective Development, Inc.</p>
<p class="MsoNormal"><a href="http://www.convectivedevelopment.com/" target="_blank">http://www.convectivedevelopment.com/</a></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
</div>
</div>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br></div>
<pre>***************************************************
The information contained in this e-mail message
is intended only for the use of the recipient(s)
named above and may contain information that is
privileged, confidential, and/or proprietary.
If you are not the intended recipient, you may not
review, copy or distribute this message. If you have
received this communication in error, please notify
the sender immediately by e-mail, and delete the original message.
***************************************************