From 9accacee9316f0ad4cb5863c692f0cf99f83bd25 Mon Sep 17 00:00:00 2001
From: Philippe WAUTELET <philippe.wautelet@aero.obs-mip.fr>
Date: Wed, 14 Sep 2022 14:39:04 +0200
Subject: [PATCH] Philippe 14/09/2022: bugfix: usage of xhatm_bound was
 incorrect

---
 src/MNH/write_lfifm1_for_diag.f90    | 2 +-
 src/MNH/write_lfifmn_fordiachron.f90 | 2 +-
 src/MNH/write_lfin.f90               | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/MNH/write_lfifm1_for_diag.f90 b/src/MNH/write_lfifm1_for_diag.f90
index a83308109..ceba1cb51 100644
--- a/src/MNH/write_lfifm1_for_diag.f90
+++ b/src/MNH/write_lfifm1_for_diag.f90
@@ -393,7 +393,7 @@ IF (.NOT.LCARTESIAN) THEN
 ! 
 !* diagnostic of 1st mass point
 !
-  CALL SM_LATLON( XLATORI, XLONORI, XHATM_BOUND(NEXTE_XMIN), XYHATM(NEXTE_XMIN), ZLATOR, ZLONOR )
+  CALL SM_LATLON( XLATORI, XLONORI, XHATM_BOUND(NEXTE_XMIN), XHATM_BOUND(NEXTE_YMIN), ZLATOR, ZLONOR )
 !
   CALL IO_Field_write(TPFILE,'LONOR',ZLONOR)
   CALL IO_Field_write(TPFILE,'LATOR',ZLATOR)
diff --git a/src/MNH/write_lfifmn_fordiachron.f90 b/src/MNH/write_lfifmn_fordiachron.f90
index 83b6d0a9b..a46115d97 100644
--- a/src/MNH/write_lfifmn_fordiachron.f90
+++ b/src/MNH/write_lfifmn_fordiachron.f90
@@ -157,7 +157,7 @@ IF (.NOT.LCARTESIAN) THEN
   !
   !* diagnostic of 1st mass point
   !
-  CALL SM_LATLON( XLATORI, XLONORI, XHATM_BOUND(NEXTE_XMIN), XYHATM(NEXTE_XMIN), ZLATOR, ZLONOR )
+  CALL SM_LATLON( XLATORI, XLONORI, XHATM_BOUND(NEXTE_XMIN), XHATM_BOUND(NEXTE_YMIN), ZLATOR, ZLONOR )
 !
   CALL IO_Field_write(TPFILE,'LONOR',ZLONOR)
   CALL IO_Field_write(TPFILE,'LATOR',ZLATOR)
diff --git a/src/MNH/write_lfin.f90 b/src/MNH/write_lfin.f90
index 8818506c3..1b48d9b9b 100644
--- a/src/MNH/write_lfin.f90
+++ b/src/MNH/write_lfin.f90
@@ -360,7 +360,7 @@ IF (.NOT.LCARTESIAN) THEN
 ! 
 !* diagnostic of 1st mass point
 !
-  CALL SM_LATLON( XLATORI, XLONORI, XHATM_BOUND(NEXTE_XMIN), XYHATM(NEXTE_XMIN), ZLATOR, ZLONOR )
+  CALL SM_LATLON( XLATORI, XLONORI, XHATM_BOUND(NEXTE_XMIN), XHATM_BOUND(NEXTE_YMIN), ZLATOR, ZLONOR )
 !
   CALL IO_Field_write(TPFILE,'LONOR',ZLONOR)
   CALL IO_Field_write(TPFILE,'LATOR',ZLATOR)
-- 
GitLab