add base.context.dump to save experiment config as metadata - #131
Conversation
e4ae491 to
0b4186f
Compare
|
hi @uwefladrich . I am implementing "saveic" in ECE4. To make saved initial conditions fully self-documenting and traceable, I'd like saveic to also save a snapshot of the experiment config that defines the model setup (component list, resolutions/grids, forcing settings, and dates) that generated those initial conditions. I did not find an easy way to dump from ScriptEngine in-memory context. With the new and render it I hope this PR makes sense to you. Let me know if there is a better way to achieve the same. |
b41fb84 to
6c097db
Compare
|
when testing, I realized implementing a So, I decided to add |
feaecca to
ec59b4d
Compare
164c46f to
b0499c9
Compare
|
I thought about copying the input file but it's fragile (cli args position uncertain, can be more than 1). So, Also, some meaningful context, added via base.include can be missed (such as model tuning presets). It can also filter out platform and job context to the model physics and experiment parameters.
|
b0499c9 to
da33f7a
Compare
Adds
toyaml(andto_yamlalias) Jinja filter to dump SE context as a yaml file (via yaml.dump).