[gradsusr] continue a line

Kevin Huyck klhuyck at meridian-enviro.com
Mon Sep 17 03:22:24 EDT 2012


I have searched for an answer to this question, too. To my knowledge 
there is no line continuation syntax in GrADS. When I have a long 
calculation, I break it into parts across several lines, often including 
some extra variables.

Example:
* One line
'define 
esat=0.611*pow(10,(7.5*(tmp_isbl-273.15))/(237.3+(tmp_isbl-273.15)))'

* Several lines. Note "undefines" when we are done with the temporary 
values.
'define tmp=(tmp_isbl - 273.15)'
'define a = pow(10, (7.5 * tmp) / (237.3 + tmp))'
'define esat = 0.611 * a'
'undefine tmp'
'undefine a'

Hope this helps. Good luck.

Kevin L. Huyck
Forecaster, Meridian Environmental Technology, Inc.
klhuyck at meridian-enviro.com <mailto:klhuyck at meridian-enviro.com>

Composed using Mozilla Thunderbird!

On 09/12/12 10:38, Athanasios Karagiannidis wrote:
> hello to all.
>
> My question may be a little ...dumb, but i'm stuck!
> How can i continue a big expression (eg a sum) to the next line?
> And as a secondary question: is there a maximum character length for 
> GrADS scripts?
>
> Thank you all.
>
> A. Karagiannidis
>
> Athanasios F. Karagiannidis
> Physicist, PhD Meteorology and Climatology
> E-mail: thankar at live.com
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120917/2bd8f6f0/attachment-0003.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: klhuyck.vcf
Type: text/x-vcard
Size: 307 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20120917/2bd8f6f0/attachment-0003.vcf 


More information about the gradsusr mailing list