Changeset 4481 for LMDZ6/trunk/libf
- Timestamp:
- Mar 28, 2023, 4:00:31 PM (21 months ago)
- Location:
- LMDZ6/trunk/libf/phylmd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/atke_exchange_coeff_mod.F90
r4478 r4481 26 26 27 27 28 USE atke_turbulence_ini_mod, ONLY : iflag_atke, kappa, l0, ric, c n, cinf, rpi, rcpd28 USE atke_turbulence_ini_mod, ONLY : iflag_atke, kappa, l0, ric, cinf, rpi, rcpd 29 29 USE atke_turbulence_ini_mod, ONLY : cepsilon, pr_slope, pr_asym, pr_neut, rg, rd 30 30 USE atke_turbulence_ini_mod, ONLY : viscom, viscoh … … 66 66 67 67 INTEGER :: igrid,ilay ! horizontal,vertical index (flat grid) 68 REAL :: Ri0,Ri1 ! parameter for Sm stability function and Prandlt68 REAL :: cn,Ri0,Ri1 ! parameter for Sm stability function and Prandlt 69 69 REAL :: preff ! reference pressure for potential temperature calculations 70 70 REAL :: thetam ! mean potential temperature at interface … … 77 77 dz_interf(igrid,1) = 0.0 78 78 z_interf(igrid,1) = 0.0 79 ! Km(igrid,1) = 0.080 ! Kh(igrid,1) = 0.081 ! tke(igrid,1) = 0.082 ! Km(igrid,nlay+1) = 0.083 ! Kh(igrid,nlay+1) = 0.084 ! tke(igrid,nlay+1) = 0.085 79 END DO 86 80 … … 129 123 !=================================================================== 130 124 125 ! calculation of cn = Sm value at Ri=0 126 ! direct dependance on cepsilon to guarantee Fm=1 (first-order like stability function) at Ri=0 127 cn=(1./sqrt(cepsilon))**(2/3) 128 ! calculation of Ri0 such that continuity in slope of Sm at Ri=0 129 Ri0=2./rpi*(cinf - cn)*ric/cn 130 ! calculation of Ri1 to guarantee continuity in slope of Prandlt number at Ri=0 131 Ri1 = -2./rpi * (pr_asym - pr_neut) / pr_slope 132 133 131 134 DO ilay=2,nlay 132 135 DO igrid=1,ngrid … … 136 139 MAX(((wind_u(igrid,ilay) - wind_u(igrid,ilay-1)) / dz_lay(igrid,ilay))**2 + & 137 140 ((wind_v(igrid,ilay) - wind_v(igrid,ilay-1)) / dz_lay(igrid,ilay))**2,1E-10) 138 ! calculation of Ri0 such that continuity in slope of Sm at Ri=0 139 Ri0=2./rpi*(cinf - cn)*ric/cn 140 ! calculation of Ri1 to guarantee continuity in slope of Prandlt number at Ri=0 141 Ri1 = -2./rpi * (pr_asym - pr_neut) / pr_slope 142 143 IF (Ri(igrid,ilay) < 0.) THEN 141 142 IF (Ri(igrid,ilay) < 0.) THEN ! unstable cases 144 143 Sm(igrid,ilay) = 2./rpi * (cinf-cn) * atan(-Ri(igrid,ilay)/Ri0) + cn 145 144 Prandtl(igrid,ilay) = -2./rpi * (pr_asym - pr_neut) * atan(Ri(igrid,ilay)/Ri1) + pr_neut 146 ELSE 145 ELSE ! stable cases 147 146 Sm(igrid,ilay) = max(0.,cn*(1.-Ri(igrid,ilay)/Ric)) 148 147 Prandtl(igrid,ilay) = pr_neut + Ri(igrid,ilay) * pr_slope 148 IF (Ri(igrid,ilay) .GE. Prandtl(igrid,ilay)) THEN 149 call abort_physic("atke_compute_km_kh", & 150 'Ri>=Pr in stable conditions -> violates energy conservation principles, change pr_neut or slope', 1) 151 ENDIF 149 152 END IF 150 153 -
LMDZ6/trunk/libf/phylmd/atke_turbulence_ini_mod.F90
r4478 r4481 9 9 real :: kappa = 0.4 ! Von Karman constant 10 10 !$OMP THREADPRIVATE(kappa) 11 real :: l0, ric, ri0, c n, cinf, cepsilon, pr_slope, pr_asym, pr_neut12 !$OMP THREADPRIVATE(l0, ric, c n, cinf, cepsilon, pr_slope, pr_asym, pr_neut)11 real :: l0, ric, ri0, cinf, cepsilon, pr_slope, pr_asym, pr_neut 12 !$OMP THREADPRIVATE(l0, ric, cinf, cepsilon, pr_slope, pr_asym, pr_neut) 13 13 integer :: lunout,prt_level 14 14 !$OMP THREADPRIVATE(lunout,prt_level) … … 53 53 CALL getin_p('atke_ric',ric) 54 54 55 ! value of Sm stability function for neutral conditions (Ri=0)56 cn=1.057 CALL getin_p('atke_cn',cn)58 59 55 ! asymptotic value of Sm for Ri=-Inf 60 56 cinf=1.5 … … 74 70 75 71 ! value of turbulent prandtl number in neutral conditions (Ri=0) 76 ! to guarantee tke>0 in stationary case, pr_neut has to be >= 1 77 pr_neut=1.0 72 pr_neut=0.8 78 73 CALL getin_p('atke_pr_neut',pr_neut) 79 74 -
LMDZ6/trunk/libf/phylmd/cdrag_mod.F90
r4478 r4481 23 23 USE print_control_mod, ONLY: lunout, prt_level 24 24 USE ioipsl_getin_p_mod, ONLY : getin_p 25 USE atke_turbulence_ini_mod, ONLY : ric, c n, cinf, cepsilon, pr_slope, pr_asym, pr_neut25 USE atke_turbulence_ini_mod, ONLY : ric, cinf, cepsilon, pr_slope, pr_asym, pr_neut 26 26 27 27 IMPLICIT NONE … … 128 128 REAL zzzcd 129 129 REAL, DIMENSION(klon) :: sm, prandtl ! Stability function from atke turbulence scheme 130 REAL ri0, ri1 130 REAL ri0, ri1, cn ! to have dimensionless term in sm and prandtl 131 131 132 132 LOGICAL, SAVE :: firstcall = .TRUE. … … 168 168 169 169 ALPHA=5.0 170 171 ! Consistent with atke scheme 172 cn=(1./sqrt(cepsilon))**(2/3) 173 ri0=2./rpi*(cinf - cn)*ric/cn 174 ri1=-2./rpi * (pr_asym - pr_neut)/pr_slope 170 175 171 176 … … 246 251 !******************************************************* 247 252 253 254 248 255 !'''''''''''''' 249 256 ! Cas instables … … 291 298 CASE (6) ! Consistent with turbulence scheme (in stationary case) derived in atke (2023) 292 299 293 ri0=2./rpi*(cinf - cn)*ric/cn294 ri1=-2./rpi * (pr_asym - pr_neut)/pr_slope295 300 sm(i) = 2./rpi * (cinf - cn) * atan(-zri(i)/ri0) + cn 296 301 prandtl(i) = -2./rpi * (pr_asym - pr_neut) * atan(zri(i)/ri1) + pr_neut
Note: See TracChangeset
for help on using the changeset viewer.