Ouranosinc/xclim: v0.30.0
Authors/Creators
- 1. Ouranos
- 2. ECCC
- 3. CERFACS
- 4. @jakarto3d
- 5. STFC CEDA
Description
climatological_mean_doyindice returns the mean and standard deviation across a climatology according to day-of-year (xarray.DataArray.groupby("time.dayofyear")). A moving window averaging of days can also be supplied (default:window=1).within_bnds_doyindice returns a boolean array indicating whether or not array's values are within bounds for each day of the year.- Added
atmos.wet_precip_accumulation, an indicator accumulating precipitation over wet days. - Module ICCLIM now includes
PRCPTOT, which accumulates precipitation for days with precipitation above 1 mm/day.
xclim.core.utils.nan_calc_percentilesnow uses a custom algorithm instead ofnumpy.nanpercentilesto have more flexibility on the interpolation method. The performance is also improved.xclim.core.calendar.percentile_doynow uses the 8th method of Hyndman & Fan for linear interpolation (alpha = beta = 1/3). Previously, the function used Numpy's percentile, which corresponds to the 7th method. This change is motivated by the fact that the 8th is recommended by Hyndman & Fay, and it ensures consistency with other climate indices packages (climdex,icclim). Usingalpha = beta = 1restores the previous behaviour.xclim.core.utils._cal_percis now only a proxy forxc.core.utils.nan_calc_percentileswith some axis moves.xclimnow implements many data quality assurance flags (xclim.core.dataflags) for temperature and precipitation based onICCLIM documentation guidelines <https://eca.knmi.nl/documents/atbd.pdf>_. These checks include the following:- Temperature (variables:
tas,tasmin,tasmax):tasmax_below_tasmin,tas_exceeds_tasmax,tas_below_tasmin,temperature_extremely_low(thresh="-90 degC"),temperature_extremely_high(thresh="60 degC"). - Precipitation-specific (variables:
pr,prsn, ):negative_accumulation_values,very_large_precipitation_events(thresh="300 mm d-1"). - Wind-specific (variables:
sfcWind,wsgsmax/sfcWindMax):wind_values_outside_of_bounds Generic:
outside_n_standard_deviations_of_climatology,values_repeating_for_n_or_more_days,values_op_thresh_repeating_for_n_or_more_days,percentage_values_outside_of_bounds.These quality-assurance checks are selected according to CF-standard variable names, and can be triggered via
xclim.core.dataflags.data_flags(xarray.DataArray, xarray.Dataset). These checks are separate from the Indicator-defineddatachecksand must be launched manually. They'll return an array of data_flags as boolean variables. If called withraise_flags=True, will raise an Exception with comments for each quality control check raised.
- Temperature (variables:
- A convenience function (
xclim.core.dataflags.ecad_compliant) is also offered as a method for asserting that data adheres to all relevant ECAD/ICCLIM checks. For more information on usage, consult the docstring/documentation. - A new utility "
dataflags" is also available for performing fast quality control checks from the command-line (xclim dataflags --help). See the CLI documentation page for usage examples. - Added missing typed call signatures, expected returns and docstrings for many
xclim.core.calendarfunctions.
- All "ANUCLIM" indices and indicators have lost their
src_timestepargument. Most of them were not using it and now every function infers the frequency from the data directly. This may add stricter constraints on the time coordinate, the same as forxarray.infer_freq. - Many functions found within
xclim.core.cfchecks(generate_cfcheckandcheck_valid_*) have been removed as existing indicator CF-standard checks and data checks rendered them redundant/obsolete.
- Fixes in
sdbafor (1) inputs with dimensions without coordinates, for (2)sdba.detrending.MeanDetrendand for (3)DetrendedQuantileMappingwhen used with dask's distributed scheduler. - Replaced instances of
'◦'("White bullet") with'°'("Degree Sign") inicclim.yamlas it was causing issues for non-UTF8 environments. - Addressed an edge case where
test_sdba::test_standardizerandomness could generate values that surpass the test error tolerance. - Added a missing
.txtfile to the MANIFEST of the source distributable in order to be able to run all tests. xc.core.units.rate2amountis now exact when the sampling frequency is monthly, seasonal or yearly. Earlier, monthly and yearly data were computed using constant month and year length. End-of-period frequencies are also correctly understood (ex: "M" vs "MS").- In the
potential_evapotranspirationindice, add abbreviatedmethodnames to docstring. - Fixed an issue that prevented using the default
grouparg in adjustment objects. - Fix bug in
missing_wmo, where a period would be considered valid if all months met WMO criteria, but complete months in a year were missing. Now, if any month does not meet criteria or is absent, the period will be considered missing. - Fix bootstrapping with dask arrays. Dask does not support using
locwith multiple indexes to set new values, so a workaround was necessary. - Fix bootstrapping when the bootstrapped year must be converted to a 366_day calendar.
- Virtual modules and translations now use 'UTF-8' by default when reading yaml or json file, instead of a machine-dependent encoding.
xclimcode quality checks now use the newestblack(v21.8-beta). Checks launched viatoxandpre-commitnow run formatting modifications over Jupyter notebooks found underdocs.
Files
Ouranosinc/xclim-v0.30.0.zip
Files
(749.2 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:ca0f2149d2f3f875eeaabde95a147de0
|
749.2 kB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/Ouranosinc/xclim/tree/v0.30.0 (URL)