Skip to content

Commit 276d13d

Browse files
committed
Change try statement to if statement in v_wind_hellman
1 parent 58c0387 commit 276d13d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

windpowerlib/wind_speed.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ def v_wind_hellman(v_wind, v_wind_height, hub_height, hellman_exp=None,
147147
148148
"""
149149
if hellman_exp is None:
150-
try:
150+
if z_0 is not None:
151151
hellman_exp = 1 / np.log(hub_height / z_0)
152-
except:
152+
else:
153153
hellman_exp = 1/7
154154
else:
155155
if not isinstance(hellman_exp, float):

0 commit comments

Comments
 (0)