mirror of https://github.com/ecmwf/eccodes.git
Testing: move old deprecated code
This commit is contained in:
parent
fdb658b1bc
commit
01701feb84
|
@ -1,36 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# --- setup the environment
|
|
||||||
. ./include.sh
|
|
||||||
|
|
||||||
src=${data_dir}/essential_ml/grib1_ecmwf
|
|
||||||
dest=${data_dir}/essential_ml/grib2_ecmwf
|
|
||||||
|
|
||||||
if [ ! -d $src ]; then
|
|
||||||
echo "Data source folder does not exist: '$src'"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p $dest
|
|
||||||
|
|
||||||
# --- convert to grib 2
|
|
||||||
|
|
||||||
for file in `ls $src/*.grib`; do
|
|
||||||
f=`basename $file`
|
|
||||||
${tools_dir}/grib_set -s edition=2 $file $dest/$f
|
|
||||||
|
|
||||||
if [ ! $? == 0 ]; then
|
|
||||||
echo "FAIL"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# --- compare the results
|
|
||||||
|
|
||||||
set +e # don't fail on error for now
|
|
||||||
for file in `ls $src/*.grib`; do
|
|
||||||
name=`basename $file`
|
|
||||||
echo "Comparing $name"
|
|
||||||
${tools_dir}/grib_compare -c mars:n,name,shortName $src/$name $dest/$name
|
|
||||||
done
|
|
||||||
set -e
|
|
Loading…
Reference in New Issue