Skip to content

Commit

Permalink
trop_cyclone.apply_climate_scenario_knu: make yearly_steps argument e…
Browse files Browse the repository at this point in the history
…xplicit
  • Loading branch information
emanuel-schmid committed Jan 13, 2025
1 parent 0bcbc61 commit f612fff
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions climada/hazard/trop_cyclone/trop_cyclone.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"]
]
Expand Down

0 comments on commit f612fff

Please sign in to comment.