diff --git a/definitions/grib1/scanning_mode.def b/definitions/grib1/scanning_mode.def index ccd4b3c18..ca2c5c60f 100644 --- a/definitions/grib1/scanning_mode.def +++ b/definitions/grib1/scanning_mode.def @@ -6,7 +6,9 @@ flagbit iScansNegatively(scanningMode,7) : dump; flagbit jScansPositively(scanningMode,6) : dump; flagbit jPointsAreConsecutive(scanningMode,5) : dump; constant alternativeRowScanning=0 : dump; + transient iScansPositively = !iScansNegatively : constraint; +transient jScansNegatively = !jScansPositively : constraint; alias geography.iScansNegatively=iScansNegatively; alias geography.jScansPositively=jScansPositively; diff --git a/definitions/grib2/template.3.scanning_mode.def b/definitions/grib2/template.3.scanning_mode.def index 6f90222da..793b8946f 100644 --- a/definitions/grib2/template.3.scanning_mode.def +++ b/definitions/grib2/template.3.scanning_mode.def @@ -21,6 +21,7 @@ alias geography.jScansPositively=jScansPositively; alias geography.jPointsAreConsecutive=jPointsAreConsecutive; transient iScansPositively = !iScansNegatively : constraint; +transient jScansNegatively = !jScansPositively : constraint; flagbit scanningMode5(scanningMode,3) = 0: read_only; flagbit scanningMode6(scanningMode,2) = 0: read_only; diff --git a/tests/grib_change_scanning.sh b/tests/grib_change_scanning.sh index 9bd8f8561..1f2f5ab29 100755 --- a/tests/grib_change_scanning.sh +++ b/tests/grib_change_scanning.sh @@ -121,6 +121,13 @@ status=$? set -e [ $status -ne 0 ] +# ECC-1492 +grib_check_key_equals "$ECCODES_SAMPLES_PATH/GRIB1.tmpl" iScansNegatively,iScansPositively '0 1' +grib_check_key_equals "$ECCODES_SAMPLES_PATH/GRIB1.tmpl" jScansNegatively,jScansPositively '1 0' + +grib_check_key_equals "$ECCODES_SAMPLES_PATH/GRIB2.tmpl" iScansNegatively,iScansPositively '0 1' +grib_check_key_equals "$ECCODES_SAMPLES_PATH/GRIB2.tmpl" jScansNegatively,jScansPositively '1 0' + # Clean up rm -f $tempFilt $tempGribA $tempGribB $tempRef $tempText rm -f ${data_dir}/scan1.grib ${data_dir}/scan.grib