Skip to content

Saving options #2099

Open
Open
@johnomotani

Description

@johnomotani

Options that were actually used in a run are saved into BOUT.settings.

  • BOUT.settings is only fully created if the run finishes cleanly

    • the initial version is created before the init() method of a PhysicsModel is called, so is missing many options
    • I often let runs time out, and then the final version is never created
    • I think it would be more reliable (and useful at least for me) if writeSettingsFile() was called when the output monitor is called for the first time (which is after rhs() has been evaluated at least once, so we can be pretty sure that all the needed options have been read and used).
  • It would be nice to write the options into the dump files as well

    • BOUT.settings is nice because it can be used as an input file to explicitly re-create an old run, even if defaults, etc. have changed since then, so I think is definitely a feature to keep
    • but for keeping track of run output, it's much nicer to have everything in a single file where it can't be separated. (I say 'single file' assuming the BOUT.dmp.*.nc files will be squashed to a single netcdf file somehow or other to avoid wasting disk space and network bandwidth.)
  • What is the best way of saving options into the dump files?

    • saving each option into a variable is simple, but might risk name conflicts with existing variables?
    • it would be natural to create a 'group' in the netCDF file for options, and maybe sub-groups for sub-sections. Unfortunately xarray doesn't support groups at the moment

A backport would be nice to have, but I guess how feasible it is depends on implementation details...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions