- Timestamp:
- Apr 13, 2025, 7:10:19 PM (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/contrails/libf/phylmd/lmdz_lscp_condensation.f90
r5602 r5609 94 94 !********************************************************************************** 95 95 SUBROUTINE condensation_ice_supersat( & 96 klon, dtime, pplay, paprsdn, paprsup, cldfracv, qcondcv, & 97 cldfra_in, qvc_in, qliq_in, qice_in, shear, pbl_eps, cell_area, stratomask, & 98 temp, qtot_in, qsat, gamma_cond, ratqs, keepgoing, & 99 cldfra, qincld, qvc, issrfra, qissr, dcf_sub, dcf_con, dcf_mix, & 100 dqi_adj, dqi_sub, dqi_con, dqi_mix, dqvc_adj, dqvc_sub, dqvc_con, dqvc_mix, & 101 contfra_in, qcont_in, flight_dist, flight_h2o, contfra, qcont, & 102 Tcritcont, qcritcont, potcontfraP, potcontfraNP, & 96 klon, dtime, pplay, paprsdn, paprsup, cfcon, & 97 cldfra_in, qvc_in, qliq_in, qice_in, shear, pbl_eps, cell_area, & 98 temp, qtot_in, qsat, gamma_cond, ratqs, keepgoing, pt_pron_clds, & 99 cldfra_above, icesed_flux, & 100 cldfra, qincld, qvc, issrfra, qissr, dcf_sub, dcf_con, dcf_mix, dcf_sed, & 101 dqi_adj, dqi_sub, dqi_con, dqi_mix, dqi_sed, & 102 dqvc_adj, dqvc_sub, dqvc_con, dqvc_mix, dqvc_sed, & 103 contfra_in, perscontfra_in, qva_in, qia_in, flight_dist, flight_h2o, & 104 contfra, perscontfra, qcont, Tcritcont, qcritcont, potcontfraP, potcontfraNP, & 103 105 dcfa_ini, dqia_ini, dqta_ini, dcfa_sub, dqia_sub, dqta_sub, & 104 106 dcfa_cir, dqta_cir, dcfa_mix, dqia_mix, dqta_mix) … … 118 120 119 121 USE lmdz_lscp_tools, ONLY: calc_qsat_ecmwf, calc_gammasat, GAMMAINC 120 USE lmdz_lscp_ini, ONLY: RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG, RV, RPI, EPS_W 121 USE lmdz_lscp_ini, ONLY: eps, temp_nowater, ok_weibull_warm_clouds 122 USE lmdz_lscp_ini, ONLY: ok_unadjusted_clouds, ok_no_issr_strato 123 124 USE lmdz_lscp_ini, ONLY: depo_coef_cirrus, capa_cond_cirrus, std_subl_pdf_lscp 125 USE lmdz_lscp_ini, ONLY: beta_pdf_lscp, temp_thresh_pdf_lscp 122 USE lmdz_lscp_ini, ONLY: RLSTT, RTT, RD, RG, RV, RPI, EPS_W 123 USE lmdz_lscp_ini, ONLY: eps, temp_nowater, ok_unadjusted_clouds 124 125 USE lmdz_lscp_ini, ONLY: depo_coef_cirrus, capa_cond_cirrus, rho_ice 126 USE lmdz_lscp_ini, ONLY: mu_subl_pdf_lscp, beta_pdf_lscp, temp_thresh_pdf_lscp 126 127 USE lmdz_lscp_ini, ONLY: std100_pdf_lscp, k0_pdf_lscp, kappa_pdf_lscp 127 128 USE lmdz_lscp_ini, ONLY: coef_mixing_lscp, coef_shear_lscp … … 143 144 REAL, INTENT(IN) , DIMENSION(klon) :: paprsdn ! pressure at the lower interface [Pa] 144 145 REAL, INTENT(IN) , DIMENSION(klon) :: paprsup ! pressure at the upper interface [Pa] 145 REAL, INTENT(IN) , DIMENSION(klon) :: cldfracv ! cloud fraction from deep convection [-] 146 REAL, INTENT(IN) , DIMENSION(klon) :: qcondcv ! in-cloud condensed specific humidity from deep convection [kg/kg] 146 REAL, INTENT(IN) , DIMENSION(klon) :: cfcon ! cloud fraction from deep convection [-] 147 147 REAL, INTENT(IN) , DIMENSION(klon) :: cldfra_in ! cloud fraction [-] 148 148 REAL, INTENT(IN) , DIMENSION(klon) :: qvc_in ! gridbox-mean water vapor in cloud [kg/kg] … … 152 152 REAL, INTENT(IN) , DIMENSION(klon) :: pbl_eps ! TKE dissipation [m2/s3] 153 153 REAL, INTENT(IN) , DIMENSION(klon) :: cell_area ! cell area [m2] 154 REAL, INTENT(IN) , DIMENSION(klon) :: stratomask ! fraction of stratosphere in the mesh (1 or 0)155 154 REAL, INTENT(IN) , DIMENSION(klon) :: temp ! temperature [K] 156 155 REAL, INTENT(IN) , DIMENSION(klon) :: qtot_in ! total specific humidity (without precip) [kg/kg] … … 159 158 REAL, INTENT(IN) , DIMENSION(klon) :: ratqs ! ratio between the variance of the total water distribution and its average [-] 160 159 LOGICAL, INTENT(IN) , DIMENSION(klon) :: keepgoing ! .TRUE. if a new condensation loop should be computed 160 LOGICAL, INTENT(IN) , DIMENSION(klon) :: pt_pron_clds ! .TRUE. if clouds are prognostic in this mesh 161 REAL, INTENT(IN) , DIMENSION(klon) :: cldfra_above ! cloud fraction IN THE LAYER ABOVE [-] 162 REAL, INTENT(IN) , DIMENSION(klon) :: icesed_flux ! sedimentated ice flux [kg/s/m2] 161 163 ! 162 164 ! Input for aviation 163 165 ! 164 166 REAL, INTENT(IN) , DIMENSION(klon) :: contfra_in ! input linear contrails fraction [-] 165 REAL, INTENT(IN) , DIMENSION(klon) :: qcont_in ! input linear contrails total specific humidity [kg/kg] 167 REAL, INTENT(IN) , DIMENSION(klon) :: perscontfra_in! input contrail induced cirrus fraction [-] 168 REAL, INTENT(IN) , DIMENSION(klon) :: qva_in ! input linear contrails total specific humidity [kg/kg] 169 REAL, INTENT(IN) , DIMENSION(klon) :: qia_in ! input linear contrails total specific humidity [kg/kg] 166 170 REAL, INTENT(IN) , DIMENSION(klon) :: flight_dist ! aviation distance flown concentration [m/s/m3] 167 171 REAL, INTENT(IN) , DIMENSION(klon) :: flight_h2o ! aviation emitted H2O concentration [kgH2O/s/m3] … … 186 190 REAL, INTENT(INOUT), DIMENSION(klon) :: dcf_con ! cloud fraction tendency because of condensation [s-1] 187 191 REAL, INTENT(INOUT), DIMENSION(klon) :: dcf_mix ! cloud fraction tendency because of cloud mixing [s-1] 192 REAL, INTENT(INOUT), DIMENSION(klon) :: dcf_sed ! cloud fraction tendency because of sedimentation [s-1] 188 193 REAL, INTENT(INOUT), DIMENSION(klon) :: dqi_adj ! specific ice content tendency because of temperature adjustment [kg/kg/s] 189 194 REAL, INTENT(INOUT), DIMENSION(klon) :: dqi_sub ! specific ice content tendency because of sublimation [kg/kg/s] 190 195 REAL, INTENT(INOUT), DIMENSION(klon) :: dqi_con ! specific ice content tendency because of condensation [kg/kg/s] 191 196 REAL, INTENT(INOUT), DIMENSION(klon) :: dqi_mix ! specific ice content tendency because of cloud mixing [kg/kg/s] 197 REAL, INTENT(INOUT), DIMENSION(klon) :: dqi_sed ! specific ice content tendency because of sedimentation [kg/kg/s] 192 198 REAL, INTENT(INOUT), DIMENSION(klon) :: dqvc_adj ! specific cloud water vapor tendency because of temperature adjustment [kg/kg/s] 193 199 REAL, INTENT(INOUT), DIMENSION(klon) :: dqvc_sub ! specific cloud water vapor tendency because of sublimation [kg/kg/s] 194 200 REAL, INTENT(INOUT), DIMENSION(klon) :: dqvc_con ! specific cloud water vapor tendency because of condensation [kg/kg/s] 195 201 REAL, INTENT(INOUT), DIMENSION(klon) :: dqvc_mix ! specific cloud water vapor tendency because of cloud mixing [kg/kg/s] 202 REAL, INTENT(INOUT), DIMENSION(klon) :: dqvc_sed ! specific cloud water vapor tendency because of sedimentation [kg/kg/s] 196 203 ! 197 204 ! Diagnostics for aviation … … 199 206 ! 200 207 REAL, INTENT(INOUT), DIMENSION(klon) :: contfra ! linear contrail fraction [-] 208 REAL, INTENT(INOUT), DIMENSION(klon) :: perscontfra ! linear contrail induced cirrus fraction [-] 201 209 REAL, INTENT(INOUT), DIMENSION(klon) :: qcont ! linear contrail specific humidity [kg/kg] 202 210 REAL, INTENT(INOUT), DIMENSION(klon) :: Tcritcont ! critical temperature for contrail formation [K] … … 220 228 INTEGER :: i 221 229 LOGICAL :: ok_warm_cloud 222 REAL, DIMENSION(klon) :: q tot, qcld, qzero230 REAL, DIMENSION(klon) :: qcld, qzero 223 231 REAL, DIMENSION(klon) :: clrfra, qclr 224 232 ! … … 228 236 ! 229 237 ! for unadjusted clouds 230 REAL :: qvapincld, qiceincld, qvapincld_new 231 ! 232 ! for sublimation 233 REAL :: dqt_sub 238 REAL :: qiceincld, qvapincld, qvapincld_new 239 ! 240 ! for deposition / sublimation 241 REAL :: pres_sat, kappa_depsub, tau_depsub 242 REAL :: air_thermal_conduct, water_vapor_diff 243 REAL :: N_ice 244 ! 245 ! for dissipation 246 REAL :: pdf_shape 234 247 ! 235 248 ! for condensation 236 249 REAL, DIMENSION(klon) :: qsatl, dqsatl 237 REAL, DIMENSION(klon) :: pdf_alpha, pdf_scale, pdf_loc 238 REAL :: rhl_clr 239 REAL :: pdf_ratqs, pdf_skew 240 REAL :: pdf_x, pdf_y, pdf_T 241 REAL :: pdf_e3, pdf_e4 242 REAL :: cf_cond, qt_cond, dqt_con 250 REAL, DIMENSION(klon) :: pdf_alpha, pdf_scale, pdf_gamma 251 REAL :: rhl_clr, pdf_loc 252 REAL :: pdf_e3, pdf_x, pdf_y 253 REAL :: dqt_con 254 ! 255 ! for sedimentation 256 REAL, DIMENSION(klon) :: qice_sedim 257 REAL :: clrfra_sed 243 258 ! 244 259 ! for mixing 245 260 REAL :: a_mix, bovera, Povera, N_cld_mix, L_mix 246 REAL :: cl rfra_mix, sigma_mix261 REAL :: cldfra_mix, clrfra_mix, sigma_mix 247 262 REAL :: L_shear, shear_fra 248 REAL :: q vapinclr_lim263 REAL :: qiceinmix, qvapinmix_lim, qvapinclr_lim 249 264 REAL :: pdf_fra_above_nuc, pdf_q_above_nuc 250 265 REAL :: pdf_fra_above_lim, pdf_q_above_lim 251 REAL :: pdf_fra_below_lim 266 REAL :: pdf_fra_below_lim, pdf_q_below_lim 267 REAL :: mixed_fraction 252 268 ! 253 269 ! for cell properties 254 REAL, DIMENSION(klon) :: dz 270 REAL :: rho, rhodz, dz 271 ! 272 ! for contrails 273 REAL :: perscontfra_ratio 274 REAL :: contrails_conversion_factor 255 275 256 276 qzero(:) = 0. 257 qtot = qtot_in258 277 259 278 !--Calculation of qsat w.r.t. liquid … … 269 288 !--formed elsewhere) 270 289 IF (keepgoing(i)) THEN 271 272 !--Initialisation273 issrfra(i) = 0.274 qissr(i) = 0.275 contfra(i) = 0.276 qcont(i) = 0.277 290 278 291 !--If the temperature is higher than the threshold below which … … 281 294 !--If ok_weibull_warm_clouds = .TRUE., the Weibull law is used for 282 295 !--all clouds, and the lognormal scheme is not activated 283 IF ( ( ( temp(i) .GT. temp_nowater ) .AND. .NOT. ok_weibull_warm_clouds ) .OR. & 284 ( ok_no_issr_strato .AND. ( stratomask(i) .EQ. 1. ) ) ) THEN 285 286 pdf_std = ratqs(i) * qtot(i) 287 pdf_k = -SQRT( LOG( 1. + (pdf_std / qtot(i))**2 ) ) 288 pdf_delta = LOG( qtot(i) / ( gamma_cond(i) * qsat(i) ) ) 296 IF ( .NOT. pt_pron_clds(i) ) THEN 297 298 pdf_std = ratqs(i) * qtot_in(i) 299 pdf_k = -SQRT( LOG( 1. + (pdf_std / qtot_in(i))**2 ) ) 300 pdf_delta = LOG( qtot_in(i) / ( gamma_cond(i) * qsat(i) ) ) 289 301 pdf_a = pdf_delta / ( pdf_k * SQRT(2.) ) 290 302 pdf_b = pdf_k / (2. * SQRT(2.)) … … 303 315 ELSE 304 316 cldfra(i) = 0.5 * pdf_e1 305 qincld(i) = qtot (i) * pdf_e2 / pdf_e1317 qincld(i) = qtot_in(i) * pdf_e2 / pdf_e1 306 318 qvc(i) = qsat(i) * cldfra(i) 307 319 ENDIF … … 319 331 ok_warm_cloud = ( temp(i) .GT. temp_nowater ) 320 332 321 !--We remove the convection water from the total available water322 qtot(i) = qtot(i) - ( qcondcv(i) + qsat(i) ) * cldfracv(i)323 324 333 !--The following barriers ensure that the traced cloud properties 325 334 !--are consistent. In some rare cases, i.e. the cloud water vapor 326 335 !--can be greater than the total water in the gridbox 327 cldfra(i) = MAX(0., MIN(1. - c ldfracv(i), cldfra_in(i)))328 qcld(i) = MAX(0., MIN(qtot (i), qliq_in(i) + qice_in(i) + qvc_in(i)))336 cldfra(i) = MAX(0., MIN(1. - cfcon(i), cldfra_in(i))) 337 qcld(i) = MAX(0., MIN(qtot_in(i), qliq_in(i) + qice_in(i) + qvc_in(i))) 329 338 qvc(i) = MAX(0., MIN(qcld(i), qvc_in(i))) 330 339 331 340 !--Initialise clear fraction properties 332 clrfra(i) = ( 1. - cldfracv(i) ) - cldfra(i)333 qclr(i) = qtot (i) - qcld(i)341 clrfra(i) = MAX(0., MIN(1., ( 1. - cfcon(i) ) - cldfra(i))) 342 qclr(i) = qtot_in(i) - qcld(i) 334 343 335 344 dcf_sub(i) = 0. … … 344 353 dqi_mix(i) = 0. 345 354 dqvc_mix(i) = 0. 355 dcf_sed(i) = 0. 356 dqi_sed(i) = 0. 357 dqvc_sed(i) = 0. 358 359 IF ( icesed_flux(i) .GT. 0. ) THEN 360 !--If ice sedimentation is activated, the quantity of sedimentated ice was added 361 !--to the total water vapor in the precipitation routine. Here we remove it 362 !--(it will be reincluded later) 363 qice_sedim(i) = icesed_flux(i) / ( paprsdn(i) - paprsup(i) ) * RG * dtime 364 qclr(i) = qclr(i) - qice_sedim(i) 365 ENDIF 346 366 347 367 !--Initialisation of the cell properties 348 368 !--Dry density [kg/m3] 349 !rho = pplay(i) / temp(i) / RD369 rho = pplay(i) / temp(i) / RD 350 370 !--Dry air mass [kg/m2] 351 !rhodz = ( paprsdn(i) - paprsup(i) ) / RG371 rhodz = ( paprsdn(i) - paprsup(i) ) / RG 352 372 !--Cell thickness [m] 353 !dz = rhodz / rho 354 dz(i) = ( paprsdn(i) - paprsup(i) ) / pplay(i) * temp(i) * RD / RG 373 dz = rhodz / rho 374 375 !--If ok_unadjusted_clouds is set to TRUE, then the saturation adjustment 376 !--hypothesis is lost, and the vapor in the cloud is purely prognostic. 377 ! 378 !--The deposition equation is 379 !-- dmi/dt = alpha*4pi*C*Svi / ( R_v*T/esi/Dv + Ls/ka/T * (Ls/R_v/T - 1) ) 380 !--from Lohmann et al. (2016), where 381 !--alpha is the deposition coefficient [-] 382 !--mi is the mass of one ice crystal [kg] 383 !--C is the capacitance of an ice crystal [m] 384 !--Svi is the supersaturation ratio equal to (qvc - qsat)/qsat [-] 385 !--R_v is the specific gas constant for humid air [J/kg/K] 386 !--T is the temperature [K] 387 !--esi is the saturation pressure w.r.t. ice [Pa] 388 !--Dv is the diffusivity of water vapor [m2/s] 389 !--Ls is the specific latent heat of sublimation [J/kg/K] 390 !--ka is the thermal conductivity of dry air [J/m/s/K] 391 ! 392 !--alpha is a coefficient to take into account the fact that during deposition, a water 393 !--molecule cannot join the crystal from everywhere, it must do so that the crystal stays 394 !--coherent (with the same structure). It has no impact for sublimation. 395 !--We fix alpha = depo_coef_cirrus (=0.5 by default following Lohmann et al. (2016)) 396 !--during deposition, and alpha = 1. during sublimation. 397 !--The capacitance of the ice crystals is proportional to a parameter capa_cond_cirrus 398 !-- C = capa_cond_cirrus * rm_ice 399 ! 400 !--We have qice = Nice * mi, where Nice is the ice crystal 401 !--number concentration per kg of moist air 402 !--HYPOTHESIS 1: the ice crystals are spherical, therefore 403 !-- mi = 4/3 * pi * rm_ice**3 * rho_ice 404 !--HYPOTHESIS 2: the ice crystals are monodisperse with the 405 !--initial radius rm_ice_0. 406 !--NB. this is notably different than the assumption 407 !--of a distributed qice in the cloud made in the sublimation process; 408 !--should it be consistent? 409 ! 410 !--As the deposition process does not create new ice crystals, 411 !--and because we assume a same rm_ice value for all crystals 412 !--therefore the sublimation process does not destroy ice crystals 413 !--(or, in a limit case, it destroys all ice crystals), then 414 !--Nice is a constant during the sublimation/deposition process. 415 !-- dmi = dqi, et Nice = qi_0 / ( 4/3 RPI rm_ice_0**3 rho_ice ) 416 ! 417 !--The deposition equation then reads: 418 !-- dqi/dt = alpha*4pi*capa_cond_cirrus*rm_ice*(qvc-qsat)/qsat / ( R_v*T/esi/Dv + Ls/ka/T * (Ls/R_v/T - 1) ) * Nice 419 !-- dqi/dt = alpha*4pi*capa_cond_cirrus* (qi / qi_0)**(1/3) *rm_ice_0*(qvc-qsat)/qsat & 420 !-- / ( R_v*T/esi/Dv + Ls/ka/T * (Ls*R_v/T - 1) ) & 421 !-- * qi_0 / ( 4/3 RPI rm_ice_0**3 rho_ice ) 422 !-- dqi/dt = qi**(1/3) * (qvc - qsat) * qi_0**(2/3) & 423 !-- *alpha/qsat*capa_cond_cirrus/ (R_v*T/esi/Dv + Ls/ka/T*(Ls*R_v/T - 1)) / ( 1/3 rm_ice_0**2 rho_ice ) 424 !--and we have 425 !-- dqvc/dt = - qi**(1/3) * (qvc - qsat) / kappa * alpha * qi_0**(2/3) / rm_ice_0**2 426 !-- dqi/dt = qi**(1/3) * (qvc - qsat) / kappa * alpha * qi_0**(2/3) / rm_ice_0**2 427 !--where kappa = 1/3*rho_ice/capa_cond_cirrus*qsat*(R_v*T/esi/Dv + Ls/ka/T*(Ls/R_v/T - 1)) 428 ! 429 !--This system of equations can be resolved with an exact 430 !--explicit numerical integration, having one variable resolved 431 !--explicitly, the other exactly. The exactly resolved variable is 432 !--the one decreasing, so it is qvc if the process is 433 !--condensation, qi if it is sublimation. 434 ! 435 !--kappa is computed as an initialisation constant, as it depends only 436 !--on temperature and other pre-computed values 437 pres_sat = qsat(i) / ( EPS_W + ( 1. - EPS_W ) * qsat(i) ) * pplay(i) 438 !--This formula for air thermal conductivity comes from Beard and Pruppacher (1971) 439 air_thermal_conduct = ( 5.69 + 0.017 * ( temp(i) - RTT ) ) * 1.e-3 * 4.184 440 !--This formula for water vapor diffusivity comes from Hall and Pruppacher (1976) 441 water_vapor_diff = 0.211 * ( temp(i) / RTT )**1.94 * ( 101325. / pplay(i) ) * 1.e-4 442 !--Median ice crystal concentration [#/m3] in cirrus clouds from Kramer et al (2020) 443 N_ice = 0.003 * 1e6 444 !--NB. the greater kappa_depsub, the lower the efficiency of the 445 !--deposition/sublimation process 446 kappa_depsub = ( 4. / 3. * RPI * N_ice / rho * rho_ice )**(1./3.) & 447 * qsat(i) / ( 4. * RPI * capa_cond_cirrus * N_ice / rho ) & 448 * ( RV * temp(i) / water_vapor_diff / pres_sat & 449 + RLSTT / air_thermal_conduct / temp(i) * ( RLSTT / RV / temp(i) - 1. ) ) 355 450 356 451 !--If contrails are activated 357 452 IF ( ok_plane_contrail ) THEN 358 contfra(i) = contfra_in(i) 359 qcont(i) = qcont_in(i) 453 contfra(i) = MAX(0., MIN(cldfra(i), contfra_in(i))) 454 perscontfra(i) = MAX(0., MIN(cldfra(i), perscontfra_in(i))) 455 qcont(i) = MAX(0., MIN(qcld(i), qva_in(i) + qia_in(i))) 360 456 361 457 dcfa_ini(i) = 0. … … 370 466 dqia_mix(i) = 0. 371 467 dqta_mix(i) = 0. 468 ELSE 469 contfra(i) = 0. 470 perscontfra(i) = 0. 471 qcont(i) = 0. 372 472 ENDIF 373 473 … … 379 479 !--If there is a contrail 380 480 IF ( contfra(i) .GT. eps ) THEN 481 !--We remove contrails from the main class 482 cldfra(i) = cldfra(i) - contfra(i) 483 qcld(i) = qcld(i) - qcont(i) 484 qvc(i) = qvc(i) - qsat(i) * contfra(i) 485 381 486 !--The contrail is always adjusted to saturation 382 487 qiceincld = ( qcont(i) / contfra(i) - qsat(i) ) 383 488 384 489 !--If the ice water content is too low, the cloud is purely sublimated 385 IF ( qiceincld .LT. eps) THEN490 IF ( qiceincld .LT. ( 0.005 * qsat(i) ) ) THEN 386 491 dcfa_sub(i) = - contfra(i) 387 492 dqia_sub(i) = - qiceincld * contfra(i) … … 389 494 contfra(i) = 0. 390 495 qcont(i) = 0. 391 clrfra(i) = clrfra(i) + dcfa_sub(i) 392 qclr(i) = qclr(i) + dqta_sub(i) 393 ELSE 394 !--We remove contrails from the main class 395 cldfra(i) = cldfra(i) - contfra(i) 396 qcld(i) = qcld(i) - qcont(i) 397 qvc(i) = qvc(i) - qsat(i) * contfra(i) 496 clrfra(i) = MIN(1., clrfra(i) - dcfa_sub(i)) 497 qclr(i) = qclr(i) - dqta_sub(i) 398 498 ENDIF ! qiceincld .LT. eps 399 499 ENDIF ! contfra(i) .GT. eps 500 501 !--If there is a contrail induced cirrus, we save the ratio 502 perscontfra_ratio = perscontfra(i) / MAX(eps, cldfra(i)) 400 503 401 504 … … 421 524 qcld(i) = 0. 422 525 qvc(i) = 0. 423 clrfra(i) = clrfra(i) - dcf_sub(i)526 clrfra(i) = MIN(1., clrfra(i) - dcf_sub(i)) 424 527 qclr(i) = qclr(i) - dqvc_sub(i) - dqi_sub(i) 425 426 !--If all the ice has been sublimated, we sublimate427 !--completely the cloud and do not activate the sublimation428 !--process429 qvapincld_new = 0.430 528 431 529 !--Else, the cloud is adjusted and sublimated 432 530 ELSE 433 531 434 !--The vapor in cloud cannot be higher than the 435 !--condensation threshold 436 qvapincld = MIN(qvapincld, gamma_cond(i) * qsat(i)) 437 qiceincld = ( qcld(i) / cldfra(i) - qvapincld ) 532 !IF ( qiceincld .LT. ( 0.005 * qsat(i) ) ) THEN 533 ! dcf_sub(i) = ( qiceincld / ( 0.005 * qsat(i) ) - 1. ) * cldfra(i) 534 ! dqvc_sub(i) = qvapincld * dcf_sub(i) 535 536 ! cldfra(i) = cldfra(i) + dcf_sub(i) 537 ! qcld(i) = qcld(i) + dqvc_sub(i) 538 ! qvc(i) = qvc(i) + dqvc_sub(i) 539 ! clrfra(i) = MIN(1., clrfra(i) - dcf_sub(i)) 540 ! qclr(i) = qclr(i) - dqvc_sub(i) 541 !ENDIF 438 542 439 543 IF ( ok_unadjusted_clouds .AND. .NOT. ok_warm_cloud ) THEN 440 qvapincld_new = QVAPINCLD_DEPSUB( & 441 qvapincld, qiceincld, temp(i), qsat(i), pplay(i), dtime) 442 IF ( qvapincld_new .EQ. 0. ) THEN 443 !--If all the ice has been sublimated, we sublimate 444 !--completely the cloud and do not activate the dissipation 445 !--process 446 !--Tendencies and diagnostics 447 dcf_sub(i) = - cldfra(i) 448 dqvc_sub(i) = - qvc(i) 449 dqi_sub(i) = - ( qcld(i) - qvc(i) ) 450 451 cldfra(i) = 0. 452 qcld(i) = 0. 453 qvc(i) = 0. 454 clrfra(i) = clrfra(i) - dcf_sub(i) 455 qclr(i) = qclr(i) - dqvc_sub(i) - dqi_sub(i) 456 ENDIF 544 IF ( qvapincld .GE. qsat(i) ) THEN 545 !--If the cloud is initially supersaturated 546 !--Exact explicit integration (qvc exact, qice explicit) 547 tau_depsub = 1. / ( depo_coef_cirrus * qiceincld**(1./3.) * kappa_depsub ) 548 ELSE 549 !--If the cloud is initially subsaturated 550 !--Exact explicit integration (qvc exact, qice explicit) 551 !--Same but depo_coef_cirrus = 1 552 tau_depsub = 1. / ( qiceincld**(1./3.) * kappa_depsub ) 553 ENDIF ! qvapincld .GT. qsat 554 qvapincld_new = qsat(i) + ( qvapincld - qsat(i) ) * EXP( - dtime / tau_depsub ) 555 !--If all the ice is sublimated 556 IF ( qvapincld_new .GE. ( qvapincld + qiceincld ) ) qvapincld_new = 0. 457 557 ELSE 458 558 !--We keep the saturation adjustment hypothesis, and the vapor in the 459 559 !--cloud is set equal to the saturation vapor 460 qvapincld_new = qsat(i) 560 IF ( ( qvapincld + qiceincld ) .GT. qsat(i) ) THEN 561 qvapincld_new = qsat(i) 562 ELSE 563 qvapincld_new = 0. 564 ENDIF 461 565 ENDIF ! ok_unadjusted_clouds 462 463 !--Adjustment of the IWC to the new vapor in cloud464 !--(this can be either positive or negative)465 dqvc_adj(i) = ( qvapincld_new * cldfra(i) - qvc(i) )466 dqi_adj(i) = - dqvc_adj(i)467 468 !--Add tendencies469 !--The vapor in the cloud is updated, but not qcld as it is constant470 !--through this process, as well as cldfra which is unmodified471 qvc(i) = MAX(0., MIN(qcld(i), qvc(i) + dqvc_adj(i)))472 566 473 567 … … 477 571 478 572 !--If the dissipation process must be activated 479 IF ( qvapincld_new .GT. 0. ) THEN 480 !--Normal distribution around qvapincld + qiceincld with width 481 !--constant in the RHi space 482 pdf_y = ( qvapincld_new - qvapincld - qiceincld ) & 483 / ( std_subl_pdf_lscp / 100. * qsat(i)) 484 pdf_e1 = 0.5 * ( 1. + ERF( pdf_y / SQRT(2.) ) ) 485 pdf_e2 = EXP( - pdf_y**2 / 2. ) / SQRT( 2. * RPI ) 486 487 dcf_sub(i) = - cldfra(i) * pdf_e1 488 dqt_sub = - cldfra(i) * ( ( qvapincld + qiceincld ) * pdf_e1 & 489 - std_subl_pdf_lscp / 100. * qsat(i) * pdf_e2 ) 573 !IF ( cldfra(i) .GT. eps ) THEN 574 IF ( qvapincld_new .GT. qvapincld ) THEN 575 !--Gamma distribution starting at qvapincld 576 pdf_shape = ( mu_subl_pdf_lscp + 1. ) / qiceincld 577 pdf_y = pdf_shape * ( qvapincld_new - qvapincld ) 578 pdf_e1 = GAMMAINC ( mu_subl_pdf_lscp + 1. , pdf_y ) 579 pdf_e2 = GAMMAINC ( mu_subl_pdf_lscp + 2. , pdf_y ) 490 580 491 581 !--Tendencies and diagnostics 492 dqvc_sub(i) = dqt_sub 582 dcf_sub(i) = - cldfra(i) * pdf_e1 583 dqi_sub(i) = - cldfra(i) * pdf_e2 / pdf_shape 584 dqvc_sub(i) = dcf_sub(i) * qvapincld 493 585 494 586 !--Add tendencies 495 cldfra(i) = cldfra(i) + dcf_sub(i)496 qcld(i) = qcld(i) + dq t_sub587 cldfra(i) = MAX(0., cldfra(i) + dcf_sub(i)) 588 qcld(i) = qcld(i) + dqvc_sub(i) + dqi_sub(i) 497 589 qvc(i) = qvc(i) + dqvc_sub(i) 498 clrfra(i) = clrfra(i) - dcf_sub(i)499 qclr(i) = qclr(i) - dq t_sub590 clrfra(i) = MIN(1., clrfra(i) - dcf_sub(i)) 591 qclr(i) = qclr(i) - dqvc_sub(i) - dqi_sub(i) 500 592 ENDIF ! qvapincld_new .GT. 0. 593 594 595 !------------------------------------ 596 !-- PHASE ADJUSTMENT -- 597 !------------------------------------ 598 599 IF ( qvapincld_new .EQ. 0. ) THEN 600 !--If all the ice has been sublimated, we sublimate 601 !--completely the cloud and do not activate the dissipation 602 !--process 603 !--Tendencies and diagnostics 604 dcf_sub(i) = - cldfra(i) 605 dqvc_sub(i) = - qvc(i) 606 dqi_sub(i) = - ( qcld(i) - qvc(i) ) 607 608 cldfra(i) = 0. 609 qcld(i) = 0. 610 qvc(i) = 0. 611 clrfra(i) = MIN(1., clrfra(i) - dcf_sub(i)) 612 qclr(i) = qclr(i) - dqvc_sub(i) - dqi_sub(i) 613 ELSE 614 !--Adjustment of the IWC to the new vapor in cloud 615 !--(this can be either positive or negative) 616 dqvc_adj(i) = ( qvapincld_new * cldfra(i) - qvc(i) ) 617 dqi_adj(i) = - dqvc_adj(i) 618 619 !--Add tendencies 620 !--The vapor in the cloud is updated, but not qcld as it is constant 621 !--through this process, as well as cldfra which is unmodified 622 qvc(i) = MAX(0., MIN(qcld(i), qvc(i) + dqvc_adj(i))) 623 ENDIF 501 624 502 625 ENDIF ! qiceincld .LT. eps 503 626 ENDIF ! cldfra(i) .GT. eps 627 628 !--If there is a contrail induced cirrus, we restore it 629 perscontfra(i) = perscontfra_ratio * cldfra(i) 504 630 505 631 … … 519 645 !--Calculation of the properties of the PDF 520 646 !--Parameterization from IAGOS observations 521 !--pdf_ e1 and pdf_e2will be reused below647 !--pdf_alpha, pdf_scale and pdf_gamma will be reused below 522 648 523 649 !--Coefficient for standard deviation: … … 537 663 pdf_alpha(i) = EXP( rhl_clr / 100. ) * pdf_e3 538 664 539 IF ( ok_warm_cloud ) THEN 540 !--If the statistical scheme is activated, the standard deviation is adapted 541 !--to depend on the pressure level. It is multiplied by ratqs, so that near the 542 !--surface std is almost 0, and upper than about 450 hPa the std is left untouched 543 pdf_std = pdf_std * ratqs(i) 544 ENDIF 545 546 pdf_e2 = GAMMA(1. + 1. / pdf_alpha(i)) 547 pdf_scale(i) = MAX(eps, pdf_std / SQRT( GAMMA(1. + 2. / pdf_alpha(i)) - pdf_e2**2 )) 548 pdf_loc(i) = rhl_clr - pdf_scale(i) * pdf_e2 665 !IF ( ok_warm_cloud ) THEN 666 ! !--If the statistical scheme is activated, the standard deviation is adapted 667 ! !--to depend on the pressure level. It is multiplied by ratqs, so that near the 668 ! !--surface std is almost 0, and upper than about 450 hPa the std is left untouched 669 ! pdf_std = pdf_std * ratqs(i) 670 !ENDIF 671 672 pdf_gamma(i) = GAMMA(1. + 1. / pdf_alpha(i)) 673 pdf_scale(i) = MAX(eps, pdf_std / SQRT( & 674 GAMMA(1. + 2. / pdf_alpha(i)) - pdf_gamma(i)**2 )) 675 pdf_loc = rhl_clr - pdf_scale(i) * pdf_gamma(i) 549 676 550 677 !--Calculation of the newly condensed water and fraction (pronostic) … … 553 680 554 681 pdf_x = gamma_cond(i) * qsat(i) / qsatl(i) * 100. 555 pdf_y = ( MAX( pdf_x - pdf_loc (i), 0. ) / pdf_scale(i) ) ** pdf_alpha(i)682 pdf_y = ( MAX( pdf_x - pdf_loc, 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 556 683 pdf_e3 = GAMMAINC ( 1. + 1. / pdf_alpha(i) , pdf_y ) 557 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_ e2558 cf_cond= EXP( - pdf_y )559 qt_cond = ( pdf_e3 + pdf_loc(i) * cf_cond) * qsatl(i) / 100.560 561 IF ( cf_cond.GT. eps ) THEN562 563 dcf_con(i) = clrfra(i) * cf_cond564 dqt_con = clrfra(i) * qt_cond684 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_gamma(i) 685 pdf_fra_above_nuc = EXP( - pdf_y ) 686 pdf_q_above_nuc = ( pdf_e3 + pdf_loc * pdf_fra_above_nuc ) * qsatl(i) / 100. 687 688 IF ( pdf_fra_above_nuc .GT. eps ) THEN 689 690 dcf_con(i) = clrfra(i) * pdf_fra_above_nuc 691 dqt_con = clrfra(i) * pdf_q_above_nuc 565 692 566 693 !--Barriers (should be useless … … 574 701 qvapincld = gamma_cond(i) * qsat(i) 575 702 qiceincld = dqt_con / dcf_con(i) - gamma_cond(i) * qsat(i) 576 qvapincld_new = QVAPINCLD_DEPSUB( & 577 qvapincld, qiceincld, temp(i), qsat(i), pplay(i), dtime / 2.) 578 qvapincld = qvapincld_new 703 tau_depsub = 1. / ( depo_coef_cirrus * qiceincld**(1./3.) * kappa_depsub ) 704 qvapincld_new = qsat(i) + ( qvapincld - qsat(i) ) * EXP( - dtime / 2. / tau_depsub ) 579 705 ELSE 580 706 !--We keep the saturation adjustment hypothesis, and the vapor in the 581 707 !--newly formed cloud is set equal to the saturation vapor. 582 qvapincld = qsat(i)708 qvapincld_new = qsat(i) 583 709 ENDIF 584 710 585 711 !--Tendency on cloud vapor and diagnostic 586 dqvc_con(i) = qvapincld * dcf_con(i)712 dqvc_con(i) = qvapincld_new * dcf_con(i) 587 713 dqi_con(i) = dqt_con - dqvc_con(i) 588 714 589 715 !--Add tendencies 590 cldfra(i) = cldfra(i) + dcf_con(i)716 cldfra(i) = MIN(1., cldfra(i) + dcf_con(i)) 591 717 qcld(i) = qcld(i) + dqt_con 592 718 qvc(i) = qvc(i) + dqvc_con(i) 593 clrfra(i) = clrfra(i) - dcf_con(i)719 clrfra(i) = MAX(0., clrfra(i) - dcf_con(i)) 594 720 qclr(i) = qclr(i) - dqt_con 595 721 … … 597 723 ENDIF ! ( 1. - cldfra(i) ) .GT. eps 598 724 725 726 !--If there is a contrail induced cirrus, we save the ratio 727 perscontfra_ratio = perscontfra(i) / MAX(eps, cldfra(i)) 599 728 600 729 !-------------------------------------- … … 658 787 clrfra_mix = N_cld_mix * RPI / cell_area(i) & 659 788 * ( a_mix * ( 1. + bovera ) * L_mix + L_mix**2 ) 789 !--The fraction of clear sky mixed is 790 !-- N_cld_mix * ( a * b - (a - L_mix) * (b - L_mix) ) * RPI / cell_area 791 cldfra_mix = N_cld_mix * RPI / cell_area(i) & 792 * ( a_mix * ( 1. + bovera ) * L_mix - L_mix**2 ) 660 793 661 794 … … 666 799 !--semi-major axis (a_mix), on the entire cell heigh dz. 667 800 !--The increase in size is 668 L_shear = coef_shear_lscp * shear(i) * dz (i)* dtime801 L_shear = coef_shear_lscp * shear(i) * dz * dtime 669 802 !--therefore, the fraction of clear sky mixed is 670 803 !-- N_cld_mix * ( (a + L_shear) * b - a * b ) * RPI / 2. / cell_area … … 678 811 !--mixed clouds are different. 679 812 clrfra_mix = clrfra_mix + shear_fra 680 813 cldfra_mix = cldfra_mix + shear_fra 681 814 682 815 !-- PART 3 - CALCULATION OF THE MIXING PROPERTIES 683 816 684 clrfra_mix = MIN( clrfra_mix, clrfra(i) ) 817 clrfra_mix = MAX(eps, MIN(clrfra(i), clrfra_mix)) 818 cldfra_mix = MAX(eps, MIN(cldfra(i), cldfra_mix)) 685 819 686 820 !--We compute the limit vapor in clear sky where the mixed cloud could not … … 690 824 !--diagnostic, and if the cloud size is increased, we add the new vapor to the 691 825 !--cloud's vapor without condensing or sublimating ice crystals 692 qvapinclr_lim = ( ( cldfra(i) + clrfra_mix ) * qsat(i) - qcld(i) ) / clrfra_mix 826 IF ( ok_unadjusted_clouds .AND. .NOT. ok_warm_cloud ) THEN 827 qiceinmix = ( qcld(i) - qvc(i) ) / cldfra(i) / ( 1. + clrfra_mix / cldfra_mix ) 828 tau_depsub = 1. / ( qiceinmix**(1./3.) * kappa_depsub ) 829 qvapinmix_lim = qsat(i) - qiceinmix / ( 1. - EXP( - dtime / tau_depsub ) ) 830 qvapinclr_lim = qvapinmix_lim * ( 1. + cldfra_mix / clrfra_mix ) & 831 - qvc(i) / cldfra(i) * cldfra_mix / clrfra_mix 832 ELSE 833 !--NB. if tau_depsub = 0, we get the same result as above 834 qvapinclr_lim = qsat(i) * ( 1. + cldfra_mix / clrfra_mix ) & 835 - qcld(i) / cldfra(i) * cldfra_mix / clrfra_mix 836 ENDIF 693 837 694 838 IF ( qvapinclr_lim .LT. 0. ) THEN … … 696 840 dcf_mix(i) = clrfra_mix 697 841 dqvc_mix(i) = clrfra_mix * qclr(i) / clrfra(i) 698 dqi_mix(i) = 0.699 842 ELSE 700 843 !--We then calculate the clear sky part where the humidity is lower than … … 704 847 !--because the clear sky fraction can only be reduced by condensation. 705 848 !--Thus the `pdf_xxx` variables are well defined. 706 pdf_x = gamma_cond(i) * qsat(i) / qsatl(i) * 100. 707 pdf_y = ( MAX( pdf_x - pdf_loc(i), 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 849 850 rhl_clr = qclr(i) / clrfra(i) / qsatl(i) * 100. 851 pdf_loc = rhl_clr - pdf_scale(i) * pdf_gamma(i) 852 pdf_x = qvapinclr_lim / qsatl(i) * 100. 853 pdf_y = ( MAX( pdf_x - pdf_loc, 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 708 854 pdf_e3 = GAMMAINC ( 1. + 1. / pdf_alpha(i) , pdf_y ) 709 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_e2 710 pdf_fra_above_nuc = EXP( - pdf_y ) * clrfra(i) 711 pdf_q_above_nuc = ( pdf_e3 * clrfra(i) & 712 + pdf_loc(i) * pdf_fra_above_nuc ) * qsatl(i) / 100. 713 714 pdf_x = qvapinclr_lim / qsatl(i) * 100. 715 pdf_y = ( MAX( pdf_x - pdf_loc(i), 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 716 pdf_e3 = GAMMAINC ( 1. + 1. / pdf_alpha(i) , pdf_y ) 717 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_e2 855 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_gamma(i) 718 856 pdf_fra_above_lim = EXP( - pdf_y ) * clrfra(i) 719 857 pdf_q_above_lim = ( pdf_e3 * clrfra(i) & 720 + pdf_loc (i)* pdf_fra_above_lim ) * qsatl(i) / 100.858 + pdf_loc * pdf_fra_above_lim ) * qsatl(i) / 100. 721 859 722 860 pdf_fra_below_lim = clrfra(i) - pdf_fra_above_lim 723 pdf_fra_above_lim = pdf_fra_above_lim - pdf_fra_above_nuc 724 pdf_q_above_lim = pdf_q_above_lim - pdf_q_above_nuc 861 pdf_q_below_lim = qclr(i) - pdf_q_above_lim 725 862 726 863 !--sigma_mix is the ratio of the surroundings of the clouds where mixing … … 733 870 dcf_mix(i) = clrfra_mix * sigma_mix 734 871 dqvc_mix(i) = clrfra_mix * sigma_mix * pdf_q_above_lim / pdf_fra_above_lim 735 dqi_mix(i) = 0.736 872 ENDIF 737 873 738 874 IF ( pdf_fra_below_lim .GT. eps ) THEN 739 dcf_mix(i) = dcf_mix(i) - cldfra (i)* ( 1. - sigma_mix )740 dqvc_mix(i) = dqvc_mix(i) - cldfra (i)* ( 1. - sigma_mix ) &741 * qvc(i) / cldfra(i)742 dqi_mix(i) = dqi_mix(i) - cldfra (i)* ( 1. - sigma_mix ) &743 * ( qcld(i) - qvc(i) ) / cldfra(i)875 dcf_mix(i) = dcf_mix(i) - cldfra_mix * ( 1. - sigma_mix ) 876 dqvc_mix(i) = dqvc_mix(i) - cldfra_mix * ( 1. - sigma_mix ) & 877 * qvc(i) / cldfra(i) 878 dqi_mix(i) = dqi_mix(i) - cldfra_mix * ( 1. - sigma_mix ) & 879 * ( qcld(i) - qvc(i) ) / cldfra(i) 744 880 ENDIF 881 745 882 ENDIF 746 747 !--Add tendencies748 cldfra(i) = cldfra(i) + dcf_mix(i)749 qcld(i) = qcld(i) + dqvc_mix(i) + dqi_mix(i)750 qvc(i) = qvc(i) + dqvc_mix(i)751 clrfra(i) = clrfra(i) - dcf_mix(i)752 qclr(i) = qclr(i) - dqvc_mix(i) - dqi_mix(i)753 754 883 ENDIF ! ( cldfra(i) .GT. eps ) .AND. ( clrfra(i) .GT. eps ) 755 884 … … 812 941 clrfra_mix = N_cld_mix * RPI / cell_area(i) & 813 942 * ( a_mix * ( 1. + bovera ) * L_mix + L_mix**2 ) 943 !--The fraction of clear sky mixed is 944 !-- N_cld_mix * ( a * b - (a - L_mix) * (b - L_mix) ) * RPI / cell_area 945 cldfra_mix = N_cld_mix * RPI / cell_area(i) & 946 * ( a_mix * ( 1. + bovera ) * L_mix - L_mix**2 ) 814 947 815 948 … … 823 956 !--With this, the clouds increase in size along b only, by a factor 824 957 !--L_shear * SQRT(2.) / 2. (to account for the 45 degrees orientation of the wind) 825 L_shear = coef_shear_contrails * shear(i) * dz (i)* dtime958 L_shear = coef_shear_contrails * shear(i) * dz * dtime 826 959 !--therefore, the fraction of clear sky mixed is 827 960 !-- N_cld_mix * ( a * (b + L_shear * SQRT(2.) / 2.) - a * b ) * RPI / 2. / cell_area … … 835 968 !--mixed clouds are different. 836 969 clrfra_mix = clrfra_mix + shear_fra 970 cldfra_mix = cldfra_mix + shear_fra 837 971 838 972 839 973 !-- PART 3 - CALCULATION OF THE MIXING PROPERTIES 840 974 841 clrfra_mix = MIN( clrfra_mix, clrfra(i) ) 975 clrfra_mix = MAX(eps, MIN(clrfra(i), clrfra_mix)) 976 cldfra_mix = MAX(eps, MIN(cldfra(i), cldfra_mix)) 842 977 843 978 !--We compute the limit vapor in clear sky where the mixed cloud could not … … 847 982 !--diagnostic, and if the cloud size is increased, we add the new vapor to the 848 983 !--cloud's vapor without condensing or sublimating ice crystals 849 qvapinclr_lim = ( ( contfra(i) + clrfra_mix ) * qsat(i) - qcont(i) ) / clrfra_mix 984 qvapinclr_lim = qsat(i) * ( 1. + cldfra_mix / clrfra_mix ) & 985 - qcont(i) / contfra(i) * cldfra_mix / clrfra_mix 850 986 851 987 IF ( qvapinclr_lim .LT. 0. ) THEN … … 853 989 dcfa_mix(i) = clrfra_mix 854 990 dqta_mix(i) = clrfra_mix * qclr(i) / clrfra(i) 855 dqia_mix(i) = 0.856 991 ELSE 857 992 !--We then calculate the clear sky part where the humidity is lower than … … 861 996 !--because the clear sky fraction can only be reduced by condensation. 862 997 !--Thus the `pdf_xxx` variables are well defined. 863 pdf_x = gamma_cond(i) * qsat(i) / qsatl(i) * 100. 864 pdf_y = ( MAX( pdf_x - pdf_loc(i), 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 998 999 rhl_clr = qclr(i) / clrfra(i) / qsatl(i) * 100. 1000 pdf_loc = rhl_clr - pdf_scale(i) * pdf_gamma(i) 1001 pdf_x = qvapinclr_lim / qsatl(i) * 100. 1002 pdf_y = ( MAX( pdf_x - pdf_loc, 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 865 1003 pdf_e3 = GAMMAINC ( 1. + 1. / pdf_alpha(i) , pdf_y ) 866 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_e2 867 pdf_fra_above_nuc = EXP( - pdf_y ) * clrfra(i) 868 pdf_q_above_nuc = ( pdf_e3 * clrfra(i) & 869 + pdf_loc(i) * pdf_fra_above_nuc ) * qsatl(i) / 100. 870 871 pdf_x = qvapinclr_lim / qsatl(i) * 100. 872 pdf_y = ( MAX( pdf_x - pdf_loc(i), 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 873 pdf_e3 = GAMMAINC ( 1. + 1. / pdf_alpha(i) , pdf_y ) 874 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_e2 1004 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_gamma(i) 875 1005 pdf_fra_above_lim = EXP( - pdf_y ) * clrfra(i) 876 1006 pdf_q_above_lim = ( pdf_e3 * clrfra(i) & 877 + pdf_loc (i)* pdf_fra_above_lim ) * qsatl(i) / 100.1007 + pdf_loc * pdf_fra_above_lim ) * qsatl(i) / 100. 878 1008 879 1009 pdf_fra_below_lim = clrfra(i) - pdf_fra_above_lim 880 pdf_fra_above_lim = pdf_fra_above_lim - pdf_fra_above_nuc881 pdf_q_above_lim = pdf_q_above_lim - pdf_q_above_nuc882 1010 883 1011 !--sigma_mix is the ratio of the surroundings of the clouds where mixing … … 893 1021 dcfa_mix(i) = clrfra_mix * sigma_mix 894 1022 dqta_mix(i) = clrfra_mix * sigma_mix * pdf_q_above_lim / pdf_fra_above_lim 895 dqia_mix(i) = 0.896 1023 ENDIF 897 1024 898 1025 IF ( pdf_fra_below_lim .GT. eps ) THEN 899 dcfa_mix(i) = dcfa_mix(i) - contfra(i) * ( 1. - sigma_mix)900 dqta_mix(i) = dqta_mix(i) - contfra(i) * ( 1. - sigma_mix ) &901 * qcont(i) / contfra(i)902 dq ia_mix(i) = dqia_mix(i) - contfra(i) * ( 1. - sigma_mix ) &903 * ( qcont(i) / contfra(i) - qsat(i) )1026 qvapincld = qcont(i) / contfra(i) 1027 qiceincld = qvapincld - qsat(i) 1028 dcfa_mix(i) = dcfa_mix(i) - cldfra_mix * ( 1. - sigma_mix ) 1029 dqta_mix(i) = dqta_mix(i) - cldfra_mix * ( 1. - sigma_mix ) * qvapincld 1030 dqia_mix(i) = dqia_mix(i) - cldfra_mix * ( 1. - sigma_mix ) * qiceincld 904 1031 ENDIF 1032 1033 ENDIF 1034 ENDIF ! ( contfra(i) .GT. eps ) .AND. ( clrfra(i) .GT. eps ) 1035 1036 IF ( contfra(i) .GT. eps ) THEN 1037 !--We balance the mixing tendencies between the different cloud classes 1038 mixed_fraction = dcf_mix(i) + dcfa_mix(i) 1039 IF ( mixed_fraction .GT. clrfra(i) ) THEN 1040 mixed_fraction = clrfra(i) / mixed_fraction 1041 dcf_mix(i) = dcf_mix(i) * mixed_fraction 1042 dqvc_mix(i) = dqvc_mix(i) * mixed_fraction 1043 dqi_mix(i) = dqi_mix(i) * mixed_fraction 1044 dcfa_mix(i) = dcfa_mix(i) * mixed_fraction 1045 dqta_mix(i) = dqta_mix(i) * mixed_fraction 905 1046 ENDIF 906 1047 … … 910 1051 clrfra(i) = clrfra(i) - dcfa_mix(i) 911 1052 qclr(i) = qclr(i) - dqta_mix(i) 912 913 ENDIF ! ( contfra(i) .GT. eps ) .AND. ( clrfra(i) .GT. eps ) 1053 ENDIF 1054 1055 !--Add tendencies 1056 cldfra(i) = cldfra(i) + dcf_mix(i) 1057 qcld(i) = qcld(i) + dqvc_mix(i) + dqi_mix(i) 1058 qvc(i) = qvc(i) + dqvc_mix(i) 1059 clrfra(i) = clrfra(i) - dcf_mix(i) 1060 qclr(i) = qclr(i) - dqvc_mix(i) - dqi_mix(i) 1061 1062 !--If there is a contrail induced cirrus, we restore it 1063 perscontfra(i) = perscontfra_ratio * cldfra(i) 1064 1065 1066 !--------------------------------------- 1067 !-- ICE SEDIMENTATION -- 1068 !--------------------------------------- 1069 ! 1070 !--If ice supersaturation is activated, the cloud properties are prognostic. 1071 !--The falling ice is then considered a new cloud in the gridbox. 1072 !--BEWARE with this parameterisation, we can create a new cloud with a much 1073 !--different ice water content and water vapor content than the existing cloud 1074 !--(if it exists). This implies than unphysical fluxes of ice and vapor 1075 !--occur between the existing cloud and the newly formed cloud (from sedimentation). 1076 !--Note also that currently, the precipitation scheme assume a maximum 1077 !--random overlap, meaning that the new formed clouds will not be affected 1078 !--by vertical wind shear. 1079 ! 1080 IF ( icesed_flux(i) .GT. 0. ) THEN 1081 1082 clrfra_sed = MIN(clrfra(i), cldfra_above(i) - cldfra(i)) 1083 1084 IF ( ( clrfra_sed .GT. eps ) .AND. ( clrfra(i) .GT. eps ) ) THEN 1085 1086 qiceincld = qice_sedim(i) / cldfra_above(i) 1087 IF ( ok_unadjusted_clouds .AND. .NOT. ok_warm_cloud ) THEN 1088 tau_depsub = 1. / ( qiceincld**(1./3.) * kappa_depsub ) 1089 qvapinclr_lim = qsat(i) - qiceincld / ( 1. - EXP( - dtime / tau_depsub ) ) 1090 ELSE 1091 qvapinclr_lim = qsat(i) - qiceincld 1092 ENDIF 1093 1094 rhl_clr = qclr(i) / clrfra(i) / qsatl(i) * 100. 1095 pdf_loc = rhl_clr - pdf_scale(i) * pdf_gamma(i) 1096 pdf_x = qvapinclr_lim / qsatl(i) * 100. 1097 pdf_y = ( MAX( pdf_x - pdf_loc, 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 1098 pdf_e3 = GAMMAINC ( 1. + 1. / pdf_alpha(i) , pdf_y ) 1099 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_gamma(i) 1100 pdf_fra_above_lim = EXP( - pdf_y ) * clrfra(i) 1101 pdf_q_above_lim = ( pdf_e3 * clrfra(i) & 1102 + pdf_loc * pdf_fra_above_lim ) * qsatl(i) / 100. 1103 1104 IF ( pdf_fra_above_lim .GT. eps ) THEN 1105 dcf_sed(i) = clrfra_sed * pdf_fra_above_lim / clrfra(i) 1106 dqvc_sed(i) = dcf_sed(i) * pdf_q_above_lim / pdf_fra_above_lim 1107 !--We include the sedimentated ice: 1108 dqi_sed(i) = qiceincld & !--We include the sedimentated ice: 1109 * ( dcf_sed(i) & !--the part that falls in the newly formed cloud and 1110 + cldfra(i) ) !--the part that falls in the existing cloud 1111 1112 ENDIF 1113 1114 ELSE 1115 1116 dqi_sed(i) = qice_sedim(i) 1117 1118 ENDIF ! clrfra(i) .GT. eps 1119 1120 !--Add tendencies 1121 cldfra(i) = MIN(1., cldfra(i) + dcf_sed(i)) 1122 qcld(i) = qcld(i) + dqvc_sed(i) + dqi_sed(i) 1123 qvc(i) = qvc(i) + dqvc_sed(i) 1124 clrfra(i) = MAX(0., clrfra(i) - dcf_sed(i)) 1125 !--We re-include sublimated sedimentated ice into clear sky water vapor 1126 qclr(i) = qclr(i) - dqvc_sed(i) + qice_sedim(i) - dqi_sed(i) 1127 1128 ENDIF ! qice_sedim(i) .GT. 0. 1129 914 1130 915 1131 !--We put back contrails in the clouds class … … 919 1135 920 1136 921 !--Diagnostics922 dcf_sub(i) = dcf_sub(i) / dtime923 dcf_con(i) = dcf_con(i) / dtime924 dcf_mix(i) = dcf_mix(i) / dtime925 dqi_adj(i) = dqi_adj(i) / dtime926 dqi_sub(i) = dqi_sub(i) / dtime927 dqi_con(i) = dqi_con(i) / dtime928 dqi_mix(i) = dqi_mix(i) / dtime929 dqvc_adj(i) = dqvc_adj(i) / dtime930 dqvc_sub(i) = dqvc_sub(i) / dtime931 dqvc_con(i) = dqvc_con(i) / dtime932 dqvc_mix(i) = dqvc_mix(i) / dtime933 934 1137 !--Diagnose ISSRs 935 1138 IF ( clrfra(i) .GT. eps ) THEN 936 !--We then calculate the part that is greater than qsat937 !--and lower than gamma_cond * qsat, which is the ice supersaturated region938 pdf_x = gamma_cond(i) *qsat(i) / qsatl(i) * 100.939 pdf_y = ( MAX( pdf_x - pdf_loc (i), 0. ) / pdf_scale(i) ) ** pdf_alpha(i)1139 rhl_clr = qclr(i) / clrfra(i) / qsatl(i) * 100. 1140 pdf_loc = rhl_clr - pdf_scale(i) * pdf_gamma(i) 1141 pdf_x = qsat(i) / qsatl(i) * 100. 1142 pdf_y = ( MAX( pdf_x - pdf_loc, 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 940 1143 pdf_e3 = GAMMAINC ( 1. + 1. / pdf_alpha(i) , pdf_y ) 941 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_e2 942 pdf_fra_above_nuc = EXP( - pdf_y ) * clrfra(i) 943 pdf_q_above_nuc = ( pdf_e3 * clrfra(i) & 944 + pdf_loc(i) * pdf_fra_above_nuc ) * qsatl(i) / 100. 945 946 pdf_x = qsat(i) / qsatl(i) * 100. 947 pdf_y = ( MAX( pdf_x - pdf_loc(i), 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 948 pdf_e3 = GAMMAINC ( 1. + 1. / pdf_alpha(i) , pdf_y ) 949 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_e2 1144 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_gamma(i) 950 1145 issrfra(i) = EXP( - pdf_y ) * clrfra(i) 951 qissr(i) = ( pdf_e3 * clrfra(i) + pdf_loc (i)* issrfra(i) ) * qsatl(i) / 100.952 953 issrfra(i) = issrfra(i) - pdf_fra_above_nuc954 qissr(i) = qissr(i) - pdf_q_above_nuc1146 qissr(i) = ( pdf_e3 * clrfra(i) + pdf_loc * issrfra(i) ) * qsatl(i) / 100. 1147 ELSE 1148 issrfra(i) = 0. 1149 qissr(i) = 0. 955 1150 ENDIF 956 1151 … … 969 1164 ENDIF ! cldfra .LT. eps 970 1165 1166 !--Diagnostics 1167 dcf_sub(i) = dcf_sub(i) / dtime 1168 dcf_con(i) = dcf_con(i) / dtime 1169 dcf_mix(i) = dcf_mix(i) / dtime 1170 dcf_sed(i) = dcf_sed(i) / dtime 1171 dqi_adj(i) = dqi_adj(i) / dtime 1172 dqi_sub(i) = dqi_sub(i) / dtime 1173 dqi_con(i) = dqi_con(i) / dtime 1174 dqi_mix(i) = dqi_mix(i) / dtime 1175 dqi_sed(i) = dqi_sed(i) / dtime 1176 dqvc_adj(i) = dqvc_adj(i) / dtime 1177 dqvc_sub(i) = dqvc_sub(i) / dtime 1178 dqvc_con(i) = dqvc_con(i) / dtime 1179 dqvc_mix(i) = dqvc_mix(i) / dtime 1180 dqvc_sed(i) = dqvc_sed(i) / dtime 1181 971 1182 ENDIF ! ( temp(i) .GT. temp_nowater ) .AND. .NOT. ok_weibull_warm_clouds 972 1183 … … 983 1194 CALL contrails_formation( & 984 1195 klon, dtime, pplay, temp, qsat, qsatl, gamma_cond, & 985 flight_dist, clrfra, pdf_loc, pdf_scale, pdf_alpha, keepgoing, & 1196 flight_dist, clrfra, qclr, pdf_scale, pdf_alpha, pdf_gamma, & 1197 keepgoing, pt_pron_clds, & 986 1198 Tcritcont, qcritcont, potcontfraP, potcontfraNP, & 987 1199 dcfa_ini, dqia_ini, dqta_ini) 988 1200 989 1201 DO i = 1, klon 990 IF ( keepgoing(i) .AND. ( temp(i) .LE. temp_nowater) ) THEN1202 IF ( keepgoing(i) .AND. pt_pron_clds(i) ) THEN 991 1203 992 1204 !--Convert existing contrail fraction into "natural" cirrus cloud fraction 993 dcfa_cir(i) = contfra(i) * ( EXP( - dtime / linear_contrails_lifetime ) - 1. ) 994 dqta_cir(i) = qcont(i) * ( EXP( - dtime / linear_contrails_lifetime ) - 1. ) 1205 IF ( cldfra(i) .GE. ( 1. - cfcon(i) - eps ) ) THEN 1206 contrails_conversion_factor = 1. 1207 ELSE 1208 contrails_conversion_factor = ( 1. - & 1209 !--First, the linear contrails are continuously degraded in induced cirrus 1210 EXP( - dtime / linear_contrails_lifetime ) & 1211 !--Second, if the cloud fills the entire gridbox, the linear contrails 1212 !--cannot exist. The exponent is set so that this only happens for 1213 !--very cloudy gridboxes 1214 * ( 1. - cldfra(i) / ( 1. - cfcon(i) ) )**0.1 ) 1215 ENDIF 1216 dcfa_cir(i) = - contrails_conversion_factor * contfra(i) 1217 dqta_cir(i) = - contrails_conversion_factor * qcont(i) 995 1218 996 1219 !--Add tendencies 997 1220 issrfra(i) = MAX(0., issrfra(i) - dcfa_ini(i)) 998 1221 qissr(i) = MAX(0., qissr(i) - dqta_ini(i)) 999 cldfra(i) = MAX(0., MIN(1. - cldfracv(i), cldfra(i) + dcfa_ini(i))) 1000 qcld(i) = MAX(0., MIN(qtot(i), qcld(i) + dqta_ini(i))) 1222 clrfra(i) = MAX(0., clrfra(i) - dcfa_ini(i)) 1223 qclr(i) = MAX(0., qclr(i) - dqta_ini(i)) 1224 1225 cldfra(i) = MAX(0., MIN(1. - cfcon(i), cldfra(i) + dcfa_ini(i))) 1226 qcld(i) = MAX(0., MIN(qtot_in(i), qcld(i) + dqta_ini(i))) 1001 1227 qvc(i) = MAX(0., MIN(qcld(i), qvc(i) + dcfa_ini(i) * qsat(i))) 1002 1228 contfra(i) = MAX(0., MIN(cldfra(i), contfra(i) + dcfa_cir(i) + dcfa_ini(i))) 1003 1229 qcont(i) = MAX(0., MIN(qcld(i), qcont(i) + dqta_cir(i) + dqta_ini(i))) 1230 perscontfra(i) = perscontfra(i) - dcfa_cir(i) 1004 1231 1005 1232 !--Diagnostics … … 1024 1251 cldfra(i) = 0. 1025 1252 contfra(i)= 0. 1253 perscontfra(i) = 0. 1026 1254 qcld(i) = 0. 1027 1255 qvc(i) = 0. 1256 qcont(i) = 0. 1028 1257 qincld(i) = qsat(i) 1029 1258 ELSE … … 1036 1265 ENDIF 1037 1266 1267 IF ( perscontfra(i) .LT. eps ) perscontfra(i) = 0. 1268 1038 1269 ENDIF ! keepgoing 1039 1270 ENDDO … … 1044 1275 !********************************************************************************** 1045 1276 1046 FUNCTION QVAPINCLD_DEPSUB( &1047 qvapincld, qiceincld, temp, qsat, pplay, dtime)1048 1049 USE lmdz_lscp_ini, ONLY: RV, RLSTT, RTT, RD, EPS_W1050 USE lmdz_lscp_ini, ONLY: depo_coef_cirrus, capa_cond_cirrus, rho_ice1051 USE lmdz_lscp_ini, ONLY: eps1052 1053 IMPLICIT NONE1054 1055 ! inputs1056 REAL :: qvapincld !1057 REAL :: qiceincld !1058 REAL :: temp !1059 REAL :: qsat !1060 REAL :: pplay !1061 REAL :: dtime ! time step [s]1062 ! outpu1063 REAL :: qvapincld_depsub1064 1065 !1066 ! local1067 REAL :: pres_sat, rho, kappa1068 REAL :: air_thermal_conduct, water_vapor_diff1069 REAL :: iwc1070 REAL :: iwc_log_inf100, iwc_log_sup1001071 REAL :: iwc_inf100, alpha_inf100, coef_inf1001072 REAL :: mu_sup100, sigma_sup100, coef_sup1001073 REAL :: Dm_ice, rm_ice1074 1075 !--If ok_unadjusted_clouds is set to TRUE, then the saturation adjustment1076 !--hypothesis is lost, and the vapor in the cloud is purely prognostic.1077 !1078 !--The deposition equation is1079 !-- dmi/dt = alpha*4pi*C*Svi / ( R_v*T/esi/Dv + Ls/ka/T * (Ls/R_v/T - 1) )1080 !--from Lohmann et al. (2016), where1081 !--alpha is the deposition coefficient [-]1082 !--mi is the mass of one ice crystal [kg]1083 !--C is the capacitance of an ice crystal [m]1084 !--Svi is the supersaturation ratio equal to (qvc - qsat)/qsat [-]1085 !--R_v is the specific gas constant for humid air [J/kg/K]1086 !--T is the temperature [K]1087 !--esi is the saturation pressure w.r.t. ice [Pa]1088 !--Dv is the diffusivity of water vapor [m2/s]1089 !--Ls is the specific latent heat of sublimation [J/kg/K]1090 !--ka is the thermal conductivity of dry air [J/m/s/K]1091 !1092 !--alpha is a coefficient to take into account the fact that during deposition, a water1093 !--molecule cannot join the crystal from everywhere, it must do so that the crystal stays1094 !--coherent (with the same structure). It has no impact for sublimation.1095 !--We fix alpha = depo_coef_cirrus (=0.5 by default following Lohmann et al. (2016))1096 !--during deposition, and alpha = 1. during sublimation.1097 !--The capacitance of the ice crystals is proportional to a parameter capa_cond_cirrus1098 !-- C = capa_cond_cirrus * rm_ice1099 !1100 !--We have qice = Nice * mi, where Nice is the ice crystal1101 !--number concentration per kg of moist air1102 !--HYPOTHESIS 1: the ice crystals are spherical, therefore1103 !-- mi = 4/3 * pi * rm_ice**3 * rho_ice1104 !--HYPOTHESIS 2: the ice crystals are monodisperse with the1105 !--initial radius rm_ice_0.1106 !--NB. this is notably different than the assumption1107 !--of a distributed qice in the cloud made in the sublimation process;1108 !--should it be consistent?1109 !1110 !--As the deposition process does not create new ice crystals,1111 !--and because we assume a same rm_ice value for all crystals1112 !--therefore the sublimation process does not destroy ice crystals1113 !--(or, in a limit case, it destroys all ice crystals), then1114 !--Nice is a constant during the sublimation/deposition process.1115 !-- dmi = dqi, et Nice = qi_0 / ( 4/3 RPI rm_ice_0**3 rho_ice )1116 !1117 !--The deposition equation then reads:1118 !-- dqi/dt = alpha*4pi*capa_cond_cirrus*rm_ice*(qvc-qsat)/qsat / ( R_v*T/esi/Dv + Ls/ka/T * (Ls/R_v/T - 1) ) * Nice1119 !-- dqi/dt = alpha*4pi*capa_cond_cirrus* (qi / qi_0)**(1/3) *rm_ice_0*(qvc-qsat)/qsat &1120 !-- / ( R_v*T/esi/Dv + Ls/ka/T * (Ls*R_v/T - 1) ) &1121 !-- * qi_0 / ( 4/3 RPI rm_ice_0**3 rho_ice )1122 !-- dqi/dt = qi**(1/3) * (qvc - qsat) * qi_0**(2/3) &1123 !-- *alpha/qsat*capa_cond_cirrus/ (R_v*T/esi/Dv + Ls/ka/T*(Ls*R_v/T - 1)) / ( 1/3 rm_ice_0**2 rho_ice )1124 !--and we have1125 !-- dqvc/dt = - qi**(1/3) * (qvc - qsat) / kappa * alpha * qi_0**(2/3) / rm_ice_0**21126 !-- dqi/dt = qi**(1/3) * (qvc - qsat) / kappa * alpha * qi_0**(2/3) / rm_ice_0**21127 !--where kappa = 1/3*rho_ice/capa_cond_cirrus*qsat*(R_v*T/esi/Dv + Ls/ka/T*(Ls/R_v/T - 1))1128 !1129 !--This system of equations can be resolved with an exact1130 !--explicit numerical integration, having one variable resolved1131 !--explicitly, the other exactly. The exactly resolved variable is1132 !--the one decreasing, so it is qvc if the process is1133 !--condensation, qi if it is sublimation.1134 !1135 !--kappa is computed as an initialisation constant, as it depends only1136 !--on temperature and other pre-computed values1137 pres_sat = qsat / ( EPS_W + ( 1. - EPS_W ) * qsat ) * pplay1138 !--This formula for air thermal conductivity comes from Beard and Pruppacher (1971)1139 air_thermal_conduct = ( 5.69 + 0.017 * ( temp - RTT ) ) * 1.e-3 * 4.1841140 !--This formula for water vapor diffusivity comes from Hall and Pruppacher (1976)1141 water_vapor_diff = 0.211 * ( temp / RTT )**1.94 * ( 101325. / pplay ) * 1.e-41142 kappa = 1. / 3. * rho_ice / capa_cond_cirrus * qsat &1143 * ( RV * temp / water_vapor_diff / pres_sat &1144 + RLSTT / air_thermal_conduct / temp * ( RLSTT / RV / temp - 1. ) )1145 !--NB. the greater kappa, the lower the efficiency of the deposition/sublimation process1146 1147 !--Dry density [kg/m3]1148 rho = pplay / temp / RD1149 1150 !--Here, the initial vapor in the cloud is qvapincld, and we compute1151 !--the new vapor qvapincld_new1152 1153 !--rm_ice formula from McFarquhar and Heymsfield (1997)1154 iwc = qiceincld * rho * 1e31155 iwc_inf100 = MIN(iwc, 0.252 * iwc**0.837)1156 iwc_log_inf100 = LOG10( MAX(eps, iwc_inf100) )1157 iwc_log_sup100 = LOG10( MAX(eps, iwc - iwc_inf100) )1158 1159 alpha_inf100 = - 4.99E-3 - 0.0494 * iwc_log_inf1001160 coef_inf100 = iwc_inf100 * alpha_inf100**3 / 120.1161 1162 mu_sup100 = ( 5.2 + 0.0013 * ( temp - RTT ) ) &1163 + ( 0.026 - 1.2E-3 * ( temp - RTT ) ) * iwc_log_sup1001164 sigma_sup100 = ( 0.47 + 2.1E-3 * ( temp - RTT ) ) &1165 + ( 0.018 - 2.1E-4 * ( temp - RTT ) ) * iwc_log_sup1001166 coef_sup100 = ( iwc - iwc_inf100 ) / EXP( 3. * mu_sup100 + 4.5 * sigma_sup100**2 )1167 1168 Dm_ice = ( 2. / alpha_inf100 * coef_inf100 + EXP( mu_sup100 + 0.5 * sigma_sup100**2 ) &1169 * coef_sup100 ) / ( coef_inf100 + coef_sup100 )1170 rm_ice = Dm_ice / 2. * 1.E-61171 1172 IF ( qvapincld .GE. qsat ) THEN1173 !--If the cloud is initially supersaturated1174 !--Exact explicit integration (qvc exact, qice explicit)1175 qvapincld_depsub = qsat + ( qvapincld - qsat ) &1176 * EXP( - depo_coef_cirrus * dtime * qiceincld / kappa / rm_ice**2 )1177 ELSE1178 !--If the cloud is initially subsaturated1179 !--Exact explicit integration (qvc exact, qice explicit)1180 !--Same but depo_coef_cirrus = 11181 qvapincld_depsub = qsat + ( qvapincld - qsat ) &1182 * EXP( - dtime * qiceincld / kappa / rm_ice**2 )1183 IF ( qvapincld_depsub .GE. ( qvapincld + qiceincld ) ) &1184 qvapincld_depsub = 0.1185 ENDIF ! qvapincld .GT. qsat1186 1187 END FUNCTION QVAPINCLD_DEPSUB1188 1189 1277 END MODULE lmdz_lscp_condensation
Note: See TracChangeset
for help on using the changeset viewer.
