Skip to content

Commit

Permalink
Fixed bug in track_reanalysis.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralager committed Nov 23, 2020
1 parent 9a36ba8 commit 2ab1d2d
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions gewittergefahr/gg_utils/track_reanalysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,12 +535,21 @@ def join_collinear_tracks(
unique_primary_id_strings, these_last_rows
)))

first_late_time_index = numpy.where(
these_indices = numpy.where(
unique_times_unix_sec >= first_late_time_unix_sec
)[0][0]
last_late_time_index = numpy.where(
)[0]

if len(these_indices) == 0:
return storm_object_table
first_late_time_index = these_indices[0]

these_indices = numpy.where(
unique_times_unix_sec <= last_late_time_unix_sec
)[0][-1]
)[0]

if len(these_indices) == 0:
return storm_object_table
last_late_time_index = these_indices[-1]

for j in range(first_late_time_index, last_late_time_index + 1):

Expand Down

0 comments on commit 2ab1d2d

Please sign in to comment.