- Timestamp:
- 2020-06-24T14:38:26+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r12527_Gurvan_ShallowWater/src/OCE/DOM/dommsk.F90
r12377 r13151 2 2 !!====================================================================== 3 3 !! *** MODULE dommsk *** 4 !! Ocean initialization : domain land/sea mask 4 !! Ocean initialization : domain land/sea mask 5 5 !!====================================================================== 6 6 !! History : OPA ! 1987-07 (G. Madec) Original code … … 18 18 !! 3.6 ! 2015-05 (P. Mathiot) ISF: add wmask,wumask and wvmask 19 19 !! 4.0 ! 2016-06 (G. Madec, S. Flavoni) domain configuration / user defined interface 20 !! 4.x ! 2020-02 (G. Madec, S. Techene) introduce ssh to h0 ratio 20 21 !!---------------------------------------------------------------------- 21 22 … … 40 41 ! !!* Namelist namlbc : lateral boundary condition * 41 42 REAL(wp) :: rn_shlat ! type of lateral boundary condition on velocity 42 LOGICAL, PUBLIC :: ln_vorlat ! consistency of vorticity boundary condition 43 LOGICAL, PUBLIC :: ln_vorlat ! consistency of vorticity boundary condition 43 44 ! with analytical eqs. 44 45 … … 47 48 !!---------------------------------------------------------------------- 48 49 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 49 !! $Id$ 50 !! $Id$ 50 51 !! Software governed by the CeCILL license (see ./LICENSE) 51 52 !!---------------------------------------------------------------------- … … 59 60 !! zontal velocity points (u & v), vorticity points (f) points. 60 61 !! 61 !! ** Method : The ocean/land mask at t-point is deduced from ko_top 62 !! and ko_bot, the indices of the fist and last ocean t-levels which 62 !! ** Method : The ocean/land mask at t-point is deduced from ko_top 63 !! and ko_bot, the indices of the fist and last ocean t-levels which 63 64 !! are either defined in usrdef_zgr or read in zgr_read. 64 !! The velocity masks (umask, vmask, wmask, wumask, wvmask) 65 !! The velocity masks (umask, vmask, wmask, wumask, wvmask) 65 66 !! are deduced from a product of the two neighboring tmask. 66 67 !! The vorticity mask (fmask) is deduced from tmask taking … … 77 78 !! due to cyclic or North Fold boundaries as well as MPP halos. 78 79 !! 79 !! ** Action : tmask, umask, vmask, wmask, wumask, wvmask : land/ocean mask 80 !! ** Action : tmask, umask, vmask, wmask, wumask, wvmask : land/ocean mask 80 81 !! at t-, u-, v- w, wu-, and wv-points (=0. or 1.) 81 !! fmask : land/ocean mask at f-point (=0., or =1., or 82 !! fmask : land/ocean mask at f-point (=0., or =1., or 82 83 !! =rn_shlat along lateral boundaries) 83 !! tmask_i : interior ocean mask 84 !! tmask_i : interior ocean mask 84 85 !! tmask_h : halo mask 85 86 !! ssmask , ssumask, ssvmask, ssfmask : 2D ocean mask … … 108 109 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namlbc in configuration namelist' ) 109 110 IF(lwm) WRITE ( numond, namlbc ) 110 111 111 112 IF(lwp) THEN ! control print 112 113 WRITE(numout,*) … … 115 116 WRITE(numout,*) ' Namelist namlbc' 116 117 WRITE(numout,*) ' lateral momentum boundary cond. rn_shlat = ',rn_shlat 117 WRITE(numout,*) ' consistency with analytical form ln_vorlat = ',ln_vorlat 118 WRITE(numout,*) ' consistency with analytical form ln_vorlat = ',ln_vorlat 118 119 ENDIF 119 120 ! … … 140 141 ! 141 142 ! the following call is mandatory 142 ! it masks boundaries (bathy=0) where needed depending on the configuration (closed, periodic...) 143 ! it masks boundaries (bathy=0) where needed depending on the configuration (closed, periodic...) 143 144 CALL lbc_lnk( 'dommsk', tmask , 'T', 1._wp ) ! Lateral boundary conditions 144 145 145 146 ! Mask corrections for bdy (read in mppini2) 146 147 READ ( numnam_ref, nambdy, IOSTAT = ios, ERR = 903) … … 157 158 END_3D 158 159 ENDIF 159 160 160 161 ! Ocean/land mask at u-, v-, and f-points (computed from tmask) 161 162 ! ---------------------------------------- … … 174 175 END DO 175 176 CALL lbc_lnk_multi( 'dommsk', umask, 'U', 1., vmask, 'V', 1., fmask, 'F', 1. ) ! Lateral boundary conditions 176 177 177 178 ! Ocean/land mask at wu-, wv- and w points (computed from tmask) 178 179 !----------------------------------------- … … 182 183 DO jk = 2, jpk ! interior values 183 184 wmask (:,:,jk) = tmask(:,:,jk) * tmask(:,:,jk-1) 184 wumask(:,:,jk) = umask(:,:,jk) * umask(:,:,jk-1) 185 wumask(:,:,jk) = umask(:,:,jk) * umask(:,:,jk-1) 185 186 wvmask(:,:,jk) = vmask(:,:,jk) * vmask(:,:,jk-1) 186 187 END DO … … 192 193 ssumask(:,:) = MAXVAL( umask(:,:,:), DIM=3 ) 193 194 ssvmask(:,:) = MAXVAL( vmask(:,:,:), DIM=3 ) 195 ssfmask(:,:) = MAXVAL( fmask(:,:,:), DIM=3 ) 194 196 195 197 … … 201 203 ! 202 204 ! ! halo mask : 0 on the halo and 1 elsewhere 203 tmask_h(:,:) = 1._wp 205 tmask_h(:,:) = 1._wp 204 206 tmask_h( 1 :iif, : ) = 0._wp ! first columns 205 207 tmask_h(iil:jpi, : ) = 0._wp ! last columns (including mpp extra columns) … … 208 210 ! 209 211 ! ! north fold mask 210 tpol(1:jpiglo) = 1._wp 212 tpol(1:jpiglo) = 1._wp 211 213 fpol(1:jpiglo) = 1._wp 212 214 IF( jperio == 3 .OR. jperio == 4 ) THEN ! T-point pivot … … 225 227 ENDIF 226 228 ! 227 ! ! interior mask : 2D ocean mask x halo mask 229 ! ! interior mask : 2D ocean mask x halo mask 228 230 tmask_i(:,:) = ssmask(:,:) * tmask_h(:,:) 229 231 230 232 231 233 ! Lateral boundary conditions on velocity (modify fmask) 232 ! --------------------------------------- 234 ! --------------------------------------- 233 235 IF( rn_shlat /= 0 ) THEN ! Not free-slip lateral boundary condition 234 236 ! … … 236 238 ! 237 239 DO jk = 1, jpk 238 zwf(:,:) = fmask(:,:,jk) 240 zwf(:,:) = fmask(:,:,jk) 239 241 DO_2D_00_00 240 242 IF( fmask(ji,jj,jk) == 0._wp ) THEN … … 250 252 fmask(jpi,jj,jk) = rn_shlat * MIN( 1._wp , MAX( zwf(jpi,jj+1), zwf(jpim1,jj), zwf(jpi,jj-1) ) ) 251 253 ENDIF 252 END DO 254 END DO 253 255 DO ji = 2, jpim1 254 256 IF( fmask(ji,1,jk) == 0._wp ) THEN … … 259 261 ENDIF 260 262 END DO 261 #if defined key_agrif 262 IF( .NOT. AGRIF_Root() ) THEN 263 IF ((nbondi == 1).OR.(nbondi == 2)) fmask(nlci-1 , : ,jk) = 0.e0 ! east 264 IF ((nbondi == -1).OR.(nbondi == 2)) fmask(1 , : ,jk) = 0.e0 ! west 265 IF ((nbondj == 1).OR.(nbondj == 2)) fmask(: ,nlcj-1 ,jk) = 0.e0 ! north 266 IF ((nbondj == -1).OR.(nbondj == 2)) fmask(: ,1 ,jk) = 0.e0 ! south 267 ENDIF 268 #endif 263 #if defined key_agrif 264 IF( .NOT. AGRIF_Root() ) THEN 265 IF ((nbondi == 1).OR.(nbondi == 2)) fmask(nlci-1 , : ,jk) = 0.e0 ! east 266 IF ((nbondi == -1).OR.(nbondi == 2)) fmask(1 , : ,jk) = 0.e0 ! west 267 IF ((nbondj == 1).OR.(nbondj == 2)) fmask(: ,nlcj-1 ,jk) = 0.e0 ! north 268 IF ((nbondj == -1).OR.(nbondj == 2)) fmask(: ,1 ,jk) = 0.e0 ! south 269 ENDIF 270 #endif 269 271 END DO 270 272 ! … … 276 278 ! 277 279 ENDIF 278 280 279 281 ! User defined alteration of fmask (use to reduce ocean transport in specified straits) 280 ! -------------------------------- 282 ! -------------------------------- 281 283 ! 282 284 CALL usr_def_fmask( cn_cfg, nn_cfg, fmask ) 283 285 ! 284 286 END SUBROUTINE dom_msk 285 287 286 288 !!====================================================================== 287 289 END MODULE dommsk
Note: See TracChangeset
for help on using the changeset viewer.