using grib2ctl/gribmap for multiple grib files

Matei Georgescu matt1 at CEP.RUTGERS.EDU
Wed Nov 12 14:40:38 EST 2008


Greetings fellow GrADS users,

I need to use NARR data and have downloaded the necessary files (1 month
worth of data).

I've got the latest grib2ctl.pl file to create the .ctl file and gribmap
for the index file creation.

]./grib2ctl.pl narr-a_221_19950701_0000_000.grb > 1995070100.ctl
] gribmap -v -i 1995070100.ctl -0

the little verbose option shows everything to work as expected ... i can
subsequently visualize the data, etc.

The NARR data also comes with a handy .ctl file with a template option to
use for the entire month:
DSET  ^narr-a_221_%iy4%im2%d2_%h200_000.grb
INDEX ^narr-a_221_199507dd_0000_fff.idx

When I simply run gribmap on this file:
gribmap -v -i narr-a_221_199507dd_hh00_000.ctl -0 > gribout

the scanning works only for the hours: 00, 12, 18, 24. For 03, 09, 15, and
21, the grib file is not opened. For example:

gribmap:  Opening GRIB file narr-a_221_19950701_0900_000.grb
Warning: Could not open GRIB file: narr-a_221_19950701_0900_000.grb
gribmap:  Opening GRIB file narr-a_221_19950701_1200_000.grb
!!!!! MATCH:    1     166602  221  1  12092   7  109 1

My question is the following: i need to look at the whole lot of files ..
how can i do that automatically, without having to grib2ctl.pl & gribmap
each of the 03/09/15/21 files that gribmap couldn't open?

Thanks in advance for your assistance,
matt


-----
Matei ("Matt") Georgescu
Post-doctoral Fellow
Program on Food Security and the Environment
Stanford University
Y2E2 Bldg - MC4205
473 Via Ortega
Stanford, CA 94305
homepage - http://stanford.edu/~mateig



More information about the gradsusr mailing list