Skip to content

Commit

Permalink
Fixed bug in echo_top_tracking.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralager committed Nov 23, 2020
1 parent 2ab1d2d commit 6769586
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions gewittergefahr/gg_utils/echo_top_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -1803,20 +1803,27 @@ def reanalyze_across_spc_dates(
]

if i == 0:
this_first_time_unix_sec = numpy.min(
storm_object_table_by_date[i][
tracking_utils.VALID_TIME_COLUMN].values
)
these_times_unix_sec = storm_object_table_by_date[i][
tracking_utils.VALID_TIME_COLUMN
].values
else:
this_first_time_unix_sec = numpy.min(
storm_object_table_by_date[i + 1][
tracking_utils.VALID_TIME_COLUMN].values
)

this_last_time_unix_sec = numpy.max(
storm_object_table_by_date[i + 1][
tracking_utils.VALID_TIME_COLUMN].values
)
these_times_unix_sec = storm_object_table_by_date[i + 1][
tracking_utils.VALID_TIME_COLUMN
].values

if len(these_times_unix_sec) > 0:
this_first_time_unix_sec = numpy.min(these_times_unix_sec)
else:
this_first_time_unix_sec = int(1e12)

these_times_unix_sec = storm_object_table_by_date[i + 1][
tracking_utils.VALID_TIME_COLUMN
].values

if len(these_times_unix_sec) > 0:
this_last_time_unix_sec = numpy.max(these_times_unix_sec)
else:
this_last_time_unix_sec = 0

indices_to_concat = numpy.array([i, i + 1, i + 2], dtype=int)
indices_to_concat = indices_to_concat[
Expand Down

0 comments on commit 6769586

Please sign in to comment.