- Timestamp:
- 2020-04-23T15:14:45+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/DOM/dommsk.F90
r12738 r12807 25 25 USE oce ! ocean dynamics and tracers 26 26 USE dom_oce ! ocean space and time domain 27 USE domutl ! 27 28 USE usrdef_fmask ! user defined fmask 28 29 USE bdy_oce ! open boundary … … 88 89 ! 89 90 INTEGER :: ji, jj, jk ! dummy loop indices 90 INTEGER :: iif, iil ! local integers91 INTEGER :: ijf, ijl ! - -92 91 INTEGER :: iktop, ikbot ! - - 93 92 INTEGER :: ios, inum … … 131 130 ! 132 131 tmask(:,:,:) = 0._wp 133 DO_2D_ 11_11132 DO_2D_00_00 134 133 iktop = k_top(ji,jj) 135 134 ikbot = k_bot(ji,jj) 136 135 IF( iktop /= 0 ) THEN ! water in the column 137 tmask(ji,jj,iktop:ikbot 136 tmask(ji,jj,iktop:ikbot) = 1._wp 138 137 ENDIF 139 138 END_2D 140 139 ! 141 ! the following callis mandatory140 ! the following is mandatory 142 141 ! it masks boundaries (bathy=0) where needed depending on the configuration (closed, periodic...) 143 CALL lbc_lnk( 'dommsk', tmask , 'T', 1._wp ) ! Lateral boundary conditions 142 IF( .NOT. (nbondj == 1 .OR. nbondj == 0 .OR. l_Jperio) ) THEN 143 tmask(mi0( 1 ):mi1(jpiglo),mj0(Njs0):mj1(Njs0 ),:) = 0._wp ! line number Njs0 at 0 144 ENDIF 145 IF( .NOT. (nbondi == 1 .OR. nbondi == 0 .OR. l_Iperio) ) THEN 146 tmask(mi0(Nis0):mi1( Nis0),mj0( 1 ):mj1(jpjglo),:) = 0._wp ! column number Nis0 at 0 147 ENDIF 148 CALL lbc_lnk( 'dommsk', tmask, 'T', 1._wp ) ! Lateral boundary conditions 144 149 145 150 ! Mask corrections for bdy (read in mppini2) … … 186 191 END DO 187 192 188 189 193 ! Ocean/land column mask at t-, u-, and v-points (i.e. at least 1 wet cell in the vertical) 190 194 ! ---------------------------------------------- … … 193 197 ssvmask(:,:) = MAXVAL( vmask(:,:,:), DIM=3 ) 194 198 195 196 199 ! Interior domain mask (used for global sum) 197 200 ! -------------------- 198 201 ! 199 iif = nn_hls ; iil = nlci - nn_hls + 1 200 ijf = nn_hls ; ijl = nlcj - nn_hls + 1 201 ! 202 ! ! halo mask : 0 on the halo and 1 elsewhere 203 tmask_h(:,:) = 1._wp 204 tmask_h( 1 :iif, : ) = 0._wp ! first columns 205 tmask_h(iil:jpi, : ) = 0._wp ! last columns (including mpp extra columns) 206 tmask_h( : , 1 :ijf) = 0._wp ! first rows 207 tmask_h( : ,ijl:jpj) = 0._wp ! last rows (including mpp extra rows) 208 ! 209 ! ! north fold mask 210 tpol(1:jpiglo) = 1._wp 211 fpol(1:jpiglo) = 1._wp 212 IF( jperio == 3 .OR. jperio == 4 ) THEN ! T-point pivot 213 tpol(jpiglo/2+1:jpiglo) = 0._wp 214 fpol( 1 :jpiglo) = 0._wp 215 IF( mjg(nlej) == jpjglo ) THEN ! only half of the nlcj-1 row for tmask_h 216 DO ji = iif+1, iil-1 217 tmask_h(ji,nlej-1) = tmask_h(ji,nlej-1) * tpol(mig(ji)) 218 END DO 219 ENDIF 220 ENDIF 221 ! 222 IF( jperio == 5 .OR. jperio == 6 ) THEN ! F-point pivot 223 tpol( 1 :jpiglo) = 0._wp 224 fpol(jpiglo/2+1:jpiglo) = 0._wp 225 ENDIF 202 CALL dom_uniq( tmask_h, 'T' ) 226 203 ! 227 204 ! ! interior mask : 2D ocean mask x halo mask 228 205 tmask_i(:,:) = ssmask(:,:) * tmask_h(:,:) 229 230 206 231 207 ! Lateral boundary conditions on velocity (modify fmask) … … 261 237 #if defined key_agrif 262 238 IF( .NOT. AGRIF_Root() ) THEN 263 IF ((nbondi == 1).OR.(nbondi == 2)) fmask( nlci-1 , :,jk) = 0.e0 ! east264 IF ((nbondi == -1).OR.(nbondi == 2)) fmask(1 , :,jk) = 0.e0 ! west265 IF ((nbondj == 1).OR.(nbondj == 2)) fmask(: ,nlcj-1,jk) = 0.e0 ! north266 IF ((nbondj == -1).OR.(nbondj == 2)) fmask(: ,1,jk) = 0.e0 ! south239 IF ((nbondi == 1).OR.(nbondi == 2)) fmask(jpi-1, : ,jk) = 0.e0 ! east 240 IF ((nbondi == -1).OR.(nbondi == 2)) fmask(1 , : ,jk) = 0.e0 ! west 241 IF ((nbondj == 1).OR.(nbondj == 2)) fmask(: ,jpj-1,jk) = 0.e0 ! north 242 IF ((nbondj == -1).OR.(nbondj == 2)) fmask(: ,1 ,jk) = 0.e0 ! south 267 243 ENDIF 268 244 #endif
Note: See TracChangeset
for help on using the changeset viewer.