mirror of https://github.com/ecmwf/eccodes.git
ECC-1115: Testing with proj command line tool (if available)
This commit is contained in:
parent
c208987e75
commit
506b2112f2
|
@ -11,11 +11,17 @@
|
|||
. ./include.sh
|
||||
|
||||
files="
|
||||
regular_latlon_surface.grib1
|
||||
mercator.grib2
|
||||
satellite.grib
|
||||
"
|
||||
|
||||
# Decide if we have the proj commandline tool
|
||||
PROJ_NAME="proj"
|
||||
PROJ_TOOL=""
|
||||
if command -v $PROJ_NAME >/dev/null 2>&1; then
|
||||
PROJ_TOOL=$PROJ_NAME
|
||||
fi
|
||||
|
||||
for f in `echo $files`; do
|
||||
file=${data_dir}/$f
|
||||
ps=`${tools_dir}/grib_get -wcount=1 -p projString $file`
|
||||
|
@ -26,6 +32,10 @@ for f in `echo $files`; do
|
|||
*+proj=*) echo OK;;
|
||||
*) echo "File: $file. Invalid proj string: |$ps|"; exit 1;;
|
||||
esac
|
||||
if test "x$PROJ_TOOL" != "x"; then
|
||||
${tools_dir}/grib_get -p longitudeOfFirstGridPointInDegrees,latitudeOfFirstGridPointInDegrees $file |\
|
||||
$PROJ_TOOL $ps
|
||||
fi
|
||||
done
|
||||
|
||||
# Reminder
|
||||
|
|
Loading…
Reference in New Issue