<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>'minHgt=max(max(PRES0C,lon='lonmin',lon='lonmax'),lat='latmin',lat='latmax')'</div><div>'minHgt=minHgt/100'</div><div><br></div><div><div>if (minHgt > 1011.63)</div><div>'botzlev = 1'</div><div>endif</div><div>if (minHgt <= 1011.63 & minHgt > 1005)</div><div>'botzlev = 2'</div><div>endif</div><div>if (minHgt <= 1005 & minHgt > 995)</div><div>'botzlev = 3'</div><div>endif</div><div>if (minHgt <= 995 & minHgt > 985)</div><div>'botzlev = 4'</div><div>endif</div><div>if (minHgt <= 985 & minHgt > 977.5)</div><div>'botzlev = 5'</div><div>endif</div><div>if (minHgt <= 977.5 & minHgt > 972.5)</div><div>'botzlev = 6'</div><div>endif</div></div><div><br></div><div>.</div><div>.</div><div>.</div><div>.</div><div><br></div><div><br></div><div>'set z '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>