What’s New

What’s New#

climpred v2.5.0 (unreleased)#

Internals/Minor Fixes#

  • Fixed some issues with the documentation build to address rendering errors and reduce the number of warnings on ReadTheDocs. (pr:843) Trevor James Smith

  • Fixed some issues with the typing hints of classes functions. (pr:850) Trevor James Smith

climpred v2.4.0 (2023-11-09)#

Internals/Minor Fixes#

climpred v2.3.0 (2022-11-25)#

Note

As both maintainers moved out of academia into industry, this will be probably the last release for a while. If you are interested in maintaining climpred, please ping us.

Bug Fixes#

New Features#

Internals/Minor Fixes#

Bug Fixes#

  • Fix PerfectModel_persistence_from_initialized_lead_0=True with multiple references. (GH732, GH733) Aaron Spring.

Documentation#

climpred v2.2.0 (2021-12-20)#

Bug Fixes#

  • Fix when creating valid_time from lead.attrs["units"] in ["seasons", "years"] with multi-month stride in init. (GH698, GH700) Aaron Spring.

  • Fix seasonality="season" in reference="climatology". (GH641, GH703) Aaron Spring.

New Features#

  • Upon instantiation, PredictionEnsemble generates new 2-dimensional coordinate valid_time for initialized from init and lead, which is matched with time from verification during alignment. (GH575, GH675, GH678) Aaron Spring.

>>> hind = climpred.tutorial.load_dataset("CESM-DP-SST")
>>> hind.lead.attrs["units"] = "years"
>>> climpred.HindcastEnsemble(hind).get_initialized()
<xarray.Dataset>
Dimensions:     (lead: 10, member: 10, init: 64)
Coordinates:
  * lead        (lead) int32 1 2 3 4 5 6 7 8 9 10
  * member      (member) int32 1 2 3 4 5 6 7 8 9 10
  * init        (init) object 1954-01-01 00:00:00 ... 2017-01-01 00:00:00
    valid_time  (lead, init) object 1955-01-01 00:00:00 ... 2027-01-01 00:00:00
Data variables:
    SST         (init, lead, member) float64 ...
>>> import climpred
>>> hind = climpred.tutorial.load_dataset("NMME_hindcast_Nino34_sst")
>>> obs = climpred.tutorial.load_dataset("NMME_OIv2_Nino34_sst")
>>> hindcast = climpred.HindcastEnsemble(hind).add_observations(obs)
>>> # skill for each init month separated
>>> skill = hindcast.verify(
...     metric="rmse",
...     dim="init",
...     comparison="e2o",
...     skipna=True,
...     alignment="maximize",
...     groupby="month",
... )
>>> skill
<xarray.Dataset>
Dimensions:  (month: 12, lead: 12, model: 12)
Coordinates:
  * lead     (lead) float64 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0
  * model    (model) object 'NCEP-CFSv2' 'NCEP-CFSv1' ... 'GEM-NEMO'
    skill    <U11 'initialized'
  * month    (month) int64 1 2 3 4 5 6 7 8 9 10 11 12
Data variables:
    sst      (month, lead, model) float64 0.4127 0.3837 0.3915 ... 1.255 3.98
>>> skill.sst.plot(hue="model", col="month", col_wrap=3)

Internals/Minor Fixes#

Documentation#

climpred v2.1.6 (2021-08-31)#

Adding on to v2.1.5, more bias reduction methods wrapped from xclim are implemented.

Bug Fixes#

New Features#

climpred v2.1.5 (2021-08-12)#

While climpred has used in the ASP summer colloquium 2021, many new features in HindcastEnsemble.remove_bias() were implemented.

Breaking changes#

Bug Fixes#

New Features#

Documentation#

climpred v2.1.4 (2021-06-28)#

New Features#

Documentation#

Internals/Minor Fixes#

  • Add weekly upstream CI, which raises issues for failures. Adapted from xarray. Manually trigger by git commit -m '[test-upstream]'. Skip climpred_testing CI by git commit -m '[skip-ci]' (GH518, GH596) Aaron Spring.

climpred v2.1.3 (2021-03-23)#

New Features#

Bug fixes#

Internals/Minor Fixes#

climpred v2.1.2 (2021-01-22)#

This release is the fixed version for our Journal of Open Source Software (JOSS) article about climpred, see review.

