Breaking changes
xclim.subset
has been deprecated and now relies onclisops
to perform specialized spatio-temporal subsetting.
Install withpip install xclim[gis]
in order to retain the same functionality.- The python library
pandoc
is no longer listed as a docs build requirement. Documentation still requires a current
version ofpandoc
binaries installed at system-level. - ANUCLIM indices have seen their
input_freq
parameter renamed tosrc_timestep
for clarity. - A clean-up and harmonization of the indicators metadata has changed some of the indicator identifiers, long_names, abstracts and titles.
xclim.atmos.drought_code
andfire_weather_indexes
now have indentifiers "dc" and "fwi" (lowercase version of the previous identifiers). xc.indices.run_length.run_length_with_dates
becomesxc.indices.run_length.season_length
. Its argumentdate
is now optional and the default changes from "07-01" toNone
.xc.indices.consecutive_frost_days
becomesxc.indices.maximum_consecutive_frost_days
.- Changed the
history
indicator output attribute toxclim_history
in order to respect CF conventions.
New indicators
atmos.max_pr_intensity
acting on hourly data.atmos.wind_vector_from_speed
, also thewind_speed_from_vector
now also returns the "wind from direction".- Richards-Baker flow flashiness indicator (
xclim.land.rb_flashiness_index
). atmos.max_daily_temperature_range
.atmos.cold_spell_frequency
.atmos.tg_min
andatmos.tg_max
.atmos.frost_season_length
,atmos.first_day_above
. Also,atmos.consecutive_frost_days
now takes athresh
argument (default : 0 degC).
New features and enhancements
sdba.loess
submodule implementing LOESS smoothing tools used insdba.detrending.LoessDetrend
.- xclim now depends on clisops for subsetting, offloading several heavy GIS dependencies. This improves
maintainability and reduces the size of a "vanilla" xclim installation considerably. - New
generic.parametric_quantile
function taking parameters estimated bygeneric.fit
as an input. - Add support for using probability weighted moments method in
generic.fit
function. Requires the
lmoments3
package, which is not included in dependencies because it is unmaintained. Install manually if needed. - Implemented
_fit_start
utility function providing initial conditions for statistical distribution parameters estimation, reducing the likelihood of poor fits. - Added support for indicators based on hourly (1H) inputs, and a first hourly indicator called
max_pr_intensity
returning hourly precipitation intensity. - Indicator instances can be retrieved through their class with the
get_instance()
class method.
This allows the use ofxclim.core.indicator.registry
as an instance registry. - Indicators now have a
realm
attribute. It must be given when creating indicators outside xclim. - Better docstring parsing for indicators: parameters description, annotation and default value are accessible in the json output and
Indicator.parameters
. - New command line interface
xclim
for simple indicator computing tasks. - New
sdba.processing.jitter_over_thresh
for variables with a upper bound. - Added
op
parameter toxclim.indices.daily_temperature_range
to allow resample reduce operations other than mean core.formatting.AttrFormatter
(and thus, locale dictionaries) can now use glob-like pattern for matching values to translate.
Bug fixes
- The ICCLIM module was identified as
icclim
in the documentation but the module available underICCLIM
. Nowicclim == ICCLIM
andICCLIM will be deprecated in a future release
.
Internal changes
xclim.subset
now attempts to load and expose the functions ofclisops.core.subset
. This is an API workaround preserving backwards compatibility.- Code styling now conforms to the latest release of black (v0.20.8).
- New
IndicatorRegistrar
class that takes care of adding indicator classes and instances to the
appropriate registries.Indicator
now inherits from it.