Skip to content

Commit

Permalink
bugfix: lead time should not be string
Browse files Browse the repository at this point in the history
  • Loading branch information
khintz committed Mar 11, 2024
1 parent 141799b commit a5f4ef7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dlotter/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def read(self, args:argparse.Namespace, files_to_read:list) -> xr.Dataset:
lead = ec.codes_get(time_gid, 'step')

analysis = dt.datetime.strptime("{:d}-{:04d}".format(date,time), '%Y%m%d-%H%M')
forecast = analysis + dt.timedelta(minutes=lead)
forecast = analysis + dt.timedelta(minutes=int(lead))
Nt_coords[k] = forecast

for _, gid in enumerate(gids):
Expand Down

0 comments on commit a5f4ef7

Please sign in to comment.