mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 14:40:26 -05:00
`add_well_keyword_event` previously emitted items in `keyword_data` dict insertion order. Eclipse keywords such as WCONHIST are positional, so a non-canonical order silently corrupted the simulator input. `RifEventKeywordFormatter::formatKeyword` now walks the OPM `ParserRecord` schema and emits items in canonical order, inserting `1*` defaults for intermediate gaps and dropping trailing unspecified items. Items that are not part of the keyword schema (e.g. mnemonic-list keywords like RPTRST/RPTSCHED) are appended after the canonical block in caller-supplied order to preserve existing behaviour. Fixes #14065.