Skip to content

Commit 0579026

Browse files
committed
fixes #897 (make "cyclostrophic" a model_kwarg)
1 parent 994fd6d commit 0579026

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

climada/hazard/trop_cyclone/trop_cyclone.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ def from_tracks(
233233
inside of the brackets is that the wind speed maximum is attained a bit
234234
farther away from the center than according to the recorded radius of
235235
maximum winds (RMW). Default: False
236+
cyclostrophic : bool, optional
237+
If True, do not apply the influence of the Coriolis force (set the Coriolis terms to 0).
238+
Default: True for H10 model, False otherwise.
236239
237240
ignore_distance_to_coast : boolean, optional
238241
If True, centroids far from coast are not ignored.

climada/hazard/trop_cyclone/trop_cyclone_windfields.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ def compute_angular_windspeeds(
9696
mask_centr_close: np.ndarray,
9797
model: int,
9898
model_kwargs: Optional[dict] = None,
99-
cyclostrophic: bool = False,
10099
):
101100
"""Compute (absolute) angular wind speeds according to a parametric wind profile
102101
@@ -113,9 +112,6 @@ def compute_angular_windspeeds(
113112
Wind profile model selection according to MODEL_VANG.
114113
model_kwargs: dict, optional
115114
If given, forward these kwargs to the selected model. Default: None
116-
cyclostrophic : bool, optional
117-
If True, do not apply the influence of the Coriolis force (set the Coriolis terms to 0).
118-
Default: False
119115
120116
Returns
121117
-------
@@ -135,7 +131,6 @@ def compute_angular_windspeeds(
135131
si_track,
136132
d_centr,
137133
mask_centr_close,
138-
cyclostrophic=cyclostrophic,
139134
**model_kwargs,
140135
)
141136
result[0, :] *= 0
@@ -278,7 +273,7 @@ def _compute_angular_windspeeds_h10(
278273
containing the magnitude of the angular windspeed per track position per centroid location
279274
"""
280275
if not cyclostrophic:
281-
LOGGER.debug(
276+
LOGGER.warning(
282277
'The function _compute_angular_windspeeds_h10 was called with parameter '
283278
'"cyclostrophic" equal to false. Please be aware that this setting is ignored as the'
284279
' Holland et al. 2010 model is always cyclostrophic.')
@@ -1149,7 +1144,7 @@ def _compute_windfields(
11491144

11501145
# derive (absolute) angular velocity from parametric wind profile
11511146
v_ang_norm = compute_angular_windspeeds(
1152-
si_track, d_centr, mask_centr_close, model, model_kwargs=model_kwargs, cyclostrophic=False,
1147+
si_track, d_centr, mask_centr_close, model, model_kwargs=model_kwargs,
11531148
)
11541149

11551150
# Influence of translational speed decreases with distance from eye.

0 commit comments

Comments
 (0)