New Features#

  • Function to calculate predictability horizon predictability_horizon() based on condition. (GH46, GH521) Aaron Spring.

Bug fixes#

climpred v2.1.1 (2020-10-13)#

Breaking changes#

This version introduces a lot of breaking changes. We are trying to overhaul climpred to have an intuitive API that also forces users to think about methodology choices when running functions. The main breaking changes we introduced are for HindcastEnsemble.verify() and PerfectModelEnsemble.verify(). Now, instead of assuming defaults for most keywords, we require the user to define metric, comparison, dim, and alignment (for hindcast systems). We also require users to designate the number of iterations for bootstrapping.

New Features#

This release is accompanied by a bunch of new features. Math operations can now be used with our PredictionEnsemble objects and their variables can be sub-selected. Users can now quick plot time series forecasts with these objects. Bootstrapping is available for HindcastEnsemble. Spatial dimensions can be passed to metrics to do things like pattern correlation. New metrics have been implemented based on Contingency tables. We now include an early version of bias removal for HindcastEnsemble.

Depreciated#

Bug Fixes#

Documentation#

Internals/Minor Fixes#

climpred v2.1.0 (2020-06-08)#

Breaking Changes#

  • Keyword bootstrap has been replaced with iterations. We feel that this more accurately describes the argument, since “bootstrap” is really the process as a whole. (GH354) Aaron Spring.

New Features#

  • HindcastEnsemble and PerfectModelEnsemble now use an HTML representation, following the more recent versions of xarray. (GH371) Aaron Spring.

  • HindcastEnsemble.verify() now takes reference=... keyword. Current options are 'persistence' for a persistence forecast of the observations and 'uninitialized' for an uninitialized/historical reference, such as an uninitialized/forced run. (GH341) Riley X. Brady.

  • We now only enforce a union of the initialization dates with observations if reference='persistence' for HindcastEnsemble. This is to ensure that the same set of initializations is used by the observations to construct a persistence forecast. (GH341) Riley X. Brady.

  • compute_perfect_model() now accepts initialization (init) as cftime and int. cftime is now implemented into the bootstrap uninitialized functions for the perfect model configuration. (GH332) Aaron Spring.

  • New explicit keywords in bootstrap functions for resampling_dim and reference_compute (GH320) Aaron Spring.

  • Logging now included for compute_hindcast which displays the inits and verification dates used at each lead (GH324) Aaron Spring, (GH338) Riley X. Brady. See (logging).

  • New explicit keywords added for alignment of verification dates and initializations. (GH324) Aaron Spring. See (alignment)

    • 'maximize': Maximize the degrees of freedom by slicing hind and verif to a common time frame at each lead. (GH338) Riley X. Brady.

    • 'same_inits': slice to a common init frame prior to computing metric. This philosophy follows the thought that each lead should be based on the same set of initializations. (GH328) Riley X. Brady.

    • 'same_verifs': slice to a common/consistent verification time frame prior to computing metric. This philosophy follows the thought that each lead should be based on the same set of verification dates. (GH331) Riley X. Brady.

Performance#

The major change for this release is a dramatic speedup in bootstrapping functions, led by Aaron Spring. We focused on scalability with dask and found many places we could compute skill simultaneously over all bootstrapped ensemble members rather than at each iteration.

  • Bootstrapping uninitialized skill in the perfect model framework is now sped up significantly for annual lead resolution. (GH332) Aaron Spring.

  • General speedup in ~climpred.bootstrap.bootstrap_hindcast and ~climpred.bootstrap.bootstrap_perfect_model: (GH285) Aaron Spring.

    • Properly implemented handling for lazy results when inputs are chunked.

    • User gets warned when chunking potentially unnecessarily and/or inefficiently.

Bug Fixes#

  • Alignment options now account for differences in the historical time series if reference='historical'. (GH341) Riley X. Brady.

Internals/Minor Fixes#

Documentation#

climpred v2.0.0 (2020-01-22)#

New Features#

  • Add support for days, pentads, weeks, months, seasons for lead time resolution. climpred now requires a lead attribute “units” to decipher what resolution the predictions are at. (GH294) Kathy Pegion and Riley X. Brady.

