Skip to content

Commit eda7e40

Browse files
Explicit arguments in TropCyclone.apply_climate_scenario_knu (#991)
* trop_cyclone.apply_climate_scenario_knu: make yearly_steps argument explicit * changelog * readthedocs: explicit configuration file
1 parent 004651b commit eda7e40

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ CLIMADA tutorials. [#872](https://github.com/CLIMADA-project/climada_python/pull
190190
- `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)
191191
- `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)
192192
- Split `climada.hazard.trop_cyclone` module into smaller submodules without affecting module usage [#911](https://github.com/CLIMADA-project/climada_python/pull/911)
193+
- `yearly_steps` parameter of `TropCyclone.apply_climate_scenario_knu` has been made explicit [#991](https://github.com/CLIMADA-project/climada_python/pull/991)
193194

194195
### Fixed
195196

climada/hazard/trop_cyclone/trop_cyclone.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ def apply_climate_scenario_knu(
391391
percentile: str = "50",
392392
scenario: str = "4.5",
393393
target_year: int = 2050,
394-
**kwargs,
394+
yearly_steps: int = 5,
395395
):
396396
"""
397397
From current TC hazard instance, return new hazard set with future events
@@ -437,6 +437,9 @@ def apply_climate_scenario_knu(
437437
438438
target_year : int
439439
future year to be simulated, between 2000 and 2100. Default: 2050.
440+
yearly_steps : int
441+
yearly resolution at which projections are provided. Default is 5 years.
442+
440443
Returns
441444
-------
442445
haz_cc : climada.hazard.TropCyclone
@@ -465,11 +468,11 @@ def apply_climate_scenario_knu(
465468
for basin in np.unique(tc_cc.basin):
466469
scale_year_rcp_05, scale_year_rcp_45 = [
467470
get_knutson_scaling_factor(
468-
percentile=percentile,
469471
variable=variable,
472+
percentile=percentile,
470473
basin=basin,
471474
baseline=(np.min(years), np.max(years)),
472-
**kwargs,
475+
yearly_steps=yearly_steps,
473476
).loc[target_year, scenario]
474477
for variable in ["cat05", "cat45"]
475478
]

0 commit comments

Comments
 (0)