Changeset 2106
- Timestamp:
- 2010-09-20T10:51:43+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DEV_r2006_merge_TRA_TRC/NEMO/OPA_SRC/TRA/trabbl.F90
r2104 r2106 20 20 !! tra_bbl_adv : generic routine to compute bbl advective trend 21 21 !! bbl : computation of bbl diffu. flux coef. & transport in bottom boundary layer 22 !! tra_bbl_init : initialization, nam list read, parameters control22 !! tra_bbl_init : initialization, namelist read, parameters control 23 23 !!---------------------------------------------------------------------- 24 24 USE oce ! ocean dynamics and active tracers … … 32 32 USE lbclnk ! ocean lateral boundary conditions 33 33 USE prtctl ! Print control 34 USE trc_oce ! share passive tracers/Ocean variables35 34 36 35 IMPLICIT NONE … … 49 48 # endif 50 49 51 LOGICAL, PUBLIC :: l_bbl !: flag to compute bbl diffu. flux coef and transport52 53 50 ! !!* Namelist nambbl * 54 51 INTEGER , PUBLIC :: nn_bbl_ldf = 0 !: =1 : diffusive bbl or not (=0) 55 52 INTEGER , PUBLIC :: nn_bbl_adv = 0 !: =1/2 : advective bbl or not (=0) 56 ! ! =1 : advective bbl using the modelvelocity57 ! ! =2 : -- using utr_bbl proportional to grad(rho)53 ! ! =1 : advective bbl using the bottom ocean velocity 54 ! ! =2 : - - using utr_bbl proportional to grad(rho) 58 55 REAL(wp), PUBLIC :: rn_ahtbbl = 1.e+3 !: along slope bbl diffusive coefficient [m2/s] 59 56 REAL(wp), PUBLIC :: rn_gambbl = 10.e0 !: lateral coeff. for bottom boundary layer scheme [s] 60 57 61 REAL(wp), DIMENSION(jpi,jpj), PUBLIC :: utr_bbl , vtr_bbl ! u- (v-) transport in the bottom boundary layer62 58 REAL(wp), DIMENSION(jpi,jpj), PUBLIC :: utr_bbl , vtr_bbl ! u- (v-) transport in the bottom boundary layer 59 63 60 INTEGER , DIMENSION(jpi,jpj) :: mbkt ! vertical index of the bottom ocean T-level 64 61 INTEGER , DIMENSION(jpi,jpj) :: mbku , mbkv ! vertical index of the (upper) bottom ocean U/V-level … … 68 65 REAL(wp), DIMENSION(jpi,jpj) :: ahu_bbl , ahv_bbl ! masked diffusive bbl coefficients at u and v-points 69 66 REAL(wp), DIMENSION(jpi,jpj) :: e3u_bbl_0, e3v_bbl_0 ! thichness of the bbl (e3) at u and v-points 70 REAL(wp), DIMENSION(jpi,jpj) :: e1e2t_r ! thichness of the bbl (e3) at u and v-points 67 REAL(wp), DIMENSION(jpi,jpj) :: e1e2t_r ! thichness of the bbl (e3) at u and v-points 68 LOGICAL, PUBLIC :: l_bbl !: flag to compute bbl diffu. flux coef and transport 71 69 72 70 !! * Substitutions … … 80 78 81 79 CONTAINS 80 82 81 83 82 SUBROUTINE tra_bbl( kt ) … … 89 88 !! of tracer equations. 90 89 !! 90 !! ** Method : Depending on namtra_bbl namelist parameters the bbl 91 !! diffusive and/or advective contribution to the tracer trend 92 !! is added to the general tracer trend 91 93 !!---------------------------------------------------------------------- 92 94 INTEGER, INTENT( in ) :: kt ! ocean time-step … … 100 102 ENDIF 101 103 102 !* bbl coef and transport are computed only if not already done in passive tracers routine 103 IF( l_bbl ) CALL bbl( kt, 'TRA' ) 104 105 !* Diffusive bbl : 106 IF( nn_bbl_ldf == 1 ) THEN 104 IF( l_bbl ) CALL bbl( kt, 'TRA' ) !* bbl coef. and transport (only if not already done trcbbl) 105 106 107 IF( nn_bbl_ldf == 1 ) THEN !* Diffusive bbl 107 108 CALL tra_bbl_dif( tsb, tsa, jpts ) 108 109 IF( ln_ctl ) & … … 115 116 END IF 116 117 117 !* Advective bbl : bbl upstream advective trends added to the tracer trends 118 IF( nn_bbl_adv /= 0 ) THEN 119 CALL tra_bbl_adv( tsb, tsa, jpts ) 118 IF( nn_bbl_adv /= 0 ) THEN !* Advective bbl 119 CALL tra_bbl_adv( tsb, tsa, jpts ) 120 120 IF(ln_ctl) & 121 121 CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' bbl_adv - Ta: ', mask1=tmask, & 122 122 & tab3d_2=tsa(:,:,:,jp_sal), clinfo2= ' Sa: ', mask2=tmask, clinfo3='tra' ) 123 123 ! lateral boundary conditions ; just need for outputs 124 CALL lbc_lnk( utr_bbl, 'U', 1. ) ; CALL lbc_lnk( vtr_bbl, 'V', 1. ) 124 CALL lbc_lnk( utr_bbl, 'U', 1. ) ; CALL lbc_lnk( vtr_bbl, 'V', 1. ) 125 125 CALL iom_put( "uoce_bbl", utr_bbl ) ! bbl i-transport 126 126 CALL iom_put( "voce_bbl", vtr_bbl ) ! bbl j-transport … … 155 155 !! convection is satified) 156 156 !! 157 !! ** Action : ptraa increased by the bbl diffusive trend 158 !! 157 159 !! References : Beckmann, A., and R. Doscher, 1997, J. Phys.Oceanogr., 581-591. 158 160 !! Campin, J.-M., and H. Goosse, 1999, Tellus, 412-430. … … 163 165 !! 164 166 INTEGER :: ji, jj, jn ! dummy loop indices 165 INTEGER :: ik ! local integer 166 REAL(wp) :: zbtr, ztra ! local scalars 167 REAL(wp), DIMENSION(jpi,jpj) :: ztrb, zkx, zky ! 2D workspace 167 INTEGER :: ik ! local integers 168 REAL(wp) :: zbtr, ztra ! local scalars 168 169 !!---------------------------------------------------------------------- 169 170 ! … … 171 172 DO jn = 1, kjpt ! tracer loop 172 173 ! ! =========== 173 #if defined key_vectopt_loop174 DO jj = 1, 1 ! vector opt. (forced unrolling)175 DO ji = 1, jpij176 #else177 DO jj = 1, jpj178 DO ji = 1, jpi179 #endif180 ik = mbkt(ji,jj) ! bottom T-level index181 ztrb(ji,jj) = ptrab(ji,jj,ik,jn) ! bottom before T and S182 END DO183 END DO184 !185 !!gm forced unrolling should be uuseless in the loop below (no indirect adressing)186 # if defined key_vectopt_loop187 DO jj = 1, 1 ! vector opt. (forced unrolling)188 DO ji = 1, jpij-jpi189 # else190 DO jj = 1, jpjm1191 DO ji = 1, jpim1192 # endif193 zkx(ji,jj) = ahu_bbl(ji,jj) * ( ztrb(ji+1,jj ) - ztrb(ji,jj) ) ! diffusive i-flux194 zky(ji,jj) = ahv_bbl(ji,jj) * ( ztrb(ji ,jj+1) - ztrb(ji,jj) ) ! diffusive j-flux195 END DO196 END DO197 ! ! Add the diffusive trends198 174 # if defined key_vectopt_loop 199 175 DO jj = 1, 1 ! vector opt. (forced unrolling) … … 203 179 DO ji = 2, jpim1 204 180 # endif 205 ik = mbkt(ji,jj) 181 ik = mbkt(ji,jj) ! bottom T-level index 206 182 zbtr = e1e2t_r(ji,jj) / fse3t(ji,jj,ik) 207 ztra = ( zkx(ji,jj) - zkx(ji-1,jj) + zky(ji,jj) - zky(ji,jj-1) ) * zbtr 208 ptraa(ji,jj,ik,jn) = ptraa(ji,jj,ik,jn) + ztra 183 ptraa(ji,jj,ik,jn) = ptraa(ji,jj,ik,jn) & 184 & + ( ahu_bbl(ji,jj) * ( ptrab(ji+1,jj ,ik,jn) - ptrab(ji ,jj ,ik,jn) ) & 185 & - ahu_bbl(ji,jj) * ( ptrab(ji ,jj ,ik,jn) - ptrab(ji-1,jj ,ik,jn) ) & 186 & + ahv_bbl(ji,jj) * ( ptrab(ji ,jj+1,ik,jn) - ptrab(ji ,jj ,ik,jn) ) & 187 & - ahv_bbl(ji,jj) * ( ptrab(ji ,jj ,ik,jn) - ptrab(ji ,jj-1,ik,jn) ) ) * zbtr 209 188 END DO 210 189 END DO 211 ! 212 END DO 213 ! 190 ! ! =========== 191 END DO ! end tracer 192 ! ! =========== 214 193 END SUBROUTINE tra_bbl_dif 215 194 … … 218 197 !!---------------------------------------------------------------------- 219 198 !! *** ROUTINE trc_bbl *** 220 !! 199 !! 221 200 !! ** Purpose : Compute the before passive tracer trend associated 222 201 !! with the bottom boundary layer and add it to the general trend 223 202 !! of tracer equations. 224 !! * advective bbl (nn_bbl_adv=1 or 2) : 225 !! nn_bbl_adv = 1 use of the ocean velocity as bbl velocity 226 !! nn_bbl_adv = 2 follow Campin and Goosse (1999) implentation 227 !! i.e. transport proportional to the along-slope density gradient 228 !! 229 !! NB: the along slope density gradient is evaluated using the 230 !! local density (i.e. referenced at a common local depth). 203 !! ** Method : advective bbl (nn_bbl_adv = 1 or 2) : 204 !! nn_bbl_adv = 1 use of the ocean near bottom velocity as bbl velocity 205 !! nn_bbl_adv = 2 follow Campin and Goosse (1999) implentation i.e. 206 !! transport proportional to the along-slope density gradient 231 207 !! 232 208 !! … … 303 279 ! 304 280 END DO 305 !306 END DO 307 ! 281 ! ! =========== 282 END DO ! end tracer 283 ! ! =========== 308 284 END SUBROUTINE tra_bbl_adv 309 285 … … 407 383 IF( nn_bbl_ldf == 1 ) THEN ! diffusive bbl ! 408 384 ! !-------------------! 409 ! ! bbl diffusive fluxes 410 ! ! (criteria for non zero flux: grad(rho).grad(h) < 0 ) 411 # if defined key_vectopt_loop 412 DO jj = 1, 1 ! vector opt. (forced unrolling) 413 DO ji = 1, jpij-jpi 414 # else 415 DO jj = 1, jpjm1 416 DO ji = 1, jpim1 417 # endif 385 DO jj = 1, jpjm1 ! (criteria for non zero flux: grad(rho).grad(h) < 0 ) 386 DO ji = 1, jpim1 418 387 ! ! i-direction 419 388 zt = 0.5 * ( ztb (ji,jj) + ztb (ji+1,jj) ) ! T, S anomalie, and depth … … 544 513 REWIND ( numnam ) !* Read Namelist nambbl : bottom boundary layer scheme 545 514 READ ( numnam, nambbl ) 546 515 ! 516 l_bbl = .TRUE. !* flag to compute bbl coef and transport 517 ! 547 518 IF(lwp) THEN !* Parameter control and print 548 519 WRITE(numout,*) … … 626 597 ENDIF 627 598 ! 628 l_bbl = .TRUE. !: flag to compute bbl coef and transport629 !630 599 END SUBROUTINE tra_bbl_init 631 600
Note: See TracChangeset
for help on using the changeset viewer.