Changelog#
v0.9.0 - unreleased#
New Features#
- Refactored statistical functionality for linear regression:
Create
mesmer.stats.linear_regression.LinearRegression
which encapsulatesfit
,predict
, etc. methods around linear regression (#134). By Mathias Hauser.Add
mesmer.stats._fit_linear_regression_xr
: xarray wrapper formesmer.stats._fit_linear_regression_np
. (#123 and #142). By Mathias Hauser.Add add
fit_intercept
argument to thelinear_regression
fitting methods and functions (#144). By Mathias Hauser.Allow to pass 1-dimensional targets to
mesmer.stats.linear_regression.LinearRegression.fit()
(#221). By Mathias Hauser.
- Refactored statistical functionality for auto regression:
Add
mesmer.stats.auto_regression._fit_auto_regression_xr
: xarray wrapper to fit an auto regression model (#139). By Mathias Hauser.Add
mesmer.stats.auto_regression._draw_auto_regression_correlated_np
: to draw samples of an auto regression model (#161). By Mathias Hauser.Extract function to select the order of the auto regressive model:
mesmer.stats.auto_regression._select_ar_order_xr
(#176). By Mathias Hauser.
- Refactored functions dealing with the spatial covariance and its localization:
Add xarray wrappers
mesmer.stats.localized_covariance.adjust_covariance_ar1()
andmesmer.stats.localized_covariance.find_localized_empirical_covariance()
(#191). By Mathias Hauser.Refactor and extract numpy-based functions dealing with the spatial covariance and its localization (#167 and #184). By Mathias Hauser.
Allow to pass 1 x n arrays to
mesmer.stats.localized_covariance.adjust_covariance_ar1()
(#224). By Mathias Hauser.
- Other refactorings:
Extract the LOWESS smoothing for xarray objects:
mesmer.stats.smoothing.lowess()
. (#193). By Mathias Hauser.
- Added helper functions to process xarray-based model data:
Added functions to stack regular lat-lon grids to 1D grids and unstack them again (#217). By Mathias Hauser.
Added functions to mask the ocean and Antarctica (#219). By Mathias Hauser.
Added functions to calculate the weighted global mean (#220). By Mathias Hauser.
Breaking changes#
Localization radii that lead to singular matrices are now skipped (#187). By Mathias Hauser.
Refactor and split
train_l_prepare_X_y_wgteq()
into two functions:get_scenario_weights()
andstack_predictors_and_targets()
(#143). By Mathias Hauser.Moved
gaspari_cohn
&calc_geodist_exact
fromio.load_constant_files
tocore.computation
(#158). By Yann Quilcaille.The function
mask_percentage
has been renamed toutils.regionmaskcompat.mask_3D_frac_approx()
(#202). By Mathias Hauser.Removed
mesmer.io.load_constant_files.infer_interval_breaks()
and the edges from the lat and lon dictionaries i.e.,lon["e"]
andlat["e"]
(#233). By Mathias Hauser.Deprecated the
reg_type
argument tomesmer.io.load_constant_files.load_regs_ls_wgt_lon_lat()
and thereg_dict
argument tomesmer.utils.select.extract_land()
. These arguments no longer have any affect (#235). By Mathias Hauser.Removed
ref["type"] == "first"
, i.e., caculating the anomaly w.r.t. the first ensemble member (#247). By Mathias Hauser.Renamed
mesmer.calibrate_mesmer._calibrate_and_draw_realisations
tomesmer.calibrate_mesmer._calibrate_tas
(#66). By Mathias Hauser.
Deprecations#
The function
mesmer.create_emulations.create_emus_gt
has been renamed tocreate_emulations.gather_gt_data()
(#246). By Mathias Hauser.The function
mesmer.utils.select.extract_time_period
is now deprecated and will be removed in a future version. Please raise an issue if you use this function (#243). By Mathias Hauser.
Bug fixes#
Fix three issues with
utils.regionmaskcompat.mask_3D_frac_approx()
. Note that these issues are only relevant if passing xarray objects and/ or masks close to the poles (#202 and #218). By Mathias Hauser.
Documentation#
Add development/contributing docs (#121). By Zeb Nicholls.
Internal Changes#
Restore compatibility with regionmask v0.9.0 (#136). By Mathias Hauser.
Renamed the
interpolation
keyword ofnp.quantile
tomethod
changed in numpy v1.22.0 (#137). By Mathias Hauser.Add python 3.10 to list of supported versions (#162). By Mathias Hauser.
Move contents of setup.py to setup.cfg (#169). By Mathias Hauser.
Use pyproject.toml for the build-system and setuptools_scm for the __version__ (#188). By Mathias Hauser.
- Added additional tests for the calibration step (#209):
By Mathias Hauser.
v0.8.3 - 2021-12-23#
New Features#
Add
mesmer.stats._linear_regression
(renamed tomesmer.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
andio.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).