From 4dd42193de02e36043b94804f1510bbabf6c04a0 Mon Sep 17 00:00:00 2001
From: Quentin Rodier <quentin.rodier@meteo.fr>
Date: Fri, 9 Aug 2024 18:43:22 +0200
Subject: [PATCH] Quentin 09/08/2024: update to MNHPy 0.3.2

---
 src/LIB/Python/misc_functions.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/LIB/Python/misc_functions.py b/src/LIB/Python/misc_functions.py
index 53577de6e..c5b29258e 100644
--- a/src/LIB/Python/misc_functions.py
+++ b/src/LIB/Python/misc_functions.py
@@ -213,9 +213,11 @@ def comp_altitude2DVar(oneVar3D, orography, ztop, level, n_y, n_x):
     n_x3D = copy.deepcopy(oneVar3D)
     n_y3D = copy.deepcopy(oneVar3D)
     altitude = copy.deepcopy(oneVar3D)
-    for i in range(len(level)):
-        n_y3D[i, :] = n_y
-        n_x3D[i, :] = n_x
+    for k in range(len(level)):
+        for j in range(oneVar3D.shape[2]):
+            n_y3D[k,:,j] = n_y
+        for i in range(oneVar3D.shape[1]):
+            n_x3D[k,i,:] = n_x
     for i in range(oneVar3D.shape[2]):
         for j in range(oneVar3D.shape[1]):
             if ztop == 0:
-- 
GitLab