[gradsusr] GrADS plotted data to ASCII/TXT format

Jorge OTINIANO Rodriguez jotinianor at unmsm.edu.pe
Tue Jul 7 15:09:43 EDT 2015


Debe usar las funciones intrinsicas
read (para leer lineas columnas y caracteres desde un archivo txt)
write (para grabar lineas en un archivo txt)


Lease en
http://grads.iges.org/grads/gadoc/users.html
http://grads.iges.org/grads/gadoc/script.html#functions

*write (filename, record <, append>)*
This functions writes records to output file filename. On the first call to
write for a particular file, the file is opened in write mode. This will
destroy an existing file! If you use the optional append flag, the file
will be opened in append mode, and all writes will be appended to the end
of the file. Return codes are:

   0 - ok
   1 - open error
   8 - file open for read

*close (name)*
This function closes the named file. This must be done if you wish to read
from a file you have been writing to. This can also be used to rewind a
file. Return codes are:

   0 - ok
   1 - file not open



Ejem:
archivo=/home/santiago/prueba.txt
linea='este es un ejemplo'
lixo=write(archivo,linea); close(archivo)

en el archivo prueba.txt, se guardara la linea

2015-06-29 10:00 GMT-05:00 Andrew Friedman <andfried at gmail.com>:

> Hi Utsav,
> Check out this discussion in the GrADS documentation:
> http://www.iges.org/grads/gadoc/ascii.html
> Andrew
>
> On Mon, Jun 29, 2015 at 1:32 PM, Utsav Bhowmik <utsav at tropmet.res.in>
> wrote:
>
>>
>> Respected Sir/Madam,
>>
>> I am new to GrADS. I recently plotted (using an .nc file and .gs script)
>> a time series of area average Temperature(say) of a reanalysis datasets. x
>> axis= day of season, y axis Temperature value. I wish to export it to a
>> text or Ascii format. I searched a lot but am at a loss. CAn you guide
>> please?
>>
>> Thanks in advance
>>
>> --
>> Regards
>> Utsav
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>
>
> _______________________________________________
> 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/20150707/d0fc8276/attachment.html 


More information about the gradsusr mailing list