Changeset 2497
- Timestamp:
- 2010-12-21T07:44:40+01:00 (14 years ago)
- Location:
- branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DYN/dynbfr.F90
r2460 r2497 13 13 USE dom_oce ! ocean space and time domain variables 14 14 USE zdf_oce ! ocean vertical physics variables 15 USE zdfbfr ! bottom friction16 15 17 16 USE trdmod ! ocean active dynamics and tracers trends -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90
r2450 r2497 20 20 USE phycst ! physical constants 21 21 USE in_out_manager ! I/O manager 22 #if defined key_zdfgls23 USE zdfbfr, ONLY : bfrua, bfrva, wbotu, wbotv ! bottom stresses24 USE lbclnk ! ocean lateral boundary conditions (or mpp link)25 #endif26 22 27 23 IMPLICIT NONE … … 36 32 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 37 33 !! $Id$ 38 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 39 !!---------------------------------------------------------------------- 40 34 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 35 !!---------------------------------------------------------------------- 41 36 CONTAINS 42 37 … … 66 61 !! 67 62 INTEGER :: ji, jj, jk ! dummy loop indices 68 REAL(wp) :: z rau0r, zcoef ! temporary scalars63 REAL(wp) :: z1_p2dt, zcoef ! temporary scalars 69 64 REAL(wp) :: zzwi, zzws, zrhs ! temporary scalars 70 65 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zwi ! 3D workspace … … 79 74 ! 0. Local constant initialization 80 75 ! -------------------------------- 81 z rau0r = 1. / rau0 ! inverse of the reference density76 z1_p2dt = 1._wp / p2dt ! inverse of the timestep 82 77 83 78 ! 1. Vertical diffusion on u … … 98 93 zzws = zcoef * avmu (ji,jj,jk+1) / fse3uw(ji,jj,jk+1) 99 94 zws(ji,jj,jk) = zzws * umask(ji,jj,jk+1) 100 zwd(ji,jj,jk) = 1. - zwi(ji,jj,jk) - zzws95 zwd(ji,jj,jk) = 1._wp - zwi(ji,jj,jk) - zzws 101 96 END DO 102 97 END DO … … 104 99 DO jj = 2, jpjm1 ! Surface boudary conditions 105 100 DO ji = fs_2, fs_jpim1 ! vector opt. 106 zwi(ji,jj,1) = 0. 107 zwd(ji,jj,1) = 1. - zws(ji,jj,1)101 zwi(ji,jj,1) = 0._wp 102 zwd(ji,jj,1) = 1._wp - zws(ji,jj,1) 108 103 END DO 109 104 END DO … … 134 129 DO jj = 2, jpjm1 !== second recurrence: SOLk = RHSk - Lk / Dk-1 Lk-1 == 135 130 DO ji = fs_2, fs_jpim1 ! vector opt. 136 ua(ji,jj,1) = ub(ji,jj,1) &137 & + p2dt * ( ua(ji,jj,1) + 0.5 * ( utau_b(ji,jj) + utau(ji,jj) ) / ( fse3u(ji,jj,1) * rau0) )131 ua(ji,jj,1) = ub(ji,jj,1) + p2dt * ( ua(ji,jj,1) + 0.5_wp * ( utau_b(ji,jj) + utau(ji,jj) ) & 132 & / ( fse3u(ji,jj,1) * rau0 ) ) 138 133 END DO 139 134 END DO … … 155 150 DO jj = 2, jpjm1 156 151 DO ji = fs_2, fs_jpim1 ! vector opt. 157 ua(ji,jj,jk) =( ua(ji,jj,jk) - zws(ji,jj,jk) * ua(ji,jj,jk+1) ) / zwd(ji,jj,jk) 158 END DO 159 END DO 160 END DO 161 162 #if defined key_zdfgls 163 ! Save bottom stress for next time step 164 DO jj = 2, jpjm1 165 DO ji = fs_2, fs_jpim1 ! vector opt. 166 wbotu(ji,jj) = bfrua(ji,jj) * ua(ji,jj,mbku(ji,jj)) * umask(ji,jj,mbku(ji,jj)) 167 END DO 168 END DO 169 CALL lbc_lnk( wbotu(:,:), 'U', -1. ) 170 #endif 152 ua(ji,jj,jk) = ( ua(ji,jj,jk) - zws(ji,jj,jk) * ua(ji,jj,jk+1) ) / zwd(ji,jj,jk) 153 END DO 154 END DO 155 END DO 171 156 172 157 ! Normalization to obtain the general momentum trend ua … … 174 159 DO jj = 2, jpjm1 175 160 DO ji = fs_2, fs_jpim1 ! vector opt. 176 ua(ji,jj,jk) = ( ua(ji,jj,jk) - ub(ji,jj,jk) ) /p2dt161 ua(ji,jj,jk) = ( ua(ji,jj,jk) - ub(ji,jj,jk) ) * z1_p2dt 177 162 END DO 178 163 END DO … … 197 182 zzws = zcoef * avmv (ji,jj,jk+1) / fse3vw(ji,jj,jk+1) 198 183 zws(ji,jj,jk) = zzws * vmask(ji,jj,jk+1) 199 zwd(ji,jj,jk) = 1. - zwi(ji,jj,jk) - zzws184 zwd(ji,jj,jk) = 1._wp - zwi(ji,jj,jk) - zzws 200 185 END DO 201 186 END DO … … 203 188 DO jj = 2, jpjm1 ! Surface boudary conditions 204 189 DO ji = fs_2, fs_jpim1 ! vector opt. 205 zwi(ji,jj,1) = 0. e0206 zwd(ji,jj,1) = 1. - zws(ji,jj,1)190 zwi(ji,jj,1) = 0._wp 191 zwd(ji,jj,1) = 1._wp - zws(ji,jj,1) 207 192 END DO 208 193 END DO … … 233 218 DO jj = 2, jpjm1 !== second recurrence: SOLk = RHSk - Lk / Dk-1 Lk-1 == 234 219 DO ji = fs_2, fs_jpim1 ! vector opt. 235 va(ji,jj,1) = vb(ji,jj,1) &236 & + p2dt * ( va(ji,jj,1) + 0.5 * ( vtau_b(ji,jj) + vtau(ji,jj) ) / ( fse3v(ji,jj,1) * rau0) )220 va(ji,jj,1) = vb(ji,jj,1) + p2dt * ( va(ji,jj,1) + 0.5_wp * ( vtau_b(ji,jj) + vtau(ji,jj) ) & 221 & / ( fse3v(ji,jj,1) * rau0 ) ) 237 222 END DO 238 223 END DO … … 254 239 DO jj = 2, jpjm1 255 240 DO ji = fs_2, fs_jpim1 ! vector opt. 256 va(ji,jj,jk) =( va(ji,jj,jk) - zws(ji,jj,jk) * va(ji,jj,jk+1) ) / zwd(ji,jj,jk) 257 END DO 258 END DO 259 END DO 260 261 #if defined key_zdfgls 262 ! Save bottom stress for next time step 263 DO jj = 2, jpjm1 264 DO ji = fs_2, fs_jpim1 ! vector opt. 265 wbotv(ji,jj) = bfrva(ji,jj) * va(ji,jj,mbkv(ji,jj)) * vmask(ji,jj,mbku(ji,jj)) 266 END DO 267 END DO 268 CALL lbc_lnk( wbotv(:,:), 'V', -1. ) 269 #endif 241 va(ji,jj,jk) = ( va(ji,jj,jk) - zws(ji,jj,jk) * va(ji,jj,jk+1) ) / zwd(ji,jj,jk) 242 END DO 243 END DO 244 END DO 270 245 271 246 ! Normalization to obtain the general momentum trend va … … 273 248 DO jj = 2, jpjm1 274 249 DO ji = fs_2, fs_jpim1 ! vector opt. 275 va(ji,jj,jk) = ( va(ji,jj,jk) - vb(ji,jj,jk) ) /p2dt250 va(ji,jj,jk) = ( va(ji,jj,jk) - vb(ji,jj,jk) ) * z1_p2dt 276 251 END DO 277 252 END DO -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/ZDF/zdf_oce.F90
r2287 r2497 33 33 34 34 35 REAL(wp), PUBLIC, DIMENSION (jpk) :: avmb, avtb !: background profile of avm and avt 36 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: avtb_2d !: set in tke_init, for other modif than ice 37 REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) :: avmu, avmv !: vertical viscosity coeff. at uw- & vw-points [m2/s] 38 REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) :: avm , avt !: vertical viscosity & diffusivity coeff. at w-point [m2/s] 35 REAL(wp), PUBLIC, DIMENSION (jpk) :: avmb , avtb !: background profile of avm and avt 36 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: avtb_2d !: set in tke_init, for other modif than ice 37 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: bfrua, bfrva !: Bottom friction coefficients set in zdfbfr 38 REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) :: avmu , avmv !: vertical viscosity coef at uw- & vw-pts [m2/s] 39 REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) :: avm , avt !: vertical viscosity & diffusivity coef at w-pt [m2/s] 39 40 40 41 !!---------------------------------------------------------------------- -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90
r2450 r2497 29 29 PUBLIC zdf_bfr_init ! called by opa.F90 30 30 31 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: bfrua , bfrva !: Bottom friction coefficients set in zdfbfr32 #if defined key_zdfgls || defined key_esopa33 REAL(wp), PUBLIC :: rn_hbro = 0.003_wp ! Bottom roughness (m)34 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: wbotu, wbotv ! Bottom stresses35 #endif36 37 31 ! !!* Namelist nambfr: bottom friction namelist * 38 32 INTEGER :: nn_bfr = 0 ! = 0/1/2/3 type of bottom friction … … 51 45 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 52 46 !! $Id$ 53 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 54 !!---------------------------------------------------------------------- 55 47 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 48 !!---------------------------------------------------------------------- 56 49 CONTAINS 57 50 … … 117 110 ENDIF 118 111 ! 119 120 !zdfgls case with explicit vertical diffusion scheme: save bottom stress for next time step121 122 #if defined key_zdfgls && defined key_dynspg_exp123 DO jj = 2, jpjm1124 DO ji = fs_2, fs_jpim1 ! vector opt.125 wbotu(ji,jj) = bfrua(ji,jj) * un(ji,jj,mbku(ji,jj)) * umask(ji,jj,mbku(ji,jj))126 wbotv(ji,jj) = bfrva(ji,jj) * vn(ji,jj,mbkv(ji,jj)) * vmask(ji,jj,mbkv(ji,jj))127 END DO128 END DO129 CALL lbc_lnk( wbotu(:,:), 'U', -1. ) ; CALL lbc_lnk( wbotv(:,:), 'V', -1. ) ! lateral boundary condition130 #endif131 132 112 END SUBROUTINE zdf_bfr 133 113 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90
r2452 r2497 28 28 USE in_out_manager ! I/O manager 29 29 USE iom ! I/O manager library 30 USE zdfbfr, ONLY : rn_hbro, wbotu, wbotv ! bottom roughness and bottom stresses31 30 32 31 IMPLICIT NONE … … 61 60 62 61 REAL(wp) :: hsro = 0.003_wp ! Minimum surface roughness 62 REAL(wp) :: hbro = 0.003_wp ! Bottom roughness (m) 63 63 REAL(wp) :: rcm_sf = 0.73_wp ! Shear free turbulence parameters 64 64 REAL(wp) :: ra_sf = -2.0_wp ! Must be negative -2 < ra_sf < -1 … … 143 143 ustars2 = 0._wp ; ustarb2 = 0._wp ; psi = 0._wp ; zwall_psi = 0._wp 144 144 145 ! Compute wind stressat T-points145 ! Compute surface and bottom friction at T-points 146 146 !CDIR NOVERRCHK 147 147 DO jj = 2, jpjm1 148 148 !CDIR NOVERRCHK 149 DO ji = fs_2, fs_jpim1 ! vector opt.150 !151 ! wind stress152 ! squared surface velocity scale153 ustars2(ji,jj) = rau0r * taum(ji,jj) * tmask(ji,jj,1)154 !155 ! bottom friction156 ztx2 = ( wbotu(ji-1,jj)*umask(ji-1,jj,1) + wbotu(ji,jj)*umask(ji,jj,1)) &157 & / MAX( 1., umask(ji-1,jj,1) + umask(ji,jj,1))158 zty2 = ( wbotv(ji,jj-1)*vmask(ji,jj-1,1) + wbotv(ji,jj)*vmask(ji,jj,1)) &159 & / MAX( 1., vmask(ji,jj-1,1) + vmask(ji,jj,1))160 ustarb2(ji,jj) = SQRT( ztx2 * ztx2 + zty2 * zty2 ) * tmask(ji,jj,1)161 END DO149 DO ji = fs_2, fs_jpim1 ! vector opt. 150 ! 151 ! surface friction 152 ustars2(ji,jj) = rau0r * taum(ji,jj) * tmask(ji,jj,1) 153 ! 154 ! bottom friction (explicit before friction) 155 ! Note that we chose here not to bound the friction as in dynbfr) 156 ztx2 = ( bfrua(ji,jj) * ub(ji,jj,mbku(ji,jj)) + bfrua(ji-1,jj) * ub(ji-1,jj,mbku(ji-1,jj)) ) & 157 & * ( 1._wp - 0.5_wp * umask(ji,jj,1) * umask(ji-1,jj,1) ) 158 zty2 = ( bfrva(ji,jj) * vb(ji,jj,mbkv(ji,jj)) + bfrva(ji,jj-1) * vb(ji,jj-1,mbkv(ji,jj-1)) ) & 159 & * ( 1._wp - 0.5_wp * vmask(ji,jj,1) * vmask(ji,jj-1,1) ) 160 ustarb2(ji,jj) = SQRT( ztx2 * ztx2 + zty2 * zty2 ) * tmask(ji,jj,1) 161 END DO 162 162 END DO 163 163 … … 617 617 ! 618 618 CASE ( 0 ) ! Dirichlet 619 ! ! en(ibot) = u*^2 / Co2 and mxln(ibot) = vkarmn * rn_hbro619 ! ! en(ibot) = u*^2 / Co2 and mxln(ibot) = vkarmn * hbro 620 620 ! ! Balance between the production and the dissipation terms 621 621 !CDIR NOVERRCHK … … 625 625 ibot = mbkt(ji,jj) + 1 ! k bottom level of w-point 626 626 ibotm1 = mbkt(ji,jj) ! k-1 bottom level of w-point but >=1 627 zdep(ji,jj) = vkarmn * rn_hbro627 zdep(ji,jj) = vkarmn * hbro 628 628 psi (ji,jj,ibot) = rc0**rpp * en(ji,jj,ibot)**rmm * zdep(ji,jj)**rnn 629 629 z_elem_a(ji,jj,ibot) = 0._wp … … 632 632 ! 633 633 ! Just above last level, Dirichlet condition again (GOTM like) 634 zdep(ji,jj) = vkarmn * ( rn_hbro + fse3t(ji,jj,ibotm1))634 zdep(ji,jj) = vkarmn * ( hbro + fse3t(ji,jj,ibotm1) ) 635 635 psi (ji,jj,ibotm1) = rc0**rpp * en(ji,jj,ibot )**rmm * zdep(ji,jj)**rnn 636 636 z_elem_a(ji,jj,ibotm1) = 0._wp … … 650 650 ! 651 651 ! Bottom level Dirichlet condition: 652 zdep(ji,jj) = vkarmn * rn_hbro652 zdep(ji,jj) = vkarmn * hbro 653 653 psi (ji,jj,ibot) = rc0**rpp * en(ji,jj,ibot)**rmm * zdep(ji,jj)**rnn 654 654 ! … … 662 662 ! 663 663 ! Set psi vertical flux at the bottom: 664 zdep(ji,jj) = rn_hbro + 0.5_wp*fse3t(ji,jj,ibotm1)664 zdep(ji,jj) = hbro + 0.5_wp*fse3t(ji,jj,ibotm1) 665 665 zflxb = rsbc_psi2 * ( avm(ji,jj,ibot) + avm(ji,jj,ibotm1) ) & 666 666 & * (0.5_wp*(en(ji,jj,ibot)+en(ji,jj,ibotm1)))**rmm * zdep(ji,jj)**(rnn-1._wp) … … 906 906 WRITE(numout,*) ' minimum value of en rn_emin = ', rn_emin 907 907 WRITE(numout,*) ' minimum value of eps rn_epsmin = ', rn_epsmin 908 WRITE(numout,*) ' Surface roughness (m) hsro = ', hsro909 WRITE(numout,*) ' Bottom roughness (m) rn_hbro = ', rn_hbro910 908 WRITE(numout,*) ' Limit dissipation rate under stable stratif. ln_length_lim = ', ln_length_lim 911 909 WRITE(numout,*) ' Galperin limit (Standard: 0.53, Holt: 0.26) rn_clim_galp = ', rn_clim_galp … … 920 918 WRITE(numout,*) ' Stability functions nn_stab_func = ', nn_stab_func 921 919 WRITE(numout,*) ' Type of closure nn_clos = ', nn_clos 922 WRITE(numout,*) 920 WRITE(numout,*) ' Hard coded parameters' 921 WRITE(numout,*) ' Surface roughness (m) hsro = ', hsro 922 WRITE(numout,*) ' Bottom roughness (m) hbro = ', hbro 923 923 ENDIF 924 924 … … 1195 1195 id5 = iom_varid( numror, 'avmv' , ldstop = .FALSE. ) 1196 1196 id6 = iom_varid( numror, 'mxln' , ldstop = .FALSE. ) 1197 id7 = iom_varid( numror, 'wbotu', ldstop = .FALSE. )1198 id8 = iom_varid( numror, 'wbotv', ldstop = .FALSE. )1199 1197 ! 1200 1198 IF( MIN( id1, id2, id3, id4, id5, id6, id7, id8 ) > 0 ) THEN ! all required arrays exist … … 1205 1203 CALL iom_get( numror, jpdom_autoglo, 'avmv' , avmv ) 1206 1204 CALL iom_get( numror, jpdom_autoglo, 'mxln' , mxln ) 1207 CALL iom_get( numror, jpdom_autoglo, 'wbotu' , wbotu )1208 CALL iom_get( numror, jpdom_autoglo, 'wbotv' , wbotv )1209 1205 ELSE 1210 1206 IF(lwp) WRITE(numout,*) ' ===>>>> : previous run without gls scheme, en and mxln computed by iterative loop' 1211 IF(lwp) WRITE(numout,*) ' ===>>>> : The bottom stresses are estimated'1212 1207 en (:,:,:) = rn_emin 1213 1208 mxln(:,:,:) = 0.001 1214 ! Initialize bottom stresses1215 DO jj = 2, jpjm11216 DO ji = fs_2, fs_jpim1 ! vector opt.1217 ikbu = mbku(ji,jj) ! bottom ocean level of u-point1218 ikbv = mbkv(ji,jj)1219 cbx = avmu(ji,jj,ikbu+1) / fse3uw(ji,jj,ikbu+1)1220 cby = avmv(ji,jj,ikbv+1) / fse3vw(ji,jj,ikbv+1)1221 wbotu(ji,jj) = -cbx * un(ji,jj,ikbu) * umask(ji,jj,1)1222 wbotv(ji,jj) = -cby * vn(ji,jj,ikbv) * vmask(ji,jj,1)1223 END DO1224 END DO1225 1209 DO jit = nit000 + 1, nit000 + 10 ; CALL zdf_gls( jit ) ; END DO 1226 1210 ENDIF 1227 1211 ELSE !* Start from rest 1228 1212 IF(lwp) WRITE(numout,*) ' ===>>>> : Initialisation of en and mxln by background values' 1229 IF(lwp) WRITE(numout,*) ' ===>>>> : The bottom stresses are estimated'1230 1213 en (:,:,:) = rn_emin 1231 1214 mxln(:,:,:) = 0.001 1232 ! Initialize bottom stresses1233 DO jj = 2, jpjm11234 DO ji = fs_2, fs_jpim1 ! vector opt.1235 ikbu = mbku(ji,jj) ! bottom ocean level of u-point1236 ikbv = mbkv(ji,jj)1237 cbx = avmu(ji,jj,ikbu+1) / fse3uw(ji,jj,ikbu+1)1238 cby = avmv(ji,jj,ikbv+1) / fse3vw(ji,jj,ikbv+1)1239 wbotu(ji,jj) = -cbx * un(ji,jj,ikbu) * umask(ji,jj,1)1240 wbotv(ji,jj) = -cby * vn(ji,jj,ikbv) * vmask(ji,jj,1)1241 END DO1242 END DO1243 1215 ENDIF 1244 1216 ! … … 1252 1224 CALL iom_rstput( kt, nitrst, numrow, 'avmv' , avmv ) 1253 1225 CALL iom_rstput( kt, nitrst, numrow, 'mxln' , mxln ) 1254 CALL iom_rstput( kt, nitrst, numrow, 'wbotu' , wbotu )1255 CALL iom_rstput( kt, nitrst, numrow, 'wbotv' , wbotv )1256 1226 ! 1257 1227 ENDIF -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90
r2450 r2497 44 44 USE zdf_oce ! vertical physics: ocean variables 45 45 USE zdfmxl ! vertical physics: mixed layer 46 USE zdfbfr ! vertical mixing: bottom friction47 46 USE restart ! ocean restart 48 47 USE lbclnk ! ocean lateral boundary conditions (or mpp link)
Note: See TracChangeset
for help on using the changeset viewer.