Skip to content

Commit

Permalink
ECC-1532: GRIB: Allow setting 'expver' on CARRA/CERRA data
Browse files Browse the repository at this point in the history
  • Loading branch information
shahramn committed Feb 24, 2023
1 parent dadd1d8 commit bc105ef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 4 additions & 2 deletions definitions/grib2/products_11.def
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# (C) Copyright 2005- ECMWF.

# Copernicus regional reanalysis (CARRA/CERRA)
constant marsExpver = 'test';
# Copernicus regional reanalysis test (CARRA/CERRA)
if (!defined(marsExpver)) {
constant marsExpver = 'test';
}
include "grib2/products_crra.def"
9 changes: 8 additions & 1 deletion tests/grib_uerra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,18 @@ status=$?
set -e
[ $status -ne 0 ]

# crraLocalVersion=2 has a coded key which can be set
# ECC-1532
# crraLocalVersion=2 has a coded key for experimentVersionNumber
${tools_dir}/grib_set -s \
productionStatusOfProcessedData=10,grib2LocalSectionPresent=1,crraLocalVersion=2,marsExpver=coco \
$grib2_sample $temp1
grib_check_key_equals $temp1 'marsExpver,mars.expver' 'coco coco'

${tools_dir}/grib_set -s \
productionStatusOfProcessedData=11,grib2LocalSectionPresent=1,crraLocalVersion=2,experimentVersionNumber=0078 \
$grib2_sample $temp1
grib_check_key_equals $temp1 'marsExpver,mars.expver' '0078 0078'


# Clean up
rm -f $temp1 $temp2 $tempSample

0 comments on commit bc105ef

Please sign in to comment.