Performance - up to 30% faster for some simulations.
Expanded support for WRF.
Pip package support - install once, run anywhere.
Updated tutorial, API, and documentation.
CI workflow.
Breaking Changes:
Drops support for Python 3.8 and lower.
Replaces the entire configuration system.
Centralises the source directory structure.
Removes the output and output.full files. Output variable selection is now in the config file.
Some arguments have been renamed to avoid namespace collision. -c, -x, -u, -s are now reserved for handling configuration files.
Some output attributes variable names have been corrected.
Details
Critical Bug Fixes
The surface temperature solver no longer terminates prematurely.
Refreezing now conserves mass and uses the correct units. Thanks to @MarcusGastaldello for providing both these fixes.
Snowfall is now in m water equivalent instead of ice equivalent. Thanks to @Richteny for spotting this.
Date comparisons now compare times instead of string lengths.
Incorrect conversion to radians in radiation module.
Fixed typos in output variable names.
Configuration
Configuration system now uses .toml files. You can now run multiple simulations from the same root directory. You can now select from multiple configuration files in any directory via optional user arguments:
If you have custom scripts importing constants or config variables, these will break. Look at densification.py to see how these are now implemented: if you want to access constants or config variables within an njitted function, these must be declared at the module level. Otherwise, replace import constants with from cosipy.constants import Constants.
Packaging
COSIPY now supports pip installation as a package or editable. This centralises the file hierarchy, so utilities and postprocessing are now under cosipy. Installing COSIPY as a package or editable adds entry points to simplify your workflow. View these using cosipy-shortcuts.
When running COSIPY from source, you will need to modify your commands, e.g.:
This release is not backwards-compatible with previous versions of COSIPY!
Tested on Ubuntu 22.04 & 24.04, Python 3.9 to 3.12, with and without Slurm.
Main Features:
convert_config.py
.Breaking Changes:
output
andoutput.full
files. Output variable selection is now in the config file.-c
,-x
,-u
,-s
are now reserved for handling configuration files.Details
Critical Bug Fixes
Configuration
Configuration system now uses .toml files. You can now run multiple simulations from the same root directory. You can now select from multiple configuration files in any directory via optional user arguments:
This system is not backwards-compatible, but you can convert your existing configuration files:
If you have custom scripts importing constants or config variables, these will break. Look at
densification.py
to see how these are now implemented: if you want to access constants or config variables within an njitted function, these must be declared at the module level. Otherwise, replaceimport constants
withfrom cosipy.constants import Constants
.Packaging
COSIPY now supports pip installation as a package or editable. This centralises the file hierarchy, so utilities and postprocessing are now under
cosipy
. Installing COSIPY as a package or editable adds entry points to simplify your workflow. View these usingcosipy-shortcuts
.When running COSIPY from source, you will need to modify your commands, e.g.:
Optimisations
Documentation
CI workflow
Code pushed to master or release branches is automatically tested with python 3.9-3.12 on Ubuntu.
Fixes #8, fixes #9, fixes #42, fixes #64. Closes #59, closes #66.