Skip to content

v3.0.0

Compare
Choose a tag to compare
@BSchilperoort BSchilperoort released this 05 Apr 13:57
· 12 commits to main since this release
623db40

WAM2layers can be used to determine where precipitation originally evaporated (backtracking), or where evaporated moisture eventually ends up (forward tracking).

Version 3.0 comes with some big changes:

  • The internal code has been overhauled and cleaned up.
    • Calculations are now done with kg m-2 (or equivalents) instead of m-3 units.
    • Large performance improvements
    • Bugs in the vertical flux calculation have been fixed
    • Regression tests have been added to improve reliability
  • User friendliness has been greatly improved:
    • wam2layers is now a proper python package, installable with pip install wam2layers and has a command line interface.
    • Documentation has been added, hosted on readthedocs
    • Sample data is available
    • Experiments are defined using yaml configuration files
    • Standard analysis scripts are included in the package
  • The package includes preprocessing for ERA5 input data.
  • Input and output data have proper metadata

Specific changes since v3.0.0-beta.6:
Added

  • Updated the visualization: more generic for forward and backward tracking (#318).
  • Add difference plots to the regression tests (test_workflow.py). The plots are uploaded as "artifacts" on Github Actions for easy inspection (#319).
  • Added an export to file method for the configuration object (wam2layers.config.Config) to allow for easier testing of the command line interface (#320).
  • Added a regression test for the forward tracking workflow (#320).
  • Added support for Python 3.12 (#333).
  • Adopted NEP-29 as version support policy (#333).
  • The output files now contain many attributes for easier interpretation (#334).
  • Publishing of the package to the Python Package Index (PyPI) is now automated with a Github Actions workflow (#342).
  • You can now view the version of wam2layers by running wam2layers --version (#352).
  • Added a debug flag to the CLI: wam2layers --debug. This will make debug level statements be printed to the terminal as well (#354).

Removed

  • Support for Python 3.8 has been removed. This is in line with the new policy (following NEP-29) (#333).
  • The CLI command to generate snapshots was removed. This was deemed to unstable for a V3 release (#362).

Fixed

  • Fixed a bug in the profiler's track_stability_correction method (#325).
  • Log message about "lost moisture" no longer includes boundary losses. Instead,
    there is a separate log message for "boundary transport"
    (#343)
  • Fixed a bug in the calculation of losses and gains for backtrack, where the moisture was compared to the wrong reference state (#355).
  • The calculated gains are now absolute fields instead of relative to the reference field (#355).

Changed

  • The workflow tests use a temporary directory managed by pytest and the user's operating system, to avoid the /tmp folder polluting the workspace (#320).
  • The workflow tests now make extensive use of pytest's fixtures, which will make future test writing easier (#320).
  • The kvf parameter can now be a floating point number instead of an integer (#320).
  • The stability correction warning will now occur only when 10% more of the grid is corrected compared to last warning, or the correction factor is 10% stronger (#332).
  • The output files now contain a time dimension (incl. the coordinate) (#334).
  • The package version is now defined in src/wam2layers/__init__.py (#334).
  • The command line interface for tracking has changed. Tracking experiments are now started by doing wam2layers track config.yml. The tracking direction is retrieved from the new configuration entry "tracking_direction" (#338).
  • The configuration parameter "target_frequency" has been renamed to "timestep". Also, under the hood, it is applied in a different location, closer to the core computations. This makes it easier to see the relation between the formula "on paper" and the implementation in the code (#346).
  • The tests on Github Actions now use base python, not micromamba (#351).
  • The units with which WAM2layers calculates internally are changed from m3 to kg/m2. This saves some unit conversions, makes it easier to see the relation between the equations and the code, and makes it easier to interpret the output and intermediate states. Visualization functions no longer need to convert back to kg/m2 (#356).
  • The preprocessed data now mostly follows the CF-1.6 convention for netCDF files (#363).
  • The output data now follows the CF-1.6 convention for netCDF files (#363).