Plotting exponent of a variable in GrADS

Eric Altshuler ela at COLA.IGES.ORG
Tue Mar 25 16:17:43 EDT 2008


Annes,

math_exp is a scripting language math function, which operates on variables defined in the scripting language. Your variables U1 and U2 are grads data variables, not script variables. In addition, math_exp returns the exponential of its argument, not the logarithm.

This is what you need:

'define factor = log(U1*0.4/U2)'

Best regards,

Eric L. Altshuler
Assistant Research Scientist
Center for Ocean-Land-Atmosphere Studies
4041 Powder Mill Road, Suite 302
Calverton, MD 20705-3106
USA

E-mail: ela at cola.iges.org
Phone: (301) 902-1257
Fax: (301) 595-9793


----- Original Message -----
From: "Annes Hassankunju" <AHassankunju at FLAGSTONERE.BM>
To: GRADSUSR at LIST.CINECA.IT
Sent: Tuesday, March 25, 2008 9:39:54 AM GMT -05:00 US/Canada Eastern
Subject: Plotting exponent of a variable in GrADS




Dear GrADS users,

Â

I would like to create a shaded image of a variable which is defined as:

Â

factor = Ln(U1/U2), where Ln is the natural logarithm. I tried the script below which does not work:

Â

'define u=UGRD10m’

'define v=VGRD10m'

‘define U1=sqrt(u*u+v*v)'

'define U2=FRICVsfc'

Â

‘define factor = math_exp(U1*0.4/U2)’

Â

-----------------

Â

Any help will be much appreciated.

Â

Thanks,

Â

Annes

Â



More information about the gradsusr mailing list