<!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.0.8">
</HEAD>
<BODY>
Hi Cristian,<BR>
<BR>
Yes, now it is right. The problem was the specification of the time parameters.<BR>
<BR>
Many thanks<BR>
Paolo<BR>
<BR>
On Fri, 2011-04-01 at 10:27, LUSSANA CRISTIAN wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE><FONT COLOR="#737373"><I>Hello Paolo,
it seems like you have a problem in the specification of the time parameters
Do suolo.ctl and msg.ctl refers to the same time intervals?

If not, when you set up 

'set t 'i

in your script then you will be able to plot the map only from file 1.

I suggest you to use the following command in the script:
'd MSLsfc(t='i')/100'
'd IMGD(t='i')/4 '

Cristian Lussana

________________________________________
From: gradsusr-bounces@gradsusr.org [gradsusr-bounces@gradsusr.org] on behalf of Paolo Boi [pboi@arpa.sardegna.it]
Sent: 01 April 2011 10:08
To: GrADS Users Forum
Subject: Re: [gradsusr] Plot images by using two different .ctl files   (different lat long steps)

Thanks Quian Hao,

The .gs script contains the lines 'd file1' and 'd file2', 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.
Here is the script .gs:

'reinit'

* Palette colori
* --------------

'run /opt/grads-1.8sl11/lib/colors/BYR-02'

* Apertura file .ctl
* ------------------

'open suolo.ctl'
'open msg.ctl'


* Mappa
* -----

'set mpdraw on'
'set display color black'
'set mproj nps'
'set mpdset hires'
'set map 13'
'set lon 0 20'
'set lat 35 45'

*
i=1
*ntime=1
*while (i&lt;=ntime)
'clear'
'set t 'i
*
* Non riesce a passare da un grafico all'altro.
* Grafica il primo file (sia esso mslp o msg) ma il secondo no
* se i due grib hanno la stessa risoluzione (vedi geop e temp 850)
* allora li grafica
* perch??
*
* Traccia le isolinee di mslp
* -------------------
'set dfile 1'

'set gxout contour'
'set cint 4 '
'set ccolor 0'
'set csmooth on'
'set clopts 1 1 0.08'
'set cthick 6'
'd MSLsfc/100'


'set dfile 2'

* Plot shading
* ------------
'set gxout shaded'
*'set ccols  13  5   10    3  2   6   9   8   16  18   20  22   24   26   28   30  40  42   44  46  48  50  52  54   56  58    60   62  64  66  68  70 72  74  76 '
*'set clevs -80  -70 -65 -60 -58 -56 -54 -52 -50 -48 -46 -44 -42 -40 -38 -36 -34 -32 -30 -28 -26 -24 -22 -20  -15 -10  -5   0   2   4   6   8   10  12   14   16  18  20  22  24  26   30 40 '
'set clevs  0  3   9    15 21  27 30 36 41 47 50 60 66  70 75 80 86  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'
'set ccols   5  13   10   3  80 79 78 77 76 75 74 73 72 71  70 69  68   67  66  65   64   63  62 61 54   52  50   48  46  44 42  40  38  36   34   32   30  28 26 24   22  20   18  16'
'd IMGD/4 '


* legenda

'run cbarn 1 1'

'q time'
res = subwrd(result,3)
data=substr(res,1,15)

'set string 1 tc 8'
'set strsiz 0.13 0.16'
'draw title IR T(C)   'data''
*'draw title IR T(C)   'day' 'month' 'year' 'hour''
'draw string 8.2 0.5 Dati EUMETSAT   Elaborazioni SAR'
*'draw string 1.2 0.5 Analisi'


'enable print msg.gm'
'print'
'disable print'
*i=i+1
*endwhile
'quit'



On Fri, 2011-04-01 at 02:28, Qian Hao wrote:
Please also provide your .gs script file. I suggest you 'set dfile' to the corresponding file you are going to dispaly. Hope this may help.

