Conversation
…c -> sol The sfc->sol levtype fix in fixMapToSol() covered the instantaneous snow depth (228141) but not its statistically processed variants produced by statistics-mtg2 (average->235078, max->237078, min->238078, stddev->239078). As a result the monthly-averaged snow depth kept the wrong levtype and did not encode/archive. Add the four time-processed params to the rule.
|
Targetting hotfix/2.10.3 because it is the multio version currently used in the 49r3 bundle in ifs-raps |
|
Addresses this raised issue: #293 |
|
This should merge cleanly into develop. Also now covers 238038 and 238 -- which are not needed in production, but can be useful for research, |
There was a problem hiding this comment.
We should move away from applying fixes late in the MultIO pipeline, we already discussed on Teams. For now this can serve as a temporary fix for the problem we have.
Could we merge the two functions? And test the behavior for levelist=0 for all params, not just one.
| auto fixMapToSol() { | ||
| return rule( | ||
| all(OneOf{&dm::FullMarsRecord::levtype, {dm::LevType::SFC}}, Has{&dm::FullMarsRecord::levelist}, | ||
| NoneOf{&dm::FullMarsRecord::levelist, {0}}, | ||
| matchParams(33, 238, 228038, 228141, 235080, 237080, 238080, 239080, 260360, 262000, 262024, 260199)), // | ||
| setKey(&dm::FullMarsRecord::levtype, dm::LevType::SOL)); // | ||
| } | ||
|
|
||
| auto fixSnowMapToSol() { | ||
| return rule( | ||
| all(OneOf{&dm::FullMarsRecord::levtype, {dm::LevType::SFC}}, Has{&dm::FullMarsRecord::levelist}, | ||
| NoneOf{&dm::FullMarsRecord::levelist, {0}}, | ||
| matchParams(235078, 237078, 238078, 239078, 235238, 237238, 238238, 239238, | ||
| 235406, 237406, 238406, 239406)), // | ||
| setKey(&dm::FullMarsRecord::levtype, dm::LevType::SOL)); | ||
| } | ||
|
|
There was a problem hiding this comment.
Is there a specific reason for putting these mappings in it's own function? The function above does the exact same for a different set of params.
There was a problem hiding this comment.
Technically, not really. It's more for "human" understanding. There are two functions because snow variables have five layers and soil ones have four. But I think having all mappings in one function would do the same thing.
There was a problem hiding this comment.
So I don't know, up to you... keep sol/snow separated, or merge them?
|
Superseded by #296 |
The climate DT portfolio required for CY49R3 includes snow depth water equivalent, both instantaneous (228141) and time-averaged (235078). These parameters should be encoded as both levtype=sfc (vertical sum) and levtype=sol (per-level, five layers for snow variables). The branch used by 49r3 climate DT has a sfc->sol mapping for paramid 228141 (instantaneous), but not for 235078 (its time-averaged version).
JIRA: https://jira.ecmwf.int/browse/DE-3673
Description
The sfc->sol levtype fix in fixMapToSol() covered the instantaneous snow
depth (228141) but not its statistically processed variants produced by
statistics-mtg2 (average->235078, max->237078, min->238078, stddev->239078).
As a result the monthly-averaged snow depth kept the wrong levtype and did
not encode/archive. Add the four time-processed params to the rule.
Contributor Declaration
By opening this pull request, I affirm the following: