diff --git a/.zenodo.json b/.zenodo.json index 6d8446f7f..9242df632 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -125,6 +125,10 @@ "name": "Braun, Marco", "affiliation": "Ouranos Consortium, Montréal, Québec, Canada", "orcid": "0000-0001-5061-3217" + }, + { + "name": "Castro, Dante", + "affiliation": "Helmholtz-Zentrum Hereon, Geesthacht, Germany" } ], "keywords": [ diff --git a/AUTHORS.rst b/AUTHORS.rst index 46208a9c8..2f2e29442 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -40,3 +40,4 @@ Contributors * Ag Stephens `@agstephens `_ * Maliko Tanguy `@malngu `_ * Christopher Whelan `@qwhelan `_ +* Dante Castro `@profesorpaiche `_ diff --git a/CHANGES.rst b/CHANGES.rst index dd83cfc13..df35adb76 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,7 @@ Changelog v0.48 (unreleased) ------------------ -Contributors to this version: Juliette Lavoie (:user:`juliettelavoie`), Pascal Bourgault (:user:`aulemahal`), Trevor James Smith (:user:`Zeitsperre`), David Huard (:user:`huard`), Éric Dupuis (:user:`coxipi`). +Contributors to this version: Juliette Lavoie (:user:`juliettelavoie`), Pascal Bourgault (:user:`aulemahal`), Trevor James Smith (:user:`Zeitsperre`), David Huard (:user:`huard`), Éric Dupuis (:user:`coxipi`), Dante Castro (:user:`profesorpaiche`). Announcements ^^^^^^^^^^^^^ @@ -21,6 +21,7 @@ New features and enhancements * Support ``indexer`` keyword in YAML indicator description. (:issue:`1522`, :pull:`1561`). * New ``xclim.core.calendar.stack_periods`` and ``unstack_periods`` for performing ``rolling(time=...).construct(..., stride=...)`` but with non-uniform temporal periods like years or months. They replace ``xclim.sdba.processing.construct_moving_yearly_window`` and ``unpack_moving_yearly_window`` which are deprecated and will be removed in a future release. * New ``as_dataset`` options for ``xclim.set_options``. When True, indicators will output Datasets instead of DataArrays. (:issue:`1257`, :pull:`1625`). +* Added new option for UTCI calculation to cap low wind velocities to a minimum of 0.5 m/s following Bröde (2012) guidelines. Breaking changes ^^^^^^^^^^^^^^^^ diff --git a/xclim/indices/_conversion.py b/xclim/indices/_conversion.py index 8483fb880..d0d47b9f7 100644 --- a/xclim/indices/_conversion.py +++ b/xclim/indices/_conversion.py @@ -1781,6 +1781,7 @@ def universal_thermal_climate_index( rlus: xr.DataArray | None = None, stat: str = "sunlit", mask_invalid: bool = True, + wind_cap_min: bool = False, ) -> xr.DataArray: r"""Universal thermal climate index (UTCI). @@ -1818,6 +1819,9 @@ def universal_thermal_climate_index( If True (default), UTCI values are NaN where any of the inputs are outside their validity ranges : -50°C < tas < 50°C, -30°C < tas - mrt < 30°C and 0.5 m/s < sfcWind < 17.0 m/s. + wind_cap_min: bool + If True, low wind velocities are capped to a minimum of 0.5 m/s. This ensures + UTCI calculation for low winds. Default value False. Returns ------- @@ -1842,6 +1846,8 @@ def universal_thermal_climate_index( e_sat = saturation_vapor_pressure(tas=tas, method="its90") tas = convert_units_to(tas, "degC") sfcWind = convert_units_to(sfcWind, "m/s") + if wind_cap_min: + sfcWind = sfcWind.clip(0.5, None) if mrt is None: mrt = mean_radiant_temperature( rsds=rsds, rsus=rsus, rlds=rlds, rlus=rlus, stat=stat @@ -1868,7 +1874,7 @@ def universal_thermal_climate_index( & (tas < 50.0) & (-30 < delta) & (delta < 30) - & (0.5 < sfcWind) + & (0.5 <= sfcWind) & (sfcWind < 17.0) ) return utci