Skip to content

Latest commit

 

History

History
524 lines (432 loc) · 25.4 KB

CHANGELOG.rst

File metadata and controls

524 lines (432 loc) · 25.4 KB

Changelog

v0.11.0 - unreleased

New Features

Breaking changes

  • Switch random number generation for drawing emulations from np.random.seed() to np.random.default_rng() (#495). By Victoria Bauer.

  • Using Cholesky decomposition for finding covariance localization radius and drawing from the multivariate normal distribution (#408) By Victoria Bauer.

  • Removed support for python 3.9 (#513) By Mathias Hauser.

  • The supported versions of some dependencies were changed (#399, #405, and #503):

    Package

    Old

    New

    cartopy

    not specified

    0.22

    dask

    not specified

    2023.8

    joblib

    not specified

    1.3

    netcdf4

    not specified

    1.6

    numpy

    not specified

    1.24

    packaging

    not specified

    23.1

    pandas

    2.0

    no change

    pooch

    not specified

    1.7

    properscoring

    not specified

    0.1

    pyproj

    not specified

    3.6

    regionmask

    0.8

    0.10

    scikit-learn

    not specified

    1.3

    scipy

    not specified

    1.11

    shapely

    not specified

    2.0

    statsmodels

    not specified

    0.14

    xarray

    2023.04

    2023.7

Deprecations

  • Deprecated mask_3D_frac_approx as the functionality is now offered in regionmask v0.12.0 (#451).

Bug fixes

  • Averaging standard deviations for the AR parameters of global variability over several ensemble members and scenarios now averages the variances (#499). By Victoria Bauer.

Documentation

  • Updated and extended the development Guide (#511, #523)

Internal Changes

  • Start testing the minimum versions of required dependencies (#398). By Mathias Hauser.
  • Restore compatibility with pandas version v2.2 and xarray version v2024.02 (#404). By Mathias Hauser.
  • Explicitly include all required dependencies (#448).
  • Unshallow the mesmer git repository on rtd (#456). By Victoria Bauer.
  • Use ruff instead of isort and flake8 to lint the code base (#490). By Mathias Hauser.

Integration of MESMER-X

In the release the MESMER-X functionality is integrated into the MESMER Codebase.

Integration of MESMER-M

This release integrates MESMER-M into the existing MESMER infrastructure. This includes some refactoring, bugfixes and enhancements of the MESMER-M functionality. Note that this led to some numerical changes compared to the MESMER-M publication (Nath et al., 2022).

  • move MESMER-M scripts into mesmer ( #419, and #421).
  • move the harmonic model and power transformer functionalities to the stats module ( #484).
  • add example script for MESMER-M workflow (#491)

Auto-Regression

  • Implement functions performing the monthly (cyclo-stationary) auto-regression and adapt these functions to work with xarray. This includes extracting the drawing of spatially correlated innovations to a stand-alone function. (#473)
  • Remove the bounds of -1 and 1 on the slope of the cyclo-stationary AR(1) process. This bound is not necessary since cyclo-stationarity is also given if the slopes of a few months are (slightly) larger than one. We now return the residuals of the cyclo-stationary AR(1) process to fit the covariance matrix on these residuals. As a consequence, adjustment of the covariance matrix with the AR slopes is no longer necessary. After this, no adjustment is necessary anymore. (#480) Compare discussion in #472.
  • Implement function to localize the empirical covarince matrix for each month individually to use in drawing of spatially correlated noise in the AR process. (#479)

Yeo-Johnson power transformer

  • Ensure the power transformer yields the correct normalization for more cases ( #440):
    • expand the upper bound of the first coefficient from 1 to \infty, i.e. to all positive numbers ( #446)
    • remove jacobian rosen_der from fit ( #447)
    • change optimization method from SLSQP to Nelder-Mead ( #455)
  • adjust the first guess to assume the data is normally distributed ( #429)
  • make (back-) transformations more stable by using np.expm1 and np.log1p (#494)
  • rewrite power transformer to work with xarray, and refactor from a class structure to functions ( #442, and #474)
  • fix small code issues and clean the docstrings ( #436, #444, #439, #475, and #425)
  • add tests (#430)

Harmonic model

  • Performance and other optimizations:
    • only fit orders up to local minimum and use coeffs from precious order as first guess (#443)
    • infer the harmonic model order from the coefficients (#434)
  • return residuals instead of the loss for the optimization (#460)
  • remove fitting of linear regression with yearly temperature (#415 <https://github.com/MESMER-group/mesmer/pull/415/>_ and #488) in line with (Nath et al. 2022).
  • add helper function to upsample yearly data to monthly resolution ( #418, and #435)
  • de-duplicate the expression of months in their harmonic form (#415) move creation of the month array to the deepest level (#487).
  • fix indexing of harmonic model coefficients (#415)
  • Refactor variable names, small code improvements, optimization, fixes and clean docstring (#415, #424, #433, #512, and #512).
  • add tests ( #431, and #458)
  • add function to generate fourier series using xarray (#478)

By Victoria Bauer and Mathias Hauser.

v0.10.0 - 2024.01.04

version 0.10.0 fixes the bug in the legacy calibration and is thus not numerically backward compatible. It also updated the supported python, pandas and xarray versions. Updating the pandas version will create an error when trying to load pickled mesmer bundles, requiring to use mesmer version v0.9.0 for this.

Bug fixes

Ensure de-duplicating the historical ensemble members conserves their order. Previously, the legacy calibration routines used np.unique, which shuffles them. See #338 for details. (#339). By Mathias Hauser.

Breaking changes

  • Removed support for python 3.7 and python 3.8 ( #163, #365, #367, and #371). By Mathias Hauser.

  • The supported versions of some dependencies were changed (#369):

    Package

    Old

    New

    pandas

    <2.0

    >=2.0

    xarray

    not specified

    >=2023.04

New Features

v0.9.0 - 2023.12.19

version 0.9.0 is a big step towards rewriting mesmer. All statistical functionality was extracted and works for xarray data objects. It also contains data handling functions to prepare climate model data using xarray.

  • The restructured code is fully functional and can be used to calibrate and emulate temperature. However, it is still missing wrappers which encapsulate the full chain and helpers to simplify calibrating several scenarios and ensemble members.
  • This version still contains the legacy routines to train and emulate temperature. It should have no numerical changes, only minimal changes in usage, and offers speed gains over v0.8.3.

Known bugs

For the legacy training, the influence of the global variability is underestimated, because the historical ensemble members are shuffled "randomly". This is kept in v0.9.0 for backward compatibility and will be fixed in a follow-up bug fix release. For details see #338.

New Features

Breaking changes

Deprecations

Bug fixes

Documentation

Internal Changes

v0.8.3 - 2021-12-23

New Features

  • Add mesmer.stats._linear_regression (renamed to mesmer.stats._fit_linear_regression_np in #142). Starts the process of refactoring the codebase (#116). By Zeb Nicholls.

Bug fixes

  • Initialize llh_max to -inf to ensure the cross validation loop is entered (#110). By Jonas Schwaab.

Documentation

  • Fix copyright notice and release version in documentation (#127). By Zeb Nicholls.

Internal Changes

  • Automatically upload the code coverage to codecov.io after the test suite has run (#99). By Mathias Hauser.
  • Internal refactor: moved a number of inline comments to their own line (especially if this allows to have the code on one line instead of several) and other minor cleanups (#98). By Mathias Hauser.
  • Refactor io.load_cmipng_tas and io.load_cmipng_hfds to de-duplicate their code and add tests for them (#55). By Mathias Hauser.

v0.8.2 - 2021-10-07

Bug fixes

  • Reintroduce ability to read in cmip5 data from the cmip5-ng archive at ETH (#90). By Lea Beusch.

Internal Changes

  • Reproduce the test files because of a change in regionmask which affected the mesmer tests (#95). By Mathias Hauser.
  • Refactor and speed up of the Gaspari-Cohn function and the calculation of the great circle distance (#85, #88). By Mathias Hauser.
  • The geopy package is no longer a dependency of mesmer (#88). By Mathias Hauser.
  • Convert README from Markdown to reStructuredText to fix package build errors. Also allows to include the README in the docs to avoid duplication (#102). By Mathias Hauser.

v0.8.1 - 2021-07-15

  • Update example script (#80).

v0.8.0 - 2021-07-13

  • First release on PyPI and conda (#79).