Merge pull request #162 from mjg41/feature/destine-layout

DestinE ClimateDT - support for new metadata keys and fdb layout
This commit is contained in:
shahramn 2023-09-26 12:06:37 +01:00 committed by GitHub
commit e0d45c78d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 171 additions and 1 deletions

View File

@ -0,0 +1 @@
1 1 MARS labeling

View File

@ -0,0 +1,5 @@
0 unknown unknown
1 climate-dt Climate change adaptation digital twin
2 extremes-dt Weather and geophysical extremes digital twin
3 on-demand-climate-dt On-demand climate change adaptation digital twin
4 on-demand-extremes-dt On-demand weather and geophysical extremes digital twin

View File

@ -0,0 +1,3 @@
0 unknown unknown
1 CMIP6 CMIP6
2 ScenarioMIP ScenarioMIP

View File

@ -0,0 +1,8 @@
0 unknown unknown
1 hist Historical
2 amip AMIP
3 SSP1-1.9 SSP1-1.9
4 SSP1-2.6 SSP1-2.6
5 SSP2-4.5 SSP2-4.5
6 SSP3-7.0 SSP3-7.0
7 SSP5-8.5 SSP5-8.5

View File

@ -0,0 +1,3 @@
0 unknown unknown
1 v20230701 v20230701
2 v20230801 v20230801

View File

@ -0,0 +1,7 @@
0 unknown unknown
1 IFS IFS with no ocean model
2 IFS-NEMO IFS with NEMO ocean model
3 IFS-FESOM IFS with FESOM ocean model
4 ICON ICON with no ocean model
5 ICON-NEMO ICON with NEMO ocean model
6 ICON-FESOM ICON with FESOM ocean model

View File

@ -0,0 +1,7 @@
# DestinE MARS layout
# Base keywords for all datasets
include "grib2/local.destine.base.def";
# Keywords based on dataset
template_nofail datasetTemplate "grib2/local.destine.[dataset:s].def";

View File

@ -0,0 +1,4 @@
# DestinE MARS base keywords
codetable[2] dataset "grib2/destine_dataset.table" : dump;
alias mars.dataset = dataset;

View File

@ -0,0 +1,13 @@
# DestinE MARS ClimateDT keywords
codetable[2] datasetVersion "grib2/destine_datasetVersion.table" : dump;
alias mars.datasetVersion = datasetVersion;
codetable[2] datasetActivity "grib2/destine_datasetActivity.table" : dump;
alias mars.datasetActivity = datasetActivity;
codetable[2] datasetExperiment "grib2/destine_datasetExperiment.table" : dump;
alias mars.datasetExperiment = datasetExperiment;
codetable[2] model "grib2/destine_model.table" : dump;
alias mars.model = model;

View File

@ -0,0 +1,7 @@
# Concept destineOrigin
"DWD" = { centre=98; subCentre=78; }
"MeteoFrance" = { centre=98; subCentre=84; }
"BSC" = { centre=98; subCentre=1000; }
"CSC" = { centre=98; subCentre=1001; }
"DKRZ" = { centre=98; subCentre=1002; }

View File

@ -0,0 +1,10 @@
# Concept gridSpecification
'H16' = {numberOfDataPoints=3072; gridDefinitionTemplateNumber=150; Nside=16;}
'H32' = {numberOfDataPoints=12288; gridDefinitionTemplateNumber=150; Nside=32;}
'H64' = {numberOfDataPoints=49152; gridDefinitionTemplateNumber=150; Nside=64;}
'H128' = {numberOfDataPoints=196608; gridDefinitionTemplateNumber=150; Nside=128;}
'H256' = {numberOfDataPoints=786432; gridDefinitionTemplateNumber=150; Nside=256;}
'H512' = {numberOfDataPoints=3145728; gridDefinitionTemplateNumber=150; Nside=512;}
'H1024' = {numberOfDataPoints=12582912; gridDefinitionTemplateNumber=150; Nside=1024;}
'O1280' = {numberOfDataPoints=6599680; gridDefinitionTemplateNumber=40; Nj=2560;}
'O8000' = {numberOfDataPoints=256288000; gridDefinitionTemplateNumber=40; Nj=16000;}

View File

@ -0,0 +1,15 @@
# (C) Copyright 2005- ECMWF.
# Hooks post meta-data for DestinE (productionStatusOfProcessedData=12)
# conceptsDir2 --> datasetForLocal
concept gridSpecification(unknown, "gridSpecificationConcept.def",conceptsDir2,conceptsDir1): no_copy, read_only, dump;
concept destineOrigin (unknown, "destineOriginConcept.def",conceptsDir2,conceptsDir1): no_copy, dump;
if(dataset is "climate-dt") {
alias mars.date = validityDate;
alias mars.time = validityTime;
unalias mars.step;
}

View File

@ -0,0 +1,7 @@
# (C) Copyright 2005- ECMWF.
# Destination Earth (DestinE)
constant marsClass = 'd1';
include "grib2/products_destine.def"

View File

@ -0,0 +1,70 @@
# (C) Copyright 2005- ECMWF.
alias mars.expver = experimentVersionNumber;
alias parameter.paramId=paramId;
alias parameter.shortName=shortName;
alias parameter.units=units;
alias parameter.name=name;
alias mars.class = marsClass;
alias mars.param = paramId;
alias mars.origin = centre;
# Special rule for level type 103 'Specified height level above ground (m)'
if(typeOfFirstFixedSurface == 103) {
# only the parameters above 10m
if (level > 10) {
constant heightLevelName = 'hl';
alias mars.levtype = heightLevelName;
# levelist was unaliased in template.4.horizontal.def so we must have it back
alias mars.levelist = level;
}
}
# Define marsType based on type of processed data
concept marsType(unknown) {
fc = {
typeOfProcessedData = 1;
}
"9" = {
typeOfProcessedData = 1;
}
an = {
typeOfProcessedData = 0;
}
"2" = {
typeOfProcessedData = 0;
}
}
alias mars.type = marsType;
concept marsStream(unknown) {
oper = {
productDefinitionTemplateNumber = 8;
}
oper = {
productDefinitionTemplateNumber = 0;
}
enda = {
productDefinitionTemplateNumber = 11;
}
enda = {
productDefinitionTemplateNumber = 1;
}
} : no_copy;
alias mars.stream = marsStream;
if (stepType is "avg" || stepType is "accum") {
alias mars.step = stepRange;
}
else {
alias mars.step = step;
}

View File

@ -34,6 +34,12 @@ if ( addEmptySection2 == 0 ) {
template crraSection "grib2/local.crra.[crraLocalVersion:l].def";
}
if(productionStatusOfProcessedData == 12 || productionStatusOfProcessedData == 13) {
# destine = Destination Earth
codetable[2] destineLocalVersion 'grib2/destineLocalVersion.table' = 1 : dump;
template destineSection "grib2/local.destine.[destineLocalVersion:l].def";
}
codetable[2] grib2LocalSectionNumber 'grib2/grib2LocalSectionNumber.[centreForLocal:l].table' = 1 : dump;
if (grib2LocalSectionNumber!=0) {

View File

@ -44,6 +44,8 @@ meta md5Headers md5(startOfHeaders,lengthOfHeaders);
lookup[1] sectionNumber(4) ;
template_nofail hook_post_meta_data "grib2/post_meta_data.hook.products_[productionStatusOfProcessedData].def";
if (!headersOnly) {
if (sectionNumber == 5 or new() ) {
position sectionPosition;

View File

@ -11,6 +11,8 @@
9 9 Uncertainties in Ensembles of Regional ReAnalyses project test (UERRA)
10 10 Copernicus regional reanalysis (CARRA/CERRA)
11 11 Copernicus regional reanalysis test (CARRA/CERRA)
# 12-191 Reserved
12 12 Destination Earth (DestinE)
13 13 Destination Earth test (DestinE)
# 14-191 Reserved
# 192-254 Reserved for local use
255 255 Missing