pypi xclim 0.19.0
v0.19.0

latest releases: 0.53.2, 0.53.1, 0.53.0...
4 years ago

Breaking changes

  • Refactoring of the Indicator class. The cfprobe method has been renamed to cfcheck and the validate
    method has been renamed to datacheck. More importantly, instantiating Indicator creates a new subclass on
    the fly and stores it in a registry, allowing users to subclass existing indicators easily. The algorithm for
    missing values is identified by its registered name, e.g. "any", "pct", etc, along with its missing_options.
  • xclim now requires xarray >= 0.16, ensuring that xclim.sdba is fully functional.
  • The dev requirements now include xdoctest -- a rewrite of the standard library module, doctest.
  • xclim.core.locales.get_local_attrs now uses the indicator's class name instead of the indicator itself and no
    longer accepts the fill_missing keyword. Behaviour is now the same as passing False.
  • Indicator.cf_attrs is now a list of dictionaries. Indicator.json puts all the metadata attributes in the key "outputs" (a list of dicts).
    All variable metadata (names in Indicator._cf_names) might be strings or lists of strings when accessed as object attributes.
  • Passing doctests are now strictly enforced as a build requirement in the Travis CI testing ensemble.

New features and enhancements

  • New ensembles.kkz_reduce_ensemble method to select subsets of an ensemble based on the KKZ algorithm.
  • Create new Indicator Daily, Daily2D subclasses for indicators using daily input data.
  • The Indicator class now supports outputing multiple indices for the same inputs.
  • xclim.core.units.declare_units now works with indices outputting multiple DataArrays.
  • Doctests now make use of the xdoctest_namespace in order to more easily access mdoules and tesdata.

Bug fixes

  • Fix generic.fit dimension ordering. This caused errors when "time" was not the first dimension in a DataArray.

Internal changes

  • datachecks.check_daily now uses xr.infer_freq.
  • Indicator subclasses Tas, Tasmin, Tasmax, Pr and Streamflow now inherit from Daily.
  • Indicator subclasses TasminTasmax and PrTas now inherit from Daily2D.
  • Docstring style now enforced using the pydocstyle with numpy doctsring conventions.
  • Doctests are now performed for all docstring Examples using xdoctest. Failing examples must be explicitly skipped otherwise build will now fail.
  • Indicator methods update_attrs and format are now classmethods, attrs to update must be passed.
  • Indicators definitions without an accompanying translation (presently French) will cause build failures.
  • Major refactoring of the internal marchinery of Indicator to support multiple outputs.

Don't miss a new xclim release

NewReleases is sending notifications on new releases.