mirror of https://github.com/ecmwf/eccodes.git
Merge pull request #266 from ecmwf/feature/ECC-1909-model-name-version-extension
ECC-1909 GRIB2: Extend the model name and model version concept for On-Demand DT
This commit is contained in:
commit
4d91fbb9fb
|
@ -1,12 +1,13 @@
|
|||
# (C) Copyright 2005- ECMWF.
|
||||
|
||||
# See ECC-1846
|
||||
if (centre is "ecmf" or datasetForLocal is "era6") {
|
||||
concept modelName(unknown, "modelNameConcept.def", conceptsMasterDir, conceptsLocalDirAll): no_copy, dump, read_only;
|
||||
# This is only read when centre=ecmf, so can remove if statement that was here
|
||||
# This is ecmf local so we shouldn't use MasterDir. Instead we look for pseudocentre (conceptsDir2) then centre (conceptsLocalDirAll)
|
||||
|
||||
if (modelName isnot "unknown") {
|
||||
concept modelVersion(unknown, "modelVersionConcept.[modelName].def", conceptsMasterDir, conceptsLocalDirAll): no_copy, dump, read_only;
|
||||
# alias ls.model = modelName;
|
||||
# alias mars.model = modelName;
|
||||
}
|
||||
concept modelName(unknown, "modelNameConcept.def", conceptsDir2, conceptsLocalDirAll): no_copy, dump, read_only;
|
||||
|
||||
if (modelName isnot "unknown") {
|
||||
concept modelVersion(unknown, "modelVersionConcept.[modelName].def", conceptsDir2, conceptsLocalDirAll): no_copy, dump, read_only;
|
||||
# alias ls.model = modelName;
|
||||
# alias mars.model = modelName;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
'IFS' = {
|
||||
backgroundProcess = 255;
|
||||
}
|
||||
'AIFS' = {
|
||||
backgroundProcess = 1;
|
||||
}
|
||||
'ICON' = {
|
||||
backgroundProcess = 2;
|
||||
}
|
||||
'ALARO' = {
|
||||
backgroundProcess = 3;
|
||||
}
|
||||
'AROME' = {
|
||||
backgroundProcess = 4;
|
||||
}
|
||||
'HARMONIE-AROME' = {
|
||||
backgroundProcess = 5;
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
'v1' = { generatingProcessIdentifier = 1; }
|
||||
'v2' = { generatingProcessIdentifier = 2; }
|
|
@ -0,0 +1,3 @@
|
|||
'cy49t2' = { generatingProcessIdentifier = 3; }
|
||||
'cy48t3' = { generatingProcessIdentifier = 2; }
|
||||
'cy46h1' = { generatingProcessIdentifier = 1; }
|
|
@ -0,0 +1,3 @@
|
|||
'cy49t2' = { generatingProcessIdentifier = 3; }
|
||||
'cy48t3' = { generatingProcessIdentifier = 2; }
|
||||
'cy46h1' = { generatingProcessIdentifier = 1; }
|
|
@ -0,0 +1,3 @@
|
|||
'cy49t2' = { generatingProcessIdentifier = 3; }
|
||||
'cy48t3' = { generatingProcessIdentifier = 2; }
|
||||
'cy46h1' = { generatingProcessIdentifier = 1; }
|
|
@ -0,0 +1,18 @@
|
|||
'cy50r3' = { generatingProcessIdentifier = 163; }
|
||||
'cy50r2' = { generatingProcessIdentifier = 162; }
|
||||
'cy50r1' = { generatingProcessIdentifier = 161; }
|
||||
'cy49r3' = { generatingProcessIdentifier = 160; }
|
||||
'cy49r2' = { generatingProcessIdentifier = 159; }
|
||||
'cy49r1' = { generatingProcessIdentifier = 158; }
|
||||
'cy48r3' = { generatingProcessIdentifier = 157; }
|
||||
'climatedt' = { generatingProcessIdentifier = 156; }
|
||||
'cy48r2' = { generatingProcessIdentifier = 155; }
|
||||
'cy48r1' = { generatingProcessIdentifier = 154; }
|
||||
'cy47r3' = { generatingProcessIdentifier = 153; }
|
||||
'cy47r2' = { generatingProcessIdentifier = 152; }
|
||||
'cy47r1' = { generatingProcessIdentifier = 151; }
|
||||
'cy46r1' = { generatingProcessIdentifier = 150; }
|
||||
'cy45r1' = { generatingProcessIdentifier = 149; }
|
||||
'cy43r3' = { generatingProcessIdentifier = 148; }
|
||||
'cy43r1' = { generatingProcessIdentifier = 147; }
|
||||
'cy41r2' = { generatingProcessIdentifier = 146; }
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
label="grib_modelName_test"
|
||||
tempGrib=temp.$label.grib
|
||||
temp2Grib=temp2.$label.grib
|
||||
tempFilt=temp.$label.filt
|
||||
tempLog=temp.$label.log
|
||||
tempOut=temp.$label.txt
|
||||
|
@ -30,6 +31,18 @@ grib_check_key_equals $tempGrib modelName,modelVersion "IFS cy48r1"
|
|||
${tools_dir}/grib_set -s generatingProcessIdentifier=100 $sample $tempGrib
|
||||
grib_check_key_equals $tempGrib modelName,modelVersion "IFS unknown"
|
||||
|
||||
# Check that this only works for centre ecmf
|
||||
${tools_dir}/grib_set -s generatingProcessIdentifier=1,backgroundProcess=1,centre=84 $sample $tempGrib
|
||||
[ $( ${tools_dir}/grib_get -f -p modelName $tempGrib ) = "not_found" ]
|
||||
[ $( ${tools_dir}/grib_get -f -p modelVersion $tempGrib ) = "not_found" ]
|
||||
|
||||
# Check that it works for pseudocentres (e.g. DestinE)
|
||||
${tools_dir}/grib_set -s generatingProcessIdentifier=1,backgroundProcess=3,productionStatusOfProcessedData=13 $sample $tempGrib
|
||||
grib_check_key_equals $tempGrib modelName,modelVersion "ALARO cy46h1"
|
||||
${tools_dir}/grib_set -s productionStatusOfProcessedData=0 $tempGrib $temp2Grib
|
||||
[ $( ${tools_dir}/grib_get -f -p modelName $temp2Grib ) = "unknown" ]
|
||||
[ $( ${tools_dir}/grib_get -f -p modelVersion $temp2Grib ) = "not_found" ]
|
||||
|
||||
# Keys are read-only (may change this later)
|
||||
set +e
|
||||
${tools_dir}/grib_set -s modelName=AIFS $sample $tempGrib 2>$tempLog
|
||||
|
|
Loading…
Reference in New Issue