Merge branch 'hotfix/2.36.1'

This commit is contained in:
shahramn 2024-07-15 16:47:27 +01:00
commit 25647279d6
5 changed files with 50 additions and 2 deletions

View File

@ -1 +1 @@
2.36.0
2.36.1

View File

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

View File

@ -101,6 +101,7 @@ static int extra_set(grib_accessor* a, long val)
long is_chemical_srcsink = 0;
long is_aerosol = 0;
long is_aerosol_optical = 0;
long is_wave = 0, is_wave_prange = 0;
grib_get_long(hand, "is_chemical", &is_chemical);
grib_get_long(hand, "is_chemical_srcsink", &is_chemical_srcsink);
@ -108,6 +109,9 @@ static int extra_set(grib_accessor* a, long val)
grib_get_long(hand, "is_aerosol", &is_aerosol);
grib_get_long(hand, "is_aerosol_optical", &is_aerosol_optical);
is_wave = grib_is_defined(hand, "waveDirectionNumber");
is_wave_prange = grib_is_defined(hand, "typeOfWavePeriodInterval");
switch (self->index) {
case 0:
/* class */
@ -287,6 +291,11 @@ static int extra_set(grib_accessor* a, long val)
return GRIB_INTERNAL_ERROR;
}
if (is_wave || is_wave_prange) {
// ECC-1867
productDefinitionTemplateNumberNew = -1; // disable PDT selection
}
if (productDefinitionTemplateNumberNew >= 0) {
grib_get_long(hand, self->productDefinitionTemplateNumber, &productDefinitionTemplateNumber);
if (productDefinitionTemplateNumber != productDefinitionTemplateNumberNew)

View File

@ -12,6 +12,8 @@
label="grib2_wave_spectra_test"
temp=temp.$label
tempGribA=temp.$label.A.grib
tempGribB=temp.$label.B.grib
tempSample=temp.$label.tmpl
sample2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl
@ -52,5 +54,18 @@ grib_check_key_equals $temp firstWavelengthInNanometres '12'
grib_check_key_equals $temp firstWavelengthInMetres '1.2e-08'
# ECC-1867: Unexpected PDT change for wave template for ensemble DA streams
sample_ld=$ECCODES_SAMPLES_PATH/reduced_gg_pl_32_grib2.tmpl # Sample with a mars local def
${tools_dir}/grib_set -s tablesVersion=32,productDefinitionTemplateNumber=99,waveFrequencyNumber=14 $sample_ld $tempGribA
${tools_dir}/grib_set -s stream=ewla $tempGribA $tempGribB
grib_check_key_equals $tempGribB productDefinitionTemplateNumber,waveFrequencyNumber '99 14'
${tools_dir}/grib_compare -b marsStream $tempGribA $tempGribB
${tools_dir}/grib_set -s type=em $tempGribA $tempGribB
${tools_dir}/grib_compare -b marsType,typeOfProcessedData,typeOfGeneratingProcess $tempGribA $tempGribB
${tools_dir}/grib_set -s type=es $tempGribA $tempGribB
${tools_dir}/grib_compare -b marsType,typeOfProcessedData,typeOfGeneratingProcess $tempGribA $tempGribB
# Clean up
rm -f $tempSample $temp
rm -f $tempSample $temp $tempGribA $tempGribB

View File

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