mirror of https://github.com/ecmwf/eccodes.git
Testing: use -N for grib index build
This commit is contained in:
parent
6541872ca3
commit
8def561d76
|
@ -30,7 +30,7 @@ rm -f out.gribidx $temp
|
|||
tempIndex=temp.$label.$$.idx
|
||||
tempOut=temp.$label.$$.out
|
||||
tempRef=temp.$label.$$.ref
|
||||
${tools_dir}/grib_index_build -o $tempIndex ${infile} >/dev/null
|
||||
${tools_dir}/grib_index_build -N -o $tempIndex ${infile} >/dev/null
|
||||
|
||||
# Must remove first two lines and the last (filename specifics)
|
||||
${tools_dir}/grib_dump -D ${tempIndex} | sed '1,2d' | sed '$d' > $tempOut
|
||||
|
@ -38,23 +38,63 @@ cat $tempOut
|
|||
|
||||
cat > $tempRef <<EOF
|
||||
Index keys:
|
||||
key name = mars.date
|
||||
values = 20090129
|
||||
key name = mars.time
|
||||
values = 0
|
||||
key name = mars.expver
|
||||
values = 0001
|
||||
key name = mars.stream
|
||||
values = enfo
|
||||
key name = mars.class
|
||||
values = od
|
||||
key name = mars.type
|
||||
values = pf
|
||||
key name = mars.step
|
||||
values = 12, 24, 48, 60
|
||||
key name = mars.param
|
||||
values = 130.128, 129.128
|
||||
key name = mars.levtype
|
||||
values = pl
|
||||
key name = mars.levelist
|
||||
values = 10, 50, 100, 200, 250, 300, 400, 500, 700, 850, 925, 1000
|
||||
key name = mars.number
|
||||
values = 1, 2, 3, 4
|
||||
key name = mars.iteration
|
||||
values = undef
|
||||
key name = mars.domain
|
||||
values = g
|
||||
key name = mars.fcmonth
|
||||
values = undef
|
||||
key name = mars.fcperiod
|
||||
values = undef
|
||||
key name = mars.hdate
|
||||
values = undef
|
||||
key name = mars.method
|
||||
values = undef
|
||||
key name = mars.model
|
||||
values = undef
|
||||
key name = mars.origin
|
||||
values = undef
|
||||
key name = mars.quantile
|
||||
values = undef
|
||||
key name = mars.range
|
||||
values = undef
|
||||
key name = mars.refdate
|
||||
values = undef
|
||||
key name = mars.direction
|
||||
values = undef
|
||||
key name = mars.frequency
|
||||
values = undef
|
||||
Index count = 384
|
||||
EOF
|
||||
|
||||
diff $tempRef $tempOut
|
||||
|
||||
${tools_dir}/grib_index_build -k mars.levtype -o $tempIndex ${data_dir}/tigge_cf_ecmwf.grib2 |\
|
||||
${tools_dir}/grib_index_build -N -k mars.levtype -o $tempIndex ${data_dir}/tigge_cf_ecmwf.grib2 |\
|
||||
grep -q "mars.levtype = { sfc, pl, pv, pt }"
|
||||
|
||||
${tools_dir}/grib_index_build -k mars.levtype:i -o $tempIndex ${data_dir}/tigge_cf_ecmwf.grib2 |\
|
||||
${tools_dir}/grib_index_build -N -k mars.levtype:i -o $tempIndex ${data_dir}/tigge_cf_ecmwf.grib2 |\
|
||||
grep -q "mars.levtype = { 103, 1, 106, 100, 101, 8, 109, 107 }"
|
||||
|
||||
# grib_compare with index files
|
||||
|
@ -66,8 +106,8 @@ tempGribFile2=temp.$label.$$.file2.grib
|
|||
cat ${data_dir}/high_level_api.grib2 ${data_dir}/sample.grib2 > $tempGribFile1
|
||||
cat ${data_dir}/sample.grib2 ${data_dir}/high_level_api.grib2 > $tempGribFile2
|
||||
|
||||
${tools_dir}/grib_index_build -o $tempIndex1 $tempGribFile1
|
||||
${tools_dir}/grib_index_build -o $tempIndex2 $tempGribFile2
|
||||
${tools_dir}/grib_index_build -N -o $tempIndex1 $tempGribFile1
|
||||
${tools_dir}/grib_index_build -N -o $tempIndex2 $tempGribFile2
|
||||
${tools_dir}/grib_compare $tempIndex1 $tempIndex2
|
||||
rm -f $tempIndex1 $tempIndex2 $tempGribFile1 $tempGribFile2
|
||||
|
||||
|
|
Loading…
Reference in New Issue