Changeset 3720 for trunk/NEMOGCM/NEMO/OPA_SRC/LBC
- Timestamp:
- 2012-12-04T11:10:08+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/OPA_SRC/LBC/lbclnk.F90
r2442 r3720 7 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 !!---------------------------------------------------------------------- 10 #if defined key_mpp_mpi 9 !! 3.4 ! 2012-12 (R. Bourdalle-Badie and G. Reffray) add a C1D case 10 !!---------------------------------------------------------------------- 11 #if defined key_mpp_mpi 11 12 !!---------------------------------------------------------------------- 12 13 !! 'key_mpp_mpi' MPI massively parallel processing library … … 67 68 !!---------------------------------------------------------------------- 68 69 CONTAINS 70 71 # if defined key_c1d 72 !!---------------------------------------------------------------------- 73 !! 'key_c1d' 1D configuration 74 !!---------------------------------------------------------------------- 75 76 SUBROUTINE lbc_lnk_3d_gather( pt3d1, cd_type1, pt3d2, cd_type2, psgn ) 77 !!--------------------------------------------------------------------- 78 !! *** ROUTINE lbc_lnk_3d_gather *** 79 !! 80 !! ** Purpose : set lateral boundary conditions on two 3D arrays (C1D case) 81 !! 82 !! ** Method : call lbc_lnk_3d on pt3d1 and pt3d2 83 !!---------------------------------------------------------------------- 84 CHARACTER(len=1) , INTENT(in ) :: cd_type1, cd_type2 ! nature of pt3d grid-points 85 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: pt3d1 , pt3d2 ! 3D array on which the lbc is applied 86 REAL(wp) , INTENT(in ) :: psgn ! control of the sign 87 !!---------------------------------------------------------------------- 88 ! 89 CALL lbc_lnk_3d( pt3d1, cd_type1, psgn) 90 CALL lbc_lnk_3d( pt3d2, cd_type2, psgn) 91 ! 92 END SUBROUTINE lbc_lnk_3d_gather 93 94 95 SUBROUTINE lbc_lnk_3d( pt3d, cd_type, psgn, cd_mpp, pval ) 96 !!--------------------------------------------------------------------- 97 !! *** ROUTINE lbc_lnk_3d *** 98 !! 99 !! ** Purpose : set lateral boundary conditions on a 3D array (C1D case) 100 !! 101 !! ** Method : 1D case, the central water column is set everywhere 102 !!---------------------------------------------------------------------- 103 CHARACTER(len=1) , INTENT(in ) :: cd_type ! nature of pt3d grid-points 104 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: pt3d ! 3D array on which the lbc is applied 105 REAL(wp) , INTENT(in ) :: psgn ! control of the sign 106 CHARACTER(len=3) , INTENT(in ), OPTIONAL :: cd_mpp ! MPP only (here do nothing) 107 REAL(wp) , INTENT(in ), OPTIONAL :: pval ! background value (for closed boundaries) 108 ! 109 INTEGER :: jk ! dummy loop index 110 REAL(wp) :: ztab ! local scalar 111 !!---------------------------------------------------------------------- 112 ! 113 DO jk = 1, jpk 114 ztab = pt3d(2,2,jk) 115 pt3d(:,:,jk) = ztab 116 END DO 117 ! 118 END SUBROUTINE lbc_lnk_3d 119 120 121 SUBROUTINE lbc_lnk_2d( pt2d, cd_type, psgn, cd_mpp, pval ) 122 !!--------------------------------------------------------------------- 123 !! *** ROUTINE lbc_lnk_2d *** 124 !! 125 !! ** Purpose : set lateral boundary conditions on a 2D array (non mpp case) 126 !! 127 !! ** Method : 1D case, the central water column is set everywhere 128 !!---------------------------------------------------------------------- 129 CHARACTER(len=1) , INTENT(in ) :: cd_type ! nature of pt3d grid-points 130 REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: pt2d ! 2D array on which the lbc is applied 131 REAL(wp) , INTENT(in ) :: psgn ! control of the sign 132 CHARACTER(len=3) , INTENT(in ), OPTIONAL :: cd_mpp ! MPP only (here do nothing) 133 REAL(wp) , INTENT(in ), OPTIONAL :: pval ! background value (for closed boundaries) 134 ! 135 REAL(wp) :: ztab ! local scalar 136 !!---------------------------------------------------------------------- 137 ! 138 ztab = pt2d(2,2) 139 pt2d(:,:) = ztab 140 ! 141 END SUBROUTINE lbc_lnk_2d 142 143 #else 144 !!---------------------------------------------------------------------- 145 !! Default option 3D shared memory computing 146 !!---------------------------------------------------------------------- 69 147 70 148 SUBROUTINE lbc_lnk_3d_gather( pt3d1, cd_type1, pt3d2, cd_type2, psgn ) … … 113 191 114 192 IF( PRESENT( pval ) ) THEN ; zland = pval ! set land value (zero by default) 115 ELSE ; zland = 0. e0193 ELSE ; zland = 0._wp 116 194 ENDIF 117 195 … … 203 281 204 282 IF( PRESENT( pval ) ) THEN ; zland = pval ! set land value (zero by default) 205 ELSE ; zland = 0. e0283 ELSE ; zland = 0._wp 206 284 ENDIF 207 285 … … 270 348 END SUBROUTINE lbc_lnk_2d 271 349 350 # endif 272 351 #endif 273 352
Note: See TracChangeset
for help on using the changeset viewer.