pypi xclim 0.55.0
v0.55.0

4 days ago

Contributors to this version: Juliette Lavoie (@juliettelavoie), Trevor James Smith (@Zeitsperre), Sascha Hofmann (@saschahofmann), Pascal Bourgault (@aulemahal), Éric Dupuis (@coxipi), Baptiste Hamon (@baptistehamon), Sarah Gammon (@SarahG-579462).

Breaking changes

  • Missing value method "WMO" was modified to remove the criterion that the timeseries needs to be continuous (without holes). (PR/2058).

Announcements

  • xclim now officially supports Python 3.13 (using numba v0.61.0). (GH/2022, PR/2054).
  • xclim version 0.55.0 will be the last version to support Python 3.10. The next version will require Python 3.11 or higher. (PR/2054).

New indicators

  • Added xclim.land.holiday_snow_days to compute the number of days with snow on the ground during holidays ("Christmas Days"). (GH/2029, PR/2030).
  • Added xclim.land.holiday_snow_and_snowfall_days to compute the number of days with snow on the ground and measurable snowfall during holidays ("Perfect Christmas Days"). (GH/2029, PR/2030).
  • Added xclim.atmos.vapor_pressure_deficit to compute the vapor pressure deficit from temperature and relative humidity. (GH/1917, PR/2072).

New features and enhancements

  • New function ensemble.partition.general_partition. (PR/2035).
  • Added a new xclim.indices.generic.bivariate_count_occurrences function to count instances where operations and performed and validated for two variables. (PR/2030).
  • xclim.testing.helpers.test_timeseries now accepts a calendar argument that is forwarded to xr.cftime_range. (PR/2019).
  • New xclim.indices.fao_allen98, exporting the FAO-56 Penman-Monteith equation for potential evapotranspiration (GH/2004, PR/2067).
  • Missing values method "pct" and "at_least_n" now accept a new "subfreq" option that allows to compute the missing mask in two steps. When given, the algorithm is applied at this "subfreq" resampling frequency first and then the result is resampled at the target indicator frequency. In the output, a period is invalid if any of its subgroup where flagged as invalid by the chosen method. (PR/2058, GH/1820).
  • scipy.stats.rv_continuous instances can now be given directly as the dist argument in standardized_precipitation_index and standardized_precipitation_evapotranspiration_index indicators. This includes lmoments3 distributions when specifying method="PWM". (GH/2043, PR/2045).
  • Time selection in xclim.core.calendar.select_time and the **indexer argument of indicators now supports day-of-year bounds given as DataArrays with spatial and/or temporal dimensions. (GH/1987, PR/2055).
  • Maximum Spacing Estimation method for distribution fitting has been added to xclim.indices.stats.fit (GH/2078, PR/2077)

Bug fixes

  • Fixed a bug in xclim.sdba.Grouper.get_index that didn't correctly interpolate seasonal values (GH/2014, PR/2019).
  • Fixed a bug where xclim.indicators.atmos.potential_evapotranspiration would return wrong results when hurs was provided in % (PR/2067).
  • Fixed the default "op" argument of xclim.atmos.growing_season_end (GH/2056, PR/2080).
  • Removed the useless "thresh" argument from xclim.atmos.precip_accumulation (GH/1763, PR/2080).

Internal changes

  • Adjusted the TestOfficialYaml test to use a dynamic method for finding the installed location of xclim. (PR/2028).
  • Adjusted two tests for better handling when running in Windows environments. (PR/2057).
  • Refactor of the xclim.core.missing module, usage of the Missing objects has been broken. (PR/2058, PR/2055, PR/2076, GH/1820, GH/2000).
    • Objects are initialized with their options and then called with the data, input frequency, target frequency and indexer.
    • Subclasses receive non-resampled DataArray in their is_missing methods.
    • Subclasses receive the array of valid timesteps valid instead of null, the invalid ones.
    • MissingWMO now uses xclim.indices.helpers.resample_map which should greatly improve performance in a dask context.
  • There is now a warning stating that fitkwargs are not employed when using the lmoments3 distribution. One exception is the use of 'floc' which is allowed with the gamma distribution. 'floc' is used to shift the distribution before computing fitting parameters with the lmoments3 distribution since loc=0 is always assumed in the library. (GH/2043, PR/2045).
  • xclim now tracks energy usage and carbon emissions ("last run", "average", and "total") during CI workflows using the eco-ci-energy-estimation GitHub Action. (PR/2046).

Don't miss a new xclim release

NewReleases is sending notifications on new releases.