<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 8, 2010, at 9:23 AM, Guilherme Martins wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi users,<br><br>I need help.<br><br>I did this script below to calculate potential temperature but I don't know how to call inside my script.<br><br>tempc = variable from my file and 700 level I want theta.<br><br>Thanks,<br> <br>Guilherme.<br><br>'open se_g1.ctl'<br>'set gxout shaded'<br><br>gtheta(tempc,700)<br><br>function gtheta(temp,niv)<br>theta1 = (temp+273.15)*pow(1000/niv,0.286)</blockquote><blockquote type="cite">return(theta1)<br></blockquote><div><br></div><div>Try this instead:&nbsp;</div><div><br></div><div>'open se_g1.ctl'<br>'set gxout shaded'<br>gtheta(tempc,700)<br><br></div><div>function gtheta(temp,niv)<br>'d ('temp'+273.15)*pow(1000/'niv',0.286)'</div><div>return()</div><div><br></div><div>Now you've displayed the variable you called theta1. If you want to define it instead, change function gtheta to this:</div><div><br></div><div><div>function gtheta(temp,niv)<br>'define temp1 = ('temp'+273.15)*pow(1000/'niv',0.286)'</div><div>return()</div><div><br></div></div><div>--Jennifer</div><div><div><br></div></div><div><br></div><br><blockquote type="cite"><br clear="all"><br> -- <br> -----------------------------------------------------------<br>José Guilherme Martins dos Santos<br>Grupo de Modelagem da Atmosfera e Interfaces - GMAI<br>Divisão de Modelagem e Desenvolvimento - DMD<br>Centro de Previsão de Tempo e Estudos Climáticos - INPE<br> Rodovia Presidente Dutra, km 39 - CEP 12630-000<br>Cachoeira Paulista, SP, Brasil<br>Telefone(CP): +55 12 3186 8502<br>Celular(SJC): +55 12 91678770 / +55 12 81528580<br>E-mail: <a href="mailto:guilherme.martins@cptec.inpe.br" target="_blank">guilherme.martins@cptec.inpe.br</a><br> E-mail alternativo: <a href="mailto:jgmsantos@gmail.com" target="_blank">jgmsantos@gmail.com</a><br>Homepage: <a href="http://guilhermemartins.hd1.com.br/" target="_blank">http://guilhermemartins.hd1.com.br/</a><br>-----------------------------------------------------------<br> _______________________________________________<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; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><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></div></span> </div><br></body></html>