<div dir="ltr">Jeff, Yes, things are progressing well.<div><br></div><div>I tried removing the quotes but that didn&#39;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 &#39;q dims&#39;, the z level was still at 1. When I ran &#39;q define&#39;, the only defined variable was minHgt. botzlev wasn&#39;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">&lt;<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>&gt;</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">&lt;<a href="mailto:bcbass2989@gmail.com" target="_blank">bcbass2989@gmail.com</a>&gt;</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>&#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><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>