diff --git a/tests/grib_check_param_concepts.sh b/tests/grib_check_param_concepts.sh index 59ee1c7a1..405e39afd 100755 --- a/tests/grib_check_param_concepts.sh +++ b/tests/grib_check_param_concepts.sh @@ -95,5 +95,23 @@ cp $ECMF_DIR/shortName.legacy.def shortName.def cp $ECMF_DIR/units.legacy.def units.def $CHECK_DEFS +# ------------------------------- +echo "Check duplicates" +# ------------------------------- +paramIdFile=$ECCODES_DEFINITION_PATH/grib2/paramId.def +pids=$(grep "^'" $paramIdFile | awk -F"'" '{printf "%s\n", $2}') +set +e +for p in $pids; do + # For each paramId found in the top-level WMO file, check if it also exists + # in the ECMWF local one + grep "'$p'" $ECCODES_DEFINITION_PATH/grib2/localConcepts/ecmf/paramId.def + if [ $? -ne 1 ]; then + echo "ERROR: check paramId $p. Is it duplicated?" + exit 1 + fi +done +set -e + + cd $test_dir rm -fr $tempDir