diff --git a/src/multio/action/encode-mtg2/EncodeMtg2.cc b/src/multio/action/encode-mtg2/EncodeMtg2.cc index babb5beb0..721c6fe17 100644 --- a/src/multio/action/encode-mtg2/EncodeMtg2.cc +++ b/src/multio/action/encode-mtg2/EncodeMtg2.cc @@ -25,7 +25,6 @@ #include "multio/action/encode-mtg2/fakeDoubleLoop.h" #include "multio/datamod/MarsMiscGeo.h" #include "multio/datamod/types/TimeSpan.h" -#include "multio/mars2mars/Rules.h" #include "multio/message/Parametrization.h" #include "multio/util/PrecisionTag.h" @@ -146,7 +145,6 @@ void EncodeMtg2::executeImpl(Message msg) { // Apply mappings fake_double_loop::fakeDoubleLoop(marsRec); - auto mappingResult = mars2mars::applyMappings(mars2mars::allRules(), marsRec, miscRec); executeNext(dispatchPrecisionTag(msg.precision(), [&](auto pt) { using Precision = typename decltype(pt)::type; @@ -154,25 +152,6 @@ void EncodeMtg2::executeImpl(Message msg) { auto values = static_cast(msg.payload().modifyData()); size_t size = msg.payload().size() / sizeof(Precision); - // Check if values need scaling - if (mappingResult && mappingResult->valuesScaleFactor) { - ASSERT(values); - - const auto scaleFactor = *(mappingResult->valuesScaleFactor); - - if (miscRec.missingValue.isSet()) { - const double missing = miscRec.missingValue.get(); - std::transform(values, values + size, values, [&](const Precision& value) -> Precision { - return static_cast(value == missing ? missing : value * scaleFactor); - }); - } - else { - std::transform(values, values + size, values, [&](const Precision& value) -> Precision { - return static_cast(value * scaleFactor); - }); - } - } - // Call the GRIB2 encoder in metkit const auto sample = encode(*encoder_, cache_, values, size, marsRec, miscRec); diff --git a/src/multiom/core/common/enumerators_mod.F90 b/src/multiom/core/common/enumerators_mod.F90 index 9ac0f176a..9497fa0f9 100644 --- a/src/multiom/core/common/enumerators_mod.F90 +++ b/src/multiom/core/common/enumerators_mod.F90 @@ -1475,14 +1475,6 @@ FUNCTION IPREFIX2ILEVTYPE( IPREFIX, PARAM_ID, LEVEL, REPRES, ILEVTYPE, HOOKS ) R ! Initialization of good path return value PP_SET_ERR_SUCCESS( RET ) - ! NGRBRSN - 33 - Snow density - ! NGRBTSN - 238 - Temperature of snow layer - ! NGRBWSN - 228038 - Snow liquid water (multi-layer) - ! NGRBSD - 228141 - Snow depth (multi-layer) - ! NGRBSOT - 260360 - Soil temperature (multi-layer) - ! NGRBSIT - 262024 - Sea ice temperature (multi-layer) - ! NGRBVSW - 260199 - Volumetric soil moisture (multi-layer) - SELECT CASE ( IPREFIX ) CASE ( PREFIX_MODEL_LEVEL_E ) @@ -1496,18 +1488,11 @@ FUNCTION IPREFIX2ILEVTYPE( IPREFIX, PARAM_ID, LEVEL, REPRES, ILEVTYPE, HOOKS ) R CASE ( PREFIX_THETA_LEVEL_E ) ILEVTYPE = LEVTYPE_PT_E CASE ( PREFIX_SURFACE_E ) - ! SELECT CASE (PARAM_ID) - ! TODO: This logic is very weak and should be improved - ! CASE ( NGRBSD, NGRBTSN, NGRBRSN, NGRBWSN, NGRBSOT, NGRBVSW, NGRBSIT ) - ! IF ( LEVEL .NE. 0 ) THEN - ! Multilevel surfaces at level 0 are considered as surface - ! ILEVTYPE = LEVTYPE_SOL_E - ! ELSE + IF ( LEVEL .NE. 0 ) THEN + ILEVTYPE = LEVTYPE_SOL_E + ELSE ILEVTYPE = LEVTYPE_SFC_E - ! END IF - ! CASE DEFAULT - ! ILEVTYPE = LEVTYPE_SFC_E - ! END SELECT + END IF CASE (PREFIX_AL_E) ILEVTYPE = LEVTYPE_AL_E CASE ( PREFIX_WAVE_INT_E ) diff --git a/src/multiom/ifs2mars/ifs-interface/ifs_utils_mod.F90 b/src/multiom/ifs2mars/ifs-interface/ifs_utils_mod.F90 index 6d8e81189..e1f597772 100644 --- a/src/multiom/ifs2mars/ifs-interface/ifs_utils_mod.F90 +++ b/src/multiom/ifs2mars/ifs-interface/ifs_utils_mod.F90 @@ -334,11 +334,6 @@ FUNCTION IPREFIX2ILEVTYPE( IPREFIX, PARAM_ID, LEVEL, REPRES, ILEVTYPE, HOOKS ) R ! Initialization of good path return value PP_SET_ERR_SUCCESS( RET ) - ! NGRBRSN - 33 - Snow density - ! NGRBTSN - 238 - Temperature of snow layer - ! NGRBWSN - 228038 - Snow liquid water (multi-layer) - ! NGRBSD - 228141 - Snow depth (multi-layer) - SELECT CASE ( IPREFIX ) CASE ( PREFIX_MODEL_LEVEL_E ) @@ -360,16 +355,11 @@ FUNCTION IPREFIX2ILEVTYPE( IPREFIX, PARAM_ID, LEVEL, REPRES, ILEVTYPE, HOOKS ) R CASE ( PREFIX_THETA_LEVEL_E ) ILEVTYPE = LEVTYPE_PT_E CASE ( PREFIX_SURFACE_E ) - SELECT CASE (PARAM_ID) - CASE ( NGRBRSN, NGRBTSN, NGRBWSN, NGRBSD, 231027 ) - IF ( LEVEL .NE. 0 ) THEN - ILEVTYPE = LEVTYPE_SOL_E - ELSE - ILEVTYPE = LEVTYPE_SFC_E - END IF - CASE DEFAULT + IF ( LEVEL .NE. 0 ) THEN + ILEVTYPE = LEVTYPE_SOL_E + ELSE ILEVTYPE = LEVTYPE_SFC_E - END SELECT + END IF CASE ( PREFIX_WAVE_INT_E ) ILEVTYPE = LEVTYPE_SFC_E CASE ( PREFIX_WAVE_SPEC_E )