<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>&quot;if...else&quot;</b> loop. My problems are like below<br>

<br>&#39;open file.ctl&#39;<br>prompt &#39;Enter time t1:&#39;<br>pull t1<br>&#39;set t &#39; t1<br>if ( t1 &lt;=13)<br>    &#39;d expression&#39;<br>endif<br>if (13 &lt; t1 &lt;=25)<br>     &#39;d expression1&#39;<br>endif<br>

if (25 &lt; t1 &lt;=37)<br>  &#39;d  expression2&#39;<br>endif<br>if (37 &lt; t1 &lt;=49)<br>  &#39;d  expression3&#39;<br>endif<br>if (49 &lt; t1 &lt;=61)<br>   &#39;d  expression4&#39;<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>