<div dir="ltr">Jeff, Yes, things are progressing well.<div><br></div><div>I tried removing the quotes but that didn't seem to work either. I set the minHgt to a value myself and tried running the script (that way I knew which level it should be), but when I did 'q dims', the z level was still at 1. When I ran 'q define', the only defined variable was minHgt. botzlev wasn't in the list. That SET error went away, but im not sure if that line even ran because the level was still at 1.</div></div><div class="gmail_extra"><br clear="all"><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>
<br><div class="gmail_quote">On Thu, Feb 18, 2016 at 3:36 PM, Jeff Duda <span dir="ltr"><<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hey, L.B., glad to see you are back in the game! Hope all is well.<br><br></div>If you remove the quotes around the commands within each if statement, I think that will solve your problem. As you have written the code, you are telling grads to define a new field with a constant value of 1, 2, 3,... rather than defining a script variable, which is what you appear to want.<br><br></div>Jeff<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Thu, Feb 18, 2016 at 2:32 PM, L.B. <span dir="ltr"><<a href="mailto:bcbass2989@gmail.com" target="_blank">bcbass2989@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><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><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>
<br></div></div>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div>Jeff Duda<br>Graduate research assistant<br>University of Oklahoma School of Meteorology<br>Center for Analysis and Prediction of Storms<br></div>
</font></span></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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br></div>