diff --git a/src/LIB/SURCOUCHE/src/mode_distriblb.f90 b/src/LIB/SURCOUCHE/src/mode_distriblb.f90 index e3d13ec6fb584c37f1202ed2e0af152b3c1f180a..f8e2792a45a327c50ad067bda5a788fc7273c639 100644 --- a/src/LIB/SURCOUCHE/src/mode_distriblb.f90 +++ b/src/LIB/SURCOUCHE/src/mode_distriblb.f90 @@ -103,12 +103,14 @@ END SUBROUTINE GET_DISTRIB_LB !! MODIFICATIONS !! ------------- !! Original 23/09/98 +!! Modif +!! J.Escobar 28/03/2019: for very small domain , force N/S/E/W check on getting LB bounds !------------------------------------------------------------------------------- ! USE MODD_PARAMETERS_ll,ONLY : JPHEXT USE MODD_VAR_ll, ONLY : TCRRT_PROCONF USE MODD_STRUCTURE_ll, ONLY : MODELSPLITTING_ll -USE MODE_TOOLS_ll, ONLY : GET_INTERSECTION_ll,GET_GLOBALDIMS_ll,LWEST_ll +USE MODE_TOOLS_ll, ONLY : GET_INTERSECTION_ll,GET_GLOBALDIMS_ll,LWEST_ll,LEAST_ll !* 0. DECLARATIONS ! ------------ @@ -191,7 +193,7 @@ ELSE IYEND=IJMAX_ll+ 2 * JPHEXT ENDIF CALL GET_INTERSECTION_ll(IXOR,IYOR,IXEND,IYEND,IXORI,IYORI,IXENDI,IYENDI,YMODE,IINFO,KIP) -IF (IINFO /= 1) THEN ! no empty intersection +IF (IINFO/=1 .AND. LWEST_ll(KIP) ) THEN ! no empty intersection IF (HCOORD == 'LOC') THEN KIB=IXORI KIE=IXENDI @@ -242,7 +244,7 @@ ELSE IYEND=IJMAX_ll+ 2 * JPHEXT ENDIF CALL GET_INTERSECTION_ll(IXOR,IYOR,IXEND,IYEND,IXORI,IYORI,IXENDI,IYENDI,YMODE,IINFO,KIP) -IF (IINFO /=1) THEN +IF (IINFO/=1 .AND. LEAST_ll(KIP) ) THEN IF (HCOORD == 'LOC') THEN IF (KIB == 0) KIB=1+KIE KIE=KIE+1+IXENDI-IXORI @@ -317,7 +319,7 @@ END SUBROUTINE GET_DISTRIBX_LB USE MODD_PARAMETERS_ll,ONLY : JPHEXT USE MODD_VAR_ll, ONLY : TCRRT_PROCONF USE MODD_STRUCTURE_ll, ONLY : MODELSPLITTING_ll -USE MODE_TOOLS_ll, ONLY : GET_INTERSECTION_ll,GET_GLOBALDIMS_ll,LSOUTH_ll +USE MODE_TOOLS_ll, ONLY : GET_INTERSECTION_ll,GET_GLOBALDIMS_ll,LSOUTH_ll,LNORTH_ll !* 0. DECLARATIONS ! ------------ !* 0.1 declarations of arguments @@ -396,7 +398,7 @@ ELSE IYEND=JPHEXT !1 ENDIF CALL GET_INTERSECTION_ll(IXOR,IYOR,IXEND,IYEND,IXORI,IYORI,IXENDI,IYENDI,YMODE,IINFO,KIP) -IF (IINFO /= 1) THEN ! no empty intersection +IF (IINFO/=1 .AND. LSOUTH_ll(KIP) ) THEN ! no empty intersection IF (HCOORD == 'LOC') THEN KIB=IXORI KIE=IXENDI @@ -442,7 +444,7 @@ ELSE IYEND=IJMAX_ll + 2 * JPHEXT - JPHEXT + JPHEXT ! + 2 * JPHEXT ENDIF CALL GET_INTERSECTION_ll(IXOR,IYOR,IXEND,IYEND,IXORI,IYORI,IXENDI,IYENDI,YMODE,IINFO,KIP) -IF (IINFO /=1) THEN +IF (IINFO/=1 .AND. LNORTH_ll(KIP) ) THEN IF (HCOORD == 'LOC') THEN KIB=IXORI KIE=IXENDI diff --git a/src/LIB/SURCOUCHE/src/mode_toolsz_ll.f90 b/src/LIB/SURCOUCHE/src/mode_toolsz_ll.f90 index 91cc5b3292d52f895b04bce68152b0a70a0d0025..882201462ac00002f452f7088936eaa8a67453a0 100644 --- a/src/LIB/SURCOUCHE/src/mode_toolsz_ll.f90 +++ b/src/LIB/SURCOUCHE/src/mode_toolsz_ll.f90 @@ -202,6 +202,7 @@ !! ------------- ! Original 01/05/98 ! R.Guivarch 29/11/99 : x and y splitting : HSPLITTING + ! J.Escobar 28/03/2019: check very small domain(0 size) ! !------------------------------------------------------------------------------- ! @@ -332,6 +333,14 @@ CALL CARTESIANZ(TPROC,NB_PROC,X_DIM,Y_DIM,Z_DIM,X_DOMAINS,Y_DOMAINS,Z_DOMAINS,321) ! END IF + IF ( ( (1+TPROC(IP)%NXEND-TPROC(IP)%NXOR) == 0 ) & + .OR. ( (1+TPROC(IP)%NYEND-TPROC(IP)%NYOR) == 0 ) ) THEN + PRINT*, "/!\ SPLITZ: some proc have 0 size local domaine , to much processors used for domaine size ", & + " IP=" ,IP , & + " DIMX=",1+TPROC(IP)%NXEND-TPROC(IP)%NXOR, & + " DIMY=",1+TPROC(IP)%NYEND-TPROC(IP)%NYOR + CALL ABORT() + END IF ! !* 3. shift from physical to extended domain ! @@ -352,6 +361,7 @@ PRINT*,"NYOR=",TPROC(IK)%NYOR," NYEND=",TPROC(IK)%NYEND," TAILLE=",1+TPROC(IK)%NYEND-TPROC(IK)%NYOR PRINT*,"NZOR=",TPROC(IK)%NZOR," NZEND=",TPROC(IK)%NZEND," TAILLE=",1+TPROC(IK)%NZEND-TPROC(IK)%NZOR END DO + ENDIF END IF END IF diff --git a/src/MNH/get_sizex_lb.f90 b/src/MNH/get_sizex_lb.f90 index 275f45402abf36269edf492892c1e0a3b7b97c1e..198cdac8032c518bec6021d98b3550bcb4d71c3f 100644 --- a/src/MNH/get_sizex_lb.f90 +++ b/src/MNH/get_sizex_lb.f90 @@ -83,6 +83,7 @@ END MODULE MODI_GET_SIZEX_LB !! Original 23/09/98 !! J.Escobar : 15/09/2015 : WENO5 & JPHEXT <> 1 !! Philippe Wautelet: 05/2016-04/2018: new data structures and calls for I/O +!! J.Escobar 28/03/2019: for very small domain , force N/S/E/W check on getting LB bounds !------------------------------------------------------------------------------- ! !* 0. DECLARATIONS @@ -139,7 +140,7 @@ IF (KRIMX /=0) THEN IYOR=1 IYEND=KJMAX_ll+ 2 * JPHEXT CALL GET_INTERSECTION_ll(IXOR,IYOR,IXEND,IYEND,IXORI,IYORI,IXENDI,IYENDI,"EXTE",IINFO) - IF (IINFO/=1) THEN ! no empty intersection + IF (IINFO/=1 .AND. LWEST_ll() ) THEN ! no empty intersection KISIZEXF=KISIZEXF + (IXENDI - IXORI +1) KJSIZEXF= IYENDI - IYORI +1 ENDIF @@ -150,7 +151,7 @@ IF (KRIMX /=0) THEN IYOR=1 IYEND=KJMAX_ll+ 2 * JPHEXT CALL GET_INTERSECTION_ll(IXOR,IYOR,IXEND,IYEND,IXORI,IYORI,IXENDI,IYENDI,"EXTE",IINFO) - IF (IINFO/=1) THEN ! no empty intersection + IF (IINFO/=1 .AND. LEAST_ll() ) THEN ! no empty intersection KISIZEXF=KISIZEXF + (IXENDI - IXORI +1) ! added to the western side KJSIZEXF= IYENDI - IYORI +1 KISIZEXFU=KISIZEXFU + ( IXENDI - IXORI +1) @@ -162,7 +163,7 @@ IF (KRIMX /=0) THEN IYOR=1 IYEND=KJMAX_ll+ 2 * JPHEXT CALL GET_INTERSECTION_ll(IXOR,IYOR,IXEND,IYEND,IXORI,IYORI,IXENDI,IYENDI,"EXTE",IINFO) - IF (IINFO /= 1) THEN ! no empty intersection + IF (IINFO/=1 .AND. LWEST_ll() ) THEN ! no empty intersection KISIZEXFU=KISIZEXFU + (IXENDI - IXORI +1) KJSIZEXFU= IYENDI - IYORI +1 ENDIF @@ -176,7 +177,7 @@ IXEND=JPHEXT+2 ! 3 IYOR=1 IYEND=KJMAX_ll+ 2 * JPHEXT CALL GET_INTERSECTION_ll(IXOR,IYOR,IXEND,IYEND,IXORI,IYORI,IXENDI,IYENDI,"EXTE",IINFO) -IF (IINFO /=1 ) THEN ! no empty intersection +IF (IINFO /=1 .AND. LWEST_ll() ) THEN ! no empty intersection KISIZEX4=KISIZEX4 + ( IXENDI - IXORI +1) KJSIZEX4= IYENDI - IYORI +1 ENDIF @@ -186,7 +187,7 @@ IXEND=KIMAX_ll+ 2 * JPHEXT - JPHEXT + JPHEXT ! + 2*JPHEXT IYOR=1 IYEND=KJMAX_ll+ 2 * JPHEXT CALL GET_INTERSECTION_ll(IXOR,IYOR,IXEND,IYEND,IXORI,IYORI,IXENDI,IYENDI,"EXTE",IINFO) -IF (IINFO/=1) THEN ! no empty intersection +IF (IINFO/=1 .AND. LEAST_ll() ) THEN ! no empty intersection KISIZEX4=KISIZEX4 + (IXENDI - IXORI +1) KJSIZEX4= IYENDI - IYORI +1 ENDIF @@ -199,7 +200,7 @@ IXEND=JPHEXT ! 1 IYOR=1 IYEND=KJMAX_ll+ 2 * JPHEXT CALL GET_INTERSECTION_ll(IXOR,IYOR,IXEND,IYEND,IXORI,IYORI,IXENDI,IYENDI,"EXTE",IINFO) -IF (IINFO /=1) THEN ! no empty intersection +IF (IINFO/=1 .AND. LWEST_ll() ) THEN ! no empty intersection KISIZEX2=KISIZEX2 + ( IXENDI - IXORI +1) KJSIZEX2= IYENDI - IYORI +1 ENDIF @@ -209,7 +210,7 @@ IXEND=KIMAX_ll + 2 * JPHEXT - JPHEXT + JPHEXT ! + 2 * JPHEXT IYOR=1 IYEND=KJMAX_ll+ 2 * JPHEXT CALL GET_INTERSECTION_ll(IXOR,IYOR,IXEND,IYEND,IXORI,IYORI,IXENDI,IYENDI,"EXTE",IINFO) -IF (IINFO /=1) THEN ! no empty intersection +IF (IINFO/=1 .AND. LEAST_ll() ) THEN ! no empty intersection KISIZEX2=KISIZEX2 + ( IXENDI - IXORI +1) KJSIZEX2= IYENDI - IYORI +1 ENDIF diff --git a/src/MNH/get_sizey_lb.f90 b/src/MNH/get_sizey_lb.f90 index a7dbd103947aa8f28fd6f95992ce5438957b81cd..fbff6c1dd3e0736d0d7e5a51bb22eae62a09617b 100644 --- a/src/MNH/get_sizey_lb.f90 +++ b/src/MNH/get_sizey_lb.f90 @@ -83,6 +83,7 @@ END MODULE MODI_GET_SIZEY_LB !! Original 23/09/98 !! J.Escobar : 15/09/2015 : WENO5 & JPHEXT <> 1 !! Philippe Wautelet: 05/2016-04/2018: new data structures and calls for I/O +!! J.Escobar 28/03/2019: for very small domain , force N/S/E/W check on getting LB bounds !------------------------------------------------------------------------------- ! !* 0. DECLARATIONS @@ -139,7 +140,7 @@ IF (KRIMY /=0) THEN IYOR=1 IYEND=KRIMY+JPHEXT ! +1 CALL GET_INTERSECTION_ll(IXOR,IYOR,IXEND,IYEND,IXORI,IYORI,IXENDI,IYENDI,"EXTE",IINFO) - IF (IINFO/=1) THEN ! no empty intersection + IF (IINFO/=1 .AND. LSOUTH_ll() ) THEN ! no empty intersection KISIZEYF= IXENDI - IXORI +1 KJSIZEYF= KJSIZEYF + (IYENDI - IYORI +1) ENDIF @@ -150,7 +151,7 @@ IF (KRIMY /=0) THEN IYOR=KJMAX_ll + 2 * JPHEXT-KRIMY-JPHEXT+1 ! -KRIMY IYEND=KJMAX_ll+ 2 * JPHEXT CALL GET_INTERSECTION_ll(IXOR,IYOR,IXEND,IYEND,IXORI,IYORI,IXENDI,IYENDI,"EXTE",IINFO) - IF (IINFO/=1) THEN ! no empty intersection + IF (IINFO/=1 .AND. LNORTH_ll() ) THEN ! no empty intersection KISIZEYF=IXENDI - IXORI +1 KJSIZEYF= KJSIZEYF + (IYENDI - IYORI +1 )! added to the southern side KISIZEYFV= IXENDI - IXORI +1 @@ -162,7 +163,7 @@ IF (KRIMY /=0) THEN IYOR=2 IYEND=KRIMY+JPHEXT+1 !+2 CALL GET_INTERSECTION_ll(IXOR,IYOR,IXEND,IYEND,IXORI,IYORI,IXENDI,IYENDI,"EXTE",IINFO) - IF (IINFO /= 1) THEN ! no empty intersection + IF (IINFO/=1 .AND. LSOUTH_ll() ) THEN ! no empty intersection KISIZEYFV= IXENDI - IXORI +1 KJSIZEYFV= KJSIZEYFV + (IYENDI - IYORI +1 ) ENDIF @@ -176,7 +177,7 @@ IXEND=KIMAX_ll+ 2 * JPHEXT IYOR=2 !2 IYEND=JPHEXT+2 !3 CALL GET_INTERSECTION_ll(IXOR,IYOR,IXEND,IYEND,IXORI,IYORI,IXENDI,IYENDI,"EXTE",IINFO) -IF (IINFO /=1 ) THEN ! no empty intersection +IF (IINFO /=1 .AND. LSOUTH_ll() ) THEN ! no empty intersection KISIZEY4= IXENDI - IXORI +1 KJSIZEY4= KJSIZEY4 + (IYENDI - IYORI +1) ENDIF @@ -186,7 +187,7 @@ IXEND=KIMAX_ll+ 2 * JPHEXT IYOR=KJMAX_ll + 2 * JPHEXT - JPHEXT ! + JPHEXT IYEND=KJMAX_ll+ 2 * JPHEXT - JPHEXT + JPHEXT ! + 2*JPHEXT CALL GET_INTERSECTION_ll(IXOR,IYOR,IXEND,IYEND,IXORI,IYORI,IXENDI,IYENDI,"EXTE",IINFO) -IF (IINFO/=1) THEN ! no empty intersection +IF (IINFO/=1 .AND. LNORTH_ll() ) THEN ! no empty intersection KISIZEY4=IXENDI - IXORI +1 KJSIZEY4=KJSIZEY4 + ( IYENDI - IYORI +1 ) ENDIF @@ -199,7 +200,7 @@ IXEND=KIMAX_ll+ 2 * JPHEXT IYOR=1 ! 1 IYEND=JPHEXT ! 1 CALL GET_INTERSECTION_ll(IXOR,IYOR,IXEND,IYEND,IXORI,IYORI,IXENDI,IYENDI,"EXTE",IINFO) -IF (IINFO /=1) THEN ! no empty intersection +IF (IINFO /=1 .AND. LSOUTH_ll() ) THEN ! no empty intersection KISIZEY2= IXENDI - IXORI +1 KJSIZEY2=KJSIZEY2 + (IYENDI - IYORI +1 ) ENDIF @@ -209,7 +210,7 @@ IXEND=KIMAX_ll + 2 * JPHEXT IYOR=KJMAX_ll + 2 * JPHEXT - JPHEXT + 1 ! + 2 * JPHEXT IYEND=KJMAX_ll+ 2 * JPHEXT - JPHEXT + JPHEXT ! + 2 * JPHEXT CALL GET_INTERSECTION_ll(IXOR,IYOR,IXEND,IYEND,IXORI,IYORI,IXENDI,IYENDI,"EXTE",IINFO) -IF (IINFO /=1) THEN ! no empty intersection +IF (IINFO /=1 .AND. LNORTH_ll() ) THEN ! no empty intersection KISIZEY2= IXENDI - IXORI +1 KJSIZEY2= KJSIZEY2 + (IYENDI - IYORI +1 ) ENDIF