# (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
# ECC-2309: We want to keep timespan in the statistical processing stream in climate-dt
# 1257 sttd Statistics of deterministic data
if ( defined(dataset) && dataset is "climate-dt" ) {
    if ( defined(stream) && stream!=1257 ) {
        unalias mars.timespan;
    }
}

# ECC-2222: We want model in on-demand-extremes-dt
# ECC-2304: Note that modelName/modelVersion concepts are already defined in section4_extras (as in ECMWF data).
#           All that is needed here is to alias modelName as model to the MARS and LS namespaces
if ( defined(dataset) && dataset is "on-demand-extremes-dt" ) {

    if (modelName isnot "unknown") {

        alias ls.model = modelName;
        alias mars.model = modelName;

    }
}
