[3] | 1 | MODULE lbclnk |
---|
| 2 | !!====================================================================== |
---|
[232] | 3 | !! *** MODULE lbclnk *** |
---|
[3] | 4 | !! Ocean : lateral boundary conditions |
---|
| 5 | !!===================================================================== |
---|
[2335] | 6 | !! History : OPA ! 1997-06 (G. Madec) Original code |
---|
| 7 | !! NEMO 1.0 ! 2002-09 (G. Madec) F90: Free form and module |
---|
| 8 | !! 3.2 ! 2009-03 (R. Benshila) External north fold treatment |
---|
[3680] | 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 |
---|
[3764] | 12 | !! 3.4 ! 2012-12 (R. Bourdalle-Badie and G. Reffray) add a C1D case |
---|
[1344] | 13 | !!---------------------------------------------------------------------- |
---|
[3764] | 14 | #if defined key_mpp_mpi |
---|
[3] | 15 | !!---------------------------------------------------------------------- |
---|
[2335] | 16 | !! 'key_mpp_mpi' MPI massively parallel processing library |
---|
[3] | 17 | !!---------------------------------------------------------------------- |
---|
[2335] | 18 | !! lbc_lnk : generic interface for mpp_lnk_3d and mpp_lnk_2d routines defined in lib_mpp |
---|
| 19 | !! lbc_lnk_e : generic interface for mpp_lnk_2d_e routine defined in lib_mpp |
---|
[3680] | 20 | !! lbc_bdy_lnk : generic interface for mpp_lnk_bdy_2d and mpp_lnk_bdy_3d routines defined in lib_mpp |
---|
[15] | 21 | !!---------------------------------------------------------------------- |
---|
[3] | 22 | USE lib_mpp ! distributed memory computing library |
---|
| 23 | |
---|
| 24 | INTERFACE lbc_lnk |
---|
[473] | 25 | MODULE PROCEDURE mpp_lnk_3d_gather, mpp_lnk_3d, mpp_lnk_2d |
---|
[3] | 26 | END INTERFACE |
---|
| 27 | |
---|
[3680] | 28 | INTERFACE lbc_bdy_lnk |
---|
| 29 | MODULE PROCEDURE mpp_lnk_bdy_2d, mpp_lnk_bdy_3d |
---|
| 30 | END INTERFACE |
---|
| 31 | |
---|
[311] | 32 | INTERFACE lbc_lnk_e |
---|
| 33 | MODULE PROCEDURE mpp_lnk_2d_e |
---|
| 34 | END INTERFACE |
---|
| 35 | |
---|
[3] | 36 | PUBLIC lbc_lnk ! ocean lateral boundary conditions |
---|
[311] | 37 | PUBLIC lbc_lnk_e |
---|
[3680] | 38 | PUBLIC lbc_bdy_lnk ! ocean lateral BDY boundary conditions |
---|
[2335] | 39 | |
---|
[3] | 40 | !!---------------------------------------------------------------------- |
---|
[2335] | 41 | !! NEMO/OPA 3.3 , NEMO Consortium (2010) |
---|
| 42 | !! $Id$ |
---|
| 43 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
| 44 | !!---------------------------------------------------------------------- |
---|
[3] | 45 | |
---|
| 46 | #else |
---|
| 47 | !!---------------------------------------------------------------------- |
---|
| 48 | !! Default option shared memory computing |
---|
| 49 | !!---------------------------------------------------------------------- |
---|
| 50 | !! lbc_lnk : generic interface for lbc_lnk_3d and lbc_lnk_2d |
---|
[2335] | 51 | !! lbc_lnk_3d : set the lateral boundary condition on a 3D variable on ocean mesh |
---|
| 52 | !! lbc_lnk_2d : set the lateral boundary condition on a 2D variable on ocean mesh |
---|
[3680] | 53 | !! lbc_bdy_lnk : set the lateral BDY boundary condition |
---|
[3] | 54 | !!---------------------------------------------------------------------- |
---|
| 55 | USE oce ! ocean dynamics and tracers |
---|
| 56 | USE dom_oce ! ocean space and time domain |
---|
| 57 | USE in_out_manager ! I/O manager |
---|
[1344] | 58 | USE lbcnfd ! north fold |
---|
[3] | 59 | |
---|
| 60 | IMPLICIT NONE |
---|
| 61 | PRIVATE |
---|
| 62 | |
---|
| 63 | INTERFACE lbc_lnk |
---|
[473] | 64 | MODULE PROCEDURE lbc_lnk_3d_gather, lbc_lnk_3d, lbc_lnk_2d |
---|
[3] | 65 | END INTERFACE |
---|
| 66 | |
---|
[311] | 67 | INTERFACE lbc_lnk_e |
---|
[3609] | 68 | MODULE PROCEDURE lbc_lnk_2d_e |
---|
[311] | 69 | END INTERFACE |
---|
| 70 | |
---|
[3680] | 71 | INTERFACE lbc_bdy_lnk |
---|
| 72 | MODULE PROCEDURE lbc_bdy_lnk_2d, lbc_bdy_lnk_3d |
---|
| 73 | END INTERFACE |
---|
| 74 | |
---|
[2335] | 75 | PUBLIC lbc_lnk ! ocean/ice lateral boundary conditions |
---|
| 76 | PUBLIC lbc_lnk_e |
---|
[3680] | 77 | PUBLIC lbc_bdy_lnk ! ocean lateral BDY boundary conditions |
---|
[2335] | 78 | |
---|
[3] | 79 | !!---------------------------------------------------------------------- |
---|
[2335] | 80 | !! NEMO/OPA 3.3 , NEMO Consortium (2010) |
---|
| 81 | !! $Id$ |
---|
| 82 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
| 83 | !!---------------------------------------------------------------------- |
---|
[3] | 84 | CONTAINS |
---|
| 85 | |
---|
[3764] | 86 | # if defined key_c1d |
---|
| 87 | !!---------------------------------------------------------------------- |
---|
| 88 | !! 'key_c1d' 1D configuration |
---|
| 89 | !!---------------------------------------------------------------------- |
---|
| 90 | |
---|
[473] | 91 | SUBROUTINE lbc_lnk_3d_gather( pt3d1, cd_type1, pt3d2, cd_type2, psgn ) |
---|
[3] | 92 | !!--------------------------------------------------------------------- |
---|
[473] | 93 | !! *** ROUTINE lbc_lnk_3d_gather *** |
---|
| 94 | !! |
---|
[3764] | 95 | !! ** Purpose : set lateral boundary conditions on two 3D arrays (C1D case) |
---|
| 96 | !! |
---|
| 97 | !! ** Method : call lbc_lnk_3d on pt3d1 and pt3d2 |
---|
| 98 | !!---------------------------------------------------------------------- |
---|
| 99 | CHARACTER(len=1) , INTENT(in ) :: cd_type1, cd_type2 ! nature of pt3d grid-points |
---|
| 100 | REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: pt3d1 , pt3d2 ! 3D array on which the lbc is applied |
---|
| 101 | REAL(wp) , INTENT(in ) :: psgn ! control of the sign |
---|
| 102 | !!---------------------------------------------------------------------- |
---|
| 103 | ! |
---|
| 104 | CALL lbc_lnk_3d( pt3d1, cd_type1, psgn) |
---|
| 105 | CALL lbc_lnk_3d( pt3d2, cd_type2, psgn) |
---|
| 106 | ! |
---|
| 107 | END SUBROUTINE lbc_lnk_3d_gather |
---|
| 108 | |
---|
| 109 | |
---|
| 110 | SUBROUTINE lbc_lnk_3d( pt3d, cd_type, psgn, cd_mpp, pval ) |
---|
| 111 | !!--------------------------------------------------------------------- |
---|
| 112 | !! *** ROUTINE lbc_lnk_3d *** |
---|
| 113 | !! |
---|
| 114 | !! ** Purpose : set lateral boundary conditions on a 3D array (C1D case) |
---|
| 115 | !! |
---|
| 116 | !! ** Method : 1D case, the central water column is set everywhere |
---|
| 117 | !!---------------------------------------------------------------------- |
---|
| 118 | CHARACTER(len=1) , INTENT(in ) :: cd_type ! nature of pt3d grid-points |
---|
| 119 | REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: pt3d ! 3D array on which the lbc is applied |
---|
| 120 | REAL(wp) , INTENT(in ) :: psgn ! control of the sign |
---|
| 121 | CHARACTER(len=3) , INTENT(in ), OPTIONAL :: cd_mpp ! MPP only (here do nothing) |
---|
| 122 | REAL(wp) , INTENT(in ), OPTIONAL :: pval ! background value (for closed boundaries) |
---|
| 123 | ! |
---|
| 124 | INTEGER :: jk ! dummy loop index |
---|
| 125 | REAL(wp) :: ztab ! local scalar |
---|
| 126 | !!---------------------------------------------------------------------- |
---|
| 127 | ! |
---|
| 128 | DO jk = 1, jpk |
---|
| 129 | ztab = pt3d(2,2,jk) |
---|
| 130 | pt3d(:,:,jk) = ztab |
---|
| 131 | END DO |
---|
| 132 | ! |
---|
| 133 | END SUBROUTINE lbc_lnk_3d |
---|
| 134 | |
---|
| 135 | |
---|
| 136 | SUBROUTINE lbc_lnk_2d( pt2d, cd_type, psgn, cd_mpp, pval ) |
---|
| 137 | !!--------------------------------------------------------------------- |
---|
| 138 | !! *** ROUTINE lbc_lnk_2d *** |
---|
| 139 | !! |
---|
| 140 | !! ** Purpose : set lateral boundary conditions on a 2D array (non mpp case) |
---|
| 141 | !! |
---|
| 142 | !! ** Method : 1D case, the central water column is set everywhere |
---|
| 143 | !!---------------------------------------------------------------------- |
---|
| 144 | CHARACTER(len=1) , INTENT(in ) :: cd_type ! nature of pt3d grid-points |
---|
| 145 | REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: pt2d ! 2D array on which the lbc is applied |
---|
| 146 | REAL(wp) , INTENT(in ) :: psgn ! control of the sign |
---|
| 147 | CHARACTER(len=3) , INTENT(in ), OPTIONAL :: cd_mpp ! MPP only (here do nothing) |
---|
| 148 | REAL(wp) , INTENT(in ), OPTIONAL :: pval ! background value (for closed boundaries) |
---|
| 149 | ! |
---|
| 150 | REAL(wp) :: ztab ! local scalar |
---|
| 151 | !!---------------------------------------------------------------------- |
---|
| 152 | ! |
---|
| 153 | ztab = pt2d(2,2) |
---|
| 154 | pt2d(:,:) = ztab |
---|
| 155 | ! |
---|
| 156 | END SUBROUTINE lbc_lnk_2d |
---|
| 157 | |
---|
| 158 | #else |
---|
| 159 | !!---------------------------------------------------------------------- |
---|
| 160 | !! Default option 3D shared memory computing |
---|
| 161 | !!---------------------------------------------------------------------- |
---|
| 162 | |
---|
| 163 | SUBROUTINE lbc_lnk_3d_gather( pt3d1, cd_type1, pt3d2, cd_type2, psgn ) |
---|
| 164 | !!--------------------------------------------------------------------- |
---|
| 165 | !! *** ROUTINE lbc_lnk_3d_gather *** |
---|
| 166 | !! |
---|
[2335] | 167 | !! ** Purpose : set lateral boundary conditions on two 3D arrays (non mpp case) |
---|
[473] | 168 | !! |
---|
[2335] | 169 | !! ** Method : psign = -1 : change the sign across the north fold |
---|
| 170 | !! = 1 : no change of the sign across the north fold |
---|
| 171 | !! = 0 : no change of the sign across the north fold and |
---|
| 172 | !! strict positivity preserved: use inner row/column |
---|
| 173 | !! for closed boundaries. |
---|
[473] | 174 | !!---------------------------------------------------------------------- |
---|
[2335] | 175 | CHARACTER(len=1) , INTENT(in ) :: cd_type1, cd_type2 ! nature of pt3d grid-points |
---|
| 176 | REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: pt3d1 , pt3d2 ! 3D array on which the lbc is applied |
---|
| 177 | REAL(wp) , INTENT(in ) :: psgn ! control of the sign |
---|
| 178 | !!---------------------------------------------------------------------- |
---|
| 179 | ! |
---|
[1344] | 180 | CALL lbc_lnk_3d( pt3d1, cd_type1, psgn) |
---|
| 181 | CALL lbc_lnk_3d( pt3d2, cd_type2, psgn) |
---|
[2335] | 182 | ! |
---|
[473] | 183 | END SUBROUTINE lbc_lnk_3d_gather |
---|
| 184 | |
---|
| 185 | |
---|
[888] | 186 | SUBROUTINE lbc_lnk_3d( pt3d, cd_type, psgn, cd_mpp, pval ) |
---|
[473] | 187 | !!--------------------------------------------------------------------- |
---|
[3] | 188 | !! *** ROUTINE lbc_lnk_3d *** |
---|
| 189 | !! |
---|
[2335] | 190 | !! ** Purpose : set lateral boundary conditions on a 3D array (non mpp case) |
---|
[3] | 191 | !! |
---|
[2335] | 192 | !! ** Method : psign = -1 : change the sign across the north fold |
---|
| 193 | !! = 1 : no change of the sign across the north fold |
---|
| 194 | !! = 0 : no change of the sign across the north fold and |
---|
| 195 | !! strict positivity preserved: use inner row/column |
---|
| 196 | !! for closed boundaries. |
---|
| 197 | !!---------------------------------------------------------------------- |
---|
| 198 | CHARACTER(len=1) , INTENT(in ) :: cd_type ! nature of pt3d grid-points |
---|
| 199 | REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: pt3d ! 3D array on which the lbc is applied |
---|
| 200 | REAL(wp) , INTENT(in ) :: psgn ! control of the sign |
---|
| 201 | CHARACTER(len=3) , INTENT(in ), OPTIONAL :: cd_mpp ! MPP only (here do nothing) |
---|
| 202 | REAL(wp) , INTENT(in ), OPTIONAL :: pval ! background value (for closed boundaries) |
---|
[3] | 203 | !! |
---|
[2335] | 204 | REAL(wp) :: zland |
---|
[3] | 205 | !!---------------------------------------------------------------------- |
---|
| 206 | |
---|
[2335] | 207 | IF( PRESENT( pval ) ) THEN ; zland = pval ! set land value (zero by default) |
---|
[3764] | 208 | ELSE ; zland = 0._wp |
---|
[888] | 209 | ENDIF |
---|
| 210 | |
---|
| 211 | |
---|
| 212 | IF( PRESENT( cd_mpp ) ) THEN |
---|
[473] | 213 | ! only fill the overlap area and extra allows |
---|
| 214 | ! this is in mpp case. In this module, just do nothing |
---|
| 215 | ELSE |
---|
[2335] | 216 | ! |
---|
[1344] | 217 | ! ! East-West boundaries |
---|
| 218 | ! ! ====================== |
---|
[3] | 219 | SELECT CASE ( nperio ) |
---|
[1344] | 220 | ! |
---|
| 221 | CASE ( 1 , 4 , 6 ) !** cyclic east-west |
---|
| 222 | pt3d( 1 ,:,:) = pt3d(jpim1,:,:) ! all points |
---|
| 223 | pt3d(jpi,:,:) = pt3d( 2 ,:,:) |
---|
| 224 | ! |
---|
| 225 | CASE DEFAULT !** East closed -- West closed |
---|
[3] | 226 | SELECT CASE ( cd_type ) |
---|
| 227 | CASE ( 'T' , 'U' , 'V' , 'W' ) ! T-, U-, V-, W-points |
---|
[1344] | 228 | pt3d( 1 ,:,:) = zland |
---|
| 229 | pt3d(jpi,:,:) = zland |
---|
[3] | 230 | CASE ( 'F' ) ! F-point |
---|
[1344] | 231 | pt3d(jpi,:,:) = zland |
---|
[3] | 232 | END SELECT |
---|
[1344] | 233 | ! |
---|
[3] | 234 | END SELECT |
---|
[2335] | 235 | ! |
---|
[3] | 236 | ! ! North-South boundaries |
---|
| 237 | ! ! ====================== |
---|
| 238 | SELECT CASE ( nperio ) |
---|
[1344] | 239 | ! |
---|
| 240 | CASE ( 2 ) !** South symmetric -- North closed |
---|
[3] | 241 | SELECT CASE ( cd_type ) |
---|
| 242 | CASE ( 'T' , 'U' , 'W' ) ! T-, U-, W-points |
---|
[1344] | 243 | pt3d(:, 1 ,:) = pt3d(:,3,:) |
---|
| 244 | pt3d(:,jpj,:) = zland |
---|
[3] | 245 | CASE ( 'V' , 'F' ) ! V-, F-points |
---|
[1344] | 246 | pt3d(:, 1 ,:) = psgn * pt3d(:,2,:) |
---|
| 247 | pt3d(:,jpj,:) = zland |
---|
[3] | 248 | END SELECT |
---|
[1344] | 249 | ! |
---|
| 250 | CASE ( 3 , 4 , 5 , 6 ) !** North fold T or F-point pivot -- South closed |
---|
| 251 | SELECT CASE ( cd_type ) ! South : closed |
---|
| 252 | CASE ( 'T' , 'U' , 'V' , 'W' , 'I' ) ! all points except F-point |
---|
| 253 | pt3d(:, 1 ,:) = zland |
---|
[3] | 254 | END SELECT |
---|
[1344] | 255 | ! ! North fold |
---|
| 256 | CALL lbc_nfd( pt3d(:,:,:), cd_type, psgn ) |
---|
| 257 | ! |
---|
| 258 | CASE DEFAULT !** North closed -- South closed |
---|
[3] | 259 | SELECT CASE ( cd_type ) |
---|
[1344] | 260 | CASE ( 'T' , 'U' , 'V' , 'W' ) ! T-, U-, V-, W-points |
---|
| 261 | pt3d(:, 1 ,:) = zland |
---|
| 262 | pt3d(:,jpj,:) = zland |
---|
[3] | 263 | CASE ( 'F' ) ! F-point |
---|
[1344] | 264 | pt3d(:,jpj,:) = zland |
---|
[3] | 265 | END SELECT |
---|
[1344] | 266 | ! |
---|
| 267 | END SELECT |
---|
[2335] | 268 | ! |
---|
[1344] | 269 | ENDIF |
---|
[2335] | 270 | ! |
---|
[3] | 271 | END SUBROUTINE lbc_lnk_3d |
---|
| 272 | |
---|
[888] | 273 | SUBROUTINE lbc_lnk_2d( pt2d, cd_type, psgn, cd_mpp, pval ) |
---|
[3] | 274 | !!--------------------------------------------------------------------- |
---|
| 275 | !! *** ROUTINE lbc_lnk_2d *** |
---|
| 276 | !! |
---|
[2335] | 277 | !! ** Purpose : set lateral boundary conditions on a 2D array (non mpp case) |
---|
[3] | 278 | !! |
---|
[2335] | 279 | !! ** Method : psign = -1 : change the sign across the north fold |
---|
| 280 | !! = 1 : no change of the sign across the north fold |
---|
| 281 | !! = 0 : no change of the sign across the north fold and |
---|
| 282 | !! strict positivity preserved: use inner row/column |
---|
| 283 | !! for closed boundaries. |
---|
| 284 | !!---------------------------------------------------------------------- |
---|
| 285 | CHARACTER(len=1) , INTENT(in ) :: cd_type ! nature of pt3d grid-points |
---|
[2339] | 286 | REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: pt2d ! 2D array on which the lbc is applied |
---|
[2335] | 287 | REAL(wp) , INTENT(in ) :: psgn ! control of the sign |
---|
| 288 | CHARACTER(len=3) , INTENT(in ), OPTIONAL :: cd_mpp ! MPP only (here do nothing) |
---|
| 289 | REAL(wp) , INTENT(in ), OPTIONAL :: pval ! background value (for closed boundaries) |
---|
[3] | 290 | !! |
---|
[2335] | 291 | REAL(wp) :: zland |
---|
[3] | 292 | !!---------------------------------------------------------------------- |
---|
| 293 | |
---|
[2335] | 294 | IF( PRESENT( pval ) ) THEN ; zland = pval ! set land value (zero by default) |
---|
[3764] | 295 | ELSE ; zland = 0._wp |
---|
[888] | 296 | ENDIF |
---|
| 297 | |
---|
[473] | 298 | IF (PRESENT(cd_mpp)) THEN |
---|
| 299 | ! only fill the overlap area and extra allows |
---|
| 300 | ! this is in mpp case. In this module, just do nothing |
---|
| 301 | ELSE |
---|
[2335] | 302 | ! |
---|
[1344] | 303 | ! ! East-West boundaries |
---|
| 304 | ! ! ==================== |
---|
| 305 | SELECT CASE ( nperio ) |
---|
| 306 | ! |
---|
| 307 | CASE ( 1 , 4 , 6 ) !** cyclic east-west |
---|
| 308 | pt2d( 1 ,:) = pt2d(jpim1,:) ! all points |
---|
| 309 | pt2d(jpi,:) = pt2d( 2 ,:) |
---|
| 310 | ! |
---|
| 311 | CASE DEFAULT !** East closed -- West closed |
---|
| 312 | SELECT CASE ( cd_type ) |
---|
| 313 | CASE ( 'T' , 'U' , 'V' , 'W' ) ! T-, U-, V-, W-points |
---|
| 314 | pt2d( 1 ,:) = zland |
---|
| 315 | pt2d(jpi,:) = zland |
---|
| 316 | CASE ( 'F' ) ! F-point |
---|
| 317 | pt2d(jpi,:) = zland |
---|
| 318 | END SELECT |
---|
| 319 | ! |
---|
[3] | 320 | END SELECT |
---|
[2335] | 321 | ! |
---|
[1344] | 322 | ! ! North-South boundaries |
---|
| 323 | ! ! ====================== |
---|
| 324 | SELECT CASE ( nperio ) |
---|
| 325 | ! |
---|
| 326 | CASE ( 2 ) !** South symmetric -- North closed |
---|
| 327 | SELECT CASE ( cd_type ) |
---|
| 328 | CASE ( 'T' , 'U' , 'W' ) ! T-, U-, W-points |
---|
| 329 | pt2d(:, 1 ) = pt2d(:,3) |
---|
| 330 | pt2d(:,jpj) = zland |
---|
| 331 | CASE ( 'V' , 'F' ) ! V-, F-points |
---|
| 332 | pt2d(:, 1 ) = psgn * pt2d(:,2) |
---|
| 333 | pt2d(:,jpj) = zland |
---|
| 334 | END SELECT |
---|
| 335 | ! |
---|
| 336 | CASE ( 3 , 4 , 5 , 6 ) !** North fold T or F-point pivot -- South closed |
---|
| 337 | SELECT CASE ( cd_type ) ! South : closed |
---|
| 338 | CASE ( 'T' , 'U' , 'V' , 'W' , 'I' ) ! all points except F-point |
---|
| 339 | pt2d(:, 1 ) = zland |
---|
| 340 | END SELECT |
---|
| 341 | ! ! North fold |
---|
| 342 | CALL lbc_nfd( pt2d(:,:), cd_type, psgn ) |
---|
| 343 | ! |
---|
| 344 | CASE DEFAULT !** North closed -- South closed |
---|
| 345 | SELECT CASE ( cd_type ) |
---|
| 346 | CASE ( 'T' , 'U' , 'V' , 'W' ) ! T-, U-, V-, W-points |
---|
| 347 | pt2d(:, 1 ) = zland |
---|
| 348 | pt2d(:,jpj) = zland |
---|
| 349 | CASE ( 'F' ) ! F-point |
---|
| 350 | pt2d(:,jpj) = zland |
---|
| 351 | END SELECT |
---|
| 352 | ! |
---|
[3] | 353 | END SELECT |
---|
[2335] | 354 | ! |
---|
[473] | 355 | ENDIF |
---|
[2335] | 356 | ! |
---|
[3] | 357 | END SUBROUTINE lbc_lnk_2d |
---|
| 358 | |
---|
[4153] | 359 | #endif |
---|
| 360 | |
---|
| 361 | |
---|
| 362 | SUBROUTINE lbc_bdy_lnk_3d( pt3d, cd_type, psgn, ib_bdy ) |
---|
| 363 | !!--------------------------------------------------------------------- |
---|
| 364 | !! *** ROUTINE lbc_bdy_lnk *** |
---|
| 365 | !! |
---|
| 366 | !! ** Purpose : wrapper rountine to 'lbc_lnk_3d'. This wrapper is used |
---|
| 367 | !! to maintain the same interface with regards to the mpp |
---|
| 368 | !case |
---|
| 369 | !! |
---|
| 370 | !!---------------------------------------------------------------------- |
---|
| 371 | CHARACTER(len=1) , INTENT(in ) :: cd_type ! nature of pt3d grid-points |
---|
| 372 | REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: pt3d ! 3D array on which the lbc is applied |
---|
| 373 | REAL(wp) , INTENT(in ) :: psgn ! control of the sign |
---|
| 374 | INTEGER :: ib_bdy ! BDY boundary set |
---|
| 375 | !! |
---|
| 376 | CALL lbc_lnk_3d( pt3d, cd_type, psgn) |
---|
| 377 | |
---|
| 378 | END SUBROUTINE lbc_bdy_lnk_3d |
---|
| 379 | |
---|
| 380 | SUBROUTINE lbc_bdy_lnk_2d( pt2d, cd_type, psgn, ib_bdy ) |
---|
| 381 | !!--------------------------------------------------------------------- |
---|
| 382 | !! *** ROUTINE lbc_bdy_lnk *** |
---|
| 383 | !! |
---|
| 384 | !! ** Purpose : wrapper rountine to 'lbc_lnk_3d'. This wrapper is used |
---|
| 385 | !! to maintain the same interface with regards to the mpp |
---|
| 386 | !case |
---|
| 387 | !! |
---|
| 388 | !!---------------------------------------------------------------------- |
---|
| 389 | CHARACTER(len=1) , INTENT(in ) :: cd_type ! nature of pt3d grid-points |
---|
| 390 | REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: pt2d ! 3D array on which the lbc is applied |
---|
| 391 | REAL(wp) , INTENT(in ) :: psgn ! control of the sign |
---|
| 392 | INTEGER :: ib_bdy ! BDY boundary set |
---|
| 393 | !! |
---|
| 394 | CALL lbc_lnk_2d( pt2d, cd_type, psgn) |
---|
| 395 | |
---|
| 396 | END SUBROUTINE lbc_bdy_lnk_2d |
---|
| 397 | |
---|
| 398 | |
---|
[3609] | 399 | SUBROUTINE lbc_lnk_2d_e( pt2d, cd_type, psgn, jpri, jprj ) |
---|
| 400 | !!--------------------------------------------------------------------- |
---|
| 401 | !! *** ROUTINE lbc_lnk_2d *** |
---|
| 402 | !! |
---|
| 403 | !! ** Purpose : set lateral boundary conditions on a 2D array (non mpp case) |
---|
| 404 | !! special dummy routine to allow for use of halo indexing in mpp case |
---|
| 405 | !! |
---|
| 406 | !! ** Method : psign = -1 : change the sign across the north fold |
---|
| 407 | !! = 1 : no change of the sign across the north fold |
---|
| 408 | !! = 0 : no change of the sign across the north fold and |
---|
| 409 | !! strict positivity preserved: use inner row/column |
---|
| 410 | !! for closed boundaries. |
---|
| 411 | !!---------------------------------------------------------------------- |
---|
| 412 | CHARACTER(len=1) , INTENT(in ) :: cd_type ! nature of pt3d grid-points |
---|
| 413 | REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: pt2d ! 2D array on which the lbc is applied |
---|
| 414 | REAL(wp) , INTENT(in ) :: psgn ! control of the sign |
---|
| 415 | INTEGER , INTENT(in ) :: jpri ! size of extra halo (not needed in non-mpp) |
---|
| 416 | INTEGER , INTENT(in ) :: jprj ! size of extra halo (not needed in non-mpp) |
---|
| 417 | !!---------------------------------------------------------------------- |
---|
| 418 | |
---|
| 419 | CALL lbc_lnk_2d( pt2d, cd_type, psgn ) |
---|
| 420 | ! |
---|
| 421 | END SUBROUTINE lbc_lnk_2d_e |
---|
| 422 | |
---|
[3] | 423 | #endif |
---|
| 424 | |
---|
| 425 | !!====================================================================== |
---|
| 426 | END MODULE lbclnk |
---|