<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Nov 6, 2012, at 7:58 AM, Dipak Sahu wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Dear Friends <br> I am facing some problem with <b>nested if </b>loop in grads. I want to write different calculations for different logical expressions in grads using <b>"if...else"</b> loop. My problems are like below<br>
<br>'open file.ctl'<br>prompt 'Enter time t1:'<br>pull t1<br>'set t ' t1<br>if ( t1 <=13)<br> 'd expression'<br>endif<br>if (13 < t1 <=25)<br></div></blockquote>This line and others like it should be:</div><div> if (13 < t1 & t1 <= 25)</div><div>See if that fixes things. </div><div>--Jennifer</div><div><br><blockquote type="cite"><div dir="ltr"> 'd expression1'<br>endif<br>
if (25 < t1 <=37)<br> 'd expression2'<br>endif<br>if (37 < t1 <=49)<br> 'd expression3'<br>endif<br>if (49 < t1 <=61)<br> 'd expression4'<br>endif<br><br>But the above format of if...endif loop is not working properly. Is there any other way to write such expressions in GrADS. Please if anybody has any suggestions or solutions to resolve this issue kindly share with me.<br>
<br>Thanks and welcome for your suggestions<br><br>Dipak Sahu<br>Centre for Atmospheric Sciences<br>IIT Delhi, India<br><br><br clear="all"><br>-<br>
</div>
_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>http://gradsusr.org/mailman/listinfo/gradsusr<br></blockquote></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></span>
</div>
<br></body></html>