Help

Kim WonMoo kwmski7 at SNU.AC.KR
Thu Sep 17 06:05:02 EDT 2009


Try this :

in the 'while' loop,
------------------------------------------
while ( to<5 )
 'set t 'to
 tmp=''
 'd var1' ; tmp=subwrd(result,4)
 'd var2' ; tmp=tmp%' 'subwrd(result,4)
 'd var3' ; tmp=tmp%' 'subwrd(result,4)
 'd var4' ; tmp=tmp%' 'subwrd(result,4)
 rrc = write('c:\prueba_c\pruebas_archivo_ecmwf\ereda_ecmwf_t.txt',tmp)
 to = to + 1
endwhile
------------------------------------------

so that before you write to ~.txt file, make a augmented outputs as in the script.

here, subwrd(result,4) is used, for the 4th word of the 'result' contains the value.

Good luck,
Kim, WonMoo



From: Javier Peña 
Sent: Thursday, September 17, 2009 6:23 PM
To: GRADSUSR at LIST.CINECA.IT 
Subject: Help


We have some data in a netcdf file (u velocity, v velocity, geopetential,ect) to some dates and some points of a grid.
Now, we extract each variable in a file with following script:
For example to extract the temperature:
 
'reinit'
'sdfopen ereda'
'set lat 41'
'set lon 359'
'set lev 1'
to = 1
* Write the variable to a file
*'set gxout vector'
*'set fwrite z:\dummy.dat'
while (to<5)
'set t 'to
'd t'
rrc = write('c:\prueba_c\pruebas_archivo_ecmwf\ereda_ecmwf_t.txt',result)
to = to + 1
endwhile

We'd like to extract all variables in a same file and the variables are in differents columns. 
Are there any script to do this?


-- 
Javier Peña Álvarez
Energías Renovables
javier.p at ereda.com
EREDA

                           Tel:  +34 91 5014755
                           Fax: +34 91 5014756
                 c/ Téllez 26, 28007 MADRID
                                   www.ereda.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20090917/1891afcf/attachment.html 


More information about the gradsusr mailing list