From f0e58efc328d74c753995ba0150e4f8368aaac58 Mon Sep 17 00:00:00 2001 From: shahramn Date: Thu, 11 Jul 2024 12:09:59 +0100 Subject: [PATCH] ECC-1850: Extended metadata --- definitions/grib2/local.98.43.def | 13 +++++++++++++ tests/grib_ecc-1766.sh | 11 +++++++++++ 2 files changed, 24 insertions(+) diff --git a/definitions/grib2/local.98.43.def b/definitions/grib2/local.98.43.def index 3728cd185..18846b7f7 100644 --- a/definitions/grib2/local.98.43.def +++ b/definitions/grib2/local.98.43.def @@ -10,10 +10,23 @@ alias mars.activity = activity; codetable[2] experiment "grib2/destine_experiment.table" ; alias mars.experiment = experiment; +# Generation keyword - synergise with DestinE ClimateDT and use this to version the dataset +unsigned[1] generation = 255 : dump; +alias mars.generation = generation; + +# Model keyword to index multiple models within EERIE +codetable[2] model "grib2/destine_model.table" : dump; +alias mars.model = model; + # Climate run realization keyword, which relates to an initial condition perturbation unsigned[1] realization = 255 ; alias mars.realization = realization; +# Allows simultaneous archiving of resolutions +# high resolution for best available vs standard resolution for quick access and plotting +codetable[2] resolution "grib2/destine_resolution.table" : dump; +alias mars.resolution = resolution; + # Remove mars domain from this data unalias mars.domain; diff --git a/tests/grib_ecc-1766.sh b/tests/grib_ecc-1766.sh index 79e273b1d..172fdae9a 100755 --- a/tests/grib_ecc-1766.sh +++ b/tests/grib_ecc-1766.sh @@ -41,5 +41,16 @@ ${tools_dir}/grib_set -s activity=1,experiment=1,realization=1 $eerie_sample $te grib_check_key_equals $temp_grib "activity,experiment,realization" "1 1 1" grib_check_key_equals $temp_grib "activity:s,experiment:s" "CMIP6 hist" +# ECC-1850: Additional keys added +# Check additional keys are present and correct +grib_check_key_exists $eerie_sample generation,model,resolution +grib_check_key_equals $eerie_sample "generation,model,resolution" "255 0 0" + +# Check an example where a few additional things are set +${tools_dir}/grib_set -s generation=1,model=2,resolution=1 $eerie_sample $temp_grib + +grib_check_key_equals $temp_grib "generation,model,resolution" "1 2 1" +grib_check_key_equals $temp_grib "model:s,resolution:s" "IFS-NEMO standard" + # Clean up rm -f $temp_grib $eerie_sample