grib2ctl template option problem

Kathrin Schoellhammer kschoell at GFZ-POTSDAM.DE
Thu Jun 14 04:05:22 EDT 2007


Hi Matthias,

thanks but I know this way , thats how I do it since years, but I read on the
grib2ctl.pl homepage that grib2ctl.pl can now understand template option and
I thought it could be easier now. I have 10 years with 8 parameters makes 80
ctl-files to modify.

But at this moment, I had have another look on the grib2ctl homepage and I saw
a new third exception:
(3) the wildcards have to form a single date code, %y4_%m2_%d2 is not allowed.

So we know that we must do it in the old fashioned way again (and create other
filenames in future, like 20040302 not 2004_03_01!)

But thanks for your email!

Schoene Gruesse aus dem warmfeuchten Potsdam

Kathrin



On Wednesday 13 June 2007 20:06, Matthias Munnich wrote:
> Hi Kathrin,
>
> I believe grib2ctl.pl does not understand templates.  What I do in such
> cases is:
>
> (1) Pick the first file and run grib2ctl.pl on it:
> $ grib2ctl.pl iMET-ECMWF-IFS-TEMP-E+2006_01_01_09.grb >
> iMET-ECMWF-IFS-TEMP-E+2006.ctl
>
> (2) Edit iMET-ECMWF-IFS-TEMP-E+2006.ctl:
> (2.1) Add an "options template" line.
> (2.2) Change the dset line to
> dset iMET-ECMWF-IFS-TEMP-E+2006_%m2_%d2_%h2.grb
> (2.3) Adjust the number of time steps in the tdef line to whatever the
> total number of time steps is in all files together.  If you
> only have one time step per file, you also need to choose the proper
> time interval.
>
> (3) Finally run gribmap on iMET-ECMWF-IFS-TEMP-E+2006.ctl.
>
> Schöne Grüße!
>
> Matt(hias)
>
> Kathrin Schoellhammer wrote:
> > Dear All,
> >
> > I have a lot of gribfiles for one parameter in one directory for each
> > year named e.g.
> >
> >  iMET-ECMWF-IFS-TEMP-E+2006_01_01_09.grb
> >  iMET-ECMWF-IFS-TEMP-E+2006_01_01_21.grb
> >  iMET-ECMWF-IFS-TEMP-E+2006_01_02_09.grb
> >  iMET-ECMWF-IFS-TEMP-E+2006_01_02_21.grb
> > .....
> > I try to make one ctl file for each year with grib2ctl
> > ($version="0.9.12.5p39c")  on a linux PC in that way
> >
> > grib2ctl.pl iMET-ECMWF-IFS-TEMP-E+2006_%m2_%d2_%h2.grb
> > iMET-ECMWF-IFS-TEMP-E+2006.idx iMET-ECMWF-IFS-TEMP-E.pdef >
> > TEMP-E+2006.ctl
> >
> > but all I get is an errormessage:
> >
> > Error: could not find any files in directory:blabla
> >
> > I need a lot of ctl files (9 parameter for 10 years, so I will NOT make
> > the ctl files manually....
> >
> > Thanks a lot for help,
> >
> > Kathrin
>
> --
> --------------------------------
> Matthias Munnich
> Univ. of California, Los Angeles
> Dept. of Atmos. and Oceanic Sc. and
> Inst. of Geophysics and Planetary Physics
> 3845 Slichter Hall
> Los Angeles, CA 90095-1567
> Phone: +1-310-794 5899
> Fax: +1-310-206 3051
> Email: munnich at atmos.ucla.edu
> --------------------------------



More information about the gradsusr mailing list