diff --git a/definitions/grib2/localConcepts/ecmf/unstructuredGrid.def b/definitions/grib2/localConcepts/ecmf/unstructuredGrid.def index 5a0125f4c..31e90bfe2 100644 --- a/definitions/grib2/localConcepts/ecmf/unstructuredGrid.def +++ b/definitions/grib2/localConcepts/ecmf/unstructuredGrid.def @@ -5,3 +5,6 @@ concept_nofail unstructuredGridType(unknown,"unstructuredGridType.def",conceptsL concept_nofail unstructuredGridSubtype(unknown,"unstructuredGridSubtype.def",conceptsLocalDirAll,conceptsMasterDir); concept_nofail unstructuredGridUUID(unknown,"unstructuredGridUUID.def",conceptsLocalDirAll,conceptsMasterDir); + +meta unstructuredGridName sprintf("%s_%s",unstructuredGridType,unstructuredGridSubtype); +alias gridName=unstructuredGridName; diff --git a/definitions/grib2/localConcepts/ecmf/unstructuredGridSubtype.def b/definitions/grib2/localConcepts/ecmf/unstructuredGridSubtype.def index 1a8429f26..3f93215f3 100644 --- a/definitions/grib2/localConcepts/ecmf/unstructuredGridSubtype.def +++ b/definitions/grib2/localConcepts/ecmf/unstructuredGridSubtype.def @@ -1,6 +1,6 @@ 'undefined' = { numberOfGridInReference = 0; } -'T grid' = { numberOfGridInReference = 1; } -'U grid' = { numberOfGridInReference = 2; } -'V grid' = { numberOfGridInReference = 3; } -'W grid' = { numberOfGridInReference = 4; } -'F grid' = { numberOfGridInReference = 5; } +'T' = { numberOfGridInReference = 1; } +'U' = { numberOfGridInReference = 2; } +'V' = { numberOfGridInReference = 3; } +'W' = { numberOfGridInReference = 4; } +'F' = { numberOfGridInReference = 5; } diff --git a/tests/grib_grid_unstructured.sh b/tests/grib_grid_unstructured.sh index 28ca7b4ba..8bf7d316d 100755 --- a/tests/grib_grid_unstructured.sh +++ b/tests/grib_grid_unstructured.sh @@ -19,29 +19,30 @@ temp2=temp.2.${label} ${tools_dir}/grib_set -s gridType=unstructured_grid,numberOfGridInReference=4,numberOfGridUsed=2 $sample $temp1 grib_check_key_equals $temp1 'unstructuredGridType' 'ORCA1' -grib_check_key_equals $temp1 'unstructuredGridSubtype' 'W grid' -#grib_check_key_equals $temp1 'unstructuredGridUUID' 'ORCA1 W grid unknown' +grib_check_key_equals $temp1 'unstructuredGridSubtype' 'W' +#grib_check_key_equals $temp1 'unstructuredGridUUID' 'ORCA1 W unknown' +grib_check_key_equals $temp1 gridName 'ORCA1_W' -${tools_dir}/grib_set -s gridType=unstructured_grid,unstructuredGridType=ORCA1,unstructuredGridSubtype='W grid' $sample $temp2 +${tools_dir}/grib_set -s gridType=unstructured_grid,unstructuredGridType=ORCA1,unstructuredGridSubtype=W $sample $temp2 ${tools_dir}/grib_compare $temp1 $temp2 -grib_check_key_equals $temp2 'numberOfGridInReference' '4' -grib_check_key_equals $temp2 'numberOfGridUsed' '2' +grib_check_key_equals $temp2 'numberOfGridInReference,numberOfGridUsed,gridName' '4 2 ORCA1_W' + # Test some lat/lon parameters ${tools_dir}/grib_set -s paramId=250003 $sample $temp1 -grib_check_key_equals $temp1 'unstructuredGridSubtype' 'T grid' +grib_check_key_equals $temp1 'unstructuredGridSubtype' 'T' ${tools_dir}/grib_set -s paramId=250005 $sample $temp1 -grib_check_key_equals $temp1 'unstructuredGridSubtype' 'U grid' +grib_check_key_equals $temp1 'unstructuredGridSubtype' 'U' ${tools_dir}/grib_set -s paramId=250007 $sample $temp1 -grib_check_key_equals $temp1 'unstructuredGridSubtype' 'V grid' +grib_check_key_equals $temp1 'unstructuredGridSubtype' 'V' ${tools_dir}/grib_set -s paramId=250009 $sample $temp1 -grib_check_key_equals $temp1 'unstructuredGridSubtype' 'W grid' +grib_check_key_equals $temp1 'unstructuredGridSubtype' 'W' ${tools_dir}/grib_set -s paramId=250011 $sample $temp1 -grib_check_key_equals $temp1 'unstructuredGridSubtype' 'F grid' +grib_check_key_equals $temp1 'unstructuredGridSubtype' 'F' rm -f $temp1 $temp2