diff --git a/src/LIB/SURCOUCHE/src/mode_mppdb.f90 b/src/LIB/SURCOUCHE/src/mode_mppdb.f90 index d7b340668f1c2acfdd24665628a5c02ad64d239a..42bff6b5a7bef6b3265d4d61f20039f045cca9b0 100644 --- a/src/LIB/SURCOUCHE/src/mode_mppdb.f90 +++ b/src/LIB/SURCOUCHE/src/mode_mppdb.f90 @@ -8,6 +8,7 @@ MODULE MODE_MPPDB !! J.Escobar 23/10/2012: correct CHECK_LB & format print output !! M.Moge 05/02/2015: MPPDB_CHECK_SURFEX2D and MPPDB_CHECK_SURFEX3D + bug fix in MPPDB_CHECK2D and MPPDB_CHECK3D (call MPI_AllReduce at the beginning) ! J.Escobar : 15/09/2015 : WENO5 & JPHEXT <> 1 +! G.Delautier : 23/06/2016 : surfex v8 ! IMPLICIT NONE @@ -797,8 +798,7 @@ CONTAINS USE MODI_UNPACK_SAME_RANK USE MODI_GET_SURF_MASK_n USE MODD_IO_SURF_MNH, ONLY : NHALO - USE MODD_SURF_ATM_n, ONLY : XCOVER - + USE MODD_MNH_SURFEX_n IMPLICIT NONE @@ -838,7 +838,7 @@ CONTAINS IIU = KXEND-KXOR+1+2*JPHEXT IJU = KYEND-KYOR+1+2*JPHEXT KSIZE_FULL = (KXEND-KXOR+1)*(KYEND-KYOR+1) - IF ( PRESENT(HTYPE) .AND. KSIZE_FULL /= SIZE(XCOVER,1) .AND. NHALO /= JPHEXT ) THEN + IF ( PRESENT(HTYPE) .AND. KSIZE_FULL /= SIZE(YSURF_CUR%U%XCOVER,1) .AND. NHALO /= JPHEXT ) THEN IIU = KXEND-KXOR+1+2*JPHEXT+2*NHALO IJU = KYEND-KYOR+1+2*JPHEXT+2*NHALO KSIZE_FULL = (KXEND-KXOR+1+2*NHALO) * (KYEND-KYOR+1+2*NHALO) @@ -851,7 +851,7 @@ CONTAINS KSIZE = SIZE( PTAB, 1 ) ALLOCATE( KMASK(KSIZE) ) ALLOCATE( PTAB_UNPACKED(KSIZE_FULL) ) - CALL GET_SURF_MASK_n(HTYPE,KSIZE,KMASK,KSIZE_FULL,KLUOUT) + CALL GET_SURF_MASK_n(YSURF_CUR%DTCO,YSURF_CUR%U,HTYPE,KSIZE,KMASK,KSIZE_FULL,KLUOUT) CALL UNPACK_SAME_RANK( KMASK, PTAB, PTAB_UNPACKED ) ELSE KSIZE = KSIZE_FULL @@ -893,9 +893,9 @@ CONTAINS USE MODI_UNPACK_SAME_RANK USE MODI_GET_SURF_MASK_n USE MODD_IO_SURF_MNH, ONLY : NHALO - USE MODD_SURF_ATM_n, ONLY : XCOVER USE MODD_CONFZ , ONLY : MPI_BUFFER_SIZE USE MODD_MPIF , ONLY : MPI_INTEGER, MPI_STATUS_IGNORE, MPI_SUM + USE MODD_MNH_SURFEX_n ! IMPLICIT NONE ! @@ -941,7 +941,7 @@ CONTAINS IJU = KYEND-KYOR+1+2*JPHEXT IKU = SIZE(PTAB,2) KSIZE_FULL = (KXEND-KXOR+1)*(KYEND-KYOR+1) - IF ( PRESENT(HTYPE) .AND. KSIZE_FULL /= SIZE(XCOVER,1) .AND. NHALO /= JPHEXT ) THEN + IF ( PRESENT(HTYPE) .AND. KSIZE_FULL /= SIZE(YSURF_CUR%U%XCOVER,1) .AND. NHALO /= JPHEXT ) THEN KSIZE_FULL = (KXEND-KXOR+1+2*NHALO) * (KYEND-KYOR+1+2*NHALO) ENDIF ! @@ -951,7 +951,7 @@ CONTAINS KSIZE = SIZE( PTAB, 1 ) ALLOCATE( KMASK(KSIZE) ) ALLOCATE( PTAB_UNPACKED(KSIZE_FULL,IKU) ) - CALL GET_SURF_MASK_n(HTYPE,KSIZE,KMASK,KSIZE_FULL,KLUOUT) + CALL GET_SURF_MASK_n(YSURF_CUR%DTCO,YSURF_CUR%U,HTYPE,KSIZE,KMASK,KSIZE_FULL,KLUOUT) DO II=1,IKU CALL UNPACK_SAME_RANK( KMASK, PTAB(:,II), PTAB_UNPACKED(:,II) ) ENDDO