<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.6.2">
</HEAD>
<BODY LINK="#0000ff">
Dear Gabriella, it would be nicer to ask question in english because not all grads community speaks italian ... anyway clearly your question was "clear" for me.<BR>
<BR>
1) in batch mode (non interactive) the "answers" to everything (eg 'q config') are not displayed but assigned to the variable result<BR>
(eg include <FONT COLOR="#0000ff">say ''result</FONT> to your script)<BR>
<BR>
oss.: function as "read" or "write" return something (don't use 'write" but insted: 'dummy=write')<BR>
<BR>
hoping it helps<BR>
ciao ciao<BR>
davide<BR>
<BR>
<BR>
On Fri, 2005-09-30 at 11:11 +0200, Gabriella Ceci wrote:
<BLOCKQUOTE TYPE=CITE>
<FONT SIZE="2"><FONT COLOR="#000000">Buongiorno, scrivo perché ho un problema utilizzando GRADS in modalità batch.</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">La macchian su cui sto lavorando è un NEC TX7 con processori INTEL.</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">La versione di GRADS che ho installato è:</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">v1.8SL11 32-bit little-endian readline printim</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> </FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">mentre l’output del commando “q config” è:</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">ga-> q config</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Config: v1.8SL11 32-bit little-endian readline printim</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> </FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Grid Analysis and Display System (GrADS) Version 1.8SL11</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Copyright (c) 1988-2001 by Brian Doty </FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Center for Ocean-Land-Atmosphere Studies</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Institute for Global Environment and Society </FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> </FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Built on 12/17/02 by joew (Linux 2.2.16-22smp #1 SMP Tue Aug 22 16:39:21 EDT 2000)</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> </FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">This version of GrADS has been configured with the following options:</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> </FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> o This is a 32-bit LITTLE ENDIAN machine version.</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> o Command line editing (readline) ENABLED.</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> o CIRES/CDC (http://www.cdc.noaa.gov) SDF/XDF interface DISABLED. </FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> This version is NOT configured to read NetCDF/HDF-SDS files.</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> o URI DODS interface DISABLED.</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> o PCMDI (http://www-pcmdi.llnl.gov) LATS interface DISABLED.</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> This version is NOT configured to write GRIB or NetCDF/HDF-SDS files.</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> o DAO (http://dao.gsfc.nasa.gov) Athena Widget GUI DISABLED.</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> o NRL/DAO/PCMDI XA or ImageMagick Image Output DISABLED.</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> o printim command for direct png/gif output ENABLED.</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> (via the GD Library -- http://www.boutell.com/gd)</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> </FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> </FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Il mio problema è legato alla necessità di stampare valori puntuali in modalità batch.</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Utilizzando GRADS in modo interattivo, riesco a far stampare valori scalari (ad esempio il valore della temperatura), una volta fissate latitudine e longitudine. Poiché dovrei calcolare questi valori in un numero elevato di punti (dell’ordine delle migliaia), ho la necessità di stampare in un file di output utilizzando, dunque, GRADS in batch.</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Ho creato un file “b.gs” contenente le seguenti righe:</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">"open </FONT></FONT><FONT COLOR="#000000"><I><FONT SIZE="2">nome-file.ctl</FONT></I></FONT><FONT COLOR="#000000"><FONT SIZE="2">"</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">"set lon 10"</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">"set lat 35"</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">"d t"</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">per aprire il file .ctl di nome </FONT></FONT><FONT COLOR="#000000"><I><FONT SIZE="2">nome-file</FONT></I></FONT><FONT COLOR="#000000"><FONT SIZE="2">, setto lon e lat e dico di visualizzare il valore della temperatura.</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">In modo interattivo il valore viene stampato. Il problema è che in modalità batch il valore non viene visualizzato…</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> </FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Cercando in internet ho visto che bisogna utilizzare funzioni del tipo write, fwrite, pull.</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Quando provo ad utilizzarle, viene visualizzato:</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Unknown command: write</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Unknown command: fwrite</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Unknown command: pull</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> </FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> </FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Ho provato, dunque, ad utilizzare</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">print t</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">e viene visualizzato il messaggio:</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Metafile not currently open</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">…ma, cos’è un metafile in tale contesto??</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> </FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">COME DEVO FARE??? Come posso risolvere il mio problema??</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Qualcuno può aiutarmi, per favore??</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> </FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Grazie per la disponibilità.</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Saluti,</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Gabriella</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"> </FONT></FONT><BR>
<BR>
<I><FONT COLOR="#000000"> </FONT></I><BR>
<BR>
<I><FONT COLOR="#000000">Gabriella Ceci</FONT></I><BR>
<BR>
<I><FONT COLOR="#000000">Numerics and Parallel Computing</FONT></I><BR>
<BR>
<I><FONT COLOR="#000000">C.I.R.A. (Italian Aerospace Research Center)</FONT></I><BR>
<BR>
<I><FONT COLOR="#000000">via Maiorise, 81043 Capua (CE), Italy </FONT></I><BR>
<I><FONT COLOR="#000000">e-mail: </FONT></I><I><FONT COLOR="#000000"><FONT SIZE="2"><A HREF="mailto:g.ceci@cira.it">g.ceci@cira.it</A></FONT></FONT></I><I><FONT COLOR="#000000"> </FONT></I><BR>
<I><FONT SIZE="2"><FONT COLOR="#000000">phone : +39-0823-623289</FONT></FONT></I><BR>
<I><FONT SIZE="2"><FONT COLOR="#000000">fax : +39-0823-623126</FONT></FONT></I><BR>
<BR>
<FONT COLOR="#000000"> </FONT><BR>
<BR>
<BR>
</BLOCKQUOTE>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<PRE>
--
Sacchetti Davide
ARPAL UO3 Centro Meteo Idrologico Regione Liguria - Dir. Scientifica
P.za Vittoria 15 16121 Genova (I)
tel: +39 010 5761479
mail: <A HREF="mailto:davide.sacchetti@arpal.org">davide.sacchetti@arpal.org</A> web: <A HREF="http://www.meteoliguria.it">www.meteoliguria.it</A>
</PRE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>