Changeset 6007 for LMDZ6/trunk/libf
- Timestamp:
- Jan 7, 2026, 10:29:50 PM (2 weeks ago)
- Location:
- LMDZ6/trunk/libf
- Files:
-
- 3 edited
-
phylmd/lmdz_lscp_subgridvarq.f90 (modified) (14 diffs)
-
phylmd/physiq_mod.F90 (modified) (5 diffs)
-
phylmdiso/physiq_mod.F90 (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/lmdz_lscp_subgridvarq.f90
r6005 r6007 32 32 !======================================================================= 33 33 SUBROUTINE ratqs_main(klon,klev,nbsrf,is_ter,is_lic, & 34 iflag_cld_th, fact_cldcon,pdtphys,&34 iflag_cld_th,pdtphys, & 35 35 pctsrf,s_pblh,zstd, wake_s, wake_deltaq, & 36 ptconv, clwcon0th, rnebcon0th, &37 36 paprs,pplay,t_seri,q_seri, & 38 37 qtc_cv, sigt_cv,detrain_cv,fm_cv,fqd,fqcomp, & 39 38 sigd,qsat, & 40 39 fm_therm,entr_therm,detr_therm,cell_area, & 41 ratqs,ratqsc,ratqs_inter_,sigma_qtherm) 42 43 44 USE clouds_gno_mod, ONLY: clouds_gno 40 ratqsc,ratqs,ratqs_inter_,sigma_qtherm) 41 42 45 43 USE lmdz_lscp_ini, ONLY: prt_level, lunout, iflag_ratqs 46 44 USE lmdz_lscp_ini, ONLY: ratqsbas, ratqshaut … … 54 52 ! that is, sigma=ratqs*qmean 55 53 ! Various options controled by flags iflag_cld_th and iflag_ratqs 56 ! by default, a vertical arctan profile of ratqs is prescribed 57 ! new options consider an interactive computation of ratqs 58 ! depending on other physical parameterizations and relief 54 ! This routine consists in 2 steps. 55 ! First the "stratiform" ratqs (ratqss, corresponding to stratiform clouds) 56 ! is computed 57 ! Then the total ratqs is calculated either taken equal to ratqss or 58 ! calculated as a combination of ratqss and 59 ! that corresponding to deep convective clouds ratqsc 60 ! (input of the routine, from the deep convection part). 59 61 ! contact: Frederic Hourdin, frederic.hourdin@lmd.ipsl.fr 60 62 ! … … 71 73 integer, intent(in) :: nbsrf,is_ter,is_lic ! number of subgrid tiles and indices for land and landice 72 74 integer, intent(in) :: iflag_cld_th ! flag that controls cloud properties in presence of thermals 73 real,intent(in) :: fact_cldcon ! factor for convective clouds [-]74 75 real,intent(in) :: pdtphys ! physics time step [s] 75 76 real, dimension(klon,klev+1), intent(in) :: paprs ! pressure at layer interfaces [Pa] … … 89 90 90 91 real, dimension(klon,klev+1), intent(in) :: fm_therm ! convective mass flux of thermals [kg/s/m2] 91 logical, dimension(klon,klev), intent(in) :: ptconv ! convective grid points92 real, dimension(klon,klev), intent(in) :: clwcon0th ! condensed water in thermals updrafts [kg/kg]93 92 real, dimension(klon,klev),intent(in) :: wake_deltaq ! difference in humidity between wakes and environment [kg/kg] 94 93 real, dimension(klon),intent(in) :: wake_s ! wake fraction area [-] … … 97 96 real, dimension(klon),intent(in) :: s_pblh ! boundary layer height [m] 98 97 real, dimension(klon),intent(in) :: zstd ! sub grid orography standard deviation [m] 98 real, dimension(klon,klev), intent(in) :: ratqsc ! convective ratqs 99 99 100 ! Inout101 real, dimension(klon,klev), intent(inout) :: ratqs ! ratqs i.e. factor for subgrid standard deviation of humidit102 real, dimension(klon,klev), intent(inout) :: ratqsc ! convective ratqs103 104 100 ! Output 101 real, dimension(klon,klev), intent(out) :: ratqs ! ratqs i.e. factor for subgrid standard deviation of humidit 105 102 real, dimension(klon,klev), intent(out) :: ratqs_inter_ ! interactive ratqs 106 103 real, dimension(klon,klev), intent(out) :: sigma_qtherm ! standard deviation of humidity in thermals [kg/kg] 107 real, dimension(klon,klev), intent(out) :: rnebcon0th ! cloud fraction associated with thermal updrafts (old method) [-]108 104 109 105 … … 111 107 integer :: i,k 112 108 real, dimension(klon,klev) :: ratqss 113 logical, dimension(klon,klev) :: ptconvthfalse114 109 real :: facteur,zfratqs1,zfratqs2 115 110 real, dimension(klon,klev) :: ratqs_oro_ 116 111 real :: resol, fact 117 112 118 ! Ratqs computation 119 !------------------ 120 121 ! old-style convective ratqs computation as a function of q(z=0)-q / q 122 ! the ratqsc computed by clouds_gno is replaced 123 if (iflag_cld_th.eq.1) then 124 do k=1,klev 125 do i=1,klon 126 if(ptconv(i,k)) then 127 ratqsc(i,k)=ratqsbas & 128 +fact_cldcon*(q_seri(i,1)-q_seri(i,k))/q_seri(i,k) 129 else 130 ratqsc(i,k)=0. 131 endif 132 enddo 133 enddo 134 135 ! through log-normal distribution inversion 136 else if (iflag_cld_th.eq.4) then 137 ptconvthfalse(:,:)=.false. 138 ratqsc(:,:)=0. 139 if(prt_level.ge.9) print*,'avant clouds_gno thermique' 140 call clouds_gno & 141 (klon,klev,q_seri,qsat,clwcon0th,ptconvthfalse,ratqsc,rnebcon0th) 142 if(prt_level.ge.9) print*,' CLOUDS_GNO OK' 143 144 endif 145 146 ! stratiform ratqs 147 if (iflag_ratqs.eq.0) then 148 149 ! iflag_ratqs=0 corresponds to IPCC 2005 version of the model. 150 do k=1,klev 113 114 ! First step: stratiform clouds ratqs (ratqss) computation 115 !--------------------------------------------------------- 116 ! for all options, the background ratqss is computed as a 117 ! function increasing from a value at the ground surface 118 ! (0 or ratqsbas) and a value for the high atmosphere 119 ! (ratqshaut) 120 121 if (iflag_ratqs.eq.0) then 122 123 ! iflag_ratqs=0 corresponds to LMDZ4 version of the model 124 ! with a linear function of pressure 125 126 do k=1,klev 151 127 do i=1, klon 152 128 ratqss(i,k)=ratqsbas+(ratqshaut-ratqsbas)* & … … 155 131 enddo 156 132 157 ! for iflag_ratqs = 1 or 2, ratqs is constant above 300 hPa (ratqshaut), 158 ! and then linearly varies between 600 and 300 hPa and it is either constant (ratqsbas) for iflag_ratqs=1 159 ! or lineary varies (between ratqsbas and 0 at the surface) for iflag_ratqs=2 133 ! for iflag_ratqs = 1 or 2, ratqss is constant above 300 hPa (ratqshaut), 134 ! and then linearly varies between 600 and 300 hPa and it is either constant (ratqsbas) 135 ! for iflag_ratqs=1 or lineary varies (between ratqsbas and 0 at the surface) for iflag_ratqs=2 136 ! iflag_ratqs=2 was the option retained for LMDZ5A (see Hourdin et al. 2013) 160 137 161 138 else if (iflag_ratqs.eq.1) then … … 187 164 enddo 188 165 166 ! quadratic dependency upon pressure 167 189 168 else if (iflag_ratqs==3) then 190 169 do k=1,klev … … 193 172 enddo 194 173 174 ! atan dependency on pressure, ratqsp0 being the pressure 175 ! where the transition occurs and ratqsdp controls 176 ! the sharpness of the transition. This is the version used 177 ! in LMDZ6A (see Madeleine et al. 2020, fig 2). 178 195 179 else if (iflag_ratqs==4) then 196 180 do k=1,klev … … 201 185 202 186 else if (iflag_ratqs==5) then 203 ! Dependency of ratqs on model resolution (dependency on sqrt(cell_area)204 ! according to high-tropo aircraft obs, A. Borella PhD)187 ! Dependency of ratqs on model resolution (dependency on sqrt(cell_area) 188 ! according to high-tropo aircraft obs, A. Borella PhD) 205 189 do k=1,klev 206 190 do i=1,klon … … 213 197 214 198 215 else if (iflag_ratqs .GE. 10) then199 else if (iflag_ratqs .GE. 10) then 216 200 217 ! interactive ratqs calculations that depend on cold pools, orography 218 ! This should help getting a more realistic ratqs in the low and mid troposphere 219 ! We however need a "background" ratqs to account for subgrid distribution of qt (or qt/qs) 220 ! in the high troposphere 201 ! interactive ratqss calculations that depend on cold pools, orography 202 ! This should help getting a more realistic ratqs in the low and mid troposphere 203 ! We however need a "background" ratqs to account for subgrid distribution of qt (or qt/qs) 204 ! in the high troposphere. 205 ! work of Louis d'Alecon, PhD 221 206 222 ! backgroundratqs and initialisations207 ! background atan ratqs and initialisations 223 208 do k=1,klev 224 209 do i=1,klon … … 247 232 endif 248 233 249 ! final ratqs250 !-------------- 234 ! Second step: total ratqs calculation 235 !---------------------------------------- 251 236 252 237 if (iflag_cld_th.eq.1 .or.iflag_cld_th.eq.2.or.iflag_cld_th.eq.4) then 253 ! We add a small constant value to ratqsc*2 to account for small-scale fluctuations 254 do k=1,klev 255 do i=1,klon 256 if ((fm_therm(i,k)>1.e-10)) then 257 ratqsc(i,k)=sqrt(ratqsc(i,k)**2+0.05**2) 258 endif 259 enddo 260 enddo 261 262 ! ratqs are a combination of ratqss et ratqsc 238 239 ! ratqs are a combination of ratqss et ratqsc 240 263 241 if(prt_level.ge.9) write(lunout,*)'PHYLMD NEW TAU_RATQS ',tau_ratqs 264 242 265 243 if (tau_ratqs>1.e-10) then 266 244 facteur=exp(-pdtphys/tau_ratqs) … … 270 248 ratqs(:,:)=ratqsc(:,:)*(1.-facteur)+ratqs(:,:)*facteur 271 249 ratqs(:,:)=max(ratqs(:,:),ratqss(:,:)) 250 272 251 else if (iflag_cld_th<=6) then 273 ! we only keep the stable ratqs for lscp 252 253 ! ratqs is taken equal to ratqss 274 254 ratqs(:,:)=ratqss(:,:) 255 275 256 else 276 zfratqs1=exp(-pdtphys/10800.) 277 zfratqs2=exp(-pdtphys/10800.) 278 do k=1,klev 257 258 ! additional exploratory combinations of ratqss and ratqsc 259 zfratqs1=exp(-pdtphys/10800.) 260 zfratqs2=exp(-pdtphys/10800.) 261 do k=1,klev 279 262 do i=1,klon 280 263 if (ratqsc(i,k).gt.1.e-10) then … … 283 266 ratqs(i,k)=min(ratqs(i,k)*zfratqs1+ratqss(i,k)*(1.-zfratqs1),0.5) 284 267 enddo 285 enddo268 enddo 286 269 endif 287 270 -
LMDZ6/trunk/libf/phylmd/physiq_mod.F90
r6005 r6007 109 109 USE lmdz_thermcell_dtke, ONLY : thermcell_dtke 110 110 USE lmdz_blowing_snow_ini, ONLY : blowing_snow_ini , qbst_bs 111 USE lmdz_lscp_ini, ONLY : lscp_ini 111 USE lmdz_lscp_ini, ONLY : lscp_ini, ratqsbas 112 112 USE lmdz_lscp_subgridvarq, ONLY : ratqs_main, ratqs_main_first 113 113 USE lmdz_cloud_optics_prop_ini, ONLY : cloud_optics_prop_ini … … 1972 1972 pbl_eps(:,:,is_ave) = 0. 1973 1973 ENDIF 1974 !IM begin1975 print*,'physiq: clwcon rnebcon ratqs',clwcon(1,1),rnebcon(1,1) &1976 ,ratqs(1,1)1977 !IM end1978 1974 1979 1975 … … 3421 3417 ENDIF 3422 3418 3423 ! =================================================================== c3424 ! Calcul des proprietes des nuages convectifs3425 ! 3426 3427 ! calcul des proprietes des nuages convectifs 3419 ! ======================================================================== 3420 ! Calculation of deep convective clouds properties 3421 ! that is, the convective ratqs (ratqsc) and the convective cloud fraction 3422 ! ======================================================================== 3423 3428 3424 clwcon0(:,:)=fact_cldcon*clwcon0(:,:) 3429 3425 IF (iflag_cld_cv == 0) THEN … … 3435 3431 ENDIF 3436 3432 3437 3438 ! =================================================================== c 3433 ! old-style convective ratqs computation as a function of q(z=0)-q / q 3434 ! the ratqsc computed by clouds_gno is replaced 3435 if (iflag_cld_th.eq.1) then 3436 do k=1,klev 3437 do i=1,klon 3438 if (ptconv(i,k)) then 3439 ratqsc(i,k)=ratqsbas & 3440 +fact_cldcon*(q_seri(i,1)-q_seri(i,k))/q_seri(i,k) 3441 else 3442 ratqsc(i,k)=0. 3443 endif 3444 enddo 3445 enddo 3446 ! through log-normal distribution inversion 3447 else if (iflag_cld_th.eq.4) then 3448 ptconvth(:,:)=.false. 3449 ratqsc(:,:)=0. 3450 call clouds_gno & 3451 (klon,klev,q_seri,zqsat,clwcon0th,ptconvth,ratqsc,rnebcon0th) 3452 endif 3453 3454 if (iflag_cld_th.eq.1 .or.iflag_cld_th.eq.2.or.iflag_cld_th.eq.4) then 3455 ! We add a small constant value to ratqsc*2 to account for small-scale fluctuations 3456 do k=1,klev 3457 do i=1,klon 3458 if ((fm_therm(i,k)>1.e-10)) then 3459 ratqsc(i,k)=sqrt(ratqsc(i,k)**2+0.05**2) 3460 endif 3461 enddo 3462 enddo 3463 endif 3464 3465 ! ======================================================================== 3439 3466 3440 3467 DO i = 1, klon … … 3932 3959 CALL ratqs_main_first(klon, cell_area) 3933 3960 CALL ratqs_main(klon,klev,nbsrf,is_ter,is_lic, & 3934 iflag_cld_th, fact_cldcon,pdtphys, &3961 iflag_cld_th, pdtphys, & 3935 3962 pctsrf,s_pblh,zstd, wake_s, wake_deltaq, & 3936 ptconv, clwcon0th, rnebcon0th, &3937 3963 paprs,pplay,t_seri,q_seri, & 3938 3964 qtc_cv, sigt_cv,detrain_cv,fm_cv,fqd,fqcomp,sigd,zqsat, & 3939 3965 fm_therm,entr_therm,detr_therm,cell_area, & 3940 ratqs ,ratqsc,ratqs_inter_,sigma_qtherm)3966 ratqsc,ratqs,ratqs_inter_,sigma_qtherm) 3941 3967 3942 3968 -
LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90
r6005 r6007 108 108 USE lmdz_thermcell_dtke, ONLY : thermcell_dtke 109 109 USE lmdz_blowing_snow_ini, ONLY : blowing_snow_ini , qbst_bs 110 USE lmdz_lscp_ini, ONLY : lscp_ini 110 USE lmdz_lscp_ini, ONLY : lscp_ini, ratqsbas 111 111 USE lmdz_lscp_subgridvarq, ONLY : ratqs_main, ratqs_main_first 112 112 USE lmdz_cloud_optics_prop_ini, ONLY : cloud_optics_prop_ini … … 4222 4222 enddo 4223 4223 ENDIF 4224 4225 ! =================================================================== c 4226 ! Calcul des proprietes des nuages convectifs 4227 ! 4228 4229 ! calcul des proprietes des nuages convectifs 4230 clwcon0(:,:)=fact_cldcon*clwcon0(:,:) 4231 IF (iflag_cld_cv == 0) THEN 4232 CALL clouds_gno & 4233 (klon,klev,q_seri,zqsat,clwcon0,ptconv,ratqsc,rnebcon0) 4234 ELSE 4235 CALL clouds_bigauss & 4236 (klon,klev,q_seri,zqsat,qtc_cv,sigt_cv,ptconv,ratqsc,rnebcon0) 4237 ENDIF 4238 4239 4240 ! =================================================================== c 4224 4225 ! ========================================================================= 4226 ! Calculation of deep convective clouds properties 4227 ! that is, the convective ratqs (raqtsc) and the convective cloud fraction 4228 ! ========================================================================= 4229 4230 clwcon0(:,:)=fact_cldcon*clwcon0(:,:) 4231 IF (iflag_cld_cv == 0) THEN 4232 CALL clouds_gno & 4233 (klon,klev,q_seri,zqsat,clwcon0,ptconv,ratqsc,rnebcon0) 4234 ELSE 4235 CALL clouds_bigauss & 4236 (klon,klev,q_seri,zqsat,qtc_cv,sigt_cv,ptconv,ratqsc,rnebcon0) 4237 ENDIF 4238 4239 ! old-style convective ratqs computation as a function of q(z=0)-q / q 4240 ! the ratqsc computed by clouds_gno is replaced 4241 if (iflag_cld_th.eq.1) then 4242 do k=1,klev 4243 do i=1,klon 4244 if (ptconv(i,k)) then 4245 ratqsc(i,k)=ratqsbas & 4246 +fact_cldcon*(q_seri(i,1)-q_seri(i,k))/q_seri(i,k) 4247 else 4248 ratqsc(i,k)=0. 4249 endif 4250 enddo 4251 enddo 4252 ! through log-normal distribution inversion 4253 else if (iflag_cld_th.eq.4) then 4254 ptconvth(:,:)=.false. 4255 ratqsc(:,:)=0. 4256 call clouds_gno & 4257 (klon,klev,q_seri,zqsat,clwcon0th,ptconvth,ratqsc,rnebcon0th) 4258 endif 4259 4260 if (iflag_cld_th.eq.1 .or.iflag_cld_th.eq.2.or.iflag_cld_th.eq.4) then 4261 ! We add a small constant value to ratqsc*2 to account for small-scale fluctuations 4262 do k=1,klev 4263 do i=1,klon 4264 if ((fm_therm(i,k)>1.e-10)) then 4265 ratqsc(i,k)=sqrt(ratqsc(i,k)**2+0.05**2) 4266 endif 4267 enddo 4268 enddo 4269 endif 4270 4271 ! ======================================================================= 4272 4241 4273 4242 4274 DO i = 1, klon … … 5096 5128 CALL ratqs_main_first(klon, cell_area) 5097 5129 CALL ratqs_main(klon,klev,nbsrf,is_ter,is_lic, & 5098 iflag_cld_th, fact_cldcon,pdtphys, &5130 iflag_cld_th,pdtphys, & 5099 5131 pctsrf,s_pblh,zstd, wake_s, wake_deltaq, & 5100 ptconv,clwcon0th, rnebcon0th, &5101 5132 paprs,pplay,t_seri,q_seri, & 5102 5133 qtc_cv, sigt_cv,detrain_cv,fm_cv,fqd,fqcomp,sigd,zqsat, & 5103 5134 fm_therm,entr_therm,detr_therm,cell_area, & 5104 ratqs ,ratqsc,ratqs_inter_,sigma_qtherm)5135 ratqss,ratqs,ratqs_inter_,sigma_qtherm) 5105 5136 5106 5137 !
Note: See TracChangeset
for help on using the changeset viewer.
