From 3496b96dca56d51852ece34a9b88a75099e9b4e9 Mon Sep 17 00:00:00 2001
From: Juan Escobar <escj@aero.obs-mip.fr>
Date: Wed, 13 Jul 2016 11:23:47 +0200
Subject: [PATCH] Juan 12/07/2016 : add test on NRIMY & change the one on NRIMX
 with >=

---
 src/MNH/spawn_model2.f90 | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/MNH/spawn_model2.f90 b/src/MNH/spawn_model2.f90
index 6c317cc5a..3204fa6f4 100644
--- a/src/MNH/spawn_model2.f90
+++ b/src/MNH/spawn_model2.f90
@@ -187,6 +187,7 @@ END MODULE MODI_SPAWN_MODEL2
 !!      Modification 05/02/2015 (M.Moge) parallelization of SPAWNING
 !!      J.Escobar : 15/09/2015 : WENO5 & JPHEXT <> 1 
 !!      J.Escobar   02/05/2016 : test ZZS_MAX in // 
+!!      J.Escobar   12/07/2016 : add test on NRIMY & change the one on NRIMX with >=
 !-------------------------------------------------------------------------------
 !
 !*       0.     DECLARATIONS
@@ -622,9 +623,15 @@ IF ( .NOT. L2D ) THEN
 ELSE
   NRIMY=0
 END IF
-IF (NRIMX == IIU/2-1) THEN      ! Error ! this case is not supported - it should be, but there is a bug
-  WRITE(*,*) "Error : The size of the LB zone is too big for the size of the subdomains"
-  WRITE(*,*) "Try with less cores, a smaller LB size, or a bigger grid"
+IF (NRIMX >= IIU/2-1) THEN      ! Error ! this case is not supported - it should be, but there is a bug
+  WRITE(*,*) "Error : The size of the LBX zone is too big for the size of the subdomains"
+  WRITE(*,*) "Try with less cores, a smaller LBX size, or a bigger grid in X "
+  CALL ABORT
+  STOP
+ENDIF
+IF ( ( .NOT. L2D ) .AND. (NRIMY >= IJU/2-1) ) THEN  ! Error ! this case is not supported - it should be, but there is a bug
+  WRITE(*,*) "Error : The size of the LBY zone is too big for the size of the subdomains"
+  WRITE(*,*) "Try with less cores, a smaller LBY size, or a bigger grid in Y "
   CALL ABORT
   STOP
 ENDIF
-- 
GitLab