From 747f0cc343b0d9ef5a8d1323d84af40c91c26052 Mon Sep 17 00:00:00 2001
From: Uwe Schulzweida <uwe.schulzweida@mpimet.mpg.de>
Date: Fri, 7 Oct 2022 11:14:01 +0200
Subject: [PATCH] Skip attributes _CoordinateAxisType/_CoordinateAxisType with
 CDI_CMOR_Mode.

---
 src/stream_cdf_o.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/stream_cdf_o.c b/src/stream_cdf_o.c
index d3fcc435c..719d8be57 100644
--- a/src/stream_cdf_o.c
+++ b/src/stream_cdf_o.c
@@ -709,7 +709,7 @@ cdfDefIrregularGridCommon(stream_t *streamptr, int gridID, size_t xsize, size_t
       cdfPutGridStdAtts(fileID, ncxvarid, gridID, 'X');
 
       // attribute for Panoply
-      if (ndims == 3) cdf_put_att_text(fileID, ncxvarid, "_CoordinateAxisType", 3, "Lon");
+      if (!CDI_CMOR_Mode && ndims == 3) cdf_put_att_text(fileID, ncxvarid, "_CoordinateAxisType", 3, "Lon");
 
       if ((xboundsPtr = gridInqXboundsPtr(gridID)) && nvdimID != CDI_UNDEFID)
         {
@@ -736,7 +736,7 @@ cdfDefIrregularGridCommon(stream_t *streamptr, int gridID, size_t xsize, size_t
       cdfPutGridStdAtts(fileID, ncyvarid, gridID, 'Y');
 
       // attribute for Panoply
-      if (ndims == 3) cdf_put_att_text(fileID, ncyvarid, "_CoordinateAxisType", 3, "Lat");
+      if (!CDI_CMOR_Mode && ndims == 3) cdf_put_att_text(fileID, ncyvarid, "_CoordinateAxisType", 3, "Lat");
 
       if ((yboundsPtr = gridInqYboundsPtr(gridID)) && nvdimID != CDI_UNDEFID)
         {
-- 
GitLab