<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div><span>Hi there,</span></div><div dir="ltr"><span>I am new to learning GrADS. I am having trouble with my if loops for my code.</span></div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8203" class="">"open NAM12Ztest.ctl"</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8205" class="">"set display color white"</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8207" class="">"clear"</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8209" class="">"set mpdset hires"</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8211" class="">"set grads off"</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8213" class="">"set lev 925"</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8215" class="">t=1</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8217" class="">while (t <= 2)</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8219" class="">'set t 't</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8221" class="">'query dim'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8223" class="">diminfo=result</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8225" class="">'run rgbset.gs'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8227" class=""> 'set lat 36 39'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8229" class=""> 'set lon -125 -120'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8231" class="">'set clevs 0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1.0'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8233" class="">'set ccols 0 4 13 3 10 7 12 8 2'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8235" class="">'set gxout shaded'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8237" class="">'define lcl=((TMP2m-DPT2m)*400)'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8239" class="">'define tc=(TMPprs-273.15)'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8241" class="">'define es=(6.11*exp((17.625*tc)/(tc+243.05)))'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8243" class="">'define e=(es*RHprs/100)'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8245" class="">'define wr=(622*e/(925-e))'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8247" class="">'define ht=(HGTprs*3.28)'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8249" class="">'define expo=(exp((2257*wr)/(1004*TMPprs)))'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8251" class="">'define numer=(-2.06327*TMPprs/(6516))'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8253" class="">'define denom=(pow((RHprs/100),0.46))'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8255" class="">'define dthetae=(expo*numer/denom)'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8257" class="">'define b=((-6.67*dthetae-0.667)*(-0.1*VVELprs))'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8259" class="">'define c=(0)'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8261" class="">'d b'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8263" class=""> if (ht <= lcl)</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8265" class=""> ' d c'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8267" class=""> endif</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8269" class=""> if (VVELprs >= 0)</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8271" class=""> ' d c'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8273" class=""> endif</div><div dir="ltr"></div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8275" class="">'set grads off'</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8277" class=""><br id="yui_3_16_0_1_1456783205385_8279" class=""></div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8277" class="">Any help would be appreciated.</div><div dir="ltr" id="yui_3_16_0_1_1456783205385_8277" class="">Thanks,</div><div></div><div id="yui_3_16_0_1_1456783205385_8287"> </div><div class="signature">JP Kalb</div></div></body></html>