Documentation#

  • New example pages for subseasonal-to-seasonal prediction using climpred. (GH294) Kathy Pegion

    • Calculate the skill of the MJO index as a function of lead time (link).

    • Calculate the skill of the MJO index as a function of lead time for weekly data (link).

    • Calculate ENSO skill as a function of initial month vs. lead time (link).

    • Calculate Seasonal ENSO skill (link).

  • Comparisons page rewritten for more clarity. (GH310) Riley X. Brady.

Bug Fixes#

Internals/Minor Fixes#

  • Updates to xskillscore v0.0.12 to get a 30-50% speedup in compute functions that rely on metrics from there. (GH309) Riley X. Brady.

  • Stacking dims is handled by comparisons, no need for internal keyword stack_dims. Therefore comparison now takes metric as argument instead. (GH290) Aaron Spring.

  • assign_attrs now carries dim (GH290) Aaron Spring.

  • reference changed to verif throughout hindcast compute functions. This is more clear, since reference usually refers to a type of forecast, such as persistence. (GH310) Riley X. Brady.

  • Comparison objects can now have aliases. (GH310) Riley X. Brady.

climpred v1.2.1 (2020-01-07)#

Depreciated#

  • mad no longer a keyword for the median absolute error metric. Users should now use median_absolute_error, which is identical to changes in xskillscore version 0.0.10. (GH283) Riley X. Brady

  • pacc no longer a keyword for the p value associated with the Pearson product-moment correlation, since it is used by the correlation coefficient. (GH283) Riley X. Brady

  • msss no longer a keyword for the Murphy’s MSSS, since it is reserved for the standard MSSS. (GH283) Riley X. Brady

New Features#

  • Metrics pearson_r_eff_p_value and spearman_r_eff_p_value account for autocorrelation in computing p values. (GH283) Riley X. Brady

  • Metric effective_sample_size computes number of independent samples between two time series being correlated. (GH283) Riley X. Brady

  • Added keywords for metrics: (GH283) Riley X. Brady

    • 'pval' for pearson_r_p_value

    • ['n_eff', 'eff_n'] for effective_sample_size

    • ['p_pval_eff', 'pvalue_eff', 'pval_eff'] for pearson_r_eff_p_value

    • ['spvalue', 'spval'] for spearman_r_p_value

    • ['s_pval_eff', 'spvalue_eff', 'spval_eff'] for spearman_r_eff_p_value

    • 'nev' for nmse

Internals/Minor Fixes#

  • climpred now requires xarray version 0.14.1 so that the drop_vars() keyword used in our package does not throw an error. (GH276) Riley X. Brady

  • Update to xskillscore version 0.0.10 to fix errors in weighted metrics with pairwise NaNs. (GH283) Riley X. Brady

  • doc8 added to pre-commit to have consistent formatting on .rst files. (GH283) Riley X. Brady

  • Remove proper attribute on Metric class since it isn’t used anywhere. (GH283) Riley X. Brady

  • Add testing for effective p values. (GH283) Riley X. Brady

  • Add testing for whether metric aliases are repeated/overwrite each other. (GH283) Riley X. Brady

  • ppp changed to msess, but keywords allow for ppp and msss still. (GH283) Riley X. Brady

Documentation#

climpred v1.2.0 (2019-12-17)#

Depreciated#

  • Abbreviation pval depreciated. Use p_pval for pearson_r_p_value instead. (GH264) Aaron Spring.

New Features#

>>> hind = climpred.tutorial.load_dataset("CESM-DP-SST")
>>> ref = climpred.tutorial.load_dataset("ERSST")
>>> hindcast = climpred.HindcastEnsemble(hind)
>>> hindcast = hindcast.add_reference(ref, "ERSST")
>>> print(hindcast)
<climpred.HindcastEnsemble>
Initialized Ensemble:
    SST      (init, lead, member) float64 ...
ERSST:
    SST      (time) float32 ...
Uninitialized:
    None
>>> print(hindcast.get_initialized())
<xarray.Dataset>
Dimensions:  (init: 64, lead: 10, member: 10)
Coordinates:
* lead     (lead) int32 1 2 3 4 5 6 7 8 9 10
* member   (member) int32 1 2 3 4 5 6 7 8 9 10
* init     (init) float32 1954.0 1955.0 1956.0 1957.0 ... 2015.0 2016.0 2017.0
Data variables:
    SST      (init, lead, member) float64 ...
