Help

Matt Alonso matt.alonso at GMAIL.COM
Thu Sep 17 06:07:42 EDT 2009


Try creating an array with all the variable names as strings and loop over that inside the WHILE loop. 

If you need more clarification I can send you an example once I get to my computer.

Cheers,
Matt
Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: Javier Peña <javier.p at EREDA.COM>

Date:         Thu, 17 Sep 2009 11:23:31 
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/1355abb4/attachment.html 


More information about the gradsusr mailing list