how to use level values in calculation

Matt Georgescu matt1 at CEP.RUTGERS.EDU
Mon Mar 12 01:10:32 EDT 2007


John, I've pasted below a bit from one of my scripts that answers your
question:

'open narr-a_221_19900701_0000_000.ctl'
z=1
while(z<=29)
'set z 'z
val=subwrd(result,4)
'define pressure ='val
'd ugrdprs.1'
'd vgrdprs.1'
'd tmpprs.1'
'd hgtprs.1'
'define es=0.611*exp(5423*((1/273)-(1/tmpprs.1)))'
'define e=spfhprs.1*(pressure/10)/0.622'

Note that pressure, used in the above calculation of vapor pressure, was
retrived using the 'subwrd' GrADS intrinsic function. Please check the
GrADS documentation for more:

http://grads.iges.org/grads/gadoc/script.html#intrinsic

matt

 ==========================================================================
Matt Georgescu
Graduate Assistant, Center for Environmental Prediction

ENR 201                                 Rutgers University
phone: (732) 932-3891                   14 College Farm Road
homepage-http://cep.rutgers.edu/~matt1  New Brunswick, NJ 08901 USA
 ==========================================================================
      "Patience and perseverance have a magical effect before which
             difficulties disappear and obstacles vanish."

                        - John Quincy Adams
 ==========================================================================

On Sun, 11 Mar 2007, John Guhin wrote:

> Hi,
>     I have a control file with z as pressure levels. How can I use the
> values of the pressure levels in calculations?
>
>
> thanks.
>



More information about the gradsusr mailing list