Skip to content

Commit

Permalink
Update tc_tracks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasColombi authored Feb 18, 2025
1 parent 870ec7c commit 9919d11
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions climada/hazard/tc_tracks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3029,12 +3029,12 @@ def compute_track_density(

limit_ratio = 1.12 * 1.1 # record tc speed 112km/h -> 1.12°/h + 10% margin

Check warning on line 3030 in climada/hazard/tc_tracks.py

View check run for this annotation

Jenkins - WCR / Pylint

unused-variable

NORMAL: Unused variable 'limit_ratio'
Raw output
Used when a variable is defined but not used.

if float(tc_track.data[0].time_step[0].item()) > res / limit_ratio:
warnings.warn(
"The time step is too big for the current resolution. For the desired resolution, \n"
f"apply a time step of {res/limit_ratio}h."
)
elif res < 0.1:
#if tc_track.data[0].time_step[0].item() > res / limit_ratio:
# warnings.warn(
# "The time step is too big for the current resolution. For the desired resolution, \n"
# f"apply a time step of {res/limit_ratio}h."
#)
if res < 0.1:
warnings.warn(

Check warning on line 3038 in climada/hazard/tc_tracks.py

View check run for this annotation

Jenkins - WCR / Code Coverage

Not covered line

Line 3038 is not covered by tests
"The resolution is too high. The computation might take several minutes \n"
"to hours. Consider using a resolution below 0.1°."
Expand Down

0 comments on commit 9919d11

Please sign in to comment.