>>> print(hindcast.get_reference("ERSST"))
<xarray.Dataset>
Dimensions:  (time: 61)
Coordinates:
* time     (time) int64 1955 1956 1957 1958 1959 ... 2011 2012 2013 2014 2015
Data variables:
    SST      (time) float32 ...

Bug Fixes#

  • HindcastEnsemble.compute_metric() doesn’t drop coordinates from the initialized hindcast ensemble anymore. (GH258) Aaron Spring.

  • Metric uacc does not crash when ppp negative anymore. (GH264) Aaron Spring.

  • Update xskillscore to version 0.0.9 to fix all-NaN issue with pearson_r and pearson_r_p_value when there’s missing data. (GH269) Riley X. Brady.

Internals/Minor Fixes#

Documentation#

climpred v1.1.0 (2019-09-23)#

Features#

  • Write information about skill computation to netcdf attributes(GH213) Aaron Spring

  • Temporal and spatial smoothing module (GH224) Aaron Spring

  • Add metrics brier_score, threshold_brier_score and crpss_es (GH232) Aaron Spring

  • Allow compute_hindcast and compute_perfect_model to specify which dimension dim to calculate metric over (GH232) Aaron Spring

Bug Fixes#

  • Correct implementation of probabilistic metrics from xskillscore in compute_perfect_model, bootstrap_perfect_model, compute_hindcast and bootstrap_hindcast, now requires xskillscore>=0.05 (GH232) Aaron Spring

Internals/Minor Fixes#

Documentation#

climpred v1.0.1 (2019-07-04)#

Bug Fixes#

Internals/Minor Fixes#

climpred v1.0.0 (2019-07-03)#

climpred v1.0.0 represents the first stable release of the package. It includes HindcastEnsemble and PerfectModelEnsemble objects to perform analysis with. It offers a suite of deterministic and probabilistic metrics that are optimized to be run on single time series or grids of data (e.g., lat, lon, and depth). Currently, climpred only supports annual forecasts.

Features#

  • Bootstrap prediction skill based on resampling with replacement consistently in ReferenceEnsemble and PerfectModelEnsemble. (GH128) Aaron Spring

  • Consistent bootstrap function for climpred.stats functions via bootstrap_func wrapper. (GH167) Aaron Spring

  • many more metrics: _msss_murphy, _less and probabilistic _crps, _crpss (GH128) Aaron Spring

Bug Fixes#

Internals/Minor Fixes#

Documentation#

  • Documentation built extensively in multiple PRs.

climpred v0.3 (2019-04-27)#

climpred v0.3 really represents the entire development phase leading up to the version 1 release. This was done in collaboration between Riley X. Brady, Aaron Spring, and Andrew Huang. Future releases will have less additions.

Features#

  • Introduces object-oriented system to climpred, with classes ReferenceEnsemble and PerfectModelEnsemble. (GH86) Riley X. Brady

  • Expands bootstrapping module for perfect-module configurations. (GH78, GH87) Aaron Spring

  • Adds functions for computing Relative Entropy (GH73) Aaron Spring

  • Sets more intelligible dimension expectations for climpred (GH98, GH105) Riley X. Brady and Aaron Spring:

    • init: initialization dates for the prediction ensemble

    • lead: retrospective forecasts from prediction ensemble; returned dimension for prediction calculations

    • time: time dimension for control runs, references, etc.

    • member: ensemble member dimension.

  • Updates open_dataset to display available dataset names when no argument is passed. (GH123) Riley X. Brady

  • Change ReferenceEnsemble to HindcastEnsemble. (GH124) Riley X. Brady

  • Add probabilistic metrics to climpred. (GH128) Aaron Spring

  • Consolidate separate perfect-model and hindcast functions into singular functions (GH128) Aaron Spring

  • Add option to pass proxy through to open_dataset for firewalled networks. (GH138) Riley X. Brady

Bug Fixes#

Internals/Minor Fixes#

climpred v0.2 (2019-01-11)#

Name changed to climpred, developed enough for basic decadal prediction tasks on a perfect-model ensemble and reference-based ensemble.

climpred v0.1 (2018-12-20)#

Collaboration between Riley Brady and Aaron Spring begins.