From 95a9863d26ab9aa534e9375bba6859206e9e034d Mon Sep 17 00:00:00 2001 From: Doug Latornell Date: Sat, 13 Jul 2024 15:43:45 -0700 Subject: [PATCH] Update datetime format in VFPA HADCP data handling (#282) The datetime parsing format was adjusted in the VFPA HADCP data handling module. This change will ensure the timestamp is correctly interpreted as YYYY-MM-DD HH:MM as opposed to the previous format DD/MM/YYYY HH:MM. This change was necessitated by a change in the datetime format in the observation .csv files that was made between 17:00 and 18:00 UTC on 2023-07-02. --- nowcast/workers/get_vfpa_hadcp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nowcast/workers/get_vfpa_hadcp.py b/nowcast/workers/get_vfpa_hadcp.py index 9ea31897..e2e34188 100644 --- a/nowcast/workers/get_vfpa_hadcp.py +++ b/nowcast/workers/get_vfpa_hadcp.py @@ -255,7 +255,7 @@ def _csv_to_dataset(csv_file, place): df = df.drop([col], axis="columns") except KeyError: pass - df.index = pandas.to_datetime(df.index, format="%d/%m/%Y %H:%M") + df.index = pandas.to_datetime(df.index, format="%Y-%m-%d %H:%M") df.index.name = "time" df.columns = ("speed", "direction") return xarray.Dataset.from_dataframe(df)