Skip to content
Snippets Groups Projects
Commit 98b57fe5 authored by Nils-Arne Dreier's avatar Nils-Arne Dreier Committed by Siddhant Tibrewal
Browse files

fix: datetime shift

parent 583480f6
No related branches found
No related tags found
No related merge requests found
......@@ -132,7 +132,7 @@ def main():
t0 = (
np.datetime64(start_datetime())
- np.datetime64(var_group["time"].attrs["units"][len("seconds since ") :])
) / np.timedelta64(1, "s")
) / np.timedelta64(1, "s") + dt
t0_idx = np.searchsorted(var_group["time"], t0)
assert var_group["time"][t0_idx] == t0, f"start_datetime {t0} not found in time axis at index {t0_idx} which has value {var_group['time'][t0_idx]}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment