diff --git a/MNH/resolved_cloud.f90 b/MNH/resolved_cloud.f90 index 14222cb47cb45f62ee456a00dc514adddd482b36..d33dd2bee7a0945f6229c4b79845565571559107 100644 --- a/MNH/resolved_cloud.f90 +++ b/MNH/resolved_cloud.f90 @@ -381,6 +381,7 @@ INTEGER :: IKU INTEGER :: IINFO_ll ! return code of parallel routine INTEGER :: JK ! +INTEGER :: II,IJ,IIU,IJU ! ! REAL, DIMENSION(SIZE(PZZ,1),SIZE(PZZ,2),SIZE(PZZ,3)):: ZDZZ @@ -405,10 +406,9 @@ REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: ZSVS ! scalar tendency for microphysi !* 1. PRELIMINARY COMPUTATIONS ! ------------------------ ! -IIB=1+JPHEXT -IIE=SIZE(PZZ,1) - JPHEXT -IJB=1+JPHEXT -IJE=SIZE(PZZ,2) - JPHEXT +CALL GET_INDICE_ll (IIB,IJB,IIE,IJE) +IIU=SIZE(PZZ,1) +IJU=SIZE(PZZ,2) IKB=1+JPVEXT IKE=SIZE(PZZ,3) - JPVEXT IKU=SIZE(PZZ,3) @@ -447,35 +447,36 @@ ENDIF ! ! complete the lateral boundaries to avoid possible problems ! -PTHS(IIB-1,:,:) = PTHS(IIB,:,:) -PTHS(IIE+1,:,:) = PTHS(IIE,:,:) -PTHS(:,IJB-1,:) = PTHS(:,IJB,:) -PTHS(:,IJE+1,:) = PTHS(:,IJE,:) +DO II=1,IIB-1 ; PTHS(II,:,:) = PTHS(IIB,:,:) ; ENDDO +DO II=IIE+1,IIU ; PTHS(II,:,:) = PTHS(IIE,:,:) ; ENDDO +DO IJ=1,IJB-1 ; PTHS(:,IJ,:) = PTHS(:,IJB,:) ; ENDDO +DO IJ=IJE+1,IJU ; PTHS(:,IJ,:) = PTHS(:,IJE,:) ; ENDDO ! -PRS(IIB-1,:,:,:) = PRS(IIB,:,:,:) -PRS(IIE+1,:,:,:) = PRS(IIE,:,:,:) -PRS(:,IJB-1,:,:) = PRS(:,IJB,:,:) -PRS(:,IJE+1,:,:) = PRS(:,IJE,:,:) +DO II=1,IIB-1 ; PRS(II,:,:,:) = PRS(IIB,:,:,:) ; ENDDO +DO II=IIE+1,IIU ; PRS(II,:,:,:) = PRS(IIE,:,:,:) ; ENDDO +DO IJ=1,IJB-1 ; PRS(:,IJ,:,:) = PRS(:,IJB,:,:) ; ENDDO +DO IJ=IJE+1,IJU ; PRS(:,IJ,:,:) = PRS(:,IJE,:,:) ; ENDDO ! ! complete the physical boundaries to avoid some computations ! -IF(LWEST_ll() .AND. HLBCX(1) /= 'CYCL') PRT(IIB-1,:,:,2:) = 0.0 -IF(LEAST_ll() .AND. HLBCX(2) /= 'CYCL') PRT(IIE+1,:,:,2:) = 0.0 -IF(LSOUTH_ll() .AND. HLBCY(1) /= 'CYCL') PRT(:,IJB-1,:,2:) = 0.0 -IF(LNORTH_ll() .AND. HLBCY(2) /= 'CYCL') PRT(:,IJE+1,:,2:) = 0.0 +IF(LWEST_ll() .AND. HLBCX(1) /= 'CYCL') PRT(:IIB-1,:,:,2:) = 0.0 +IF(LEAST_ll() .AND. HLBCX(2) /= 'CYCL') PRT(IIE+1:,:,:,2:) = 0.0 +IF(LSOUTH_ll() .AND. HLBCY(1) /= 'CYCL') PRT(:,:IJB-1,:,2:) = 0.0 +IF(LNORTH_ll() .AND. HLBCY(2) /= 'CYCL') PRT(:,IJE+1:,:,2:) = 0.0 ! IF (HCLOUD == 'C2R2' .OR. HCLOUD == 'C3R5' .OR. HCLOUD == 'KHKO') THEN - ZSVS(IIB-1,:,:,:) = ZSVS(IIB,:,:,:) - ZSVS(IIE+1,:,:,:) = ZSVS(IIE,:,:,:) - ZSVS(:,IJB-1,:,:) = ZSVS(:,IJB,:,:) - ZSVS(:,IJE+1,:,:) = ZSVS(:,IJE,:,:) +! +DO II=1,IIB-1 ; ZSVS(II,:,:,:) = ZSVS(IIB,:,:,:) ; ENDDO +DO II=IIE+1,IIU ; ZSVS(II,:,:,:) = ZSVS(IIE,:,:,:) ; ENDDO +DO IJ=1,IJB-1 ; ZSVS(:,IJ,:,:) = ZSVS(:,IJB,:,:) ; ENDDO +DO IJ=IJE+1,IJU ; ZSVS(:,IJ,:,:) = ZSVS(:,IJE,:,:) ; ENDDO ! ! complete the physical boundaries to avoid some computations ! - IF(LWEST_ll() .AND. HLBCX(1) /= 'CYCL') ZSVT(IIB-1,:,:,:) = 0.0 - IF(LEAST_ll() .AND. HLBCX(2) /= 'CYCL') ZSVT(IIE+1,:,:,:) = 0.0 - IF(LSOUTH_ll() .AND. HLBCY(1) /= 'CYCL') ZSVT(:,IJB-1,:,:) = 0.0 - IF(LNORTH_ll() .AND. HLBCY(2) /= 'CYCL') ZSVT(:,IJE+1,:,:) = 0.0 + IF(LWEST_ll() .AND. HLBCX(1) /= 'CYCL') ZSVT(:IIB-1,:,:,:) = 0.0 + IF(LEAST_ll() .AND. HLBCX(2) /= 'CYCL') ZSVT(IIE+1:,:,:,:) = 0.0 + IF(LSOUTH_ll() .AND. HLBCY(1) /= 'CYCL') ZSVT(:,:IJB-1,:,:) = 0.0 + IF(LNORTH_ll() .AND. HLBCY(2) /= 'CYCL') ZSVT(:,IJE+1:,:,:) = 0.0 ENDIF ! ! complete the vertical boundaries