Dear GrADS users,<br><br><span><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 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>'reinit'<br><br>'open file_u.ctl'<br>
'open file_v.ctl'<br>'open file_temp.ctl'<br><br>'set gxout fwrite'<br>'set fwrite PV300_MAM1989.dat'<br><br>k=1<br>while (k<=368)<br>'set t 'k<br><br>'set lev 300'<br><br>
* ########## Coriolis calculation<br>'define coriol=2*7.29e-5*sin(lat*3.<div id=":81" class="ii gt">1415/180)'<br><br>* ########## Relative Vorticity calculation<br>'define vort=hcurl(u300,v300.2)'<br><br>
* ########## Potential Temperature (theta) calculation <br>
* ########## tmat is Time Mean Absolute Temperature <br><br>'define dt=tmat.3(z-1)*pow(1000/lev(z-1),0.286)-tmat.3(z+1)*pow(1000/lev(z+1),0.286)'<br>'define dp=100*(lev(z-1)-lev(z+1))'<br><br>* ########## differential of theta/pressure<br>
<br>'define dtdp=dt/dp'<br><br>* ########### PV calculation on pressure surface<br><br>'define pv = -9.8*(coriol+vort)*dtdp'<br><br>'d pv'<br><br>k= k+1<br>endwhile<br><br>'disable fwrite'<br>
<br>'set gxout shaded'<br>'set gxout contour'<br><br>'quit'</div><br clear="all"><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>