<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"\@MS Mincho";
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
pre
{margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.StileMessaggioDiPostaElettronica18
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:595.3pt 841.9pt;
margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=IT link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Thanks a lot for this
email. I translated for you my first email just after your automatic reply…did
you find it in your mailbox??<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Anyway, I solved the
problem to create a file.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Writing the following
instructions in the input-file<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-GB
style='font-size:12.0pt'>'set fwrite output.dat'<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-GB
style='font-size:12.0pt'>'set gxout fwrite'<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-GB
style='font-size:12.0pt'>'d t'<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-GB
style='font-size:12.0pt'>'disable fwrite'<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>I’m able to create an
output-file…the problem now is that this output-file is empty…<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Do you have an idea to
solve this problem??<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Thanks for your help.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Sincerely,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Gabriella<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>Da:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
GRADSUSR@LIST.CINECA.IT [mailto:GRADSUSR@LIST.CINECA.IT] <b><span
style='font-weight:bold'>Per conto di </span></b>Davide Sacchetti<br>
<b><span style='font-weight:bold'>Inviato:</span></b> venerdì 30 settembre 2005
16.38<br>
<b><span style='font-weight:bold'>A:</span></b> GRADSUSR@LIST.CINECA.IT<br>
<b><span style='font-weight:bold'>Oggetto:</span></b> Re: problema con GRADS in
batch</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>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=blue><span style='color:blue'>say ''result</span></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: <o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=2 color=black
face="Times New Roman"><span style='font-size:10.0pt;color:black'>Buongiorno,
scrivo perché ho un problema utilizzando GRADS in modalità batch.</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>La macchian
su cui sto lavorando è un NEC TX7 con processori INTEL.</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>La versione
di GRADS che ho installato è:</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>v1.8SL11
32-bit little-endian readline printim</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'> </span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>mentre
l’output del commando “q config” è:</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>ga-> q
config</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>Config:
v1.8SL11 32-bit little-endian readline printim</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'> </span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>Grid
Analysis and Display System (GrADS) Version 1.8SL11</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>Copyright
(c) 1988-2001 by Brian Doty </span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>Center for
Ocean-Land-Atmosphere Studies</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>Institute
for Global Environment and Society </span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'> </span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>Built on
12/17/02 by joew (Linux 2.2.16-22smp #1 SMP Tue Aug 22 16:39:21 EDT 2000)</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'> </span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>This
version of GrADS has been configured with the following options:</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'> </span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>
o This is a 32-bit LITTLE ENDIAN machine version.</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>
o Command line editing (readline) ENABLED.</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>
o CIRES/CDC (http://www.cdc.noaa.gov) SDF/XDF interface DISABLED. </span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>
This version is NOT configured to read NetCDF/HDF-SDS files.</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>
o URI DODS interface DISABLED.</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>
o PCMDI (http://www-pcmdi.llnl.gov) LATS interface DISABLED.</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>
This version is NOT configured to write GRIB or NetCDF/HDF-SDS files.</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>
o DAO (http://dao.gsfc.nasa.gov) Athena Widget GUI DISABLED.</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>
o NRL/DAO/PCMDI XA or ImageMagick Image Output DISABLED.</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>
o printim command for direct png/gif output ENABLED.</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>
(via the GD Library -- http://www.boutell.com/gd)</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'> </span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'> </span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>Il mio
problema è legato alla necessità di stampare valori puntuali in modalità batch.</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>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.</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>Ho creato
un file “b.gs” contenente le seguenti righe:</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>"open <i><span
style='font-style:italic'>nome-file.ctl</span></i>"</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>"set
lon 10"</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>"set
lat 35"</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>"d
t"</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>per aprire
il file .ctl di nome <i><span style='font-style:italic'>nome-file</span></i>,
setto lon e lat e dico di visualizzare il valore della temperatura.</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>In modo
interattivo il valore viene stampato. Il problema è che in modalità batch il
valore non viene visualizzato…</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'> </span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>Cercando in
internet ho visto che bisogna utilizzare funzioni del tipo write, fwrite, pull.</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>Quando
provo ad utilizzarle, viene visualizzato:</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>Unknown
command: write</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>Unknown
command: fwrite</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>Unknown
command: pull</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'> </span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'> </span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>Ho provato,
dunque, ad utilizzare</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>print t</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>e viene
visualizzato il messaggio:</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>Metafile
not currently open</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>…ma, cos’è un
metafile in tale contesto??</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'> </span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>COME DEVO
FARE??? Come posso risolvere il mio problema??</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>Qualcuno
può aiutarmi, per favore??</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'> </span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>Grazie per
la disponibilità.</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>Saluti,</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'>Gabriella</span></font><br>
<br>
<font size=2 color=black><span style='font-size:10.0pt;color:black'> </span></font><br>
<br>
<i><font color=black><span style='color:black;font-style:italic'> </span></font></i><br>
<br>
<i><font color=black><span style='color:black;font-style:italic'>Gabriella Ceci</span></font></i><br>
<br>
<i><font color=black><span style='color:black;font-style:italic'>Numerics and
Parallel Computing</span></font></i><br>
<br>
<i><font color=black><span style='color:black;font-style:italic'>C.I.R.A.
(Italian Aerospace Research Center)</span></font></i><br>
<br>
<i><font color=black><span style='color:black;font-style:italic'>via Maiorise,
81043 Capua (CE), Italy </span></font></i><br>
<i><font color=black><span style='color:black;font-style:italic'>e-mail: </span></font></i><i><font
size=2 color=black><span style='font-size:10.0pt;color:black;font-style:italic'><a
href="mailto:g.ceci@cira.it">g.ceci@cira.it</a></span></font><font color=black><span
style='color:black'> </span></font></i><br>
<i><font size=2 color=black><span style='font-size:10.0pt;color:black;
font-style:italic'>phone : +39-0823-623289</span></font></i><br>
<i><font size=2 color=black><span style='font-size:10.0pt;color:black;
font-style:italic'>fax : +39-0823-623126</span></font></i><br>
<br>
<font color=black><span style='color:black'> </span></font><br>
<br>
<o:p></o:p></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%"
style='width:100.0%'>
<tr>
<td style='padding:0cm 0cm 0cm 0cm'><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>--<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>Sacchetti Davide<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>ARPAL UO3 Centro Meteo Idrologico Regione Liguria - Dir. Scientifica<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>P.za Vittoria 15 16121 Genova (I)<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>tel: +39 010 5761479 <o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>mail: <a
href="mailto:davide.sacchetti@arpal.org">davide.sacchetti@arpal.org</a> web: <a
href="http://www.meteoliguria.it">www.meteoliguria.it</a><o:p></o:p></span></font></pre></td>
</tr>
</table>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>