<div dir="ltr">Hello all,<div><br></div><div>I am attempting to set the z level from a set of if statements. Basically I am finding the lowest pressure level of a variable, then using if statements to match it to the closest level available in the model output and setting the z level based on that value. I am getting a SET error when I try to do this. Can I not do it this way? I have posted my script below:</div><div><br></div><div><div>&#39;minHgt=max(max(PRES0C,lon=&#39;lonmin&#39;,lon=&#39;lonmax&#39;),lat=&#39;latmin&#39;,lat=&#39;latmax&#39;)&#39;</div><div>&#39;minHgt=minHgt/100&#39;</div><div><br></div><div><div>if (minHgt &gt; 1011.63)</div><div>&#39;botzlev = 1&#39;</div><div>endif</div><div>if (minHgt &lt;= 1011.63 &amp; minHgt &gt; 1005)</div><div>&#39;botzlev = 2&#39;</div><div>endif</div><div>if (minHgt &lt;= 1005 &amp; minHgt &gt; 995)</div><div>&#39;botzlev = 3&#39;</div><div>endif</div><div>if (minHgt &lt;= 995 &amp; minHgt &gt; 985)</div><div>&#39;botzlev = 4&#39;</div><div>endif</div><div>if (minHgt &lt;= 985 &amp; minHgt &gt; 977.5)</div><div>&#39;botzlev = 5&#39;</div><div>endif</div><div>if (minHgt &lt;= 977.5 &amp; minHgt &gt; 972.5)</div><div>&#39;botzlev = 6&#39;</div><div>endif</div></div><div><br></div><div>.</div><div>.</div><div>.</div><div>.</div><div><br></div><div><br></div><div>&#39;set z &#39;botzlev<br></div><div><br></div><div><br></div><div>Any help would be appreciated. Thank You!</div><div><div class="gmail_signature"><div dir="ltr"><div><b>-------</b></div><b>William (L.B.) LaForce<br></b>Meteorologist<div><a href="http://www.tornadoinsanity.com" target="_blank">www.tornadoinsanity.com</a></div></div></div></div>
</div></div>