diff --git a/model/src/w3oacpmd.F90 b/model/src/w3oacpmd.F90 index 72e48e4e1..b5fbe50d2 100644 --- a/model/src/w3oacpmd.F90 +++ b/model/src/w3oacpmd.F90 @@ -58,6 +58,13 @@ MODULE W3OACPMD ! USE MOD_OASIS ! OASIS3-MCT module ! + USE W3ODATMD, ONLY: NAPROC, IAPROC, UNDEF + USE MPI, ONLY : MPI_SUM, MPI_INT + USE W3PARALL, ONLY : INIT_GET_ISEA +#ifdef W3_PDLIB + USE YOWNODEPOOL, ONLY: NPA, NP, IPLG +#endif + IMPLICIT NONE PRIVATE ! @@ -331,7 +338,7 @@ SUBROUTINE CPL_OASIS_GRID(LD_MASTER,ID_LCOMM) ! ! 1.3. Unstructured grids ! ---------------------------------- - WRITE(*,*) 'TO BE IMPLEMENT FOR UNSTRUCTURED GRIDS' + WRITE(*,*) 'TO BE IMPLEMENT FOR UNSTRUCTURED GRIDS CPL_OASIS_GRID' STOP END IF ! @@ -367,8 +374,10 @@ SUBROUTINE CPL_OASIS_DEFINE(NDSO,RCV_STR,SND_STR) !/ | A. Thevenin | !/ | V. Garnier | !/ | M. Accensi | + !/ ! A. Roland | + !/ ! H. Michaud | !/ | FORTRAN 90 | - !/ | Last update : 08-Jun-2018 | + !/ | Last update : 22-Feb-2023 | !/ +-----------------------------------+ !/ !/ Jul-2013 : Origination. ( version 4.18 ) @@ -376,6 +385,8 @@ SUBROUTINE CPL_OASIS_DEFINE(NDSO,RCV_STR,SND_STR) !/ (R. Baraille & J. Pianezze) !/ April-2016 : Add comments (J. Pianezze) ( version 5.07 ) !/ 08-Jun-2018 : use INIT_GET_ISEA ( version 6.04 ) + !/ 22-Feb-2023 : Extend to domain decomposition ( version 7.xx ) + !/ 01-Mar-2023 : Work on HYCOM part !/ ! 1. Purpose : ! @@ -416,7 +427,12 @@ SUBROUTINE CPL_OASIS_DEFINE(NDSO,RCV_STR,SND_STR) USE W3GDATMD, ONLY: NSEAL,NSEA, NX, NY, MAPSTA, MAPSF, GTYPE, & & UNGTYPE, RLGTYPE, CLGTYPE, SMCTYPE USE W3ODATMD, ONLY: NAPROC, IAPROC - USE W3PARALL, ONLY : INIT_GET_ISEA + USE W3ADATMD, ONLY: MPI_COMM_WAVE +#ifdef W3_PDLIB + USE W3PARALL, ONLY : INIT_GET_ISEA + USE YOWNODEPOOL, ONLY: NPA, NP, IPLG +#endif + IMPLICIT NONE ! !/ ------------------------------------------------------------------- / !/ Parameter list @@ -427,7 +443,7 @@ SUBROUTINE CPL_OASIS_DEFINE(NDSO,RCV_STR,SND_STR) !/ ------------------------------------------------------------------- / !/ Local parameters !/ - INTEGER :: IB_I,I + INTEGER :: IB_I,I,IPART,IERR_MPI INTEGER :: IL_PART_ID ! PartitionID INTEGER, ALLOCATABLE, DIMENSION(:) :: ILA_PARAL ! Description of the local partition in the global index space INTEGER, DIMENSION(4) :: ILA_SHAPE ! Vector giving the min & max index for each dim of the fields @@ -488,31 +504,81 @@ SUBROUTINE CPL_OASIS_DEFINE(NDSO,RCV_STR,SND_STR) ! ! 1.3. Unstructured grids ! ---------------------------------- - WRITE(*,*) 'TO BE VERIFIED FOR UNSTRUCTURED GRIDS' - STOP - ! - DO JSEA=1,NSEAL - ILA_PARAL(JSEA*2+1) = (IAPROC-1) + (JSEA-1)*NAPROC - ILA_PARAL(JSEA*2+2) = 1 - END DO +#ifdef W3_PDLIB + IPART = 4 ! USING POINT PARTITION FOR UNSTRUCTURED DD + IF (IPART == 3) THEN + ! * allocate : OASIS ORANGE partition + ALLOCATE(ILA_PARAL(2+NP*2)) + ! * Define the partition : OASIS ORANGE partition + ILA_PARAL(1) = 3 + ! * total number of segments of the global domain + ILA_PARAL(2) = NP + DO JSEA = 1, NP + CALL INIT_GET_ISEA(ILA_PARAL(JSEA*2+1),JSEA) + ILA_PARAL(JSEA*2+2) = 1 + END DO + ELSE IF (IPART == 4) THEN + ! * allocate : OASIS POINT partition + ALLOCATE(ILA_PARAL(2+NP)) + ! * Define the partition : OASIS POINTS partition + ILA_PARAL(1) = 4 + ! * total number of segments of the global domain + ILA_PARAL(2) = NP + DO JSEA = 1, NP + CALL INIT_GET_ISEA(ILA_PARAL(JSEA+2),JSEA) + ENDDO + ENDIF +#else + IPART = 4 + IF (IPART == 3) THEN + ! * allocate : OASIS ORANGE partition + ALLOCATE(ILA_PARAL(2+NSEAL*2)) + ! * Define the partition : OASIS ORANGE partition + ILA_PARAL(1) = 3 + ! * total number of segments of the global domain + ILA_PARAL(2) = NSEAL + DO JSEA = 1, NSEAL + CALL INIT_GET_ISEA(ILA_PARAL(JSEA*2+1),JSEA) + ILA_PARAL(JSEA*2+2) = 1 + END DO + ELSE IF (IPART == 4) THEN + ! * allocate : OASIS POINT partition + ALLOCATE(ILA_PARAL(2+NSEAL)) + ! * Define the partition : OASIS POINTS partition + ILA_PARAL(1) = 4 + ! * total number of segments of the global domain + ILA_PARAL(2) = NSEAL + DO JSEA = 1, NSEAL + CALL INIT_GET_ISEA(ILA_PARAL(JSEA+2),JSEA) + ENDDO + ENDIF +#endif ! ENDIF + ! ! 2. Partition definition ! ---------------------------------- - CALL OASIS_DEF_PARTITION(IL_PART_ID, ILA_PARAL,IL_ERR,NNODES) + CALL OASIS_DEF_PARTITION(IL_PART_ID, ILA_PARAL,IL_ERR,NSEA) IF(IL_ERR /= 0) THEN CALL OASIS_ABORT(IL_COMPID, 'CPL_OASIS_DEFINE', 'Problem during oasis_def_partition') ENDIF + + ! ! 3. Coupling fields declaration ! ---------------------------------- +#ifdef W3_PDLIB + ILA_SHAPE(:) = (/1, NP, 1, 1 /) +#else ILA_SHAPE(:) = (/1, NSEAL, 1, 1 /) +#endif ! ILA_VAR_NODIMS(1) = 2 ! rank of fields array ILA_VAR_NODIMS(2) = 1 ! always 1 with OASIS3-MCT 2.0 ! CALL GET_LIST_EXCH_FIELD(NDSO, RCV_FLD, SND_FLD, IL_NB_RCV, IL_NB_SND, RCV_STR, SND_STR) + ! ! 3.1 Send coupling fields ! ---------------------------------- @@ -530,6 +596,8 @@ SUBROUTINE CPL_OASIS_DEFINE(NDSO,RCV_STR,SND_STR) CALL OASIS_ABORT(IL_COMPID, 'CPL_OASIS_DEFINE', 'Problem during oasis_def_var') ENDIF ENDDO + + ! ! 3.2 Received coupling fields ! ---------------------------------- @@ -547,11 +615,14 @@ SUBROUTINE CPL_OASIS_DEFINE(NDSO,RCV_STR,SND_STR) CALL OASIS_ABORT(IL_COMPID, 'CPL_OASIS_DEFINE', 'Problem during oasis_def_var') ENDIF ENDDO + + ! ! 4. End of definition phase ! ---------------------------------- CALL OASIS_ENDDEF(IL_ERR) + IF (IL_ERR /= 0) THEN CALL OASIS_ABORT(IL_COMPID, 'CPL_OASIS_DEFINE', 'Problem during oasis_enddef') ENDIF @@ -676,6 +747,10 @@ SUBROUTINE CPL_OASIS_RCV(ID_NB, ID_TIME, RDA_FIELD, LD_ACTION) !/ ------------------------------------------------------------------- / !/ Parameter list !/ + USE W3ADATMD, ONLY: MPI_COMM_WAVE + USE W3ODATMD, ONLY: NAPROC, IAPROC, UNDEF + USE W3GDATMD, ONLY: NSEAL, NSEA, NX + IMPLICIT NONE INTEGER, INTENT(IN) :: ID_NB ! Number of the field to be received INTEGER, INTENT(IN) :: ID_TIME ! Ocean time-step in seconds REAL(KIND=8), DIMENSION(:,:), INTENT(OUT) :: RDA_FIELD ! Coupling field array to be received @@ -685,15 +760,18 @@ SUBROUTINE CPL_OASIS_RCV(ID_NB, ID_TIME, RDA_FIELD, LD_ACTION) !/ Local parameters !/ INTEGER :: IL_INFO ! OASIS3-MCT info argument + INTEGER :: IERR_MPI, NPSUM !/ !/ ------------------------------------------------------------------- / !/ Executable part !/ + CALL OASIS_GET ( RCV_fld(ID_NB)%IL_FIELD_ID & & , ID_TIME & & , RDA_FIELD & & , IL_INFO & & ) + ! LD_ACTION = IL_INFO == OASIS_RECVD .OR. IL_INFO == OASIS_FROMREST .OR. & & IL_INFO == OASIS_RECVOUT .OR. IL_INFO == OASIS_FROMRESTOUT @@ -842,14 +920,6 @@ SUBROUTINE GET_LIST_EXCH_FIELD(NDSO, RCV, SND, ID_NB_RCV, ID_NB_SND, RCV_STR, SN ID_NB_RCV=ID_NB_RCV+1 RCV(ID_NB_RCV)%CL_FIELD_NAME='WW3_OWDH' ! - ! wet-drying at u-location - ID_NB_RCV=ID_NB_RCV+1 - RCV(ID_NB_RCV)%CL_FIELD_NAME='WW3_OWDU' - ! - ! wet-drying at v-location - ID_NB_RCV=ID_NB_RCV+1 - RCV(ID_NB_RCV)%CL_FIELD_NAME='WW3_OWDV' - ! CASE('SSH') ! ssh : sea surface height (m) ID_NB_RCV=ID_NB_RCV+1 @@ -865,7 +935,6 @@ SUBROUTINE GET_LIST_EXCH_FIELD(NDSO, RCV, SND, ID_NB_RCV, ID_NB_SND, RCV_STR, SN RCV(ID_NB_RCV)%CL_FIELD_NAME='WW3_OSSV' #endif ! - ! ! ATMOSPHERE MODEL VARIABLES ! @@ -1144,4 +1213,3 @@ END SUBROUTINE GET_LIST_EXCH_FIELD !/ END MODULE W3OACPMD !/ -!/ ------------------------------------------------------------------- / diff --git a/model/src/w3ogcmmd.F90 b/model/src/w3ogcmmd.F90 index 64b10bad4..71d1321d4 100644 --- a/model/src/w3ogcmmd.F90 +++ b/model/src/w3ogcmmd.F90 @@ -64,13 +64,16 @@ SUBROUTINE SND_FIELDS_TO_OCEAN() !/ +-----------------------------------+ !/ | WAVEWATCH III NOAA/NCEP | !/ | A. Thevenin | + !/ | A. Roland | + !/ | | !/ | FORTRAN 90 | - !/ | Last update : 22-Mar-2021 | + !/ | Last update : 22-Dec-2022 | !/ +-----------------------------------+ !/ !/ Jul-2013 : Origination. ( version 4.18 ) !/ Apr-2016 : Add comments (J. Pianezze) ( version 5.07 ) !/ 22-Mar-2021 : Add extra coupling variables ( version 7.13 ) + !/ 08-Dez-2022 : Add DD paralelizaion ( version x.xx ) !/ ! 1. Purpose : ! @@ -116,6 +119,10 @@ SUBROUTINE SND_FIELDS_TO_OCEAN() TAUOCY, WNMEAN USE W3ODATMD, ONLY: NAPROC, IAPROC, UNDEF USE CONSTANTS, ONLY: PI, DERA +#ifdef W3_PDLIB + USE W3PARALL, ONLY : INIT_GET_ISEA + USE YOWNODEPOOL, only: npa, np, iplg +#endif ! !/ ------------------------------------------------------------------- / !/ Parameter list @@ -124,16 +131,32 @@ SUBROUTINE SND_FIELDS_TO_OCEAN() !/ ------------------------------------------------------------------- / !/ Local parameters !/ - INTEGER :: I, ISEA, IX, IY + INTEGER :: I, ISEA, IX, IY, NSEALL +#ifdef W3_PDLIB + INTEGER, DIMENSION(NP) :: MASK + REAL(kind=8), DIMENSION(NP,1) :: RLA_OASIS_SND + REAL(kind=8), DIMENSION(NP) :: TMP +#else INTEGER, DIMENSION(NSEAL) :: MASK REAL(kind=8), DIMENSION(NSEAL,1) :: RLA_OASIS_SND + REAL(kind=8), DIMENSION(NSEAL) :: TMP +#endif INTEGER :: IB_DO LOGICAL :: LL_ACTION - REAL(kind=8), DIMENSION(NSEAL) :: TMP ! !---------------------------------------------------------------------- ! * Executable part ! +#ifdef W3_PDLIB + DO I = 1, NP + CALL INIT_GET_ISEA(ISEA, I) + IX = MAPSF(ISEA,1) + IY = MAPSF(ISEA,2) + ! Get the mask : 1 - sea 0 - open boundary cells dried cells + MASK(I) = MOD(MAPSTA(IY,IX),2) + END DO + NSEALL = NP +#else DO I = 1, NSEAL ISEA = IAPROC + (I-1)*NAPROC IX = MAPSF(ISEA,1) @@ -141,60 +164,62 @@ SUBROUTINE SND_FIELDS_TO_OCEAN() ! Get the mask : 1 - sea 0 - open boundary cells dried cells MASK(I) = MOD(MAPSTA(IY,IX),2) END DO + NSEALL = NSEAL +#endif ! DO IB_DO = 1, IL_NB_SND ! ! Mask - wet-drying ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_ODRY') THEN - TMP(1:NSEAL) = 0.0 - WHERE(MASK(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=MASK(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(MASK(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=MASK(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! Mean wave period (tmn in s) (m0,-1) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_T0M1') THEN - TMP(1:NSEAL) = 0.0 - WHERE(T0M1(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=T0M1(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(T0M1(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=T0M1(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! Mean wave period (tmn in s) (m0,1) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3__T01') THEN - TMP(1:NSEAL) = 0.0 - WHERE(T01(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=T01(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(T01(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=T01(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! Mean wave number (wnm in m-1) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3__WNM') THEN - TMP(1:NSEAL) = 0.0 - WHERE(WNMEAN(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=WNMEAN(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(WNMEAN(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=WNMEAN(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! Charnock coefficient (-) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_OCHA') THEN - TMP(1:NSEAL) = 0.0 - WHERE(CHARN(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=CHARN(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(CHARN(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=CHARN(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! Wave height (hs in m) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3__OHS') THEN - TMP(1:NSEAL) = 0.0 - WHERE(HS(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=HS(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(HS(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=HS(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! @@ -202,9 +227,9 @@ SUBROUTINE SND_FIELDS_TO_OCEAN() ! --------------------------------------------------------------------- ! dir : nautical convention (GRIDDED files) - 0 degree from north, 90 from east IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_CDIR') THEN - TMP(1:NSEAL) = 0.0 - WHERE(THM(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=COS(THM(1:NSEAL)) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(THM(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=COS(THM(1:NSEALL)) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! @@ -212,9 +237,9 @@ SUBROUTINE SND_FIELDS_TO_OCEAN() ! --------------------------------------------------------------------- ! dir : nautical convention (GRIDDED files) - 0 degree from north, 90 from east IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_SDIR') THEN - TMP(1:NSEAL) = 0.0 - WHERE(THM(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=SIN(THM(1:NSEAL)) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(THM(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=SIN(THM(1:NSEALL)) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! @@ -222,180 +247,180 @@ SUBROUTINE SND_FIELDS_TO_OCEAN() ! --------------------------------------------------------------------- ! dir : nautical convention (GRIDDED files) - 0 degree from north, 90 from east IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3__DIR') THEN - TMP(1:NSEAL) = 0.0 - WHERE(THM /= UNDEF) TMP(1:NSEAL)=THM(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(THM /= UNDEF) TMP(1:NSEALL)=THM(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! Wave-induced Bernoulli head pressure (bhd in N.m-1) (J term, Smith JPO 2006) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3__BHD') THEN - TMP(1:NSEAL) = 0.0 - WHERE(BHD(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=BHD(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(BHD(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=BHD(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! Wave-ocean momentum flux (tauox in m2.s-2) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_TWOX') THEN - TMP(1:NSEAL) = 0.0 - WHERE(TAUOX(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=TAUOX(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(TAUOX(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=TAUOX(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! Wave-ocean momentum flux (tauoy in m2.s-2) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_TWOY') THEN - TMP(1:NSEAL) = 0.0 - WHERE(TAUOY(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=TAUOY(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(TAUOY(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=TAUOY(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! Wave-ocean total momentum flux (tauocx in Pa) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_TOCX') THEN - TMP(1:NSEAL) = 0.0 - WHERE(TAUOCX(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=TAUOCX(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(TAUOCX(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=TAUOCX(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! Wave-ocean total momentum flux (tauocy in Pa) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_TOCY') THEN - TMP(1:NSEAL) = 0.0 - WHERE(TAUOCY(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=TAUOCY(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(TAUOCY(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=TAUOCY(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! Wave-to-ocean TKE flux (phioc in W.m-2) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3__FOC') THEN - TMP(1:NSEAL) = 0.0 - WHERE(PHIOC(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=PHIOC(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(PHIOC(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=PHIOC(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! Momentum flux due to bottom friction (taubblx in m2.s-2) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_TBBX') THEN - TMP(1:NSEAL) = 0.0 - WHERE(TAUBBL(1:NSEAL,1) /= UNDEF) TMP(1:NSEAL)=TAUBBL(1:NSEAL,1) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(TAUBBL(1:NSEALL,1) /= UNDEF) TMP(1:NSEALL)=TAUBBL(1:NSEALL,1) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! Momentum flux due to bottom friction (taubbly in m2.s-2) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_TBBY') THEN - TMP(1:NSEAL) = 0.0 - WHERE(TAUBBL(1:NSEAL,2) /= UNDEF) TMP(1:NSEAL)=TAUBBL(1:NSEAL,2) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(TAUBBL(1:NSEALL,2) /= UNDEF) TMP(1:NSEALL)=TAUBBL(1:NSEALL,2) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! Energy flux due to bottom friction (phibbl in W.m-2) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3__FBB') THEN - TMP(1:NSEAL) = 0.0 - WHERE(PHIBBL(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=PHIBBL(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(PHIBBL(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=PHIBBL(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! rms amplitude of orbital velocity of the waves (ubr in m.s-1) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3__UBR') THEN - TMP(1:NSEAL) = 0.0 - WHERE(UBA(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=UBA(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(UBA(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=UBA(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! x component of the near-bottom rms wave velocity (in m.s-1) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_UBRX') THEN - TMP(1:NSEAL) = 0.0 - WHERE(UBA(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=UBA(1:NSEAL)*COS(UBD(1:NSEAL)) - RLA_OASIS_SND(:,1) = TMP(1:NSEAL) + TMP(1:NSEALL) = 0.0 + WHERE(UBA(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=UBA(1:NSEALL)*COS(UBD(1:NSEALL)) + RLA_OASIS_SND(:,1) = TMP(1:NSEALL) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! y component of the near-bottom rms wave velocity (in m.s-1) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_UBRY') THEN - TMP(1:NSEAL) = 0.0 - WHERE(UBA(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=UBA(1:NSEAL)*SIN(UBD(1:NSEAL)) - RLA_OASIS_SND(:,1) = TMP(1:NSEAL) + TMP(1:NSEALL) = 0.0 + WHERE(UBA(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=UBA(1:NSEALL)*SIN(UBD(1:NSEALL)) + RLA_OASIS_SND(:,1) = TMP(1:NSEALL) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! Net wave-supported stress, u component (tauwix in m2.s-2) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_TAWX') THEN - TMP(1:NSEAL) = 0.0 - WHERE(TAUWIX(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=TAUWIX(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(TAUWIX(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=TAUWIX(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! Net wave-supported stress, v component (tauwix in m2.s-2) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_TAWY') THEN - TMP(1:NSEAL) = 0.0 - WHERE(TAUWIY(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=TAUWIY(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(TAUWIY(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=TAUWIY(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! Volume transport associated to Stokes drift, u component (tusx in m2.s-1) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_TUSX') THEN - TMP(1:NSEAL) = 0.0 - WHERE(TUSX(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=TUSX(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(TUSX(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=TUSX(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! Volume transport associated to Stokes drift, v component (tusy in m2.s-1) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_TUSY') THEN - TMP(1:NSEAL) = 0.0 - WHERE(TUSY(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=TUSY(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(TUSY(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=TUSY(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! Surface Stokes drift, u component (ussx in m.s-1) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_USSX') THEN - TMP(1:NSEAL) = 0.0 - WHERE(USSX(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=USSX(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(USSX(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=USSX(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! Surface Stokes drift, v component (ussy in m.s-1) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_USSY') THEN - TMP(1:NSEAL) = 0.0 - WHERE(USSY(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=USSY(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(USSY(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=USSY(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! ! Mean wave length (wlm in m) ! --------------------------------------------------------------------- IF (SND_FLD(IB_DO)%CL_FIELD_NAME == 'WW3___LM') THEN - TMP(1:NSEAL) = 0.0 - WHERE(WLM(1:NSEAL) /= UNDEF) TMP(1:NSEAL)=WLM(1:NSEAL) - RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEAL)) + TMP(1:NSEALL) = 0.0 + WHERE(WLM(1:NSEALL) /= UNDEF) TMP(1:NSEALL)=WLM(1:NSEALL) + RLA_OASIS_SND(:,1) = DBLE(TMP(1:NSEALL)) CALL CPL_OASIS_SND(IB_DO, ID_OASIS_TIME, RLA_OASIS_SND, LL_ACTION) ENDIF ! @@ -463,6 +488,10 @@ SUBROUTINE RCV_FIELDS_FROM_OCEAN(ID_LCOMM, IDFLD, FXN, FYN, FAN) USE W3GDATMD, ONLY: NX, NY, NSEAL, NSEA, MAPSF USE W3ODATMD, ONLY: NAPROC, IAPROC USE W3SERVMD, ONLY: W3S2XY +#ifdef W3_PDLIB + USE W3PARALL, ONLY : INIT_GET_ISEA + USE YOWNODEPOOL, only: npa, np, iplg +#endif ! !/ ------------------------------------------------------------------- / !/ Parameter list @@ -475,15 +504,26 @@ SUBROUTINE RCV_FIELDS_FROM_OCEAN(ID_LCOMM, IDFLD, FXN, FYN, FAN) !/ Local parameters !/ LOGICAL :: LL_ACTION - INTEGER :: IB_DO, IB_I, IB_J, IL_ERR + INTEGER :: IB_DO, IB_I, IB_J, IL_ERR, NSEALL, IERR_MPI INTEGER, SAVE :: ID_OASIS_TIME_WETDRYONLYONCE = -1 +#ifdef W3_PDLIB + REAL(kind=8), DIMENSION(NP,1) :: RLA_OASIS_RCV + REAL(kind=8), DIMENSION(NP) :: TMP, MASKT, MASKU, MASKV +#else REAL(kind=8), DIMENSION(NSEAL,1) :: RLA_OASIS_RCV REAL(kind=8), DIMENSION(NSEAL) :: TMP, MASKT, MASKU, MASKV - REAL, DIMENSION(1:NSEA) :: SND_BUFF,RCV_BUFF +#endif + REAL, DIMENSION(1:NSEA) :: SND_BUFF, RCV_BUFF ! !---------------------------------------------------------------------- ! * Executable part ! +#ifdef W3_PDLIB + NSEALL = NP +#else + NSEALL = NSEAL +#endif + MASKT(:)=1. MASKU(:)=1. MASKV(:)=1. @@ -508,8 +548,9 @@ SUBROUTINE RCV_FIELDS_FROM_OCEAN(ID_LCOMM, IDFLD, FXN, FYN, FAN) IF (RCV_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_OWDH') THEN CALL CPL_OASIS_RCV(IB_DO, ID_OASIS_TIME, RLA_OASIS_RCV, LL_ACTION) + IF (LL_ACTION) THEN - MASKT(1:NSEAL) = RLA_OASIS_RCV(1:NSEAL,1) + MASKT(1:NSEALL) = RLA_OASIS_RCV(1:NSEALL,1) ENDIF ENDIF ! @@ -518,7 +559,7 @@ SUBROUTINE RCV_FIELDS_FROM_OCEAN(ID_LCOMM, IDFLD, FXN, FYN, FAN) IF (RCV_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_OWDU') THEN CALL CPL_OASIS_RCV(IB_DO, ID_OASIS_TIME, RLA_OASIS_RCV, LL_ACTION) IF (LL_ACTION) THEN - MASKU(1:NSEAL) = RLA_OASIS_RCV(1:NSEAL,1) + MASKU(1:NSEALL) = RLA_OASIS_RCV(1:NSEALL,1) ENDIF ENDIF ! @@ -527,7 +568,7 @@ SUBROUTINE RCV_FIELDS_FROM_OCEAN(ID_LCOMM, IDFLD, FXN, FYN, FAN) IF (RCV_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_OWDV') THEN CALL CPL_OASIS_RCV(IB_DO, ID_OASIS_TIME, RLA_OASIS_RCV, LL_ACTION) IF (LL_ACTION) THEN - MASKV(1:NSEAL) = RLA_OASIS_RCV(1:NSEAL,1) + MASKV(1:NSEALL) = RLA_OASIS_RCV(1:NSEALL,1) ENDIF ENDIF ! @@ -545,14 +586,24 @@ SUBROUTINE RCV_FIELDS_FROM_OCEAN(ID_LCOMM, IDFLD, FXN, FYN, FAN) IF (IDFLD == 'LEV') THEN ! IF (RCV_FLD(IB_DO)%CL_FIELD_NAME == 'WW3__SSH') THEN + CALL CPL_OASIS_RCV(IB_DO, ID_OASIS_TIME, RLA_OASIS_RCV, LL_ACTION) + IF (LL_ACTION) THEN - TMP(1:NSEAL) = RLA_OASIS_RCV(1:NSEAL,1) * MASKT(1:NSEAL) + !AR: todo: double check the masking at this place + TMP(1:NSEALL) = RLA_OASIS_RCV(1:NSEALL,1) * MASKT(1:NSEALL) SND_BUFF(1:NSEA) = 0.0 - DO IB_I = 1, NSEAL +#ifdef W3_PDLIB + DO IB_I = 1, NSEALL + CALL INIT_GET_ISEA(IB_J, IB_I) + SND_BUFF(IB_J) = TMP(IB_I) + ENDDO +#else + DO IB_I = 1, NSEALL IB_J = IAPROC + (IB_I-1)*NAPROC SND_BUFF(IB_J) = TMP(IB_I) ENDDO +#endif ! CALL MPI_ALLREDUCE(SND_BUFF(1:NSEA), & RCV_BUFF(1:NSEA), & @@ -578,12 +629,19 @@ SUBROUTINE RCV_FIELDS_FROM_OCEAN(ID_LCOMM, IDFLD, FXN, FYN, FAN) IF (RCV_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_OSSU') THEN CALL CPL_OASIS_RCV(IB_DO, ID_OASIS_TIME, RLA_OASIS_RCV, LL_ACTION) IF (LL_ACTION) THEN - TMP(1:NSEAL) = RLA_OASIS_RCV(1:NSEAL,1) * MASKU(1:NSEAL) + TMP(1:NSEALL) = RLA_OASIS_RCV(1:NSEALL,1) * MASKU(1:NSEALL) SND_BUFF(1:NSEA) = 0.0 - DO IB_I = 1, NSEAL +#ifdef W3_PDLIB + DO IB_I = 1, NSEALL + CALL INIT_GET_ISEA(IB_J, IB_I) + SND_BUFF(IB_J) = TMP(IB_I) + ENDDO +#else + DO IB_I = 1, NSEALL IB_J = IAPROC + (IB_I-1)*NAPROC SND_BUFF(IB_J) = TMP(IB_I) ENDDO +#endif ! CALL MPI_ALLREDUCE(SND_BUFF(1:NSEA), & RCV_BUFF(1:NSEA), & @@ -604,12 +662,19 @@ SUBROUTINE RCV_FIELDS_FROM_OCEAN(ID_LCOMM, IDFLD, FXN, FYN, FAN) IF (RCV_FLD(IB_DO)%CL_FIELD_NAME == 'WW3_OSSV') THEN CALL CPL_OASIS_RCV(IB_DO, ID_OASIS_TIME, RLA_OASIS_RCV, LL_ACTION) IF (LL_ACTION) THEN - TMP(1:NSEAL) = RLA_OASIS_RCV(1:NSEAL,1) * MASKV(1:NSEAL) + TMP(1:NSEALL) = RLA_OASIS_RCV(1:NSEALL,1) * MASKV(1:NSEALL) SND_BUFF(1:NSEA) = 0.0 - DO IB_I = 1, NSEAL +#ifdef W3_PDLIB + DO IB_I = 1, NSEALL + CALL INIT_GET_ISEA(IB_J, IB_I) + SND_BUFF(IB_J) = TMP(IB_I) + ENDDO +#else + DO IB_I = 1, NSEALL IB_J = IAPROC + (IB_I-1)*NAPROC SND_BUFF(IB_J) = TMP(IB_I) ENDDO +#endif ! CALL MPI_ALLREDUCE(SND_BUFF(1:NSEA), & RCV_BUFF(1:NSEA), & diff --git a/model/src/w3profsmd.F90 b/model/src/w3profsmd.F90 index 3d50812d0..e228f1e74 100644 --- a/model/src/w3profsmd.F90 +++ b/model/src/w3profsmd.F90 @@ -1266,7 +1266,7 @@ SUBROUTINE W3XYPFSNIMP ( ISP, C, LCALC, RD10, RD20, DT, AC) DO IBI=1, NBI IP = MAPSF(ISBPI(IBI),1) AC(IP) = ( RD1*BBPI0(ISP,IBI) + RD2*BBPIN(ISP,IBI) ) & - *IOBPA(IP)*IOBPD(ITH,IP) / CG(IK,ISBPI(IBI)) * CLATS(ISBPI(IBI)) + *IOBPA(IP)*(1-IOBPD(ITH,IP)) / CG(IK,ISBPI(IBI)) * CLATS(ISBPI(IBI)) END DO END IF diff --git a/model/src/w3profsmd_pdlib.F90 b/model/src/w3profsmd_pdlib.F90 index 0fbfd24e5..d4320f5cb 100644 --- a/model/src/w3profsmd_pdlib.F90 +++ b/model/src/w3profsmd_pdlib.F90 @@ -1068,7 +1068,6 @@ SUBROUTINE PDLIB_W3XYPFSN2(ISP, C, LCALC, RD10, RD20, DT, AC) ITER(IK,ITH) = ABS(NINT(CFLXY)) END IF END IF ! LCALC - #ifdef W3_DEBUGSOLVER WRITE(740+IAPROC,*) 'PDLIB_W3XYPFSN2, step 4' FLUSH(740+IAPROC) @@ -1088,8 +1087,6 @@ SUBROUTINE PDLIB_W3XYPFSN2(ISP, C, LCALC, RD10, RD20, DT, AC) WRITE(740+IAPROC,*) 'ITER=', ITER(IK,ITH) FLUSH(740+IAPROC) #endif - - DO IT = 1, ITER(IK,ITH) #ifdef W3_DEBUGSOLVER WRITE(740+IAPROC,*) 'IK=', IK, ' ITH=', ITH diff --git a/model/src/w3wavset.F90 b/model/src/w3wavset.F90 index 2f77e8938..4600aab69 100644 --- a/model/src/w3wavset.F90 +++ b/model/src/w3wavset.F90 @@ -1338,10 +1338,10 @@ SUBROUTINE TRIG_WAVE_SETUP_SOLVE_POISSON_NEUMANN_DIR(ASPAR, B, TheOut, ACTIVE, A END DO ! CALL TRIG_WAVE_SETUP_SCALAR_PROD(V_R, V_R, eNorm) -#ifdef W3_DEBUGSTP +!#ifdef W3_DEBUGSTP WRITE(740+IAPROC,*) 'nbIter=', nbIter, ' eNorm(res)=', eNorm FLUSH(740+IAPROC) -#endif +!#endif IF (eNorm .le. SOLVERTHR) THEN EXIT END IF diff --git a/model/src/ww3_shel.F90 b/model/src/ww3_shel.F90 index ee3464f44..3f22a395a 100644 --- a/model/src/ww3_shel.F90 +++ b/model/src/ww3_shel.F90 @@ -1948,7 +1948,6 @@ PROGRAM W3SHEL ENDIF ! Estimate the weights for the spatial interpolation IF (DTOUT(7).NE.0) THEN - CALL CPL_OASIS_GRID(L_MASTER,MPI_COMM) CALL CPL_OASIS_DEFINE(NDSO, FLDIN, FLDOUT) END IF #endif