diff --git a/pymagicc/core.py b/pymagicc/core.py index 0452d44a..1669068c 100644 --- a/pymagicc/core.py +++ b/pymagicc/core.py @@ -936,22 +936,25 @@ def create_copy(self): super(MAGICC7, self).create_copy() # Override the USER configuration for MAGICC7 so that it always conforms with pymagicc's expectations # The MAGCFG_USER.CFG configuration for MAGICC7 changes frequently in the repository - self.update_config('MAGCFG_USER.CFG', **{ - 'file_emisscen_2': "NONE", - 'file_emisscen_3': "NONE", - 'file_emisscen_4': "NONE", - 'file_emisscen_5': "NONE", - 'file_emisscen_6': "NONE", - 'file_emisscen_7': "NONE", - 'file_emisscen_8': "NONE", - 'file_tuningmodel_1': "PYMAGICC", - 'file_tuningmodel_2': "USER", - 'file_tuningmodel_3': "USER", - 'file_tuningmodel_4': "USER", - 'file_tuningmodel_5': "USER", - 'file_tuningmodel_6': "USER", - 'file_tuningmodel_7': "USER", - 'file_tuningmodel_8': "USER", - 'file_tuningmodel_9': "USER", - 'file_tuningmodel_10': "USER" - }) + self.update_config( + "MAGCFG_USER.CFG", + **{ + "file_emisscen_2": "NONE", + "file_emisscen_3": "NONE", + "file_emisscen_4": "NONE", + "file_emisscen_5": "NONE", + "file_emisscen_6": "NONE", + "file_emisscen_7": "NONE", + "file_emisscen_8": "NONE", + "file_tuningmodel_1": "PYMAGICC", + "file_tuningmodel_2": "USER", + "file_tuningmodel_3": "USER", + "file_tuningmodel_4": "USER", + "file_tuningmodel_5": "USER", + "file_tuningmodel_6": "USER", + "file_tuningmodel_7": "USER", + "file_tuningmodel_8": "USER", + "file_tuningmodel_9": "USER", + "file_tuningmodel_10": "USER", + }, + ) diff --git a/tests/test_core.py b/tests/test_core.py index e593b0de..55996e0b 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1099,30 +1099,30 @@ def test_get_output_filenames(mock_listdir): def test_default_config(package): if package.version == 6: - pytest.skip('Only checking MAGICC7') + pytest.skip("Only checking MAGICC7") expected_config = { - 'file_emisscen_2': "NONE", - 'file_emisscen_3': "NONE", - 'file_emisscen_4': "NONE", - 'file_emisscen_5': "NONE", - 'file_emisscen_6': "NONE", - 'file_emisscen_7': "NONE", - 'file_emisscen_8': "NONE", - 'file_tuningmodel_1': "PYMAGICC", - 'file_tuningmodel_2': "USER", - 'file_tuningmodel_3': "USER", - 'file_tuningmodel_4': "USER", - 'file_tuningmodel_5': "USER", - 'file_tuningmodel_6': "USER", - 'file_tuningmodel_7': "USER", - 'file_tuningmodel_8': "USER", - 'file_tuningmodel_9': "USER", - 'file_tuningmodel_10': "USER" + "file_emisscen_2": "NONE", + "file_emisscen_3": "NONE", + "file_emisscen_4": "NONE", + "file_emisscen_5": "NONE", + "file_emisscen_6": "NONE", + "file_emisscen_7": "NONE", + "file_emisscen_8": "NONE", + "file_tuningmodel_1": "PYMAGICC", + "file_tuningmodel_2": "USER", + "file_tuningmodel_3": "USER", + "file_tuningmodel_4": "USER", + "file_tuningmodel_5": "USER", + "file_tuningmodel_6": "USER", + "file_tuningmodel_7": "USER", + "file_tuningmodel_8": "USER", + "file_tuningmodel_9": "USER", + "file_tuningmodel_10": "USER", } - cfg = read_cfg_file(join(package.run_dir, 'MAGCFG_USER.CFG')) + cfg = read_cfg_file(join(package.run_dir, "MAGCFG_USER.CFG")) for key, expected in expected_config.items(): - assert cfg['nml_allcfgs'][key] == expected + assert cfg["nml_allcfgs"][key] == expected def test_out_forcing():