Skip to content

Commit

Permalink
bugfix: total_seconds(), instead of seconds, must be called to reliab…
Browse files Browse the repository at this point in the history
…ly compute seconds for timedeltas > 1 day
  • Loading branch information
alexstoken committed Jul 26, 2024
1 parent 242e3bb commit 9e0325a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion getgfs/getgfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def datetime_to_forecast(self, date_time):

query_time = "[{t_ind}]".format(
t_ind=round(
(desired_date - query_forecast).seconds
(desired_date - query_forecast).total_seconds()
/ (int(self.times["grads_step"][0]) * 60 * 60)
)
)
Expand Down

0 comments on commit 9e0325a

Please sign in to comment.