From 102a733200cf981bdc344f33d45d75b2dbc3645b Mon Sep 17 00:00:00 2001
From: Uwe Schulzweida <uwe.schulzweida@mpimet.mpg.de>
Date: Thu, 20 Jul 2023 15:42:42 +0200
Subject: [PATCH] write grib via ecCodes: set default taxistype to
 TAXIS_ABSOLUTE

---
 ChangeLog            | 4 ++++
 src/stream_gribapi.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 89916e496..1f139881a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2023-07-20  Uwe Schulzweida
+
+	* write grib via ecCodes: set default taxistype to TAXIS_ABSOLUTE
+
 2023-07-19  Uwe Schulzweida
 
 	* NetCDF read: add standard_name attribute for lon/lat coordinates
diff --git a/src/stream_gribapi.c b/src/stream_gribapi.c
index 6ff3a37dc..80ec36f7a 100644
--- a/src/stream_gribapi.c
+++ b/src/stream_gribapi.c
@@ -2042,7 +2042,7 @@ gribapiDefDateTimeAbs(int editionNumber, grib_handle *gh, CdiDateTime dateTime,
   if (editionNumber > 1) GRIB_CHECK(my_grib_set_long(gh, "significanceOfReferenceTime", 0), 0);
   if (editionNumber > 1) GRIB_CHECK(my_grib_set_long(gh, "stepRange", 0), 0);
 
-  //if (cdiDateTime_isNull(dateTime)) dateTime.date = cdiDate_set(10101);
+  if (cdiDateTime_isNull(dateTime)) dateTime.date = cdiDate_set(10101);
   gribapiSetDataDateTime(gh, dateTime);
 }
 
-- 
GitLab