<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> '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>