<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv="Content-Type" content="text/html; charset=utf-8"> </HEAD>Try creating an array with all the variable names as strings and loop over that inside the WHILE loop. <br/><br/>If you need more clarification I can send you an example once I get to my computer.<br/><br/>Cheers,<br/>Matt<p>Sent from my Verizon Wireless BlackBerry</p><p><hr size=2 width=100% align=center tabindex=-1><b>From</b>: Javier Peña <javier.p@EREDA.COM><br><b>Date</b>: Thu, 17 Sep 2009 11:23:31 +0200<br><b>To</b>: <GRADSUSR@LIST.CINECA.IT><br><b>Subject</b>: Help<br></font></p><p>We have some data in a netcdf file (u velocity, v velocity, geopetential,ect) to some dates and some points of a grid.<br>Now, we extract each variable in a file with following script:<br>For example to extract the temperature:<br> <br>'reinit'<br>'sdfopen ereda'<br>'set lat 41'<br>'set lon 359'<br>'set lev 1'<br>to = 1<br>* Write the variable to a file<br>*'set gxout vector'<br>*'set fwrite z:\dummy.dat'<br> while (to<5)<br>'set t 'to<br>'d t'<br>rrc = write('c:\prueba_c\pruebas_archivo_ecmwf\ereda_ecmwf_t.txt',result)<br>to = to + 1<br>endwhile</p><div>We'd like to extract all variables in a same file and the variables are in differents columns. </div><div>Are there any script to do this?<br clear="all"></div><div></div><br>-- <br>Javier Peña Álvarez<br>Energías Renovables<br><a href="mailto:javier.p@ereda.com" target="_blank">javier.p@ereda.com</a><br>EREDA<br><br> Tel: +34 91 5014755<br> Fax: +34 91 5014756<br> c/ Téllez 26, 28007 MADRID<br> <a href="http://www.ereda.com/" target="_blank">www.ereda.com</a><br> </html>