eccodes/definitions/grib2/parameters.def

90 lines
4.4 KiB
Modula-2

# (C) Copyright 2005- ECMWF.
transient dummyc=0: hidden;
# If MTG2Switch is defined and it is 0 (pre-MTG2) we need to look at pre-MTG2 definitions.
# Otherwise (if it is different from 0, or not defined) look at new definitions.
# Add support for "datasetForLocal" condition (e.g. S2S).
# These datasets will always use pre-MTG2 definitions
# TODO(mamg): Ideally shouldn't list all these datasets here
if (datasetForLocal isnot "unknown") {
if ( datasetForLocal is "cerise" ||
datasetForLocal is "era" ||
datasetForLocal is "hydro" ||
datasetForLocal is "s2s" ||
datasetForLocal is "tigge" ||
datasetForLocal is "uerra" ) {
constant tablesVersionMTG2Switch=33: hidden;
constant MTG2Switch = 0 : no_copy, read_only;
}
}
if ( defined(MTG2Switch) and MTG2Switch == 0 ) {
constant paramIdFilename = "paramId.[tablesVersionMTG2Switch].def" : hidden ;
constant shortNameFilename = "shortName.[tablesVersionMTG2Switch].def" : hidden ;
constant unitsFilename = "units.[tablesVersionMTG2Switch].def" : hidden ;
constant nameFilename = "name.[tablesVersionMTG2Switch].def" : hidden ;
# All other cases other than existing data and pre-MTG2 fall into default parameter files
} else {
constant paramIdFilename = "paramId.def" : hidden ;
constant shortNameFilename = "shortName.def" : hidden ;
constant unitsFilename = "units.def" : hidden ;
constant nameFilename = "name.def" : hidden ;
}
# Now deal with chemical parameter split, pre and post MTG2
if (defined(MTG2Switch) and MTG2Switch == 2) {
# Note: 0 is a valid chemId
concept chemId (minus_one,"chemId.def",conceptsDir2,conceptsDir1): no_copy,long_type,dump;
concept chemName (unknown,"chemName.def",conceptsDir2,conceptsDir1): no_copy,dump;
concept chemShortName (unknown,"chemShortName.def",conceptsDir2,conceptsDir1): no_copy,dump;
concept chemFormula (unknown,"chemFormula.def",conceptsDir2,conceptsDir1): no_copy,dump;
if ( chemId != -1 ) {
alias mars.chem = chemId;
alias parameter.chemId = chemId;
alias ls.chemShortName = chemShortName;
alias parameter.chemShortName = chemShortName;
}
}
concept paramIdLegacyECMF(defaultParameter,"paramId.legacy.def",conceptsMasterDir,conceptsLocalDirECMF): long_type,no_copy,hidden;
concept paramIdECMF (paramIdLegacyECMF,paramIdFilename,conceptsMasterDir,conceptsLocalDirECMF): long_type,no_copy;
concept paramId (paramIdECMF,paramIdFilename,conceptsDir2,conceptsDir1): long_type;
concept shortNameLegacyECMF(defaultShortName,"shortName.legacy.def",conceptsMasterDir,conceptsLocalDirECMF): no_copy,hidden;
concept shortNameECMF (shortNameLegacyECMF,shortNameFilename,conceptsMasterDir,conceptsLocalDirECMF): no_copy;
concept shortName (shortNameECMF,shortNameFilename,conceptsDir2,conceptsDir1): no_copy,dump;
alias ls.shortName = shortName;
concept unitsLegacyECMF(defaultName,"units.legacy.def",conceptsMasterDir,conceptsLocalDirECMF): no_copy,hidden,read_only;
concept unitsECMF (unitsLegacyECMF,unitsFilename,conceptsMasterDir,conceptsLocalDirECMF): no_copy, read_only;
concept units (unitsECMF,unitsFilename,conceptsDir2,conceptsDir1): no_copy, read_only;
concept nameLegacyECMF(defaultName,"name.legacy.def",conceptsMasterDir,conceptsLocalDirECMF): no_copy,hidden;
concept nameECMF(nameLegacyECMF,nameFilename,conceptsMasterDir,conceptsLocalDirECMF): no_copy;
concept name(nameECMF,nameFilename,conceptsDir2,conceptsDir1): no_copy,dump;
# cfName does not have pre and post MTG2 switch
concept cfNameLegacyECMF(defaultShortName,"cfName.legacy.def",conceptsMasterDir,conceptsLocalDirECMF): no_copy,hidden;
concept cfNameECMF(cfNameLegacyECMF,"cfName.def",conceptsMasterDir,conceptsLocalDirECMF) : no_copy;
concept cfName(cfNameECMF,"cfName.def",conceptsDir2,conceptsDir1) : no_copy,dump;
# concept cfVarNameLegacyECMF(defaultShortName,"cfVarName.legacy.def",conceptsMasterDir,conceptsLocalDirECMF): no_copy,hidden;
# concept cfVarNameECMF (cfVarNameLegacyECMF,"cfVarName.def",conceptsMasterDir,conceptsLocalDirECMF): no_copy;
# concept cfVarName (cfVarNameECMF,"cfVarName.def",conceptsDir2,conceptsDir1): no_copy,dump;
# See ECC-1886
meta defaultCfVarName cf_var_name(shortName) : no_copy,hidden,read_only;
concept cfVarName (defaultCfVarName, "cfVarName.def", conceptsDir2, conceptsDir1): no_copy,dump,read_only;
template_nofail names "grib2/products_[productionStatusOfProcessedData].def";
meta ifsParam ifs_param(paramId,type);