- Timestamp:
- 2016-07-19T10:38:35+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/NERC/dev_r5549_BDY_ZEROGRAD/NEMOGCM/NEMO/OPA_SRC/LBC/lbclnk.F90
r5429 r6808 4 4 !! Ocean : lateral boundary conditions 5 5 !!===================================================================== 6 !! History : OPA ! 1997-06 (G. Madec) 7 !! NEMO 1.0 ! 2002-09 (G. Madec) 6 !! History : OPA ! 1997-06 (G. Madec) Original code 7 !! NEMO 1.0 ! 2002-09 (G. Madec) F90: Free form and module 8 8 !! 3.2 ! 2009-03 (R. Benshila) External north fold treatment 9 !! 3.5 ! 2012 (S.Mocavero, I. Epicoco) Add 'lbc_bdy_lnk' 10 !! and lbc_obc_lnk' routine to optimize 11 !! the BDY/OBC communications 12 !! 3.4 ! 2012-12 (R. Bourdalle-Badie and G. Reffray) add a C1D case 9 !! 3.5 ! 2012 (S.Mocavero, I. Epicoco) optimization of BDY comm. via lbc_bdy_lnk and lbc_obc_lnk 10 !! 3.4 ! 2012-12 (R. Bourdalle-Badie, G. Reffray) add a C1D case 13 11 !!---------------------------------------------------------------------- 14 12 #if defined key_mpp_mpi … … 17 15 !!---------------------------------------------------------------------- 18 16 !! lbc_lnk : generic interface for mpp_lnk_3d and mpp_lnk_2d routines defined in lib_mpp 17 !! lbc_sum : generic interface for mpp_lnk_sum_3d and mpp_lnk_sum_2d routines defined in lib_mpp 19 18 !! lbc_lnk_e : generic interface for mpp_lnk_2d_e routine defined in lib_mpp 20 19 !! lbc_bdy_lnk : generic interface for mpp_lnk_bdy_2d and mpp_lnk_bdy_3d routines defined in lib_mpp 21 20 !!---------------------------------------------------------------------- 22 USE lib_mpp ! distributed memory computing library 23 21 USE lib_mpp ! distributed memory computing library 24 22 25 23 INTERFACE lbc_lnk_multi 26 24 MODULE PROCEDURE mpp_lnk_2d_9 27 25 END INTERFACE 28 26 ! 29 27 INTERFACE lbc_lnk 30 28 MODULE PROCEDURE mpp_lnk_3d_gather, mpp_lnk_3d, mpp_lnk_2d 31 29 END INTERFACE 30 ! 31 !JMM interface not defined if not key_mpp_mpi : likely do not compile without this CPP key !!!! 32 INTERFACE lbc_sum 33 MODULE PROCEDURE mpp_lnk_sum_3d, mpp_lnk_sum_2d 34 END INTERFACE 32 35 33 36 INTERFACE lbc_bdy_lnk 34 37 MODULE PROCEDURE mpp_lnk_bdy_2d, mpp_lnk_bdy_3d 35 38 END INTERFACE 36 39 ! 37 40 INTERFACE lbc_lnk_e 38 41 MODULE PROCEDURE mpp_lnk_2d_e 39 42 END INTERFACE 40 43 ! 41 44 INTERFACE lbc_lnk_icb 42 45 MODULE PROCEDURE mpp_lnk_2d_icb 43 46 END INTERFACE 44 47 45 PUBLIC lbc_lnk ! ocean lateral boundary conditions 46 PUBLIC lbc_lnk_multi ! modified ocean lateral boundary conditions 47 PUBLIC lbc_lnk_e 48 PUBLIC lbc_bdy_lnk ! ocean lateral BDY boundary conditions 49 PUBLIC lbc_lnk_icb 48 PUBLIC lbc_lnk ! ocean lateral boundary conditions 49 PUBLIC lbc_lnk_multi ! modified ocean lateral boundary conditions 50 PUBLIC lbc_sum 51 PUBLIC lbc_lnk_e ! 52 PUBLIC lbc_bdy_lnk ! ocean lateral BDY boundary conditions 53 PUBLIC lbc_lnk_icb ! 50 54 51 55 !!---------------------------------------------------------------------- … … 54 58 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 55 59 !!---------------------------------------------------------------------- 56 57 60 #else 58 61 !!---------------------------------------------------------------------- 59 62 !! Default option shared memory computing 60 63 !!---------------------------------------------------------------------- 61 !! lbc_lnk : generic interface for lbc_lnk_3d and lbc_lnk_2d 62 !! lbc_lnk_3d : set the lateral boundary condition on a 3D variable on ocean mesh 63 !! lbc_lnk_2d : set the lateral boundary condition on a 2D variable on ocean mesh 64 !! lbc_bdy_lnk : set the lateral BDY boundary condition 64 !! lbc_sum : generic interface for mpp_lnk_sum_3d and mpp_lnk_sum_2d 65 !! lbc_lnk_sum_3d: compute sum over the halos on a 3D variable on ocean mesh 66 !! lbc_lnk_sum_3d: compute sum over the halos on a 2D variable on ocean mesh 67 !! lbc_lnk : generic interface for lbc_lnk_3d and lbc_lnk_2d 68 !! lbc_lnk_3d : set the lateral boundary condition on a 3D variable on ocean mesh 69 !! lbc_lnk_2d : set the lateral boundary condition on a 2D variable on ocean mesh 70 !! lbc_bdy_lnk : set the lateral BDY boundary condition 65 71 !!---------------------------------------------------------------------- 66 72 USE oce ! ocean dynamics and tracers … … 75 81 MODULE PROCEDURE lbc_lnk_3d_gather, lbc_lnk_3d, lbc_lnk_2d 76 82 END INTERFACE 83 ! 84 INTERFACE lbc_sum 85 MODULE PROCEDURE mpp_lnk_sum_3d, mpp_lnk_sum_2d 86 END INTERFACE 77 87 78 88 INTERFACE lbc_lnk_e 79 89 MODULE PROCEDURE lbc_lnk_2d_e 80 90 END INTERFACE 81 91 ! 82 92 INTERFACE lbc_bdy_lnk 83 93 MODULE PROCEDURE lbc_bdy_lnk_2d, lbc_bdy_lnk_3d 84 94 END INTERFACE 85 95 ! 86 96 INTERFACE lbc_lnk_icb 87 97 MODULE PROCEDURE lbc_lnk_2d_e … … 89 99 90 100 PUBLIC lbc_lnk ! ocean/ice lateral boundary conditions 91 PUBLIC lbc_lnk_e 101 PUBLIC lbc_lnk_e ! 92 102 PUBLIC lbc_bdy_lnk ! ocean lateral BDY boundary conditions 93 PUBLIC lbc_lnk_icb 103 PUBLIC lbc_lnk_icb ! 94 104 95 105 !!---------------------------------------------------------------------- 96 !! NEMO/OPA 3. 3 , NEMO Consortium (2010)106 !! NEMO/OPA 3.7 , NEMO Consortium (2015) 97 107 !! $Id$ 98 108 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) … … 230 240 ! this is in mpp case. In this module, just do nothing 231 241 ELSE 232 !233 242 ! ! East-West boundaries 234 243 ! ! ====================== … … 249 258 ! 250 259 END SELECT 251 !252 260 ! ! North-South boundaries 253 261 ! ! ====================== … … 287 295 END SUBROUTINE lbc_lnk_3d 288 296 297 289 298 SUBROUTINE lbc_lnk_2d( pt2d, cd_type, psgn, cd_mpp, pval ) 290 299 !!--------------------------------------------------------------------- … … 316 325 ! this is in mpp case. In this module, just do nothing 317 326 ELSE 318 !319 327 ! ! East-West boundaries 320 328 ! ! ==================== … … 335 343 ! 336 344 END SELECT 337 !338 345 ! ! North-South boundaries 339 346 ! ! ====================== … … 375 382 #endif 376 383 377 378 384 SUBROUTINE lbc_bdy_lnk_3d( pt3d, cd_type, psgn, ib_bdy ) 379 385 !!--------------------------------------------------------------------- … … 381 387 !! 382 388 !! ** Purpose : wrapper rountine to 'lbc_lnk_3d'. This wrapper is used 383 !! to maintain the same interface with regards to the mpp384 ! case385 !! 386 !!----------------------------------------------------------------------387 CHARACTER(len=1) , INTENT(in ) :: cd_type ! nature of pt3d grid-points388 REAL(wp) , DIMENSION(jpi,jpj,jpk), INTENT(inout) :: pt3d ! 3D array on which the lbc is applied389 REAL(wp) , INTENT(in ) :: psgn ! control of the sign390 INTEGER :: ib_bdy ! BDY boundary set391 ! !389 !! to maintain the same interface with regards to the mpp case 390 !! 391 !!---------------------------------------------------------------------- 392 CHARACTER(len=1) , INTENT(in ) :: cd_type ! nature of pt3d grid-points 393 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: pt3d ! 3D array on which the lbc is applied 394 REAL(wp) , INTENT(in ) :: psgn ! control of the sign 395 INTEGER , INTENT(in ) :: ib_bdy ! BDY boundary set 396 !!---------------------------------------------------------------------- 397 ! 392 398 CALL lbc_lnk_3d( pt3d, cd_type, psgn) 393 399 ! 394 400 END SUBROUTINE lbc_bdy_lnk_3d 395 401 402 396 403 SUBROUTINE lbc_bdy_lnk_2d( pt2d, cd_type, psgn, ib_bdy ) 397 404 !!--------------------------------------------------------------------- … … 399 406 !! 400 407 !! ** Purpose : wrapper rountine to 'lbc_lnk_3d'. This wrapper is used 401 !! to maintain the same interface with regards to the mpp402 ! case403 !! 404 !!----------------------------------------------------------------------405 CHARACTER(len=1) , INTENT(in ) :: cd_type ! nature of pt3d grid-points406 REAL(wp) , DIMENSION(jpi,jpj), INTENT(inout) :: pt2d ! 3D array on which the lbc is applied407 REAL(wp) , INTENT(in ) :: psgn ! control of the sign408 INTEGER :: ib_bdy ! BDY boundary set409 ! !408 !! to maintain the same interface with regards to the mpp case 409 !! 410 !!---------------------------------------------------------------------- 411 CHARACTER(len=1) , INTENT(in ) :: cd_type ! nature of pt3d grid-points 412 REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: pt2d ! 3D array on which the lbc is applied 413 REAL(wp) , INTENT(in ) :: psgn ! control of the sign 414 INTEGER , INTENT(in ) :: ib_bdy ! BDY boundary set 415 !!---------------------------------------------------------------------- 416 ! 410 417 CALL lbc_lnk_2d( pt2d, cd_type, psgn) 411 418 ! 412 419 END SUBROUTINE lbc_bdy_lnk_2d 413 420 … … 426 433 !! for closed boundaries. 427 434 !!---------------------------------------------------------------------- 428 CHARACTER(len=1) , INTENT(in ) 429 REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) 430 REAL(wp) , INTENT(in ) 431 INTEGER , INTENT(in ) 432 INTEGER , INTENT(in ) 433 !!---------------------------------------------------------------------- 434 435 CHARACTER(len=1) , INTENT(in ) :: cd_type ! nature of pt3d grid-points 436 REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: pt2d ! 2D array on which the lbc is applied 437 REAL(wp) , INTENT(in ) :: psgn ! control of the sign 438 INTEGER , INTENT(in ) :: jpri ! size of extra halo (not needed in non-mpp) 439 INTEGER , INTENT(in ) :: jprj ! size of extra halo (not needed in non-mpp) 440 !!---------------------------------------------------------------------- 441 ! 435 442 CALL lbc_lnk_2d( pt2d, cd_type, psgn ) 436 443 !
Note: See TracChangeset
for help on using the changeset viewer.