<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Sep 12, 2013, at 8:27 PM, Muhammad Yunus Ahmad Mazuki wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">There is no if else statement in GrADS scripts.<br></div></blockquote>This is incorrect. The if/else/endif syntax DOES exist in the *scripting* language, but not as an explicit GrADS function.&nbsp;</div><div><br></div><div>You can use the maskout() and const() functions to create the equivalent</div><div>u1 = maskout(u,u-3)</div><div><div>u2 = maskout(u,6-u1)</div><div>mask = const(u2,1)</div><div>display &nbsp;u*mask</div><div><br></div><div>--Jennifer</div></div><div><br></div><div><br><blockquote type="cite"><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 12, 2013 at 4:35 PM, Jayakrishnan P.R <span dir="ltr">&lt;<a href="mailto:prjayakrishnan@gmail.com" target="_blank">prjayakrishnan@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><div><div><div><div><div>Dear Users,<br></div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I have to compute the drag coefficient from Large and Pond equation using grads.&nbsp; My main concern is that does if else statement effective in grads. Otherwise I will have to write a FORTRAN program and write the outputs and read using grads. Kindly clarify this. <br>


</div>I have to do like this<br></div>Equation-1<br></div>if 3&lt;=u&lt;=6<br></div>and Equation-2 <br></div>if 6&lt;=u&lt;=26.<br></div>My version of grads is Grads 2.0.1 in Fedora core-18.<br><div><div><div><div><div><div>


<div><div><br>-- <br>Sincerely<br>***********************************************<br>Jayakrishnan.P.R<br>Teaching Associate (Atmospheric Science)<br>Academy of Climate Change Education and Research<br>Kerala Agricultural University<br>


Vellanikkara-680 656<br><br>and also<br><br>Research Fellow (Part Time)<br>Department of Atmospheric Sciences<br>CUSAT, Cochin-682 016<br>Kerala, India.<br>Mob: 09496026547<br><br>***********************************************
</div></div></div></div></div></div></div></div></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" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><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="font-size: 12px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 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; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-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; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 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; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams<br>Center for Ocean-Land-Atmosphere Studies (COLA)<br>111 Research Hall, Mail Stop 2B3<br>George Mason University<br>4400 University Drive<br>Fairfax, VA 22030&nbsp;<br><br></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></div></span><br class="Apple-interchange-newline">
</div>
<br></body></html>