From f612fffe1c5826ea4c1839b4cf12ae8b7000a835 Mon Sep 17 00:00:00 2001 From: emanuel-schmid Date: Mon, 13 Jan 2025 11:45:26 +0100 Subject: [PATCH 1/3] trop_cyclone.apply_climate_scenario_knu: make yearly_steps argument explicit --- climada/hazard/trop_cyclone/trop_cyclone.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/climada/hazard/trop_cyclone/trop_cyclone.py b/climada/hazard/trop_cyclone/trop_cyclone.py index ae01332ca0..2a203ed53e 100644 --- a/climada/hazard/trop_cyclone/trop_cyclone.py +++ b/climada/hazard/trop_cyclone/trop_cyclone.py @@ -380,7 +380,7 @@ def apply_climate_scenario_knu( percentile: str = "50", scenario: str = "4.5", target_year: int = 2050, - **kwargs, + yearly_steps: int = 5, ): """ From current TC hazard instance, return new hazard set with future events @@ -422,6 +422,9 @@ def apply_climate_scenario_knu( '8.5' for RCP 8.5 target_year : int future year to be simulated, between 2000 and 2100. Default: 2050. + yearly_steps : int + yearly resolution at which projections are provided. Default is 5 years. + Returns ------- haz_cc : climada.hazard.TropCyclone @@ -450,11 +453,11 @@ def apply_climate_scenario_knu( for basin in np.unique(tc_cc.basin): scale_year_rcp_05, scale_year_rcp_45 = [ get_knutson_scaling_factor( - percentile=percentile, variable=variable, + percentile=percentile, basin=basin, baseline=(np.min(years), np.max(years)), - **kwargs, + yearly_steps=yearly_steps, ).loc[target_year, scenario] for variable in ["cat05", "cat45"] ] From 99a5fb9cd320217c37496847516bc2eebc18d0a1 Mon Sep 17 00:00:00 2001 From: emanuel-schmid Date: Mon, 13 Jan 2025 13:47:22 +0100 Subject: [PATCH 2/3] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c1401339d..e8bc90dbd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -125,6 +125,7 @@ CLIMADA tutorials. [#872](https://github.com/CLIMADA-project/climada_python/pull - `Impact.from_hdf5` now calls `str` on `event_name` data that is not strings, and issue a warning then [#894](https://github.com/CLIMADA-project/climada_python/pull/894) - `Impact.write_hdf5` now throws an error if `event_name` is does not contain strings exclusively [#894](https://github.com/CLIMADA-project/climada_python/pull/894) - Split `climada.hazard.trop_cyclone` module into smaller submodules without affecting module usage [#911](https://github.com/CLIMADA-project/climada_python/pull/911) +- `yearly_steps` parameter of `TropCyclone.apply_climate_scenario_knu` has been made explicit [#991](https://github.com/CLIMADA-project/climada_python/pull/991) ### Fixed From 698367815ce0b37a85cc4060865aeb3062eac8b5 Mon Sep 17 00:00:00 2001 From: emanuel-schmid Date: Mon, 13 Jan 2025 22:54:05 +0100 Subject: [PATCH 3/3] readthedocs: explicit configuration file --- .readthedocs.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.readthedocs.yml b/.readthedocs.yml index b0c36ed98b..9548be8f79 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,5 +1,8 @@ version: 2 +sphinx: + configuration: doc/conf.py + build: os: "ubuntu-22.04" tools: