Well, hello&nbsp;<meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">Paolo,</span><div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">I found that&nbsp;</span></font>&#39;set dfile&#39; could not change the dimension configuration of grads.When you open a file for the first time, grads will set up its dimensional coordinates accordingly.When you open a second file, the dimensional coordinates do not change. You may check this with the &#39;q dims&#39; command.<div>
And that&#39;s the problem. So you have to close the first opened file first if you want to display another variable from a second data file with a different coordinate settings. You my change you .gs file like this:</div>
<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><br></span></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">&#39;open suolo.ctl&#39;</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">...</span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">&#39;close 1&#39;<br>
&#39;open msg.ctl&#39;</span><br>
...</div><div><br></div><div>I think this would work.<br><div class="gmail_quote">2011/4/1 Paolo Boi <span dir="ltr">&lt;<a href="mailto:pboi@arpa.sardegna.it" target="_blank">pboi@arpa.sardegna.it</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




  
  

<div>
Thanks Quian Hao,<br>
<br>
The .gs script contains the lines &#39;d file1&#39; and &#39;d file2&#39;, but it plots only the first data file, no matter it is. I tried to exchange the two files, but it plots only the first one.<br>
Here is the script .gs:<br>
<br>
&#39;reinit&#39;<br>
<br>
* Palette colori<br>
* --------------<br>
<br>
&#39;run /opt/grads-1.8sl11/lib/colors/BYR-02&#39;<br>
<br>
* Apertura file .ctl<br>
* ------------------<br>
<br>
&#39;open suolo.ctl&#39;<br>
&#39;open msg.ctl&#39;<br>
<br>
<br>
* Mappa<br>
* -----<br>
<br>
&#39;set mpdraw on&#39;<br>
&#39;set display color black&#39;<br>
&#39;set mproj nps&#39;<br>
&#39;set mpdset hires&#39;<br>
&#39;set map 13&#39;<br>
&#39;set lon 0 20&#39;<br>
&#39;set lat 35 45&#39;<br>
<br>
*<br>
i=1<br>
*ntime=1<br>
*while (i&lt;=ntime)<br>
&#39;clear&#39;<br>
&#39;set t &#39;i<br>
*<br>
* Non riesce a passare da un grafico all&#39;altro.<br>
* Grafica il primo file (sia esso mslp o msg) ma il secondo no<br>
* se i due grib hanno la stessa risoluzione (vedi geop e temp 850)<br>
* allora li grafica<br>
* perch??<br>
*<br>
* Traccia le isolinee di mslp<br>
* -------------------<br>
&#39;set dfile 1&#39;<br>
<br>
&#39;set gxout contour&#39;<br>
&#39;set cint 4 &#39;<br>
&#39;set ccolor 0&#39;<br>
&#39;set csmooth on&#39;<br>
&#39;set clopts 1 1 0.08&#39;<br>
&#39;set cthick 6&#39;<br>
&#39;d MSLsfc/100&#39;<br>
<br>
<br>
&#39;set dfile 2&#39;<br>
<br>
* Plot shading<br>
* ------------<br>
&#39;set gxout shaded&#39;<br>
*&#39;set ccols&nbsp; 13&nbsp; 5&nbsp;&nbsp; 10&nbsp;&nbsp;&nbsp; 3&nbsp; 2&nbsp;&nbsp; 6&nbsp;&nbsp; 9&nbsp;&nbsp; 8&nbsp;&nbsp; 16&nbsp; 18&nbsp;&nbsp; 20&nbsp; 22&nbsp;&nbsp; 24&nbsp;&nbsp; 26&nbsp;&nbsp; 28&nbsp;&nbsp; 30&nbsp; 40&nbsp; 42&nbsp;&nbsp; 44&nbsp; 46&nbsp; 48&nbsp; 50&nbsp; 52&nbsp; 54&nbsp;&nbsp; 56&nbsp; 58&nbsp;&nbsp;&nbsp; 60&nbsp;&nbsp; 62&nbsp; 64&nbsp; 66&nbsp; 68&nbsp; 70 72&nbsp; 74&nbsp; 76 &#39;<br>
*&#39;set clevs -80&nbsp; -70 -65 -60 -58 -56 -54 -52 -50 -48 -46 -44 -42 -40 -38 -36 -34 -32 -30 -28 -26 -24 -22 -20&nbsp; -15 -10&nbsp; -5&nbsp;&nbsp; 0&nbsp;&nbsp; 2&nbsp;&nbsp; 4&nbsp;&nbsp; 6&nbsp;&nbsp; 8&nbsp;&nbsp; 10&nbsp; 12&nbsp;&nbsp; 14&nbsp;&nbsp; 16&nbsp; 18&nbsp; 20&nbsp; 22&nbsp; 24&nbsp; 26&nbsp;&nbsp; 30 40 &#39;<br>
&#39;set clevs&nbsp; 0&nbsp; 3&nbsp;&nbsp; 9&nbsp;&nbsp;&nbsp; 15 21&nbsp; 27 30 36 41 47 50 60 66&nbsp; 70 75 80 86&nbsp; 90 95 100 105 110 115 120 125 130 135 140 145 150 155 160 165 170 175 180 185 190 195 200 205 210 215 220 225 230 235 240 245 250 255&#39;<br>
&#39;set ccols&nbsp;&nbsp; 5&nbsp; 13&nbsp;&nbsp; 10&nbsp;&nbsp; 3&nbsp; 80 79 78 77 76 75 74 73 72 71&nbsp; 70 69&nbsp; 68&nbsp;&nbsp; 67&nbsp; 66&nbsp; 65&nbsp;&nbsp; 64&nbsp;&nbsp; 63&nbsp; 62 61 54&nbsp;&nbsp; 52&nbsp; 50&nbsp;&nbsp; 48&nbsp; 46&nbsp; 44 42&nbsp; 40&nbsp; 38&nbsp; 36&nbsp;&nbsp; 34&nbsp;&nbsp; 32&nbsp;&nbsp; 30&nbsp; 28 26 24&nbsp;&nbsp; 22&nbsp; 20&nbsp;&nbsp; 18&nbsp; 16&#39;<br>
&#39;d IMGD/4 &#39;<br>
<br>
<br>
* legenda<br>
<br>
&#39;run cbarn 1 1&#39;<br>
<br>
&#39;q time&#39;<br>
res = subwrd(result,3)<br>
data=substr(res,1,15)<br>
<br>
&#39;set string 1 tc 8&#39;<br>
&#39;set strsiz 0.13 0.16&#39;<br>
&#39;draw title IR T(C)&nbsp;&nbsp; &#39;data&#39;&#39;<br>
*&#39;draw title IR T(C)&nbsp;&nbsp; &#39;day&#39; &#39;month&#39; &#39;year&#39; &#39;hour&#39;&#39;<br>
&#39;draw string 8.2 0.5 Dati EUMETSAT&nbsp;&nbsp; Elaborazioni SAR&#39;<br>
*&#39;draw string 1.2 0.5 Analisi&#39;<br>
<br>
<br>
&#39;enable print <a href="http://msg.gm" target="_blank">msg.gm</a>&#39;<br>
&#39;print&#39;<br>
&#39;disable print&#39;<br>
*i=i+1<br>
*endwhile<br>
&#39;quit&#39;<div><div></div><div><br>
<br>
<br>
<br>
On Fri, 2011-04-01 at 02:28, Qian Hao wrote:
<blockquote type="CITE">
    <font color="#737373"><i>Please also provide your .gs script file. I suggest you &#39;set dfile&#39; to the corresponding file you are going to dispaly. Hope this may help.<br>
    <br>
    2011/3/30 Paolo Boi &lt;</i></font><a href="mailto:pboi@arpa.sardegna.it" target="_blank"><u>pboi@arpa.sardegna.it</u></a><font color="#737373">&gt;
    <blockquote>
        Hi,<br>
        <br>
        I tried to plot two different set of data in GRIB format. Here are the two .ctl files, with different step in lat long:<br>
        <br>
        dset ^12140800.w73.grb<br>
        index ^12140800.w73.grb.idx<br>
        undef 9.999E+20<br>
        title 12140800.w73.grb<br>
        *&nbsp; produced by grib2ctl v0.9.12.5p16<br>
        dtype grib 255<br>
        options yrev<br>
        ydef 1024 linear 28.108000 0.0269494<br>
        xdef 1280 linear -4.311000 0.0269494<br>
        tdef 1 linear 08Z14dec2009 1mo<br>
        zdef 1 linear 1 1<br>
        vars 1<br>
        IMGD&nbsp; 0 127,122,22&nbsp; ** Image data []<br>
        ENDVARS<br>
        <br>
        dset ^suolo.grb<br>
        index ^suolo.grb.idx<br>
        undef 9.999E+20<br>
        title suolo.grb<br>
        *&nbsp; produced by grib2ctl v0.9.12.5p16<br>
        dtype grib 255<br>
        options yrev<br>
        ydef 25 linear 20.000000 2.5<br>
        xdef 65 linear -90.000000 2.5<br>
        tdef 14 linear 12Z21mar2011 12hr<br>
        zdef 1 linear 1 1<br>
        vars 2<br>
        MSLsfc&nbsp; 0 151,1,0&nbsp; ** Mean Sea Level (MSL) Pressure [Pa]&nbsp;&nbsp;&nbsp; Pa<br>
        Tprs&nbsp; 0 130,100,850&nbsp; ** Temperature [K]<br>
        ENDVARS<br>
        <br>
        The two data set have a completely different step in lat long. <br>
        Here is the output error. I&#39; using grads-1.8sl11.<br>
        <br>
        Data Request Error: Invalid grid coordinates<br>
        &nbsp; World coordinates convert to non-integer grid coordinates<br>
        &nbsp;&nbsp;&nbsp; Variable = imgd&nbsp; Dimension = 3<br>
        &nbsp; Error ocurred at column 1<br>
        DISPLAY error:&nbsp; Invalid expression<br>
        &nbsp; Expression = imgd/4<br>
        Cannot plot color bar: No shading information<br>
        Hardcopy output file is closed<br>
        No hardcopy metafile open<br>
        GX package terminated<br>
        <br>
        <br>
        <br>
        Many thanks<br>
        Paolo<br>
        <br>
        </blockquote></font><br>
        <table cellspacing="0" cellpadding="0" width="100%">
<tbody><tr>
</tr>
<tr>
</tr>
<tr>
<td>
<table cellspacing="0" cellpadding="0" width="100%">
<tbody><tr>
</tr>
<tr>
</tr>
<tr>
<td>
---------------------------------------------------<br>
<b>Paolo Boi</b><br>
<br>
ARPAS- Agenzia Regionale per la Protezione dell&#39;Ambiente della Sardegna<br>
Dipartimento Specialistico Regionale Idrometeoclimatico<br>
Servizio Idrometeoclimatico<br>
<br>
<font size="1">Viale Porto Torres 119 - 07100 Sassari<br>
Tel + 39 079 258600<br>
Fax + 39 079 262681</font><br>
<br>
</td>
</tr>
</tbody></table>

</td>
</tr>
</tbody></table>
<br>
        <font color="#737373"><i>_______________________________________________<br>
        gradsusr mailing list</i></font><br>
        <a href="mailto:gradsusr@gradsusr.org" target="_blank"><u>gradsusr@gradsusr.org</u></a><br>
        <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
        <font color="#737373"><br>
    </font></blockquote>
    <br>
    <br>
    <br>
    -- <br>
    ´ËÖÂ<br>
    &nbsp; &nbsp; &nbsp; &nbsp; ¾´Àñ£¡<br>
    <br>
    
</div></div><hr><div>

<pre>_______________________________________________
gradsusr mailing list
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank"><u>http://gradsusr.org/mailman/listinfo/gradsusr</u></a></pre>

<pre><table cellspacing="0" cellpadding="0" width="100%">
<tbody><tr>
<td>
<table cellspacing="0" cellpadding="0" width="100%">
<tbody><tr>
<td>
---------------------------------------------------<br>
<b>Paolo Boi</b><br>
<br>
ARPAS- Agenzia Regionale per la Protezione dell&#39;Ambiente della Sardegna<br>
Dipartimento Specialistico Regionale Idrometeoclimatico<br>
Servizio Idrometeoclimatico<br>
<br>
<font size="1">Viale Porto Torres 119 - 07100 Sassari<br>
Tel + 39 079 258600<br>
Fax + 39 079 262681</font><br>
<br>
</td>
</tr>
</tbody></table>

</td>
</tr>
</tbody></table>
</pre>
</div></div>

<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>´ËÖÂ<br>&nbsp; &nbsp; &nbsp; &nbsp; ¾´Àñ£¡<br>
</div></div></div>