From cc05640c5939cd2c3f6ddaccac723abb59a00c6e Mon Sep 17 00:00:00 2001 From: Baudouin Raoult Date: Tue, 19 Nov 2024 16:43:18 +0000 Subject: [PATCH] update --- src/anemoi/inference/inputs/ekd.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/anemoi/inference/inputs/ekd.py b/src/anemoi/inference/inputs/ekd.py index e69a769..74fc349 100644 --- a/src/anemoi/inference/inputs/ekd.py +++ b/src/anemoi/inference/inputs/ekd.py @@ -14,6 +14,7 @@ import numpy as np from earthkit.data.indexing.fieldlist import FieldArray +from earthkit.data.utils.dates import to_datetime from ..checks import check_data from ..input import Input @@ -119,6 +120,7 @@ def _create_input_state( "%s: `date` not provided, using the most recent date: %s", self.__class__.__name__, date.isoformat() ) + date = to_datetime(date) dates = [date + h for h in self.checkpoint.lagged] date_to_index = {d.isoformat(): i for i, d in enumerate(dates)}