2011/3/30 Paolo Boi &lt;pboi@arpa.sardegna.it&lt;mailto:pboi@arpa.sardegna.it&gt;&gt;
Hi,

I tried to plot two different set of data in GRIB format. Here are the two .ctl files, with different step in lat long:

dset ^12140800.w73.grb
index ^12140800.w73.grb.idx
undef 9.999E+20
title 12140800.w73.grb
*  produced by grib2ctl v0.9.12.5p16
dtype grib 255
options yrev
ydef 1024 linear 28.108000 0.0269494
xdef 1280 linear -4.311000 0.0269494
tdef 1 linear 08Z14dec2009 1mo
zdef 1 linear 1 1
vars 1
IMGD  0 127,122,22  ** Image data []
ENDVARS

dset ^suolo.grb
index ^suolo.grb.idx
undef 9.999E+20
title suolo.grb
*  produced by grib2ctl v0.9.12.5p16
dtype grib 255
options yrev
ydef 25 linear 20.000000 2.5
xdef 65 linear -90.000000 2.5
tdef 14 linear 12Z21mar2011 12hr
zdef 1 linear 1 1
vars 2
MSLsfc  0 151,1,0  ** Mean Sea Level (MSL) Pressure [Pa]    Pa
Tprs  0 130,100,850  ** Temperature [K]
ENDVARS

The two data set have a completely different step in lat long.
Here is the output error. I' using grads-1.8sl11.

Data Request Error: Invalid grid coordinates
  World coordinates convert to non-integer grid coordinates
    Variable = imgd  Dimension = 3
  Error ocurred at column 1
DISPLAY error:  Invalid expression
  Expression = imgd/4
Cannot plot color bar: No shading information
Hardcopy output file is closed
No hardcopy metafile open
GX package terminated



Many thanks
Paolo


---------------------------------------------------
Paolo Boi

ARPAS- Agenzia Regionale per la Protezione dell'Ambiente della Sardegna
Dipartimento Specialistico Regionale Idrometeoclimatico
Servizio Idrometeoclimatico

Viale Porto Torres 119 - 07100 Sassari
Tel + 39 079 258600
Fax + 39 079 262681




_______________________________________________
gradsusr mailing list
gradsusr@gradsusr.org&lt;mailto:gradsusr@gradsusr.org&gt;</FONT>
<A HREF="http://gradsusr.org/mailman/listinfo/gradsusr"><U>http://gradsusr.org/mailman/listinfo/gradsusr</U></A>
<FONT COLOR="#737373">



--
&#27492;&#33268;
        &#25964;&#31036;&#65281;

________________________________

_______________________________________________
gradsusr mailing list
gradsusr@gradsusr.org</FONT>
<A HREF="http://gradsusr.org/mailman/listinfo/gradsusr"><U>http://gradsusr.org/mailman/listinfo/gradsusr</U></A>
<FONT COLOR="#737373">









---------------------------------------------------

Paolo Boi



ARPAS- Agenzia Regionale per la Protezione dell'Ambiente della Sardegna

Dipartimento Specialistico Regionale Idrometeoclimatico

Servizio Idrometeoclimatico



Viale Porto Torres 119 - 07100 Sassari

Tel + 39 079 258600

Fax + 39 079 262681

















_______________________________________________
gradsusr mailing list
gradsusr@gradsusr.org</FONT>
<A HREF="http://gradsusr.org/mailman/listinfo/gradsusr"><U>http://gradsusr.org/mailman/listinfo/gradsusr</U></I></A></PRE>
</BLOCKQUOTE>
<PRE><TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
---------------------------------------------------<BR>
<B>Paolo Boi</B><BR>
<BR>
ARPAS- Agenzia Regionale per la Protezione dell'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>
</TABLE>

</TD>
</TR>
</TABLE>
</PRE>
</BODY>
</HTML>