Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .config attribute to MAGICC #242

Open
znicholls opened this issue Apr 23, 2019 · 0 comments
Open

Add .config attribute to MAGICC #242

znicholls opened this issue Apr 23, 2019 · 0 comments

Comments

@znicholls
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

The config that is used to MAGICC currently exhibits hysteresis i.e. the config used in a given run depends on what happened to the files on disk in previous runs. This can make results change unexpectedly and debugging extremely difficult.

Describe the solution you'd like

Add a .config attribute to MAGICC. On instantiation, this attribute will be filled with MAGCFG_DEFAULTALL.CFG, overwritten by MAGCFG_USER.CFG, so the user can easily see what their starting config is. On calls to update_config and set_config, this attribute will be updated. The config would only be written to MAGTUNE_PYMAGICC.CFG as part of a call to MAGICC.run, which makes it easy to know what config will be used and also means we only have to write to disk once, no matter how many update_config and set_config calls are made in the meantime.

Describe alternatives you've considered

None have sprung to mind but there may be a better way.

Additional context

This came up as @lewisjared and I were doing runs where the results kept changing in weird ways. We eventually figured out the bug and that this would be a solution.

@lewisjared or @znicholls will have a go at this if no-one else gets there first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant