FormingWorlds / PROTEUS

Coupled atmosphere-interior framework to simulate the temporal evolution of rocky planets.
https://proteus-code.readthedocs.io
Apache License 2.0
10 stars 1 forks source link

Rework configuration file #74

Open nichollsh opened 4 months ago

nichollsh commented 4 months ago

The current configuration file format is very confusing. It's not clear which parameters are necessary, and how they relate to each other. I've tried to make this clearer in the ReadTheDocs page using a table, but that's not good enough.

Since we want to keep things as "modules", which are swappable, I propose that we use a TOML file for the cfg format with a section for each module being used.

For example...

# Example cfg file with some arbitrary values

[runtime]
log_output =  true
output_folder = "path/to/folder"

[planet]
mass = 10.0
radius = 2.0
surface_bc = 2

[star]
mass = 1e5
radius = 1e4
spectrum = "path/to/file"

[modules]

    [modules.interior]
    enabled    = true
    selection  = "C_SPIDER"
    melt_curve = "path/to/file"

    [modules.atmosphere]
    enabled   = true
    selection = "JANUS"

    [modules.tides]
    enabled   = false

    [modules.escape]
    enabled   = false

See more info here: https://toml.io/en/ This connects with #62, #68, #66, #56, and #71.