Changeset 10112 for NEMO/trunk
- Timestamp:
- 2018-09-11T12:12:57+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/OCE/SBC/cpl_oasis3.F90
r10068 r10112 69 69 INTEGER, PUBLIC, PARAMETER :: nmaxcat=5 ! Maximum number of coupling fields 70 70 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 71 74 72 75 TYPE, PUBLIC :: FLD_CPL !: Type for coupling field information … … 145 148 !!-------------------------------------------------------------------- 146 149 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 147 159 IF(lwp) WRITE(numout,*) 148 160 IF(lwp) WRITE(numout,*) 'cpl_define : initialization in coupled ocean/atmosphere case' … … 296 308 IF( nerror /= OASIS_Ok ) CALL oasis_abort ( ncomp_id, 'cpl_define', 'Failure in oasis_enddef') 297 309 ! 310 IF ( ltmp_wapatch ) THEN 311 nldi = nldi_save ; nlei = nlei_save 312 nldj = nldj_save ; nlej = nlej_save 313 ENDIF 298 314 END SUBROUTINE cpl_define 299 315 … … 313 329 INTEGER :: jc,jm ! local loop index 314 330 !!-------------------------------------------------------------------- 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 315 340 ! 316 341 ! snd data to OASIS3 … … 341 366 ENDDO 342 367 ENDDO 368 IF ( ltmp_wapatch ) THEN 369 nldi = nldi_save ; nlei = nlei_save 370 nldj = nldj_save ; nlej = nlej_save 371 ENDIF 343 372 ! 344 373 END SUBROUTINE cpl_snd … … 361 390 LOGICAL :: llaction, llfisrt 362 391 !!-------------------------------------------------------------------- 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 363 397 ! 364 398 ! receive local data from OASIS3 on every process … … 367 401 ! 368 402 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 369 409 llfisrt = .TRUE. 370 410 … … 408 448 ENDDO 409 449 450 IF ( ltmp_wapatch ) THEN 451 nldi = nldi_save ; nlei = nlei_save 452 nldj = nldj_save ; nlej = nlej_save 453 ENDIF 410 454 !--- Fill the overlap areas and extra hallows (mpp) 411 455 !--- check periodicity conditions (all cases)
Note: See TracChangeset
for help on using the changeset viewer.