Repository navigation
statistics-mtg2: accumulate the accumulated parameters under their own paramId, and from the forecast start - #311
Draft
tlmquintino wants to merge 2 commits into
Draft
tlmquintino wants to merge 2 commits into
tlmquintino wants to merge 2 commits into
Conversation
…n paramId
Add typeOfStatisticalProcessing=1 (accumulate) mappings with paramIn equal
to paramOut for 19 accumulated parameters, so that statistics-mtg2 with
strict mapping can accumulate per-step increments sent under the paramId
of the accumulation:
water, kg m**-2: 228228, 228143, 3062, 228144, 260259, 231002,
231010, 231012
energy, J m**-2: 146, 147, 176, 177, 169, 175, 178, 179, 212
stress, N m**-2 s: 180, 181
Without the entries the action throws "Mapping for param=228143 and
typeOfStatisticalProcessing=1 is undefined!". Values are not converted:
the increments must already be in the units of the paramId. The entries
are appended as manually added mappings, since the generator does not
produce them. Each id was checked against the parameter database: an
accumulation (typeOfStatisticalProcessing 1) with the units above.
Tests: ParamMapping covers the 19 entries with strict mapping on, the sum
of the increments in the units of the input, and that other operations and
the legacy IFS ids in metres (143, 142, 228) stay undefined.
A statistic can now accumulate from the simulation start and be emitted at every output-frequency, instead of being closed and reset after each output-frequency window. This gives the running accumulations 0-3, 0-6, 0-9 h from hourly increments without a last-step flush per output step. With `window-origin: forecast-start` the window is (simulation start, next emission point] and is never reset. A sample on the emission point is emitted at once with the absolute current step, timespan "fs" and the elapsed length as distance; the window end then moves to the next emission point. Completeness is judged against the elapsed span. A last-step flush emits only the tail after the last emission. The default (window-start) is unchanged. Supported: accumulate, average, maximum, minimum; output-frequency in hours; forward-offset windows; instantaneous input. Other combinations are rejected when the action is built. The restart format is unchanged.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #311 +/- ##
===========================================
+ Coverage 30.26% 31.04% +0.78%
===========================================
Files 410 411 +1
Lines 42236 42686 +450
Branches 2062 2099 +37
===========================================
+ Hits 12783 13254 +471
+ Misses 29453 29432 -21 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR lets
statistics-mtg2accumulate the IFS accumulated parameters from forecast start. It is needed by models that send per-step (e.g. hourly) increments, such as pmap-ifs. It has two commits.Mappings (
2fac5fce)The PR adds 19 identity
accumulateentries (typeOfStatisticalProcessing = 1,paramIn == paramOut) toshare/multio/param-mappings/statistics_param_mappings.yaml:Mapping for param=228143 and typeOfStatisticalProcessing=1 is undefined!.Option
window-origin(8e846118)The new
statistics-mtg2optionwindow-origintakeswindow-start(the default, unchanged) orforecast-start.With
forecast-start, the statistic accumulates from the simulation start (the first-step flush) and is never reset.output-frequencybecomes the cadence at which the running value is emitted, with:step= the current step;timespan = fs;misc-distanceFromPreviousStepInSeconds.A model sending hourly increments therefore gets 0-3, 0-6, 0-9 h accumulations at every output step. It needs no
last-stepflush per output step and does not need to know the run length.last-stepflush emits only the open tail.Supported combinations are accumulate/average/maximum/minimum, an hourly
output-frequency, forward-offset windows and instantaneous input. Other combinations are rejected when the action is built.The restart format is unchanged, since the window state was already serialized, and a restored window keeps its original forecast start.
Why not the existing options. The 2.11.2 workaround was a run-long window plus a
last-stepflush at every output step. It fails ondevelop, because an open window is now emitted with its nominal length (step=3, timespan=6hgives "forecastTime must be non-negative").Tests
tests/multio/action/statistics-mtg2/ForecastStartWindow.cc, 13 cases:tests/multio/action/statistics-mtg2/ParamMapping.cc: the 19 entries with strict mapping on, and rejection for other operations.ctest: 225/226.test_multio_subtocfails withsubtocExists()in an fdb5-only plan with no statistics action; I have not yet checked whether it also fails on the unmodifieddeveloptip.Questions for reviewers
timespan. Should this be an error instead?last-stepflush emit the open tail of a run that ends between outputs? It does now.🌈🌦️📖🚧 Documentation 🚧📖🌦️🌈
https://sites.ecmwf.int/docs/dev-section/multio/pull-requests/PR-311