Dear GrADS users,<br><br><span id="result_box" class="long_text"><span title="eu tenho tentado calcular a PV on a pressure surface usando tres variáveis, vento uev, e temperatura.">I have tried to calculate the PV on a 300 hPa surface using three variables, u and v wind, and temperature.<br>
</span><span title="Os dados de vento estão em um unico nivel isobárico eo dado de temperatura representa três níveis, 400, 300 e 250 hPa, isso porque o calculo da PV é feito através da diferença entre nível superior eo inferior.">The
wind data are in a single isobaric level (300 hPa) and temperature data are in three levels (400, 300 and 250 hPa), that because the
calculation of PV300 is made by the difference between lower and higher levels (400 - 250 hPa).<br></span><span title="Porém, o dado de saída da PV está bem estranho, quero dizer eu acho que nao está correto.">However, the PV output data is quite strange when it is opened by grads, I mean I do not think the PV values are correct.<br>
</span><span title="Eu ainda notei que o tamanho dos dados de vento são diferentes do tamanho do dado de PV">I also noticed that the wind data size are different than the PV</span></span> output size, look that:<br><br>-rw-r--r-- 1 henri users 27273216 2010-04-26 09:45 PV300_MAM1989.dat<br>
-rw-r--r-- 1 henri users 27131904 2010-04-26 09:45 u300_MAM1989.dat<br>-rw-r--r-- 1 henri users 27131904 2010-04-26 09:45 v300_MAM1989.dat<br><br>Please, could anyone help me with this?<br>The grads script to compute PV is below...<br>
<br>Thanks in advance<br>Henri<br clear="all"><br><br>****** Open the zonal and meridional wind, temperature and it calculates<br>****** Potential Vorticity (PV) on a pressure surface<br><br>&#39;reinit&#39;<br><br>&#39;open file_u.ctl&#39;<br>
&#39;open file_v.ctl&#39;<br>&#39;open file_temp.ctl&#39;<br><br>&#39;set gxout fwrite&#39;<br>&#39;set fwrite PV300_MAM1989.dat&#39;<br><br>k=1<br>while (k&lt;=368)<br>&#39;set t &#39;k<br><br>&#39;set lev 300&#39;<br><br>
* ########## Coriolis calculation<br>&#39;define coriol=2*7.29e-5*sin(lat*3.1415/180)&#39;<br><br>* ########## Relative Vorticity calculation<br>&#39;define vort=hcurl(u300,v300.2)&#39;<br><br>* ########## Potential Temperature (theta) calculation <br>
* ########## tmat is Time Mean Absolute Temperature <br><br>&#39;define dt=tmat.3(z-1)*pow(1000/lev(z-1),0.286)-tmat.3(z+1)*pow(1000/lev(z+1),0.286)&#39;<br>&#39;define dp=100*(lev(z-1)-lev(z+1))&#39;<br><br>* ########## differential of theta/pressure<br>
<br>&#39;define dtdp=dt/dp&#39;<br><br>* ########### PV calculation on pressure surface<br><br>&#39;define pv = -9.8*(coriol+vort)*dtdp&#39;<br><br>&#39;d pv&#39;<br><br>k= k+1<br>endwhile<br><br>&#39;disable fwrite&#39;<br>
<br>&#39;set gxout shaded&#39;<br>&#39;set gxout contour&#39;<br><br>&#39;quit&#39;<br><br><br><br>-- <br>Henri Rossi Pinheiro<br>Meteorology Master Student<br>National Institute for Space Research (INPE)<br>Weather Forecast and Climate Studies Center (CPTEC)<br>
Cachoeira Paulista, SP/Brazil, 12630-000 Tel.:+55-12-3186-8607<br>e-mails: <a href="mailto:henri.pinheiro@cptec.inpe.br">henri.pinheiro@cptec.inpe.br</a><br>               <a href="mailto:henri.inpe@gmail.com">henri.inpe@gmail.com</a><br>