<div dir="ltr">Stefan,<div>Define two separate fields, one for each side of the disjunction. �Just make sure to use the same color table for both displays so that in the end it appears you are displaying just one field.<div>
<br></div><div style>Jeff Duda</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 10, 2013 at 2:54 AM, Stefan Gofferje <span dir="ltr">&lt;<a href="mailto:stefan@saakeskus.fi" target="_blank">stefan@saakeskus.fi</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
how would one define a variable that is 1 if one parameter OR another<br>
parameter is in a certain range?<br>
<br>
I have found a way of expressing &quot;AND&quot; by masking out values, then<br>
const&#39;ing them and const&#39;ing them again, resulting in a result of 1 if<br>
the variable is in the desired range, e.g. cape&gt;500 and li&lt;-2 in this<br>
case. When I then simply multiply the 2 expressions, I get 1 if<br>
expression 1 AND expression 2 are within the desired range and 0 (or U)<br>
if either of them isn&#39;t.<br>
<br>
&#39;define tstorm =<br>
const(const(maskout(cape255_0mb,cape255_0mb-500),1.0),0,-u)*<br>
const(const(maskout(no4lftxsfc,(-1*no4lftxsfc)-2),1.0),0,-u)&#39;<br>
<br>
Now, how would I express e.g. ((cape&gt;500 AND li&lt;-2) OR prate&gt;20) in a<br>
similar way?<br>
<br>
Ideas, anyone?<br>
<br>
-Stefan<br>
<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>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Jeff Duda<br>Graduate research assistant<br>University of Oklahoma School of Meteorology<br>Center for Analysis and Prediction of Storms<br>
</div>