Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
fix time step in mars
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed Feb 14, 2024
1 parent c39abf9 commit 70c2188
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ecml_tools/create/functions/mars.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ def _expand_mars_request(request, date):
step = to_list(request.get("step", [0]))
for s in step:
r = deepcopy(request)
base = date - datetime.timedelta(hours=int(s))
r.update(
{
"date": date.strftime("%Y%m%d"),
"time": date.strftime("%H%M"),
"date": base.strftime("%Y%m%d"),
"time": base.strftime("%H%M"),
"step": s,
}
)
Expand Down

0 comments on commit 70c2188

Please sign in to comment.