grads output

Stegert stegert at IFM.UNI-HAMBURG.DE
Thu Sep 21 06:30:08 EDT 2006


That's correct.
There are two kind of variables in GrADS:
I personally divide them into:
- defined variables (created by "define var1" or read from an open grads
file)
  these are also available on command line (as all content - variables,
commands - that are
  put into quotes
- script variables (as mentioned by Sotil, e.g. var2 = 20)
  these are not available on command line (try on command line: q define
- lists all defined variables)
Thus in a script you can write:
'var1 = 20'
var1 = 30
The first is a "defined variable" and both can exist parallel in a script.
And you can combine them!
'var2 = var1 + 'var1 (gives "50" for var2)
Thus, on command line with "query define" you get "var1 20"

I think this is not yet clearly stated in the User's Guide (I also
needed some time to
understand this...)
Greetings, Christoph

Davide Sotil Bertanzetti schrieb:

>Hello, "Dot Deb"?
>
>That's because you are trying to define a variable, "dat", with an intrinsic
>function, "write", used to write the contents of a record to a filename, in
>your case the "variable" to the file "output.txt". You should define
>variables with operations, or other variables, or functions, or intrinsic
>functions that give you a result (like "sublin"), ... etc.
>
>If you have tryied the tutorial I suggest you ro read carefull the GRADS
>User's Guide, specially the "GrADS Scripting Language" part.
>
>
>Davide Sotil Bertanzetti.
>
>On Tue, 19 Sep 2006 15:15:35 +0200, Dot Deb <dotdeb at GMAIL.COM> wrote:
>
>
>
>>A stupid question: when I try with
>>dat = write('output.txt',variable,append)
>>GRADS answer write not a variale or function name
>>(I'm an absolute newbie, of course).
>>
>>[...]
>>
>>
--
Christoph Stegert
Intitute  for Oceanography - (ZMK/ZMAW alliance member)
University of Hamburg, GER - Ecological Modelling Group
Bundesstr.53 20146 Hamburg - +49-40-42838-7486 - Rm 348



More information about the gradsusr mailing list