From e311236c51ab6470d5896a50ad3437bdf3b58461 Mon Sep 17 00:00:00 2001
From: Uwe Schulzweida <uwe.schulzweida@mpimet.mpg.de>
Date: Wed, 12 Feb 2025 10:16:27 +0100
Subject: [PATCH] GRIB_API: Handle LLAM as LCC

---
 ChangeLog               | 4 ++++
 src/gribapi.h           | 1 +
 src/gribapi_utilities.c | 1 +
 3 files changed, 6 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 3c80e270f..936af6411 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,10 @@
 
 	* Version 2.5.1 released
 
+2025-02-12  Uwe Schulzweida
+
+	* GRIB_API: Handle LLAM as LCC
+
 2025-02-06  Uwe Schulzweida
 
 	* Added obsolete functions vlistNgrids() and vlistNzaxis() for ParaView vtkCDIReader
diff --git a/src/gribapi.h b/src/gribapi.h
index 87e9a23e3..784eb940a 100644
--- a/src/gribapi.h
+++ b/src/gribapi.h
@@ -49,6 +49,7 @@
 #define  GRIB2_GTYPE_LATLON_ROTSTR         3  // Stretched and Rotated Latitude/longitude
 #define  GRIB2_GTYPE_STERE                20  // Polar stereographic projection
 #define  GRIB2_GTYPE_LCC                  30  // Lambert conformal
+#define  GRIB2_GTYPE_LLAM                 33  // Lambert LAM
 #define  GRIB2_GTYPE_GAUSSIAN             40  // Gaussian latitude/longitude
 #define  GRIB2_GTYPE_GAUSSIAN_ROT         41  // Rotated Gaussian latitude/longitude
 #define  GRIB2_GTYPE_GAUSSIAN_STR         42  // Stretched Gaussian latitude/longitude
diff --git a/src/gribapi_utilities.c b/src/gribapi_utilities.c
index 068b7f4bb..ee5b15863 100644
--- a/src/gribapi_utilities.c
+++ b/src/gribapi_utilities.c
@@ -591,6 +591,7 @@ gribapiGetGridType(grib_handle *gh)
     case GRIB2_GTYPE_GAUSSIAN: return has_ni(gh) ? GRID_GAUSSIAN : GRID_GAUSSIAN_REDUCED;
     case GRIB2_GTYPE_LATLON_ROT: return GRID_PROJECTION;
     case GRIB2_GTYPE_LCC: return CDI_PROJ_LCC;
+    case GRIB2_GTYPE_LLAM: return CDI_PROJ_LCC;  // Handle LLAM as LCC
     case GRIB2_GTYPE_STERE: return CDI_PROJ_STERE;
     case GRIB2_GTYPE_SPECTRAL: return GRID_SPECTRAL;
     case GRIB2_GTYPE_GME: return GRID_GME;
-- 
GitLab