Changeset 11049
- Timestamp:
- 2019-05-24T10:22:47+02:00 (6 years ago)
- Location:
- NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/BDY/bdydyn2d.F90
r11048 r11049 99 99 ii = idx%nbi(jb,igrd) 100 100 ij = idx%nbj(jb,igrd) 101 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove102 101 zwgt = idx%nbw(jb,igrd) 103 102 pua2d(ii,ij) = ( pua2d(ii,ij) + zwgt * ( dta%u2d(jb) - pua2d(ii,ij) ) ) * umask(ii,ij,1) … … 108 107 ii = idx%nbi(jb,igrd) 109 108 ij = idx%nbj(jb,igrd) 110 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove111 109 zwgt = idx%nbw(jb,igrd) 112 110 pva2d(ii,ij) = ( pva2d(ii,ij) + zwgt * ( dta%v2d(jb) - pva2d(ii,ij) ) ) * vmask(ii,ij,1) … … 165 163 ii = idx%nbi(jb,igrd) 166 164 ij = idx%nbj(jb,igrd) 167 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove168 165 IF( ll_wd ) THEN 169 166 spgu(ii, ij) = dta%ssh(jb) - ssh_ref … … 180 177 DO jb = 1, idx%nblenrim(igrd) 181 178 ii = idx%nbi(jb,igrd) 182 ij = idx%nbj(jb,igrd) 183 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove 179 ij = idx%nbj(jb,igrd) 184 180 flagu => idx%flagu(jb,igrd) 185 181 iim1 = ii + MAX( 0, INT( flagu ) ) ! T pts i-indice inside the boundary 186 182 iip1 = ii - MIN( 0, INT( flagu ) ) ! T pts i-indice outside the boundary 183 IF( iim1 > jpi .OR. iip1 > jpi ) CYCLE 187 184 ! 188 185 zcorr = - flagu * SQRT( grav * phur(ii, ij) ) * ( pssh(iim1, ij) - spgu(iip1,ij) ) … … 199 196 DO jb = 1, idx%nblenrim(igrd) 200 197 ii = idx%nbi(jb,igrd) 201 ij = idx%nbj(jb,igrd) 202 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove 198 ij = idx%nbj(jb,igrd) 203 199 flagv => idx%flagv(jb,igrd) 204 200 ijm1 = ij + MAX( 0, INT( flagv ) ) ! T pts j-indice inside the boundary 205 201 ijp1 = ij - MIN( 0, INT( flagv ) ) ! T pts j-indice outside the boundary 202 IF( ijm1 > jpj .OR. ijp1 > jpj ) CYCLE 206 203 ! 207 204 zcorr = - flagv * SQRT( grav * phvr(ii, ij) ) * ( pssh(ii, ijm1) - spgu(ii,ijp1) ) … … 210 207 ! Use characteristics method instead 211 208 zflag = ABS(flagv) 212 zforc 209 zforc = dta%v2d(jb) * (1._wp - z1_2*zflag) + z1_2 * zflag * pva2d(ii,ijm1) 213 210 pva2d(ii,ij) = zforc + (1._wp - z1_2*zflag) * zcorr * vmask(ii,ij,1) 214 211 END DO -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/BDY/bdydyn3d.F90
r11048 r11049 86 86 ii = idx%nbi(jb,igrd) 87 87 ij = idx%nbj(jb,igrd) 88 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove89 88 ua(ii,ij,jk) = dta%u3d(jb,jk) * umask(ii,ij,jk) 90 89 END DO … … 96 95 ii = idx%nbi(jb,igrd) 97 96 ij = idx%nbj(jb,igrd) 98 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove99 97 va(ii,ij,jk) = dta%v3d(jb,jk) * vmask(ii,ij,jk) 100 98 END DO … … 128 126 ii = idx%nbi(jb,igrd) 129 127 ij = idx%nbj(jb,igrd) 130 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove131 128 flagu = NINT(idx%flagu(jb,igrd)) 132 129 flagv = NINT(idx%flagv(jb,igrd)) 133 130 ! 134 131 IF( flagu == 0 ) THEN ! north/south bdy 135 ! Rare case : rim is parallel to the mpi subdomain border and located next to the halo136 132 IF( ij+flagv > jpj .OR. ij+flagv < 1 ) CYCLE 137 133 ! … … 147 143 ii = idx%nbi(jb,igrd) 148 144 ij = idx%nbj(jb,igrd) 149 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove150 145 flagu = NINT(idx%flagu(jb,igrd)) 151 146 flagv = NINT(idx%flagv(jb,igrd)) 152 147 ! 153 148 IF( flagv == 0 ) THEN ! west/east bdy 154 ! Rare case : rim is parallel to the mpi subdomain border and located next to the halo155 149 IF( ii+flagu > jpi .OR. ii+flagu < 1 ) CYCLE 156 150 ! … … 189 183 ii = idx%nbi(ib,igrd) 190 184 ij = idx%nbj(ib,igrd) 191 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove192 185 DO ik = 1, jpkm1 193 186 ua(ii,ij,ik) = 0._wp … … 199 192 ii = idx%nbi(ib,igrd) 200 193 ij = idx%nbj(ib,igrd) 201 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove202 194 DO ik = 1, jpkm1 203 195 va(ii,ij,ik) = 0._wp … … 236 228 ii = idx%nbi(jb,igrd) 237 229 ij = idx%nbj(jb,igrd) 238 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove239 230 zwgt = idx%nbw(jb,igrd) 240 231 ua(ii,ij,jk) = ( ua(ii,ij,jk) + zwgt * ( dta%u3d(jb,jk) - ua(ii,ij,jk) ) ) * umask(ii,ij,jk) … … 247 238 ii = idx%nbi(jb,igrd) 248 239 ij = idx%nbj(jb,igrd) 249 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove250 240 zwgt = idx%nbw(jb,igrd) 251 241 va(ii,ij,jk) = ( va(ii,ij,jk) + zwgt * ( dta%v3d(jb,jk) - va(ii,ij,jk) ) ) * vmask(ii,ij,jk) … … 316 306 ii = idx_bdy(ib_bdy)%nbi(jb,igrd) 317 307 ij = idx_bdy(ib_bdy)%nbj(jb,igrd) 318 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove319 308 zwgt = idx_bdy(ib_bdy)%nbd(jb,igrd) 320 309 DO jk = 1, jpkm1 … … 328 317 ii = idx_bdy(ib_bdy)%nbi(jb,igrd) 329 318 ij = idx_bdy(ib_bdy)%nbj(jb,igrd) 330 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove331 319 zwgt = idx_bdy(ib_bdy)%nbd(jb,igrd) 332 320 DO jk = 1, jpkm1 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/BDY/bdyice.F90
r11048 r11049 116 116 ji = idx%nbi(i_bdy,jgrd) 117 117 jj = idx%nbj(i_bdy,jgrd) 118 IF( ji == 1 .OR. ji == jpi .OR. jj == 1 .OR. jj == jpj ) CYCLE ! to remove119 118 zwgt = idx%nbw(i_bdy,jgrd) 120 119 zwgt1 = 1.e0 - idx%nbw(i_bdy,jgrd) … … 148 147 ji = idx%nbi(i_bdy,jgrd) 149 148 jj = idx%nbj(i_bdy,jgrd) 150 IF( ji == 1 .OR. ji == jpi .OR. jj == 1 .OR. jj == jpj ) CYCLE ! to remove151 149 flagu => idx%flagu(i_bdy,jgrd) 152 150 flagv => idx%flagv(i_bdy,jgrd) … … 155 153 jpbound = 0 ; ib = ji ; jb = jj 156 154 ! 157 IF( u_ice(ji ,jj ) < 0. .AND. flagu == 1. ) jpbound = 1 ; ib = ji+1 158 IF( u_ice(ji-1,jj ) > 0. .AND. flagu == -1. ) jpbound = 1 ; ib = ji-1 159 IF( v_ice(ji ,jj ) < 0. .AND. flagv == 1. ) jpbound = 1 ; jb = jj+1 160 IF( v_ice(ji ,jj-1) > 0. .AND. flagv == -1. ) jpbound = 1 ; jb = jj-1 155 IF( flagu == 1. ) THEN 156 IF( ji+1 > jpi ) CYCLE 157 IF( u_ice(ji ,jj ) < 0. ) jpbound = 1 ; ib = ji+1 158 END IF 159 IF( flagu == -1. ) THEN 160 IF( ji-1 < 1 ) CYCLE 161 IF( u_ice(ji-1,jj ) < 0. ) jpbound = 1 ; ib = ji-1 162 END IF 163 IF( flagv == 1. ) THEN 164 IF( ji+1 > jpj ) CYCLE 165 IF( v_ice(ji ,jj ) < 0. ) jpbound = 1 ; jb = jj+1 166 END IF 167 IF( flagv == -1. ) THEN 168 IF( jj-1 < 1 ) CYCLE 169 IF( v_ice(ji ,jj-1) < 0. ) jpbound = 1 ; jb = jj-1 170 END IF 161 171 ! 162 172 IF( nn_ice_dta(jbdy) == 0 ) jpbound = 0 ; ib = ji ; jb = jj ! case ice boundaries = initial conditions … … 308 318 ji = idx_bdy(jbdy)%nbi(i_bdy,jgrd) 309 319 jj = idx_bdy(jbdy)%nbj(i_bdy,jgrd) 310 IF( ji == 1 .OR. ji == jpi .OR. jj == 1 .OR. jj == jpj ) CYCLE ! to remove311 320 zflag = idx_bdy(jbdy)%flagu(i_bdy,jgrd) 312 321 ! i-1 i i | ! i i i+1 | ! i i i+1 | … … 337 346 ji = idx_bdy(jbdy)%nbi(i_bdy,jgrd) 338 347 jj = idx_bdy(jbdy)%nbj(i_bdy,jgrd) 339 IF( ji == 1 .OR. ji == jpi .OR. jj == 1 .OR. jj == jpj ) CYCLE ! to remove340 348 zflag = idx_bdy(jbdy)%flagv(i_bdy,jgrd) 341 349 ! ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ! ¨¨¨¨ïce¨¨¨(jj+1)¨¨ ! ¨¨¨¨¨¨ö¨¨¨¨(jj+1) -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/BDY/bdyini.F90
r11048 r11049 132 132 INTEGER :: jpbdtau, jpbdtas ! - - 133 133 INTEGER :: ib_bdy1, ib_bdy2, ib1, ib2 ! - - 134 INTEGER :: i_offset, j_offset, inbdy 134 INTEGER :: i_offset, j_offset, inbdy, itreat ! - - 135 135 INTEGER , POINTER :: nbi, nbj, nbr ! short cuts 136 136 REAL(wp), POINTER, DIMENSION(:,:) :: pmask ! pointer to 2D mask fields … … 146 146 REAL(wp), TARGET, DIMENSION(jpi,jpj) :: zfmask ! temporary fmask array excluding coastal boundary condition (shlat) 147 147 REAL(wp) , DIMENSION(jpi,jpj) :: ztmp 148 REAL(wp), POINTER :: flagu, flagv ! short cuts 148 149 LOGICAL :: llnobdy, llsobdy, lleabdy, llwebdy ! local logicals 149 150 !! … … 802 803 iwe = mig(1) - 1 + 2 - nde ! if monotasking and no zoom, iw=2 803 804 ies = mig(1) + nlci-1 - 1 + nde ! if monotasking and no zoom, ie=jpim1 804 iso = mjg(1) - 1 + 2 - nde! if monotasking and no zoom, is=2805 iso = mjg(1) - 1 + 2 - nde ! if monotasking and no zoom, is=2 805 806 ino = mjg(1) + nlcj-1 - 1 + nde ! if monotasking and no zoom, in=jpjm1 806 807 … … 1274 1275 ztmp(:,:) = 0._wp 1275 1276 DO ib = 1, idx_bdy(ib_bdy)%nblenrim(igrd) 1276 ii = 1277 ij = 1277 ii = idx_bdy(ib_bdy)%nbi(ib,igrd) 1278 ij = idx_bdy(ib_bdy)%nbj(ib,igrd) 1278 1279 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE 1279 1280 llnobdy = pmask(ii ,ij+1) == 1. … … 1327 1328 END DO 1328 1329 END DO 1330 1329 1331 ! 1330 1332 ! Tidy up -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/BDY/bdylib.F90
r11048 r11049 56 56 ii = idx%nbi(ib,igrd) 57 57 ij = idx%nbj(ib,igrd) 58 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove59 58 zwgt = idx%nbw(ib,igrd) 60 59 pta(ii,ij,ik) = ( pta(ii,ij,ik) + zwgt * (dta(ib,ik) - pta(ii,ij,ik) ) ) * tmask(ii,ij,ik) … … 84 83 ii = idx%nbi(ib,igrd) 85 84 ij = idx%nbj(ib,igrd) 86 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove87 85 DO ik = 1, jpkm1 88 86 pta(ii,ij,ik) = dta(ib,ik) * tmask(ii,ij,ik) … … 468 466 ii = idx%nbi(ib,igrd) 469 467 ij = idx%nbj(ib,igrd) 470 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove468 ! 471 469 SELECT CASE( idx%ntreat(ib,igrd) ) ! select free ocean neighbours 472 470 ! o … … 499 497 SELECT CASE( idx%ntreat(ib,igrd) ) 500 498 CASE( 0:4 ) 499 IF( ii1 < 1 .OR. ii1 > jpi .OR. ij1 < 1 .OR. ij1 > jpj ) CYCLE 501 500 DO ik = 1, ipkm1 502 501 IF( pmask(ii1,ij1,ik) /= 0. ) phia(ii,ij,ik) = phia(ii1,ij1,ik) 503 502 END DO 504 503 CASE( 5:8 ) 504 IF( ii1 < 1 .OR. ii1 > jpi .OR. ij1 < 1 .OR. ij1 > jpj ) CYCLE 505 IF( ii2 < 1 .OR. ii2 > jpi .OR. ij2 < 1 .OR. ij2 > jpj ) CYCLE 505 506 DO ik = 1, ipkm1 506 507 zweight = pmask(ii1,ij1,ik) + pmask(ii2,ij2,ik) … … 508 509 END DO 509 510 CASE( 9:12 ) 511 IF( ii1 < 1 .OR. ii1 > jpi .OR. ij1 < 1 .OR. ij1 > jpj ) CYCLE 512 IF( ii2 < 1 .OR. ii2 > jpi .OR. ij2 < 1 .OR. ij2 > jpj ) CYCLE 513 IF( ii3 < 1 .OR. ii3 > jpi .OR. ij3 < 1 .OR. ij3 > jpj ) CYCLE 510 514 DO ik = 1, ipkm1 511 515 zweight = pmask(ii1,ij1,ik) + pmask(ii2,ij2,ik) + pmask(ii3,ij3,ik) -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/BDY/bdytra.F90
r11048 r11049 104 104 ii = idx%nbi(ib,igrd) 105 105 ij = idx%nbj(ib,igrd) 106 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove107 106 pta(ii,ij,1:jpkm1) = 0.1 * tmask(ii,ij,1:jpkm1) 108 107 END DO … … 136 135 ii = idx_bdy(ib_bdy)%nbi(ib,igrd) 137 136 ij = idx_bdy(ib_bdy)%nbj(ib,igrd) 138 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove139 137 zwgt = idx_bdy(ib_bdy)%nbd(ib,igrd) 140 138 DO ik = 1, jpkm1 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/BDY/bdyvol.F90
r11048 r11049 99 99 ii = idx%nbi(jb,jgrd) 100 100 ij = idx%nbj(jb,jgrd) 101 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove ? check tmask_i definition...101 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove 102 102 zubtpecor = zubtpecor + idx%flagu(jb,jgrd) * pua2d(ii,ij) * e2u(ii,ij) * phu(ii,ij) * tmask_i(ii,ij) * tmask_i(ii+1,ij) 103 103 END DO … … 106 106 ii = idx%nbi(jb,jgrd) 107 107 ij = idx%nbj(jb,jgrd) 108 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove ?108 IF( ii == 1 .OR. ii == jpi .OR. ij == 1 .OR. ij == jpj ) CYCLE ! to remove 109 109 zubtpecor = zubtpecor + idx%flagv(jb,jgrd) * pva2d(ii,ij) * e1v(ii,ij) * phv(ii,ij) * tmask_i(ii,ij) * tmask_i(ii,ij+1) 110 110 END DO -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DYN/dynkeg.F90
r11048 r11049 122 122 ji = idx_bdy(ib_bdy)%nbi(jb,igrd) ! maximum extent : from 1 to jpi 123 123 jj = idx_bdy(ib_bdy)%nbj(jb,igrd) ! maximum extent : from 1 to jpj 124 IF( ji == 1 .OR. j i == jpi .OR. jj == 1 .OR. jj == jpj ) CYCLE ! to remove?124 IF( ji == 1 .OR. jj == 1 ) CYCLE 125 125 DO jk = 1, jpkm1 126 126 zhke(ji,jj,jk) = 0._wp … … 164 164 ji = idx_bdy(ib_bdy)%nbi(jb,igrd) ! maximum extent : from 1 to jpi 165 165 jj = idx_bdy(ib_bdy)%nbj(jb,igrd) ! maximum extent : from 1 to jpj 166 IF( ji == 1 .OR. ji == jpi .OR. jj == 1 .OR. jj == jpj ) CYCLE ! to remove166 IF( ji == 1 .OR. ji == jpi .OR. jj == 1 .OR. jj == jpj ) CYCLE 167 167 DO jk = 1, jpkm1 168 168 zhke(ji,jj,jk) = 0._wp
Note: See TracChangeset
for help on using the changeset viewer.