grads output
Davide Sotil Bertanzetti
davide at CEAM.ES
Tue Sep 19 11:46:55 EDT 2006
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).
>
>
>On 9/12/06, Stegert <stegert at ifm.uni-hamburg.de> wrote:
>> Dear Francesco,
>> I think the best way is simple ASCII data to be opened by excel (and ay
>> other).
>> With
>> dat = write('output.txt',variable,append)
>> you can write the content of 'variable' into 'output.txt'.
>> The append enables appending the data to file.
>> So for a whole matrix you can do it in a loop of:
>>
>> while (counter < number_of_lines)
>> var2 = ''
>> while (line < number_of_colums)
>> var2 = var2 ' ' var_to_add
>> endwhile
>> dat = write('output.txt',var2,append)
>> counter = counter + 1
>> endwhile
>>
>> Here, you permanently add values to 'var2' and write them into the file.
>> E.g. var_to_add could be
>> 'd pressure' [when x,y,z,t fixed]
>> var_to_add = subwrd(result,4)
>> and with each 'number_of_...' the dimensions in a GrADS field could be
>> changed...
>> With this writing a 2d field from GrADS to ASCII (and read in excel).
>>
>> Hope that helped
>> Christoph
>>
>> Francesco D. schrieb:
>>
>> > Hi to all
>> > I want to say i it's possible to output a data table that con be read
>> > from excel?
>> > You could help me in this problem?
>>
>> --
>> 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