Changeset 4653 for LMDZ6/trunk/libf/phylmd/atke_exchange_coeff_mod.F90
- Timestamp:
- Aug 30, 2023, 9:15:43 AM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/atke_exchange_coeff_mod.F90
r4644 r4653 6 6 7 7 subroutine atke_compute_km_kh(ngrid,nlay,dtime, & 8 wind_u,wind_v,temp, play,pinterf,cdrag_uv, &8 wind_u,wind_v,temp,qvap,play,pinterf,cdrag_uv, & 9 9 tke,Km_out,Kh_out) 10 10 … … 26 26 27 27 28 USE atke_turbulence_ini_mod, ONLY : iflag_atke, kappa, l0, ric, cinf, rpi, rcpd, ok_vdiff_tke29 USE atke_turbulence_ini_mod, ONLY : cepsilon, pr_slope, pr_asym, pr_neut, ctkes,rg, rd 28 USE atke_turbulence_ini_mod, ONLY : iflag_atke, kappa, l0, ric, cinf, rpi, rcpd, atke_ok_virtual 29 USE atke_turbulence_ini_mod, ONLY : cepsilon, pr_slope, pr_asym, pr_neut, ctkes,rg, rd, rv, atke_ok_vdiff 30 30 USE atke_turbulence_ini_mod, ONLY : viscom, viscoh, clmix, iflag_atke_lmix, lmin, smmin 31 31 … … 43 43 REAL, DIMENSION(ngrid,nlay), INTENT(IN) :: wind_v ! meridional velocity (m/s) 44 44 REAL, DIMENSION(ngrid,nlay), INTENT(IN) :: temp ! temperature (K) 45 REAL, DIMENSION(ngrid,nlay), INTENT(IN) :: qvap ! specific humidity (kg/kg) 45 46 REAL, DIMENSION(ngrid,nlay), INTENT(IN) :: play ! pressure (Pa) 46 47 REAL, DIMENSION(ngrid,nlay+1), INTENT(IN) :: pinterf ! pressure at interfaces(Pa) … … 81 82 REAL :: netsource ! net source term of tke 82 83 REAL :: ustar ! friction velocity estimation 84 REAL :: invtau 85 REAL :: rvap 83 86 84 87 ! Initializations: … … 90 93 END DO 91 94 92 ! Calculation of potential temperature: (if vapor -> todovirtual potential temperature)95 ! Calculation of potential temperature: (if vapor -> virtual potential temperature) 93 96 !===================================== 94 97 95 98 preff=100000. 96 ! The resultshould not depend on the choice of preff99 ! results should not depend on the choice of preff 97 100 DO ilay=1,nlay 98 101 DO igrid = 1, ngrid … … 101 104 END DO 102 105 106 ! account for water vapor mass for buoyancy calculation 107 IF (atke_ok_virtual) THEN 108 DO ilay=1,nlay 109 DO igrid = 1, ngrid 110 rvap=max(0.,qvap(igrid,ilay)/(1.-qvap(igrid,ilay))) 111 theta(igrid,ilay)=theta(igrid,ilay)*(1.+rvap/(RD/RV))/(1.+rvap) 112 END DO 113 END DO 114 ENDIF 103 115 104 116 … … 287 299 288 300 301 ELSE IF (iflag_atke == 5) THEN 302 ! semi implicit scheme from Arpege (V. Masson methodology with 303 ! Taylor expansion of the dissipation term) 304 ! and implicit resolution when switch num (when we use the mixing length as a function of tke) 305 DO ilay=2,nlay 306 DO igrid=1,ngrid 307 qq=max(sqrt(2.*tke(igrid,ilay)),1.e-10) 308 if (switch_num(igrid,ilay) .and. N2(igrid,ilay)>0.) then 309 invtau=clmix*Sm(igrid,ilay)/sqrt(N2(igrid,ilay))*shear2(igrid,ilay)*(1.-Ri(igrid,ilay)/Prandtl(igrid,ilay)) & 310 -sqrt(N2(igrid,ilay))/(cepsilon*clmix) 311 !qq=qq/(1.-dtime*invtau) 312 !qq=qq*exp(dtime*invtau) 313 tke(igrid,ilay)=tke(igrid,ilay)/(1.-dtime*invtau) 314 tke(igrid,ilay)=max(0.,tke(igrid,ilay)) 315 else 316 qq=(l_exchange(igrid,ilay)*Sm(igrid,ilay)/sqrt(2.)*shear2(igrid,ilay)*(1.-Ri(igrid,ilay)/Prandtl(igrid,ilay)) & 317 +qq*(1.+dtime*qq/(cepsilon*l_exchange(igrid,ilay)*2.*sqrt(2.)))) & 318 /(1.+2.*qq*dtime/(cepsilon*l_exchange(igrid,ilay)*2.*sqrt(2.))) 319 qq=max(0.,qq) 320 tke(igrid,ilay)=0.5*(qq**2) 321 endif 322 ENDDO 323 ENDDO 324 325 289 326 ELSE 290 327 call abort_physic("atke_compute_km_kh", & … … 312 349 ! vertical diffusion of TKE 313 350 !========================== 314 IF ( ok_vdiff_tke) THEN351 IF (atke_ok_vdiff) THEN 315 352 CALL atke_vdiff_tke(ngrid,nlay,dtime,z_lay,z_interf,temp,play,l_exchange,Sm,tke) 316 353 ENDIF … … 338 375 339 376 ! routine that computes the vertical diffusion of TKE by the turbulence 340 ! using an implicit resolution (See note by Dufresne and Ghattas 377 ! using an implicit resolution (See note by Dufresne and Ghattas (2009)) 341 378 ! E Vignon, July 2023 342 379
Note: See TracChangeset
for help on using the changeset viewer.