[gradsusr] [Fwd: Re: calculating the potential vorticity on a surface pressure]
Austin Conaty
Austin.L.Conaty at nasa.gov
Tue Apr 13 10:38:37 EDT 2010
Henri,
Forwarding to your email address with a Cc: to the new grads user list.
I noticed you sent this to the old list serv.
-Austin
-------- Original Message --------
Subject: Re: calculating the potential vorticity on a surface pressure
Date: Tue, 13 Apr 2010 09:35:22 -0500
From: Austin Conaty <Austin.L.Conaty at nasa.gov>
Reply-To: GRADSUSR at LIST.CINECA.IT <GRADSUSR at LIST.CINECA.IT>
To: GRADSUSR at LIST.CINECA.IT <GRADSUSR at LIST.CINECA.IT>
References:
<r2p3ffad0f11004130606l88750d18m5789457b33390407 at mail.gmail.com>
Henri,
You are setting z to vary, and yet when you define "dt" and "dp"
you are using terms like z-1 and z+1. You may want to compute pv
one level at a time. You could loop through the vertical
to calculate PV at multiple levels. ( you wouldn't get a PV at
the bottom and top levels)
Cheers,
Austin Conaty
Henri Pinheiro wrote:
> Dear GrADS users,
>
> I am interested in calculating potential vorticity at a pressure surface by using a binary data set.
> The following variables available for this computation are zonal and meridional winds at 300 hPa and temperature at 18 pressure levels, from 1000 to 3 hPa, as we can see at fwrite_pv.gs<http://fwrite_pv.gs> file.
>
> After I had run the fwrite_pv.gs<http://fwrite_pv.gs> a warning appeared on the prompt, like this:
>
>
> Define Error: Unable to allocate data memory
> Size of request was -1087632 grid elements
> Syntax Error: Invalid Operand
> 'dt' not a variable or function name
> Error ocurred at column 1
> DEFINE error: Invalid expression.
> Syntax Error: Invalid Operand
> 'coriol' not a variable or function name
> Error ocurred at column 7
> DEFINE error: Invalid expression.
> Operation error: Invalid dimension environment
> Looping dimension does not vary
>
>
> Please does anybody have any idea about this problem?
> The fwrite_pv.gs<http://fwrite_pv.gs> is below.
>
> Thanks in advance
> Henri
>
> ### fwrite_pv.gs<http://fwrite_pv.gs>
> ****** Open the zonal and meridional wind, temperature and it calculates
> ****** Potential Vorticity (PV)
>
> 'reinit'
>
> 'open file_u.ctl'
> 'open file_v.ctl'
> 'open file_temp.ctl'
>
> 'set gxout fwrite'
> 'set fwrite PV_MAM1989.dat'
>
> k=1
> while (k<=368)
>
> 'set t 'k
> 'set lat -50 -15'
> 'set lon 250 345'
>
> 'set lev 1000 3'
>
> * ########## Coriolis calculation
>
> 'define coriol=2*7.29e-5*sin(lat*3.1415/180)'
>
> * ########## Relative Vorticity calculation
>
> 'define vort=hcurl(u300,v300.2)'
>
> * ########## Potential Temperature (theta)calculation
>
> 'define dt=tmat.3(z-1)*pow(1000/lev(z-1),0.286)-tmat.3(z+1)*pow(1000/lev(z+1),0.286)'
> 'define dp=100*(lev(z-1)-lev(z+1))'
>
> * ########## differential of theta/pressure
>
> 'define dtdp=dt/dp'
>
> * ########### PV calculation on pressure surface
>
> 'define pv = -9.8*(coriol+vort)*dtdp'
>
> 'd pv'
>
> k= k+1
> endwhile
>
> 'disable fwrite'
>
> 'set gxout shaded'
> 'set gxout contour'
>
> 'quit'
>
>
>
> --
> Henri Rossi Pinheiro
> Meteorology Master Student
> National Institute for Space Research (INPE)
> Weather Forecast and Climate Studies Center (CPTEC)
> Cachoeira Paulista, SP/Brazil, 12630-000 Tel.:+55-12-3186-8607
> e-mails: henri.pinheiro at cptec.inpe.br<mailto:henri.pinheiro at cptec.inpe.br>
> henri.inpe at gmail.com<mailto:henri.inpe at gmail.com>
>
>
--
Austin Conaty, SAIC Global Modeling & Assimilation Office
301-614-6149 (ph) NASA Goddard Space Flight Center
301-614-6297 (fax) Code 610.1 Greenbelt, MD 20771
Austin.L.Conaty at .nasa.gov
http://gmao.gsfc.nasa.gov
--
This message has been scanned for viruses and dangerous
content by GMAO's MailScanner, and is believed to be clean.
--
Austin Conaty, SAIC Global Modeling & Assimilation Office
301-614-6149 (ph) NASA Goddard Space Flight Center
301-614-6297 (fax) Code 610.1 Greenbelt, MD 20771
Austin.L.Conaty at .nasa.gov
http://gmao.gsfc.nasa.gov
More information about the gradsusr
mailing list