concatenate defined fields in time

Stefano Materia stefano.materia at CMCC.IT
Wed Nov 25 08:49:57 EST 2009


Thanks to whoever replied to my question.
The solution that Davide and James suggested seems good, but
unfortunately the function skip does not seem to work (GrADS 2.0a7.1).
When I do:

set t 1 600
define aa = skip (prec,12)

"aa" has got 600 timesteps instead of 600/12=50, and does not represent
the values I expect. Even the first timestep of "aa" is different from
the first timestep of "prec".

Any further help is appreciated.
Thanks very much.


Davide Sacchetti ha scritto:
> concatenating defined fields it's hard
> but you may have other chances
> If I understood correctly your data contain monthly time series for 50
> years, then your ctl should have a line like:
>         tdef 600 linear datestart 1mo
>
> if you want to see just januaries you could do:
>         set t 1 last
>         set missconn on
>         display skip(variable,12)
>
> to see februaries:
>         set t 2 last
>         ...
>
> If this could not help, on my opinion the best thing could be to divide
> januaries from februaries in different files
>
> Have a nice day
>
>
> Davide
>
> On Tue, 2009-11-24 at 18:36 +0100, Stefano Materia wrote:
>
>> Hello,
>>
>> I have .ctl file with a monthly time series of 50 years, and I'd like to
>> make time series for each month. Namely, I want one variable to loop
>> through the 50 januaries, one to loop through the 50 februaries, etc.
>>
>> example:
>>
>> define jan1=field(t=1) "january of year #1" define jan2=field(t=13)
>> "january of year #2" ... ...
>>
>> How can I define totjan = jan1 & jan2 & ......
>>
>> so that
>>
>> set t 1 50 d totjan
>>
>> allows looping through jan1, jan2, etc... ? Is it possible to do that?
>>
>> Many thanks, Stefano
>>
>> --
>>
>> ---- PLEASE NOTE THE CHANGE OF EMAIL ADDRESS ----
>>
>> Stefano Materia - PhD
>> CMCC - Centro Euro-Mediterraneo per i Cambiamenti Climatici
>> Viale Aldo Moro, 44 - 40127 Bologna (ITA)
>> tel. +390513782676, fax +390513782655
>> stefano.materia at cmcc.it
>>
>> -------------------------------------------------
>>
>>
> --
> Sacchetti Davide
> Centro Funzionale Meteo Idrologico di Protezione Civile della Regione Liguria
> ARPAL Unit�  Tecnica Complessa di livello Regionale
> V.le Brigare Partigiane 2 16121 Genova (I)
> tel: +39 010 6437535                    fax: +39 010 6437520
> mail: davide.sacchetti at arpal.org     web: www.meteoliguria.it
>

--
---- PLEASE NOTE THE CHANGE OF EMAIL ADDRESS ----

Stefano Materia - PhD
CMCC - Centro Euro-Mediterraneo per i Cambiamenti Climatici
Viale Aldo Moro, 44 - 40127 Bologna (ITA)
tel. +390513782676, fax +390513782655
stefano.materia at cmcc.it

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



More information about the gradsusr mailing list