You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 toMAGICC
. On instantiation, this attribute will be filled withMAGCFG_DEFAULTALL.CFG
, overwritten byMAGCFG_USER.CFG
, so the user can easily see what their starting config is. On calls toupdate_config
andset_config
, this attribute will be updated. The config would only be written toMAGTUNE_PYMAGICC.CFG
as part of a call toMAGICC.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 manyupdate_config
andset_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.
The text was updated successfully, but these errors were encountered: