From a52208c5d557928683824fc54ec85fe974602057 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 19 Oct 2023 17:27:14 +0200 Subject: [PATCH] Fix time variable for xarray --- jobs/prepare_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index 61397439..55f1a1a0 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -384,7 +384,7 @@ def main(starttime, hstart, hstop, cfg, model_cfg): # Merge GEOSP-dataset with other timesteps elif (time.hour != 0): # Change values of time dimension to current time - da_geosp = da_geosp.assign_coords(time=[time]) + da_geosp = da_geosp.assign_coords(time=[np.datetime64(time)]) # Merge GEOSP into temporary file ds_merged = xr.merge([ds, da_geosp]) ds_merged.attrs = ds.attrs