Merge branch 'develop' into feature/OrcaGrids

This commit is contained in:
Shahram Najm 2020-05-21 14:45:45 +01:00
commit 69dc49f0ae
1 changed files with 11 additions and 1 deletions

View File

@ -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