smash.save_setup#
- smash.save_setup(setup, path)[source]#
Save Model initialization setup dictionary.
- Parameters:
- setupdict
The setup dictionary to be saved to YAML file.
- pathstr
The file path. If the path not end with
.yaml, the extension is automatically added to the file path.
See also
read_setupRead Model initialization setup dictionary.
Examples
>>> setup, mesh = smash.load_dataset("cance") >>> setup {'structure': 'gr-a', 'dt': 3600, 'start_time': '2014-09-15 00:00', ...}
Save setup
>>> smash.save_setup(setup, "setup.yaml")
Read setup (the reloaded setup keys will be alphabetically sorted)
>>> setup_rld = smash.read_setup("setup.yaml") setup_rld {'daily_interannual_pet': True, 'descriptor_name': ['slope', 'dd'], ...}