# (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;

# ECC-1794: DestinE data does not have the domain key
unalias mars.domain;

# ECC-1796: stepRange indexing for DestinE ExtremesDT and On-Demand ExtremesDT data
# ECC-2161: only for pre-MTG2 data
if ( defined(dataset) && dataset isnot "climate-dt" && MTG2Switch == 0 ) {
    alias mars.step=stepRange;
}

# ECC-2161: We want timespan by default
# Timespan key comes after stream.type.def in section 4 and so we need to unalias it here for climate-dt
if ( defined(dataset) && dataset is "climate-dt" ) {
    unalias mars.timespan;
}

# ECC-2222: We want model in on-demand-extremes-dt
if ( defined(dataset) && dataset is "on-demand-extremes-dt" ) {
    concept modelName(unknown, "modelNameConcept.def", conceptsDir2, conceptsLocalDirAll): no_copy, dump;
    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;

    }
}
