New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 10126 for NEMO/branches/2018/dev_r10057_ENHANCE03_ZTILDE/src/OCE/SBC/cpl_oasis3.F90 – NEMO

Ignore:
Timestamp:
2018-09-13T16:59:46+02:00 (6 years ago)
Author:
jchanut
Message:

Merge with trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2018/dev_r10057_ENHANCE03_ZTILDE/src/OCE/SBC/cpl_oasis3.F90

    r9598 r10126  
    6969   INTEGER, PUBLIC, PARAMETER ::   nmaxcat=5    ! Maximum number of coupling fields 
    7070   INTEGER, PUBLIC, PARAMETER ::   nmaxcpl=5    ! Maximum number of coupling fields 
     71   LOGICAL, PARAMETER         ::   ltmp_wapatch = .TRUE.   ! patch to restore wraparound rows in cpl_send, cpl_rcv, cpl_define   
     72   INTEGER                    ::   nldi_save, nlei_save 
     73   INTEGER                    ::   nldj_save, nlej_save 
    7174    
    7275   TYPE, PUBLIC ::   FLD_CPL               !: Type for coupling field information 
     
    8790   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
    8891   !! $Id$ 
    89    !! Software governed by the CeCILL licence     (./LICENSE) 
     92   !! Software governed by the CeCILL license (see ./LICENSE) 
    9093   !!---------------------------------------------------------------------- 
    9194CONTAINS 
     
    145148      !!-------------------------------------------------------------------- 
    146149 
     150      ! patch to restore wraparound rows in cpl_send, cpl_rcv, cpl_define 
     151      IF ( ltmp_wapatch ) THEN 
     152         nldi_save = nldi   ;   nlei_save = nlei 
     153         nldj_save = nldj   ;   nlej_save = nlej 
     154         IF( nimpp           ==      1 ) nldi = 1 
     155         IF( nimpp + jpi - 1 == jpiglo ) nlei = jpi 
     156         IF( njmpp           ==      1 ) nldj = 1 
     157         IF( njmpp + jpj - 1 == jpjglo ) nlej = jpj 
     158      ENDIF  
    147159      IF(lwp) WRITE(numout,*) 
    148160      IF(lwp) WRITE(numout,*) 'cpl_define : initialization in coupled ocean/atmosphere case' 
     
    296308      IF( nerror /= OASIS_Ok )   CALL oasis_abort ( ncomp_id, 'cpl_define', 'Failure in oasis_enddef') 
    297309      ! 
     310      IF ( ltmp_wapatch ) THEN 
     311         nldi = nldi_save   ;   nlei = nlei_save 
     312         nldj = nldj_save   ;   nlej = nlej_save 
     313      ENDIF 
    298314   END SUBROUTINE cpl_define 
    299315    
     
    313329      INTEGER                                   ::   jc,jm     ! local loop index 
    314330      !!-------------------------------------------------------------------- 
     331      ! patch to restore wraparound rows in cpl_send, cpl_rcv, cpl_define 
     332      IF ( ltmp_wapatch ) THEN 
     333         nldi_save = nldi   ;   nlei_save = nlei 
     334         nldj_save = nldj   ;   nlej_save = nlej 
     335         IF( nimpp           ==      1 ) nldi = 1 
     336         IF( nimpp + jpi - 1 == jpiglo ) nlei = jpi 
     337         IF( njmpp           ==      1 ) nldj = 1 
     338         IF( njmpp + jpj - 1 == jpjglo ) nlej = jpj 
     339      ENDIF 
    315340      ! 
    316341      ! snd data to OASIS3 
     
    341366         ENDDO 
    342367      ENDDO 
     368      IF ( ltmp_wapatch ) THEN 
     369         nldi = nldi_save   ;   nlei = nlei_save 
     370         nldj = nldj_save   ;   nlej = nlej_save 
     371      ENDIF 
    343372      ! 
    344373    END SUBROUTINE cpl_snd 
     
    361390      LOGICAL                                   ::   llaction, llfisrt 
    362391      !!-------------------------------------------------------------------- 
     392      ! patch to restore wraparound rows in cpl_send, cpl_rcv, cpl_define 
     393      IF ( ltmp_wapatch ) THEN 
     394         nldi_save = nldi   ;   nlei_save = nlei 
     395         nldj_save = nldj   ;   nlej_save = nlej 
     396      ENDIF 
    363397      ! 
    364398      ! receive local data from OASIS3 on every process 
     
    367401      ! 
    368402      DO jc = 1, srcv(kid)%nct 
     403         IF ( ltmp_wapatch ) THEN 
     404            IF( nimpp           ==      1 ) nldi = 1 
     405            IF( nimpp + jpi - 1 == jpiglo ) nlei = jpi 
     406            IF( njmpp           ==      1 ) nldj = 1 
     407            IF( njmpp + jpj - 1 == jpjglo ) nlej = jpj 
     408         ENDIF 
    369409         llfisrt = .TRUE. 
    370410 
     
    408448         ENDDO 
    409449 
     450         IF ( ltmp_wapatch ) THEN 
     451            nldi = nldi_save   ;   nlei = nlei_save 
     452            nldj = nldj_save   ;   nlej = nlej_save 
     453         ENDIF 
    410454         !--- Fill the overlap areas and extra hallows (mpp) 
    411455         !--- check periodicity conditions (all cases) 
Note: See TracChangeset for help on using the changeset viewer.