Changeset 4613
- Timestamp:
- Jul 7, 2023, 4:01:37 AM (18 months ago)
- Location:
- LMDZ6/trunk/libf
- Files:
-
- 2 added
- 19 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.F90
r4089 r4613 94 94 USE init_ssrf_m, ONLY: start_init_subsurf 95 95 USE phys_state_var_mod, ONLY: beta_aridity, delta_tsurf, awake_dens, cv_gen, & 96 ratqs_inter , rneb_ancien96 ratqs_inter_, rneb_ancien 97 97 !use ioipsl_getincom 98 98 IMPLICIT NONE … … 143 143 fact_cldcon, facttemps,ok_newmicro,iflag_radia, & 144 144 iflag_cldcon, & 145 iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs, &145 ratqsbas,ratqshaut,tau_ratqs, & 146 146 ok_ade, ok_aie, ok_alw, ok_cdnc, ok_volcan, flag_volc_surfstrat, & 147 147 aerosol_couple, chemistry_couple, flag_aerosol, flag_aerosol_strat, & … … 285 285 end IF 286 286 287 ratqs_inter = 0.002287 ratqs_inter_ = 0.002 288 288 rneb_ancien = 0. 289 289 CALL phyredem( "startphy.nc" ) -
LMDZ6/trunk/libf/phylmd/cloudth_mod.F90
r4593 r4613 30 30 INTEGER itap,ind1,ind2 31 31 INTEGER ngrid,klev,klon,l,ig 32 INTEGER iflag_ratqs 32 33 33 34 REAL ztv(ngrid,klev) … … 274 275 INTEGER itap,ind1,ind2 275 276 INTEGER ngrid,klev,klon,l,ig 277 INTEGER iflag_ratqs 276 278 277 279 REAL ztv(ngrid,klev) … … 613 615 INTEGER itap,ind1,ind2 614 616 INTEGER ngrid,klev,klon,l,ig 617 INTEGER iflag_ratqs 615 618 616 619 REAL ztv(ngrid,klev) … … 835 838 INTEGER itap,ind1,ind2 836 839 INTEGER ngrid,klev,klon,l,ig 840 INTEGER iflag_ratqs 837 841 838 842 REAL ztv(ngrid,klev) … … 1022 1026 ENDIF 1023 1027 sigma1s = sigma1s_fraca + sigma1s_ratqs 1028 IF (iflag_ratqs.eq.11) then 1029 sigma1s = ratqs(ind1,ind2)*po(ind1)*aenv 1030 ENDIF 1024 1031 sigma2s=(sigma2s_factor*(((sth-senv)**2)**0.5)/((fraca(ind1,ind2)+0.02)**sigma2s_power))+0.002*zqta(ind1,ind2) 1025 1032 ! tests … … 1600 1607 1601 1608 INTEGER itap,ind1,l,ig,iter,k 1609 INTEGER iflag_ratqs 1602 1610 INTEGER iflag_topthermals, niter 1603 1611 LOGICAL falseklon(klon) … … 1894 1902 1895 1903 sigma1s = sigma1s_fraca + sigma1s_ratqs 1904 IF (iflag_ratqs.eq.11) then 1905 sigma1s = ratqs(ind1,ind2)*po(ind1)*aenv 1906 ENDIF 1896 1907 sigma2s=(sigma2s_factor*(((sth-senv)**2)**0.5)/((fraca(ind1,ind2)+0.02)**sigma2s_power))+0.002*zqta(ind1,ind2) 1897 1908 … … 2136 2147 2137 2148 sigma1s = sigma1s_fraca + sigma1s_ratqs 2149 IF (iflag_ratqs.eq.11) then 2150 sigma1s = ratqs(ind1,ind2)*po(ind1)*aenv 2151 ENDIF 2152 IF (iflag_ratqs.eq.11) then 2153 sigma1s = ratqs(ind1,ind2)*po(ind1)*aenvl 2154 ENDIF 2138 2155 deltasenv=aenvl*vert_alpha*sigma1s 2139 2156 xenv1=-(senvl+deltasenv)/(sqrt(2.)*sigma1s) -
LMDZ6/trunk/libf/phylmd/concvl.F90
r3496 r4613 3 3 t, q, t_wake, q_wake, s_wake, u, v, tra, ntra, & 4 4 Ale, Alp, sig1, w01, & 5 d_t, d_q, d_ u, d_v, d_tra, &5 d_t, d_q, d_qcomp, d_u, d_v, d_tra, & 6 6 rain, snow, kbas, ktop, sigd, & 7 7 cbmf, plcl, plfc, wbeff, convoccur, & … … 16 16 dd_t, dd_q, lalim_conv, wght_th, & ! RomP 17 17 evap, ep, epmlmMm, eplaMm, & ! RomP 18 wdtrainA, wdtrainS, wdtrainM, wght, qtc, sigt, &18 wdtrainA, wdtrainS, wdtrainM, wght, qtc, sigt, detrain, & 19 19 tau_cld_cv, coefw_cld_cv, & ! RomP+RL, AJ 20 20 !RomP <<< … … 105 105 REAL, DIMENSION(klon,klev), INTENT(INOUT) :: sig1, w01 106 106 107 REAL, DIMENSION(klon,klev), INTENT(OUT) :: d_t, d_q, d_ u, d_v107 REAL, DIMENSION(klon,klev), INTENT(OUT) :: d_t, d_q, d_qcomp, d_u, d_v 108 108 REAL, DIMENSION(klon,klev, nbtr),INTENT(OUT) :: d_tra 109 109 REAL, DIMENSION(klon), INTENT(OUT) :: rain, snow … … 145 145 REAL, DIMENSION(klon,klev), INTENT(OUT) :: wght !RL 146 146 REAL, DIMENSION(klon,klev), INTENT(OUT) :: qtc 147 REAL, DIMENSION(klon,klev), INTENT(OUT) :: sigt 147 REAL, DIMENSION(klon,klev), INTENT(OUT) :: sigt, detrain 148 148 REAL, INTENT(OUT) :: tau_cld_cv, coefw_cld_cv 149 149 REAL, DIMENSION(klon), INTENT(OUT) :: epmax_diag ! epmax_cape … … 429 429 Ale, Alp, omega, & 430 430 em_sig1feed, em_sig2feed, em_wght, & 431 iflag, d_t, d_q, d_ u, d_v, d_tra, rain, kbas, ktop, &431 iflag, d_t, d_q, d_qcomp, d_u, d_v, d_tra, rain, kbas, ktop, & 432 432 cbmf, plcl, plfc, wbeff, sig1, w01, ptop2, sigd, & 433 433 Ma, mip, Vprecip, Vprecipi, upwd, dnwd, dnwdbis, qcondc, wd, & … … 440 440 da, phi, mp, phii, d1a, dam, sij, wght, & ! RomP+RL 441 441 qta, clw, elij, evap, ep, epmlmMm, eplaMm, & ! RomP+RL 442 wdtrainA, wdtrainS, wdtrainM, qtc, sigt, &442 wdtrainA, wdtrainS, wdtrainM, qtc, sigt, detrain, & 443 443 tau_cld_cv, coefw_cld_cv, & ! RomP,AJ 444 444 !AC!+!RomP+jyg -
LMDZ6/trunk/libf/phylmd/conf_phys_m.F90
r4552 r4613 16 16 fact_cldcon, facttemps,ok_newmicro,iflag_radia,& 17 17 iflag_cld_th, & 18 iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs, &18 ratqsbas,ratqshaut,tau_ratqs, & 19 19 ok_ade, ok_aie, ok_alw, ok_cdnc, ok_volcan, flag_volc_surfstrat, aerosol_couple, & 20 20 chemistry_couple, flag_aerosol, flag_aerosol_strat, flag_aer_feedback, & … … 85 85 REAL :: fact_cldcon, facttemps,ratqsbas,ratqshaut,tau_ratqs 86 86 INTEGER :: iflag_cld_th 87 INTEGER :: iflag_ratqs87 88 88 89 89 CHARACTER (len = 6), SAVE :: type_ocean_omp, version_ocean_omp, ocean_omp -
LMDZ6/trunk/libf/phylmd/cv3_routines.F90
r4076 r4613 3448 3448 tv, tvp, wghti, & 3449 3449 iflag, precip, Vprecip, Vprecipi, & ! jyg: Vprecipi 3450 ft, fr, f u, fv, ftra, & ! jyg3450 ft, fr, fr_comp, fu, fv, ftra, & ! jyg 3451 3451 cbmf, upwd, dnwd, dnwd0, ma, mip, & 3452 3452 !! tls, tps, ! useless . jyg 3453 3453 qcondc, wd, & 3454 ftd, fqd, qta, qtc, sigt, tau_cld_cv, coefw_cld_cv)3454 ftd, fqd, qta, qtc, sigt, detrain, tau_cld_cv, coefw_cld_cv) 3455 3455 3456 3456 USE print_control_mod, ONLY: lunout, prt_level … … 3505 3505 !outputs: 3506 3506 REAL, DIMENSION (nloc), INTENT (OUT) :: precip 3507 REAL, DIMENSION (nloc, nd), INTENT (OUT) :: ft, fr, fu, fv 3507 REAL, DIMENSION (nloc, nd), INTENT (OUT) :: ft, fr, fu, fv , fr_comp 3508 3508 REAL, DIMENSION (nloc, nd), INTENT (OUT) :: ftd, fqd 3509 3509 REAL, DIMENSION (nloc, nd, ntra), INTENT (OUT) :: ftra … … 3515 3515 REAL, DIMENSION (nloc, nd), INTENT (OUT) :: qcondc ! cld 3516 3516 REAL, DIMENSION (nloc, nd), INTENT (OUT) :: qtc, sigt ! cld 3517 REAL, DIMENSION (nloc, nd), INTENT (OUT) :: detrain ! Louis : pour le calcul de Klein du terme de variance qui détraine dans lenvironnement 3517 3518 REAL, DIMENSION (nloc), INTENT (OUT) :: wd ! gust 3518 3519 REAL, DIMENSION (nloc), INTENT (OUT) :: cbmf … … 3541 3542 REAL, DIMENSION (nloc) :: sument 3542 3543 REAL, DIMENSION (nloc, nd) :: sigment, qtment ! cld 3544 REAL, DIMENSION (nloc, nd, nd) :: qdet 3543 3545 REAL sumdq !jyg 3544 3546 ! … … 3570 3572 ft(il, i) = 0.0 3571 3573 fr(il, i) = 0.0 3574 fr_comp(il,i) = 0.0 3572 3575 fu(il, i) = 0.0 3573 3576 fv(il, i) = 0.0 … … 3580 3583 sigment(il, i) = 0.0 ! cld 3581 3584 sigt(il, i) = 0.0 ! cld 3585 qdet(il,i,:) = 0.0 ! cld 3586 detrain(il, i) = 0.0 ! cld 3582 3587 nqcond(il, i) = 0.0 ! cld 3583 3588 END DO … … 3811 3816 IF (j<=inb(il) .AND. iflag(il)<=1) THEN 3812 3817 fr(il, 1) = fr(il, 1) + 0.01*grav*work(il)*ment(il, j, 1)*(qent(il,j,1)-rr(il,1)) 3818 fr_comp(il,1) = fr_comp(il,1) + 0.01*grav*work(il)*ment(il, j, 1)*(qent(il,j,1)-rr(il,1)) 3813 3819 fu(il, 1) = fu(il, 1) + 0.01*grav*work(il)*ment(il, j, 1)*(uent(il,j,1)-u(il,1)) 3814 3820 fv(il, 1) = fv(il, 1) + 0.01*grav*work(il)*ment(il, j, 1)*(vent(il,j,1)-v(il,1)) … … 4213 4219 fr(il, i) = fr(il, i) + 0.01*grav*dpinv*ment(il, k, i) * & 4214 4220 (qent(il,k,i)-awat(il)-rr(il,i)) 4221 fr_comp(il,i) = fr_comp(il,i) + 0.01*grav*dpinv*ment(il, k, i)*(qent(il,k,i)-awat(il)-rr(il,i)) 4215 4222 fu(il, i) = fu(il, i) + 0.01*grav*dpinv*ment(il, k, i)*(uent(il,k,i)-u(il,i)) 4216 4223 fv(il, i) = fv(il, i) + 0.01*grav*dpinv*ment(il, k, i)*(vent(il,k,i)-v(il,i)) … … 4218 4225 ! (saturated updrafts resulting from mixing) ! cld 4219 4226 qcond(il, i) = qcond(il, i) + (elij(il,k,i)-awat(il)) ! cld 4227 qdet(il,k,i) = (qent(il,k,i)-awat(il)) ! cld Louis : specific humidity in detraining water 4220 4228 qtment(il, i) = qtment(il, i) + qent(il,k,i) ! cld 4221 4229 nqcond(il, i) = nqcond(il, i) + 1. ! cld … … 4298 4306 ! (saturated downdrafts resulting from mixing) ! cld 4299 4307 qcond(il, i) = qcond(il, i) + elij(il, k, i) ! cld 4308 qdet(il,k,i) = qent(il,k,i) ! cld Louis : specific humidity in detraining water 4300 4309 qtment(il, i) = qent(il,k,i) + qtment(il,i) ! cld 4301 4310 nqcond(il, i) = nqcond(il, i) + 1. ! cld … … 4316 4325 ! PROBLEM: Should not qent(il,i,i) be taken into account even if nent(il,i)/=0? 4317 4326 !! qtment(il, i) = qent(il,k,i) + qtment(il,i) ! cld 4327 qdet(il,i,i) = qent(il,i,i) ! cld Louis : specific humidity in detraining water 4318 4328 qtment(il, i) = qent(il,i,i) + qtment(il,i) ! cld 4319 4329 !>jyg … … 4887 4897 IF (k<=inb(il) .AND. i<=inb(il) .AND. iflag(il)<=1) THEN ! cld 4888 4898 sument(il) =sument(il) + abs(ment(il,k,i)) 4899 detrain(il,i) = detrain(il,i) + abs(ment(il,k,i))*(qdet(il,k,i) - rr(il,i))*(qdet(il,k,i) - rr(il,i)) ! Louis terme de détrainement dans le bilan de variance 4889 4900 ENDIF 4890 4901 ENDDO ! il -
LMDZ6/trunk/libf/phylmd/cv3a_uncompress.F90
r3496 r4613 2 2 iflag, kbas, ktop, & 3 3 precip, cbmf, plcl, plfc, wbeff, sig, w0, ptop2, & 4 ft, fq, f u, fv, ftra, &4 ft, fq, fqcomp, fu, fv, ftra, & 5 5 sigd, ma, mip, vprecip, vprecipi, upwd, dnwd, dnwd0, & 6 6 qcondc, wd, cape, cin, & … … 12 12 qta, clw, elij, evap, ep, epmlmMm, eplaMm, & ! RomP+jyg 13 13 wdtrainA, wdtrainS, wdtrainM, & ! RomP 14 qtc, sigt, &14 qtc, sigt, detrain, & 15 15 epmax_diag, & ! epmax_cape 16 16 iflag1, kbas1, ktop1, & 17 17 precip1, cbmf1, plcl1, plfc1, wbeff1, sig1, w01, ptop21, & 18 ft1, fq1, f u1, fv1, ftra1, &18 ft1, fq1, fqcomp1, fu1, fv1, ftra1, & 19 19 sigd1, ma1, mip1, vprecip1, vprecipi1, upwd1, dnwd1, dnwd01, & 20 20 qcondc1, wd1, cape1, cin1, & … … 26 26 qta1, clw1, elij1, evap1, ep1, epmlmMm1, eplaMm1, & ! RomP+jyg 27 27 wdtrainA1, wdtrainS1, wdtrainM1, & ! RomP 28 qtc1, sigt1, &28 qtc1, sigt1, detrain1, & 29 29 epmax_diag1) ! epmax_cape 30 30 … … 54 54 REAL, DIMENSION (nloc), INTENT (IN) :: ptop2 55 55 REAL, DIMENSION (nloc), INTENT (IN) :: epmax_diag 56 REAL, DIMENSION (nloc, nd), INTENT (IN) :: ft, fq, f u, fv56 REAL, DIMENSION (nloc, nd), INTENT (IN) :: ft, fq, fqcomp, fu, fv 57 57 REAL, DIMENSION (nloc, nd, ntra), INTENT (IN) :: ftra 58 58 REAL, DIMENSION (nloc), INTENT (IN) :: sigd … … 81 81 REAL, DIMENSION (nloc, nd, nd), INTENT (IN) :: epmlmMm !RomP+jyg 82 82 REAL, DIMENSION (nloc, nd), INTENT (IN) :: eplamM !RomP+jyg 83 REAL, DIMENSION (nloc, nd), INTENT (IN) :: qtc, sigt !RomP83 REAL, DIMENSION (nloc, nd), INTENT (IN) :: qtc, sigt, detrain !RomP 84 84 REAL, DIMENSION (nloc, nd), INTENT (IN) :: wdtrainA, wdtrainS, wdtrainM !RomP 85 85 … … 91 91 REAL, DIMENSION (len), INTENT (OUT) :: epmax_diag1 ! epmax_cape 92 92 REAL, DIMENSION (len), INTENT (OUT) :: ptop21 93 REAL, DIMENSION (len, nd), INTENT (OUT) :: ft1, fq1, f u1, fv193 REAL, DIMENSION (len, nd), INTENT (OUT) :: ft1, fq1, fqcomp1, fu1, fv1 94 94 REAL, DIMENSION (len, nd, ntra), INTENT (OUT) :: ftra1 95 95 REAL, DIMENSION (len), INTENT (OUT) :: sigd1 … … 118 118 REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: epmlmMm1 !RomP+jyg 119 119 REAL, DIMENSION (len, nd), INTENT (OUT) :: eplamM1 !RomP+jyg 120 REAL, DIMENSION (len, nd), INTENT (OUT) :: qtc1, sigt1 !RomP120 REAL, DIMENSION (len, nd), INTENT (OUT) :: qtc1, sigt1, detrain1 !RomP 121 121 REAL, DIMENSION (len, nd), INTENT (OUT) :: wdtrainA1, wdtrainS1, wdtrainM1 !RomP 122 122 … … 158 158 ft1(idcum(i), k) = ft(i, k) 159 159 fq1(idcum(i), k) = fq(i, k) 160 fqcomp1(idcum(i), k) = fqcomp(i, k) 160 161 fu1(idcum(i), k) = fu(i, k) 161 162 fv1(idcum(i), k) = fv(i, k) … … 187 188 qtc1(idcum(i), k) = qtc(i, k) 188 189 sigt1(idcum(i), k) = sigt(i, k) 190 detrain1(idcum(i), k) = detrain(i, k) 189 191 190 192 END DO … … 285 287 ft1(:, 1:nl) = ft(:, 1:nl) 286 288 fq1(:, 1:nl) = fq(:, 1:nl) 289 fqcomp1(:, 1:nl) = fqcomp(:, 1:nl) 287 290 fu1(:, 1:nl) = fu(:, 1:nl) 288 291 fv1(:, 1:nl) = fv(:, 1:nl) … … 314 317 qtc1(:, 1:nl) = qtc(:, 1:nl) 315 318 sigt1(:, 1:nl) = sigt(:, 1:nl) 319 detrain1(:, 1:nl) = detrain(:, 1:nl) 316 320 ! 317 321 ma1(:, nlp) = 0. -
LMDZ6/trunk/libf/phylmd/cva_driver.F90
r3670 r4613 11 11 Ale1, Alp1, omega1, & 12 12 sig1feed1, sig2feed1, wght1, & 13 iflag1, ft1, fq1, f u1, fv1, ftra1, &13 iflag1, ft1, fq1, fqcomp1, fu1, fv1, ftra1, & 14 14 precip1, kbas1, ktop1, & 15 15 cbmf1, plcl1, plfc1, wbeff1, & … … 26 26 da1, phi1, mp1, phi21, d1a1, dam1, sigij1, wghti1, & ! RomP, RL 27 27 qta1, clw1, elij1, evap1, ep1, epmlmMm1, eplaMm1, & ! RomP, RL 28 wdtrainA1, wdtrainS1, wdtrainM1, qtc1, sigt1, tau_cld_cv, & !!jygprl28 wdtrainA1, wdtrainS1, wdtrainM1, qtc1, sigt1, detrain1, tau_cld_cv, & !!jygprl 29 29 coefw_cld_cv, & ! RomP, AJ 30 30 epmax_diag1) ! epmax_cape … … 88 88 ! ft1 Real Output temp tend 89 89 ! fq1 Real Output spec hum tend 90 ! fqcomp1 Real Output spec hum tend (only mixed draughts) 90 91 ! fu1 Real Output u-wind tend 91 92 ! fv1 Real Output v-wind tend … … 135 136 ! qtc1 Real Output specific humidity in convection 136 137 ! sigt1 Real Output surface fraction in adiabatic updrafts 138 ! detrain1 Real Output detrainment terme klein 137 139 ! phi21 Real Output used in tracer transport (cvltr) 138 140 … … 209 211 REAL, DIMENSION (len, nd), INTENT (OUT) :: ft1 210 212 REAL, DIMENSION (len, nd), INTENT (OUT) :: fq1 213 REAL, DIMENSION (len, nd), INTENT (OUT) :: fqcomp1 211 214 REAL, DIMENSION (len, nd), INTENT (OUT) :: fu1 212 215 REAL, DIMENSION (len, nd), INTENT (OUT) :: fv1 … … 248 251 REAL, DIMENSION (len, nd), INTENT (OUT) :: qtc1 ! in cloud water content (intensive) ! cld 249 252 REAL, DIMENSION (len, nd), INTENT (OUT) :: sigt1 ! fract. cloud area (intensive) ! cld 253 REAL, DIMENSION (len, nd), INTENT (OUT) :: detrain1 ! detrainement term of mixed draughts in environment 250 254 251 255 ! RomP >>> … … 502 506 REAL, DIMENSION(len,nd) :: ice, fondue, b 503 507 REAL, DIMENSION(len,nd) :: frac_a, frac_s, faci !!jygprl 504 REAL ft(nloc, nd), fq(nloc, nd) 508 REAL ft(nloc, nd), fq(nloc, nd), fqcomp(nloc, nd) 505 509 REAL ftd(nloc, nd), fqd(nloc, nd) 506 510 REAL fu(nloc, nd), fv(nloc, nd) … … 528 532 REAL qtc(nloc, nd) ! cld 529 533 REAL sigt(nloc, nd) ! cld 534 REAL detrain(nloc, nd) ! cld 530 535 531 536 ! RomP >>> … … 593 598 ft1(:, :) = 0.0 594 599 fq1(:, :) = 0.0 600 fqcomp1(:, :) = 0.0 595 601 fu1(:, :) = 0.0 596 602 fv1(:, :) = 0.0 … … 646 652 ! RomP >>> 647 653 sigt1(:, :) = 0. 654 detrain1(:, :) = 0. 648 655 qtc1(:, :) = 0. 649 656 wdtrainA1(:, :) = 0. … … 1139 1146 nent, elij, traent, sig, & 1140 1147 tv, tvp, wghti, & 1141 iflag, precip, Vprecip, Vprecipi, ft, fq, f u, fv, ftra, & ! jyg1148 iflag, precip, Vprecip, Vprecipi, ft, fq, fqcomp, fu, fv, ftra, & ! jyg 1142 1149 cbmf, upwd, dnwd, dnwd0, ma, mip, & 1143 1150 !! tls, tps, & ! useless . jyg 1144 1151 qcondc, wd, & 1145 1152 !! ftd, fqd, qnk, qtc, sigt, tau_cld_cv, coefw_cld_cv) 1146 ftd, fqd, qta, qtc, sigt, tau_cld_cv, coefw_cld_cv) !!jygprl1153 ftd, fqd, qta, qtc, sigt, detrain, tau_cld_cv, coefw_cld_cv) !!jygprl 1147 1154 ! 1148 1155 ! Test conseravtion de l'eau … … 1204 1211 iflag, icb, inb, & 1205 1212 precip, cbmf, plcl, plfc, wbeff, sig, w0, ptop2, & 1206 ft, fq, f u, fv, ftra, &1213 ft, fq, fqcomp, fu, fv, ftra, & 1207 1214 sigd, ma, mip, vprecip, vprecipi, upwd, dnwd, dnwd0, & 1208 1215 qcondc, wd, cape, cin, & … … 1214 1221 qta, clw, elij, evap, ep, epmlmMm, eplaMm, & ! RomP 1215 1222 wdtrainA, wdtrainS, wdtrainM, & ! RomP 1216 qtc, sigt, epmax_diag, & ! epmax_cape1223 qtc, sigt, detrain, epmax_diag, & ! epmax_cape 1217 1224 iflag1, kbas1, ktop1, & 1218 1225 precip1, cbmf1, plcl1, plfc1, wbeff1, sig1, w01, ptop21, & 1219 ft1, fq1, f u1, fv1, ftra1, &1226 ft1, fq1, fqcomp1, fu1, fv1, ftra1, & 1220 1227 sigd1, ma1, mip1, vprecip1, vprecipi1, upwd1, dnwd1, dnwd01, & 1221 1228 qcondc1, wd1, cape1, cin1, & … … 1227 1234 qta1, clw1, elij1, evap1, ep1, epmlmMm1, eplaMm1, & ! RomP 1228 1235 wdtrainA1, wdtrainS1, wdtrainM1, & ! RomP 1229 qtc1, sigt1, epmax_diag1) ! epmax_cape1236 qtc1, sigt1, detrain1, epmax_diag1) ! epmax_cape 1230 1237 ! 1231 1238 IF (prt_level >= 10) THEN -
LMDZ6/trunk/libf/phylmd/lmdz_ratqs_main.F90
r4612 r4613 1 SUBROUTINE calcratqs(klon,klev,prt_level,lunout, & 1 MODULE lmdz_ratqs_main 2 3 CONTAINS 4 5 SUBROUTINE ratqs_main(klon,klev,nbsrf,prt_level,lunout, & 2 6 iflag_ratqs,iflag_con,iflag_cld_th,pdtphys, & 3 7 ratqsbas,ratqshaut,ratqsp0,ratqsdp, & 8 pctsrf,s_pblh,zstd, & 4 9 tau_ratqs,fact_cldcon,wake_s, wake_deltaq, & 5 10 ptconv,ptconvth,clwcon0th, rnebcon0th, & 6 11 paprs,pplay,t_seri,q_seri, & 7 qtc_cv, sigt_cv, zqsat, & 8 tke,tke_dissip,lmix,wprime, & 9 t2m,q2m,fm_therm,cell_area,& 10 ratqs,ratqsc,ratqs_inter) 11 12 13 USE indice_sol_mod 14 USE phys_state_var_mod, ONLY: pctsrf 15 USE calcratqs_multi_mod, ONLY: calcratqs_inter, calcratqs_oro, calcratqs_hetero, calcratqs_tke 12 qtc_cv, sigt_cv,detrain_cv,fm_cv,fqd,fqcomp,sigd,zqsat, & 13 omega,tke,tke_dissip,lmix,wprime, & 14 t2m,q2m,fm_therm,entr_therm,detr_therm,cell_area,& 15 ratqs,ratqsc,ratqs_inter_) 16 17 18 USE lmdz_ratqs_multi, ONLY: ratqs_inter, ratqs_oro, ratqs_hetero, ratqs_tke 16 19 17 20 implicit none … … 27 30 28 31 ! Input 29 integer,intent(in) :: klon,klev, prt_level,lunout32 integer,intent(in) :: klon,klev,nbsrf,prt_level,lunout 30 33 integer,intent(in) :: iflag_con,iflag_cld_th,iflag_ratqs 31 34 real,intent(in) :: pdtphys,ratqsbas,ratqshaut,fact_cldcon,tau_ratqs 32 35 real,intent(in) :: ratqsp0, ratqsdp 36 real, dimension(klon,klev),intent(in) :: omega 33 37 real, dimension(klon,klev+1),intent(in) :: paprs,tke,tke_dissip,lmix,wprime 34 real, dimension(klon,klev),intent(in) :: pplay,t_seri,q_seri,zqsat,fm_therm, qtc_cv, sigt_cv 38 real, dimension(klon,klev),intent(in) :: pplay,t_seri,q_seri,zqsat 39 real, dimension(klon,klev),intent(in) :: entr_therm,detr_therm,qtc_cv, sigt_cv 40 real, dimension(klon,klev) :: detrain_cv,fm_cv,fqd,fqcomp 41 real, dimension(klon) :: sigd 42 43 real, dimension(klon,klev+1),intent(in) :: fm_therm 35 44 logical, dimension(klon,klev),intent(in) :: ptconv 36 45 real, dimension(klon,klev),intent(in) :: rnebcon0th,clwcon0th … … 38 47 real, dimension(klon,nbsrf),intent(in) :: t2m,q2m 39 48 real, dimension(klon), intent(in) :: cell_area 49 real, dimension(klon,nbsrf),intent(in) :: pctsrf 50 real, dimension(klon),intent(in) :: s_pblh 51 real, dimension(klon),intent(in) :: zstd 52 40 53 ! Output 41 real, dimension(klon,klev),intent(inout) :: ratqs,ratqsc,ratqs_inter 54 real, dimension(klon,klev),intent(inout) :: ratqs,ratqsc,ratqs_inter_ 42 55 43 56 logical, dimension(klon,klev),intent(inout) :: ptconvth … … 47 60 real, dimension(klon,klev) :: ratqss 48 61 real facteur,zfratqs1,zfratqs2 49 real, dimension(klon,klev) :: ratqs_hetero ,ratqs_oro,ratqs_tke62 real, dimension(klon,klev) :: ratqs_hetero_,ratqs_oro_,ratqs_tke_ 50 63 real resol,resolmax,fact 51 64 … … 173 186 *( tanh( (ratqsp0-pplay(i,k))/ratqsdp) + 1.) 174 187 ratqss(i,k)=max(ratqss(i,k),0.0) 175 176 ratqs_hetero(i,k)=0. 177 ratqs_oro(i,k)=0. 178 ratqs_tke(i,k)=0. 179 ratqs_inter(i,k)=0 188 ratqs_hetero_(i,k)=0. 189 ratqs_oro_(i,k)=0. 190 ratqs_tke_(i,k)=0. 191 ratqs_inter_(i,k)=0 180 192 enddo 181 193 enddo … … 183 195 if (iflag_ratqs .EQ. 10) then 184 196 ! interactive ratqs in presence of cold pools 185 call calcratqs_inter(klon,klev,iflag_ratqs,pdtphys,ratqsbas,wake_deltaq,wake_s,q_seri,qtc_cv, sigt_cv,ratqs_inter) 197 call ratqs_inter(klon,klev,iflag_ratqs,pdtphys,paprs, & 198 ratqsbas,wake_deltaq,wake_s,q_seri,qtc_cv, sigt_cv, & 199 fm_therm,entr_therm,detr_therm,detrain_cv,fm_cv,fqd,fqcomp,sigd, & 200 ratqs_inter_) 186 201 do k=1,klev 187 202 do i=1,klon 188 ratqs_inter (i,k)=ratqs_inter(i,k)-0.5*ratqs_inter(i,k)*(tanh((ratqsp0-pplay(i,k))/ratqsdp)+1.)203 ratqs_inter_(i,k)=ratqs_inter_(i,k)-0.5*ratqs_inter_(i,k)*(tanh((ratqsp0-pplay(i,k))/ratqsdp)+1.) 189 204 enddo 190 205 enddo 191 ratqss=ratqss+ratqs_inter 206 ratqss=ratqss+ratqs_inter_ 192 207 else if (iflag_ratqs .EQ. 11) then 208 print*,'avant ratqs_inter' 193 209 ! interactive ratqs with several sources 194 call calcratqs_inter(klon,klev,iflag_ratqs,pdtphys,ratqsbas,wake_deltaq,wake_s,q_seri,qtc_cv, sigt_cv,ratqs_inter) 195 ratqss=ratqss+ratqs_inter 210 call ratqs_inter(klon,klev,iflag_ratqs,pdtphys,paprs, & 211 ratqsbas,wake_deltaq,wake_s,q_seri,qtc_cv, sigt_cv, & 212 fm_therm,entr_therm,detr_therm,detrain_cv,fm_cv,fqd,fqcomp,sigd, & 213 ratqs_inter_) 214 ratqss=ratqss+ratqs_inter_ 196 215 else if (iflag_ratqs .EQ. 12) then 197 216 ! contribution of surface heterogeneities to ratqs 198 call calcratqs_hetero(klon,klev,t2m,q2m,t_seri,q_seri,pplay,paprs,ratqs_hetero)199 ratqss=ratqss+ratqs_hetero 217 call ratqs_hetero(klon,klev,pctsrf,s_pblh,t2m,q2m,t_seri,q_seri,pplay,paprs,ratqs_hetero_) 218 ratqss=ratqss+ratqs_hetero_ 200 219 else if (iflag_ratqs .EQ. 13) then 201 220 ! contribution of ubgrid orography to ratqs 202 call calcratqs_oro(klon,klev,zqsat,t_seri,pplay,paprs,ratqs_oro)203 ratqss=ratqss+ratqs_oro 221 call ratqs_oro(klon,klev,pctsrf,zstd,zqsat,t_seri,pplay,paprs,ratqs_oro_) 222 ratqss=ratqss+ratqs_oro_ 204 223 else if (iflag_ratqs .EQ. 14) then 205 224 ! effect of subgrid-scale TKE on ratqs (in development) 206 call calcratqs_tke(klon,klev,pdtphys,t_seri,q_seri,zqsat,pplay,paprs,tke,tke_dissip,lmix,wprime,ratqs_tke)207 ratqss=ratqss+ratqs_tke 225 call ratqs_tke(klon,klev,pdtphys,t_seri,q_seri,zqsat,pplay,paprs,omega,tke,tke_dissip,lmix,wprime,ratqs_tke_) 226 ratqss=ratqss+ratqs_tke_ 208 227 endif 209 228 … … 222 241 do k=1,klev 223 242 do i=1,klon 224 if ((fm_therm(i,k) .gt.1.e-10)) then243 if ((fm_therm(i,k)>1.e-10)) then 225 244 ratqsc(i,k)=sqrt(ratqsc(i,k)**2+0.05**2) 226 245 endif … … 262 281 263 282 return 264 end 283 END SUBROUTINE ratqs_main 284 285 END MODULE lmdz_ratqs_main -
LMDZ6/trunk/libf/phylmd/lmdz_ratqs_multi.F90
r4612 r4613 1 MODULE calcratqs_multi_mod 1 MODULE lmdz_ratqs_multi 2 3 !============================================= 4 ! A FAIRE : 5 ! Traiter le probleme de USE lscp_tools_mod, ONLY: CALC_QSAT_ECMWF 6 !============================================= 2 7 3 8 !============================================= … … 14 19 !============================================= 15 20 INCLUDE "YOETHF.h" 16 INCLUDE "YOMCST.h"17 21 18 22 … … 21 25 22 26 !======================================================================== 23 SUBROUTINE calcratqs_inter(klon,klev,iflag_ratqs,pdtphys, &27 SUBROUTINE ratqs_inter(klon,klev,iflag_ratqs,pdtphys,paprs, & 24 28 ratqsbas, wake_deltaq, wake_s, q_seri,qtc_cv, sigt_cv, & 25 ratqs_inter) 26 USE ioipsl_getin_p_mod, ONLY : getin_p 29 fm_therm,entr_therm,detr_therm,detrain_cv,fm_cv,fqd,fqcomp,sigd, & 30 ratqs_inter_) 31 32 USE lmdz_ratqs_ini, ONLY : a_ratqs_cv,tau_var,fac_tau,tau_cumul,a_ratqs_wake, dqimpl 33 USE lmdz_ratqs_ini, ONLY : RG 34 USE lmdz_ratqs_ini, ONLY : povariance, var_conv 35 USE lmdz_thermcell_dq, ONLY : thermcell_dq 36 27 37 implicit none 28 38 29 39 !======================================================================== 30 40 ! L. d'Alençon, 25/02/2021 31 ! Cette subroutine calcule une valeur de ratqsbas interactive dépendant de la présence de poches froides dans l'environnement.32 ! Elle est appelée par la subroutine calcratqs lorsque iflag_ratqs = 10.41 ! Cette subroutine calcule une valeur de ratqsbas interactive 42 ! Elle est appelée par la subroutine ratqs lorsque iflag_ratqs = 11. 33 43 !======================================================================== 34 44 35 45 ! Declarations 36 37 38 LOGICAL, SAVE :: first = .TRUE.39 !$OMP THREADPRIVATE(first)40 46 ! Input 41 47 integer,intent(in) :: klon,klev,iflag_ratqs 42 48 real,intent(in) :: pdtphys,ratqsbas 49 real, dimension(klon,klev+1),intent(in) :: paprs 43 50 real, dimension(klon,klev),intent(in) :: wake_deltaq, q_seri,qtc_cv, sigt_cv 44 51 real, dimension(klon),intent(in) :: wake_s 52 real, dimension(klon,klev+1),intent(in) :: fm_therm 53 real, dimension(klon,klev),intent(in) :: entr_therm,detr_therm,detrain_cv,fm_cv,fqd,fqcomp 54 real, dimension(klon),intent(in) :: sigd 45 55 46 56 ! Output 47 real, dimension(klon,klev),intent(inout) :: ratqs_inter 57 real, dimension(klon,klev),intent(inout) :: ratqs_inter_ 48 58 49 59 ! local 60 LOGICAL :: klein = .false. 61 LOGICAL :: klein_conv = .true. 62 REAL :: taup0 = 70000 63 REAL :: taudp = 500 64 integer :: lev_out=10 65 REAL, DIMENSION (klon,klev) :: zmasse,entr0,detr0,detraincv,dqp,detrain_p,q0,qd0,tau_diss 66 REAL, DIMENSION (klon,klev+1) :: fm0 50 67 integer i,k 51 68 real, dimension(klon,klev) :: wake_dq 52 REAL, SAVE :: a_ratqs_cv 53 !$OMP THREADPRIVATE(a_ratqs_cv) 54 REAL, SAVE :: tau_ratqs_wake 55 !$OMP THREADPRIVATE(tau_ratqs_wake) 56 REAL, SAVE :: a_ratqs_wake 57 !$OMP THREADPRIVATE(a_ratqs_wake) 58 real, dimension(klon) :: max_wake_dq, max_dqconv,max_sigt 59 !------------------------------------------------------------------------- 60 ! Caclul de ratqs_inter 61 !------------------------------------------------------------------------- 62 63 ! 64 if (first) then 65 tau_ratqs_wake = 3600. ! temps de relaxation de la variabilité 66 a_ratqs_wake = 3. ! paramètre pilotant l'importance du terme dépendant des poches froides 67 a_ratqs_cv = 0.5 68 CALL getin_p('tau_ratqs_wake', tau_ratqs_wake) 69 CALL getin_p('a_ratqs_wake', a_ratqs_wake) 70 CALL getin_p('a_ratqs_cv', a_ratqs_cv) 71 first=.false. 72 endif 73 max_wake_dq(:) = 0. 74 max_dqconv (:) = 0 75 max_sigt(:) = 0. 76 if (iflag_ratqs.eq.10) then 77 do k=1,klev 78 do i=1,klon 79 max_wake_dq(i) = max(abs(wake_deltaq(i,k)),max_wake_dq(i)) 80 max_sigt(i) = max(abs(sigt_cv(i,k)),max_sigt(i)) 81 max_dqconv(i) = max(abs(q_seri(i,k) - qtc_cv(i,k)),max_dqconv(i)) 82 enddo 69 70 71 real, dimension(klon) :: max_sigd, max_dqconv,max_sigt 72 real, dimension(klon,klev) :: zoa,zocarrea,pdocarreadj,pocarre,po,pdoadj,varq_therm 73 74 75 lev_out=0. 76 77 print*,'ratqs_inter' 78 79 !----------------------------------------------------------------------- 80 ! Calcul des masses 81 !----------------------------------------------------------------------- 82 83 do k=1,klev 84 zmasse(:,k)=(paprs(:,k)-paprs(:,k+1))/RG 85 enddo 86 !------------------------------------------------------------------------- 87 ! Caclul du terme de détrainement de la variance pour les thermiques 88 !------------------------------------------------------------------------- 89 90 ! initialisations 91 92 93 do k=1,klev 94 do i=1,klon 95 tau_diss(i,k)=tau_var +0.5*fac_tau*tau_var*(tanh((taup0-paprs(i,k))/taudp) + 1.) 96 enddo 97 enddo 98 99 100 101 entr0(:,:) = entr_therm(:,:) 102 fm0(:,:) = fm_therm(:,:) 103 detr0(:,:) = detr_therm(:,:) 104 105 ! calcul du carré de l'humidité spécifique 106 po(:,:) = q_seri(:,:) 107 call thermcell_dq(klon,klev,dqimpl,pdtphys,fm0,entr0,zmasse, & 108 & po,pdoadj,zoa,lev_out) 109 do k=1,klev 110 do i=1,klon 111 pocarre(i,k)=po(i,k)*po(i,k) + povariance(i,k) 112 enddo 113 enddo 114 call thermcell_dq(klon,klev,dqimpl,pdtphys,fm0,entr0,zmasse, & 115 & pocarre,pdocarreadj,zocarrea,lev_out) 116 117 118 do k=1,klev 119 do i=1,klon 120 varq_therm(i,k)=zocarrea(i,k)-zoa(i,k)*zoa(i,k) 121 enddo 122 enddo 123 124 125 if (klein) then 126 do k=1,klev-1 127 do i=1,klon 128 qd0(:,:) = 0.0 129 if (sigd(i).ne.0) then 130 qd0(i,k) = fqd(i,k)*tau_cumul/sigd(i) 131 endif 132 enddo 133 enddo 134 do k=1,klev-1 135 do i=1,klon 136 povariance(i,k)= (detr0(i,k)*((zoa(i,k)-po(i,k))**2 + (varq_therm(i,k)-povariance(i,k)))/zmasse(i,k) + fm0(i,k+1)*povariance(i,k+1)/zmasse(i,k) - & 137 fm0(i,k)*povariance(i,k)/zmasse(i,k) + & 138 a_ratqs_cv*(detrain_cv(i,k)/zmasse(i,k)) + sigd(i)*(1-sigd(i))*qd0(i,k)**2/tau_cumul & 139 + ((povariance(i,k+1)-povariance(i,k))*(fm_cv(i,k)/zmasse(i,k))))*pdtphys + povariance(i,k) 140 povariance(i,k)= povariance(i,k)*exp(-pdtphys/tau_diss(i,k)) 141 enddo 142 enddo 143 povariance(:,klev) = povariance(:,klev-1) 144 145 else ! calcul direct 146 qd0(:,:) = 0.0 147 q0(:,:) = 0.0 148 do k=1,klev-1 149 do i=1,klon 150 if (sigd(i).ne.0) then 151 qd0(i,k) = fqd(i,k)*tau_cumul/sigd(i) 152 endif 153 if (sigt_cv(i,k).ne.0) then 154 q0(i,k) = fqcomp(i,k)*tau_cumul/sigt_cv(i,k) 155 endif 156 enddo 157 enddo 158 do k=1,klev-1 159 do i=1,klon 160 povariance(i,k)= (pdocarreadj(i,k)-2.*po(i,k)*pdoadj(i,k) + & 161 a_ratqs_cv*(sigt_cv(i,k)*(1-sigt_cv(i,k))*q0(i,k)**2/tau_cumul + sigd(i)*(1-sigd(i))*qd0(i,k)**2/tau_cumul) + & 162 ((povariance(i,k+1)-povariance(i,k))*(fm_cv(i,k)/zmasse(i,k))))*pdtphys + povariance(i,k) 163 povariance(i,k)=povariance(i,k)*exp(-pdtphys/tau_diss(i,k)) 164 enddo 165 enddo 166 povariance(:,klev) = povariance(:,klev-1) 167 ! fqd(:,:)=sigt_cv(:,:)*(1-sigt_cv(:,:))*q0(:,:)**2/tau_cumul 168 endif 169 170 !------------------------------------------------------------------------- 171 ! Caclul du terme de détrainement de la variance pour la convection (version fausse avec deux calculs de variance indépendants) 172 !------------------------------------------------------------------------- 173 174 ! if (klein_conv) then 175 ! detrain_p(:,:) = 0. 176 ! detraincv(:,:) = 0. 177 ! dqp(:,:) = 0. 178 179 ! do k=1,klev-1 180 ! do i=1,klon 181 ! dqp(i,k) = q_seri(i,k) - qp(i,k) 182 ! detraincv(i,k) = abs(detrain_cv(i,k)) 183 184 ! if ((mp(i,k)-mp(i,k+1)).le.0) then 185 ! detrain_p(i,k) = (mp(i,k+1)-mp(i,k)) 186 ! endif 187 ! enddo 188 ! enddo 189 190 ! do k=1,klev-1 191 ! do i=1,klon 192 ! qd0(:,:) = 0.0 193 ! if (sigd(i).ne.0) then 194 ! qd0(i,k) = fqd(i,k)*tau_cumul/sigd(i) 195 ! endif 196 ! enddo 197 ! enddo 198 199 ! do k=1,klev-1 200 ! do i=1,klon 201 ! var_conv(i,k)= var_conv(i,k)*exp(-pdtphys/tau_conv) + & 202 ! (a_ratqs_cv*(detraincv(i,k)/zmasse(i,k)) + sigd(i)*(1-sigd(i))*qd0(i,k)**2/tau_cumul & 203 ! + ((var_conv(i,k+1)-var_conv(i,k))*(fm_cv(i,k)/zmasse(i,k))))* & 204 ! ((dqp(i,k)**2)*(detrain_p(i,k)/zmasse(i,k))))* & ! les termes de descentes précipitantes qui seront traités autrement 205 ! (((mp(i,k)-mp(i,k+1))/zmasse(i,k))*dqp(i,k)**2) + (2*mp(i,k)*dqp(i,k)*(qp(i,k+1)-qp(i,k))/zmasse(i,k)))* & 206 ! (1.-exp(-pdtphys/tau_conv))/(1/tau_conv) 207 ! enddo 208 ! enddo 209 ! var_conv(:,klev) = var_conv(:,klev-1) 210 ! fqd(:,:) = var_conv(:,:) 211 ! else 212 213 214 ! do k=1,klev-1 215 ! do i=1,klon 216 ! var_conv(i,k)= var_conv(i,k)*exp(-pdtphys/tau_conv) + & 217 ! (a_ratqs_cv*(sigt_cv(i,k)*(1-sigt_cv(i,k))*q0(i,k)**2/pdtphys + sigd(i)*(1-sigd(i))*qd0(i,k)**2/tau_cumul) + & ! somme des contributions des descentes précipitantes et des flux mélangés 218 ! + ((var_conv(i,k+1)-var_conv(i,k))*(fm_cv(i,k)/zmasse(i,k))))* & ! flux compensatoires dans l'environnement 219 ! (1.-exp(-pdtphys/tau_conv))/(1/tau_conv) 220 ! ((var_conv(i,k+1)-var_conv(i,k))*(fm_cv(i,k)/zmasse(i,k))) 221 ! enddo 222 ! enddo 223 ! var_conv(:,klev) = var_conv(:,klev-1) 224 ! endif 225 226 !------------------------------------------------------------------------- 227 ! Caclul du ratqs_inter_ 228 !------------------------------------------------------------------------- 229 230 do k=1,klev 231 do i=1,klon 232 if(q_seri(i,k).ge.1E-7) then 233 ratqs_inter_(i,k) = abs(povariance(i,k))**0.5/q_seri(i,k) 234 else 235 ratqs_inter_(i,k) = 0. 236 endif 83 237 enddo 84 85 do k=1,klev 86 do i=1,klon 87 ratqs_inter(i,k)= ratqs_inter(i,k)*exp(-pdtphys/tau_ratqs_wake) + & 88 a_ratqs_wake*(max_wake_dq(i)*(wake_s(i)**0.5/(1.-wake_s(i))))*(1.-exp(-pdtphys/tau_ratqs_wake))/q_seri(i,1) 89 if (ratqs_inter(i,k)<ratqsbas) then 90 ratqs_inter(i,k) = ratqsbas 91 endif 92 enddo 93 enddo 94 endif 95 96 if (iflag_ratqs.eq.11) then 97 do k=1,klev 98 do i=1,klon 99 max_wake_dq(i) = max(abs(wake_deltaq(i,k)),max_wake_dq(i)) 100 max_sigt(i) = max(abs(sigt_cv(i,k)),max_sigt(i)) 101 max_dqconv(i) = max(abs(q_seri(i,k) - qtc_cv(i,k)),max_dqconv(i)) 102 enddo 103 enddo 104 105 do k=1,klev 106 do i=1,klon 107 ratqs_inter(i,k)= ratqs_inter(i,k)*exp(-pdtphys/tau_ratqs_wake) + & 108 a_ratqs_wake*(max_wake_dq(i)*(wake_s(i)**0.5/(1.-wake_s(i))))*(1.-exp(-pdtphys/tau_ratqs_wake))/q_seri(i,1) + & 109 a_ratqs_cv*max_dqconv(i)*max_sigt(i)*(1.-exp(-pdtphys/tau_ratqs_wake))/q_seri(i,1) 110 ! if (ratqs_inter(i,k)>0) then 111 ! ratqs_inter(i,k) = abs(q_seri(i,k) - qtc_cv(i,k)) 112 ! endif 113 enddo 114 enddo 115 endif 238 enddo 239 116 240 return 117 end 118 241 end 119 242 120 243 !------------------------------------------------------------------ 121 SUBROUTINE calcratqs_oro(klon,klev,qsat,temp,pplay,paprs,ratqs_oro)244 SUBROUTINE ratqs_oro(klon,klev,pctsrf,zstd,qsat,temp,pplay,paprs,ratqs_oro_) 122 245 123 246 ! Etienne Vignon, November 2021: effect of subgrid orography on ratqs 124 247 125 USE phys_state_var_mod, ONLY: zstd 126 USE phys_state_var_mod, ONLY: pctsrf 127 USE indice_sol_mod, only: nbsrf, is_lic, is_ter 248 USE lmdz_ratqs_ini, ONLY : RG,RV,RD,RLSTT,RLVTT,RTT,nbsrf,is_lic,is_ter 128 249 129 250 IMPLICIT NONE … … 136 257 INTEGER, INTENT(IN) :: klon ! number of horizontal grid points 137 258 INTEGER, INTENT(IN) :: klev ! number of vertical layers 259 REAL, DIMENSION(klon,nbsrf) :: pctsrf 138 260 REAL, DIMENSION(klon,klev), INTENT(IN) :: qsat ! saturation specific humidity [kg/kg] 261 REAL, DIMENSION(klon), INTENT(IN) :: zstd ! sub grid orography standard deviation 139 262 REAL, DIMENSION(klon,klev), INTENT(IN) :: temp ! air temperature [K] 140 263 REAL, DIMENSION(klon,klev), INTENT(IN) :: pplay ! air pressure, layer's center [Pa] … … 143 266 ! OUTPUTS 144 267 145 REAL, DIMENSION(klon,klev), INTENT(out) :: ratqs_oro ! ratqs profile due to subgrid orography268 REAL, DIMENSION(klon,klev), INTENT(out) :: ratqs_oro_ ! ratqs profile due to subgrid orography 146 269 147 270 … … 172 295 ENDIF 173 296 xsi0(i)=zstd(i)*ABS(orogradT(i))*Lvs/temp0/temp0/RV 174 ratqs_oro (i,1)=xsi0(i)297 ratqs_oro_(i,1)=xsi0(i) 175 298 END DO 176 299 … … 187 310 /paprs(i,k)*(pplay(i,k-1)-pplay(i,k))/RG 188 311 189 ratqs_oro (i,k)=MAX(0.0,pctsrf(i,is_ter)*xsi0(i)*exp(-zlay(i,k)/MAX(zstd(i),1.)))312 ratqs_oro_(i,k)=MAX(0.0,pctsrf(i,is_ter)*xsi0(i)*exp(-zlay(i,k)/MAX(zstd(i),1.))) 190 313 END DO 191 314 END DO … … 194 317 195 318 196 END SUBROUTINE calcratqs_oro197 198 !============================================= 199 200 SUBROUTINE calcratqs_hetero(klon,klev,t2m,q2m,temp,q,pplay,paprs,ratqs_hetero)319 END SUBROUTINE ratqs_oro 320 321 !============================================= 322 323 SUBROUTINE ratqs_hetero(klon,klev,pctsrf,s_pblh,t2m,q2m,temp,q,pplay,paprs,ratqs_hetero_) 201 324 202 325 ! Etienne Vignon, November 2021 203 326 ! Effect of subgrid surface heterogeneities on ratqs 204 327 205 USE phys_local_var_mod, ONLY: s_pblh206 USE phys_state_var_mod, ONLY: pctsrf207 USE indice_sol_mod208 328 USE lscp_tools_mod, ONLY: CALC_QSAT_ECMWF 209 329 330 USE lmdz_ratqs_ini, ONLY : RG,RD,RTT,nbsrf 331 210 332 IMPLICIT NONE 211 212 include "YOMCST.h"213 333 214 334 ! INPUTS … … 217 337 INTEGER, INTENT(IN) :: klon ! number of horizontal grid points 218 338 INTEGER, INTENT(IN) :: klev ! number of vertical layers 339 REAL, DIMENSION(klon) :: s_pblh ! height of the planetary boundary layer(HPBL) 340 REAL, DIMENSION(klon,nbsrf) :: pctsrf ! Fractional cover of subsurfaces 219 341 REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: t2m ! 2m temperature for each tile [K] 220 342 REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: q2m ! 2m specific humidity for each tile [kg/kg] … … 226 348 ! OUTPUTS 227 349 228 REAL, DIMENSION(klon,klev), INTENT(out) :: ratqs_hetero ! ratsq profile due to surface heterogeneities350 REAL, DIMENSION(klon,klev), INTENT(out) :: ratqs_hetero_ ! ratsq profile due to surface heterogeneities 229 351 230 352 … … 259 381 zlay(:,1)= RD*temp(:,1)/(0.5*(paprs(:,1)+pplay(:,1))) & 260 382 *(paprs(:,1)-pplay(:,1))/RG 261 ratqs_hetero (:,1)=xsi0(:)383 ratqs_hetero_(:,1)=xsi0(:) 262 384 263 385 DO k=2,klev … … 266 388 /paprs(i,k)*(pplay(i,k-1)-pplay(i,k))/RG 267 389 268 ratqs_hetero (i,k)=MAX(xsi0(i)*exp(-zlay(i,k)/(s_pblh(i)+1.0)),0.0)390 ratqs_hetero_(i,k)=MAX(xsi0(i)*exp(-zlay(i,k)/(s_pblh(i)+1.0)),0.0) 269 391 END DO 270 392 END DO 271 393 272 END SUBROUTINE calcratqs_hetero273 274 !============================================= 275 276 SUBROUTINE calcratqs_tke(klon,klev,pdtphys,temp,q,qsat,pplay,paprs,tke,tke_dissip,lmix,wprime,ratqs_tke)394 END SUBROUTINE ratqs_hetero 395 396 !============================================= 397 398 SUBROUTINE ratqs_tke(klon,klev,pdtphys,temp,q,qsat,pplay,paprs,omega,tke,tke_dissip,lmix,wprime,ratqs_tke_) 277 399 278 400 ! References: … … 287 409 ! model. J. Atmos. Sci. 73, 279–291. https://doi.org/10.1175/JAS-D-15-0021. 288 410 289 USE phys_local_var_mod, ONLY: omega411 USE lmdz_ratqs_ini, ONLY : RG,RV,RD,RCPD,RLSTT,RLVTT,RTT 290 412 291 413 IMPLICIT NONE … … 301 423 REAL, DIMENSION(klon,klev), INTENT(IN) :: pplay ! air pressure, layer's center [Pa] 302 424 REAL, DIMENSION(klon,klev+1), INTENT(IN) :: paprs ! air pressure, lower inteface [Pa] 425 REAL, DIMENSION(klon,klev), INTENT(IN) :: omega ! air pressure, lower inteface [Pa] 303 426 REAL, DIMENSION(klon,klev+1), INTENT(IN) :: tke ! Turbulent Kinetic Energy [m2/s2] 304 427 REAL, DIMENSION(klon,klev+1), INTENT(IN) :: tke_dissip ! Turbulent Kinetic Energy Dissipation rate [m2/s3] … … 308 431 ! OUTPUTS 309 432 310 REAL, DIMENSION(klon,klev), INTENT(out) :: ratqs_tke ! ratsq profile due to subgrid TKE433 REAL, DIMENSION(klon,klev), INTENT(out) :: ratqs_tke_ ! ratsq profile due to subgrid TKE 311 434 312 435 ! LOCAL … … 333 456 ! Calculation of ratqs 334 457 !--------------------------------------------------------------- 335 ratqs_tke (:,1)=ratqsmin ! set to a very low value to avoid division by 0 in order parts458 ratqs_tke_(:,1)=ratqsmin ! set to a very low value to avoid division by 0 in order parts 336 459 ! of the code 337 460 DO k=2,klev ! we start from second model level since TKE is not defined at k=1 … … 353 476 VARLOG=AAprime/2./DD 354 477 VARLOG=MIN(VARLOG,maxvarlog) 355 ratqs_tke (i,k)=SQRT(MAX(EXP(VARLOG)-1.0,ratqsmin))478 ratqs_tke_(i,k)=SQRT(MAX(EXP(VARLOG)-1.0,ratqsmin)) 356 479 END DO 357 480 END DO 358 END SUBROUTINE calcratqs_tke 359 360 361 362 363 364 END MODULE calcratqs_multi_mod 481 END SUBROUTINE ratqs_tke 482 483 END MODULE lmdz_ratqs_multi -
LMDZ6/trunk/libf/phylmd/nuage.h
r4535 r4613 6 6 REAL tau_cld_cv,coefw_cld_cv 7 7 REAL tmax_fonte_cv 8 INTEGER iflag_cld_cv 8 INTEGER iflag_cld_cv, iflag_ratqs 9 9 INTEGER iflag_rei 10 10 LOGICAL ok_icefra_lscp … … 13 13 & rei_min,rei_max, & 14 14 & tau_cld_cv,coefw_cld_cv, & 15 & tmax_fonte_cv, 15 & tmax_fonte_cv,iflag_ratqs, & 16 16 & iflag_cld_cv, & 17 17 & ok_icefra_lscp, & -
LMDZ6/trunk/libf/phylmd/phyetat0_mod.F90
r4581 r4613 28 28 zstd, zthe, zval, ale_bl, ale_bl_trig, alp_bl, u10m, v10m, treedrg, & 29 29 ale_wake, ale_bl_stat, ds_ns, dt_ns, delta_sst, delta_sal, dter, dser, & 30 dt_ds, ratqs_inter 30 dt_ds, ratqs_inter_ 31 31 !FC 32 32 USE geometry_mod, ONLY: longitude_deg, latitude_deg … … 491 491 492 492 ! fisrtilp/Clouds 0.002 could be ratqsbas. But can stay like this as well 493 found=phyetat0_get(ratqs_inter ,"RATQS_INTER","Relative width of the lsc sugrid scale water",0.002)493 found=phyetat0_get(ratqs_inter_,"RATQS_INTER","Relative width of the lsc sugrid scale water",0.002) 494 494 495 495 !=========================================== -
LMDZ6/trunk/libf/phylmd/phyredem.F90
r4551 r4613 30 30 du_gwd_rando, du_gwd_front, u10m, v10m, & 31 31 treedrg, solswfdiff, delta_sal, ds_ns, dt_ns, & 32 delta_sst, ratqs_inter , dter, dser, dt_ds32 delta_sst, ratqs_inter_, dter, dser, dt_ds 33 33 34 34 USE geometry_mod, ONLY : longitude_deg, latitude_deg … … 334 334 335 335 ! fisrtilp/clouds 336 CALL put_field(pass,"RATQS_INTER","Relative width of the lsc sugrid scale water",ratqs_inter )336 CALL put_field(pass,"RATQS_INTER","Relative width of the lsc sugrid scale water",ratqs_inter_) 337 337 338 338 -
LMDZ6/trunk/libf/phylmd/phys_state_var_mod.F90
r4556 r4613 102 102 REAL, ALLOCATABLE, SAVE :: rneb_ancien(:,:) 103 103 !$OMP THREADPRIVATE(rneb_ancien) 104 REAL, ALLOCATABLE, SAVE :: qtc_cv(:,:),sigt_cv(:,:) 105 !$OMP THREADPRIVATE(qtc_cv,sigt_cv )104 REAL, ALLOCATABLE, SAVE :: qtc_cv(:,:),sigt_cv(:,:),detrain_cv(:,:),fm_cv(:,:) 105 !$OMP THREADPRIVATE(qtc_cv,sigt_cv,detrain_cv,fm_cv) 106 106 REAL, ALLOCATABLE, SAVE :: ratqs(:,:) 107 107 !$OMP THREADPRIVATE(ratqs) … … 229 229 !$OMP THREADPRIVATE(ftd) 230 230 ! fqd : convective moistening due to unsaturated downdraughts 231 REAL,ALLOCATABLE,SAVE :: fqd(:,:) 232 !$OMP THREADPRIVATE(fqd )231 REAL,ALLOCATABLE,SAVE :: fqd(:,:),fqcomp(:,:) 232 !$OMP THREADPRIVATE(fqd,fqcomp) 233 233 #ifdef ISO 234 234 REAL, ALLOCATABLE, SAVE :: fxtd(:,:,:) … … 454 454 !$OMP THREADPRIVATE(ale_bl_trig) 455 455 456 REAL,SAVE,ALLOCATABLE :: ratqs_inter (:,:)457 !$OMP THREADPRIVATE(ratqs_inter )456 REAL,SAVE,ALLOCATABLE :: ratqs_inter_(:,:) 457 !$OMP THREADPRIVATE(ratqs_inter_) 458 458 459 459 #ifdef ISO … … 567 567 ALLOCATE(clwcon(klon,klev),rnebcon(klon,klev)) 568 568 ALLOCATE(rneb_ancien(klon,klev)) 569 ALLOCATE(qtc_cv(klon,klev),sigt_cv(klon,klev) )569 ALLOCATE(qtc_cv(klon,klev),sigt_cv(klon,klev),detrain_cv(klon,klev),fm_cv(klon,klev)) 570 570 ALLOCATE(ratqs(klon,klev)) 571 571 ALLOCATE(pbl_tke(klon,klev+1,nbsrf+1)) … … 638 638 ALLOCATE(sigd(klon)) 639 639 ALLOCATE(cin(klon), ALE(klon), ALP(klon)) 640 ALLOCATE(ftd(klon,klev), fqd(klon,klev) )640 ALLOCATE(ftd(klon,klev), fqd(klon,klev),fqcomp(klon,klev)) 641 641 ALLOCATE(Ale_bl(klon)) 642 642 ALLOCATE(ale_wake(klon)) … … 733 733 734 734 ALLOCATE(ale_bl_trig(klon)) 735 ALLOCATE(ratqs_inter (klon,klev))735 ALLOCATE(ratqs_inter_(klon,klev)) 736 736 IF (ok_gwd_rando) THEN 737 737 ALLOCATE(du_gwd_rando(klon, klev)) … … 773 773 DEALLOCATE(qs_ancien, ql_ancien, qbs_ancien, rneb_ancien) 774 774 DEALLOCATE(prw_ancien, prlw_ancien, prsw_ancien, prbsw_ancien) 775 DEALLOCATE(qtc_cv,sigt_cv )775 DEALLOCATE(qtc_cv,sigt_cv,detrain_cv,fm_cv) 776 776 DEALLOCATE(u_ancien, v_ancien) 777 777 DEALLOCATE(tr_ancien) !RomP … … 821 821 DEALLOCATE(wd, sigd) 822 822 DEALLOCATE(cin, ALE, ALP) 823 DEALLOCATE(ftd, fqd )823 DEALLOCATE(ftd, fqd, fqcomp) 824 824 DEALLOCATE(Ale_bl, Alp_bl) 825 825 DEALLOCATE(ale_wake) … … 886 886 if (.not. ok_hines .and. ok_gwd_rando) DEALLOCATE(du_gwd_front) 887 887 DEALLOCATE(ale_bl_trig) 888 DEALLOCATE(ratqs_inter )888 DEALLOCATE(ratqs_inter_) 889 889 890 890 if (activate_ocean_skin >= 1) then -
LMDZ6/trunk/libf/phylmd/physiq_mod.F90
r4608 r4613 87 87 USE blowing_snow_ini_mod, ONLY : blowing_snow_ini , qbst_bs 88 88 USE lscp_ini_mod, ONLY : lscp_ini 89 USE lmdz_ratqs_main, ONLY : ratqs_main 90 USE lmdz_ratqs_ini, ONLY : ratqs_ini 89 91 90 92 !USE cmp_seri_mod … … 458 460 SAVE seuil_inversion 459 461 !$OMP THREADPRIVATE(seuil_inversion) 460 INTEGER iflag_ratqs461 SAVE iflag_ratqs462 !$OMP THREADPRIVATE(iflag_ratqs)462 463 464 463 465 real facteur 464 466 … … 1334 1336 solarlong0,seuil_inversion, & 1335 1337 fact_cldcon, facttemps,ok_newmicro,iflag_radia, & 1336 iflag_cld_th, iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs, &1338 iflag_cld_th,ratqsbas,ratqshaut,tau_ratqs, & 1337 1339 ok_ade, ok_aie, ok_alw, ok_cdnc, ok_volcan, flag_volc_surfstrat, aerosol_couple, & 1338 1340 chemistry_couple, flag_aerosol, flag_aerosol_strat, flag_aer_feedback, & … … 1801 1803 CALL thermcell_ini(iflag_thermals,prt_level,tau_thermals,lunout, & 1802 1804 & RG,RD,RCPD,RKAPPA,RLVTT,RETV) 1805 CALL ratqs_ini(klon,klev,iflag_thermals,lunout,nbsrf,is_lic,is_ter,RG,RV,RD,RCPD,RLSTT,RLVTT,RTT) 1803 1806 CALL lscp_ini(pdtphys,ok_ice_sursat, RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT,RD,RG) 1804 1807 CALL blowing_snow_ini(prt_level,lunout, & … … 3126 3129 ALE,ALP, & 3127 3130 sig1,w01, & 3128 d_t_con,d_q_con, d_u_con,d_v_con,d_tr, &3131 d_t_con,d_q_con,fqcomp,d_u_con,d_v_con,d_tr, & 3129 3132 rain_con, snow_con, ibas_con, itop_con, sigd, & 3130 3133 ema_cbmf,plcl,plfc,wbeff,convoccur,upwd,dnwd,dnwd0, & … … 3137 3140 ftd,fqd,lalim_conv,wght_th, & 3138 3141 ev, ep,epmlmMm,eplaMm, & 3139 wdtrainA, wdtrainS, wdtrainM,wght_cvfd,qtc_cv,sigt_cv, &3142 wdtrainA, wdtrainS, wdtrainM,wght_cvfd,qtc_cv,sigt_cv,detrain_cv, & 3140 3143 tau_cld_cv,coefw_cld_cv,epmax_diag) 3141 3144 … … 3149 3152 clwcon0=qcondc 3150 3153 pmfu(:,:)=upwd(:,:)+dnwd(:,:) 3154 fm_cv(:,:)=upwd(:,:)+dnwd(:,:)+dnwd0(:,:) 3151 3155 ! 3152 3156 !jyg< … … 3699 3703 ENDDO 3700 3704 3701 CALL calcratqs(klon,klev,prt_level,lunout, &3705 CALL ratqs_main(klon,klev,nbsrf,prt_level,lunout, & 3702 3706 iflag_ratqs,iflag_con,iflag_cld_th,pdtphys, & 3703 3707 ratqsbas,ratqshaut,ratqsp0, ratqsdp, & 3708 pctsrf,s_pblh,zstd, & 3704 3709 tau_ratqs,fact_cldcon,wake_s, wake_deltaq, & 3705 3710 ptconv,ptconvth,clwcon0th, rnebcon0th, & 3706 paprs,pplay,t_seri,q_seri, qtc_cv, sigt_cv, zqsat, & 3707 pbl_tke(:,:,is_ave),tke_dissip_ave,l_mix_ave,wprime_ave,t2m,q2m,fm_therm,cell_area, & 3708 ratqs,ratqsc,ratqs_inter) 3711 paprs,pplay,t_seri,q_seri, & 3712 qtc_cv, sigt_cv,detrain_cv,fm_cv,fqd,fqcomp,sigd,zqsat, & 3713 omega,pbl_tke(:,:,is_ave),tke_dissip_ave,l_mix_ave,wprime_ave, & 3714 t2m,q2m,fm_therm,entr_therm,detr_therm,cell_area, & 3715 ratqs,ratqsc,ratqs_inter_) 3709 3716 3710 3717 ! … … 5213 5220 !ENDIF ! (iflag_phytrac=1) 5214 5221 5215 5216 #ifndef INCA5217 5222 IF (offline) THEN 5218 5223 … … 5230 5235 5231 5236 ENDIF 5232 #endif 5237 5233 5238 ! 5234 5239 ! Calculer le transport de l'eau et de l'energie (diagnostique) … … 5549 5554 ok_sync, ptconv, read_climoz, clevSTD, & 5550 5555 ptconvth, d_u, d_t, qx, d_qx, zmasse, & 5551 flag_aerosol, flag_aerosol_strat, ok_cdnc, t, u1, v1)5556 flag_aerosol, flag_aerosol_strat, ok_cdnc,t, u1, v1) 5552 5557 #endif 5553 5558 -
LMDZ6/trunk/libf/phylmdiso/concvl.F90
r4143 r4613 3 3 t, q, t_wake, q_wake, s_wake, u, v, tra, ntra, & 4 4 Ale, Alp, sig1, w01, & 5 d_t, d_q, d_ u, d_v, d_tra, &5 d_t, d_q, d_qcomp, d_u, d_v, d_tra, & 6 6 rain, snow, kbas, ktop, sigd, & 7 7 cbmf, plcl, plfc, wbeff, convoccur, & … … 16 16 dd_t, dd_q, lalim_conv, wght_th, & ! RomP 17 17 evap, ep, epmlmMm, eplaMm, & ! RomP 18 wdtrainA, wdtrainS, wdtrainM, wght, qtc, sigt, &18 wdtrainA, wdtrainS, wdtrainM, wght, qtc, sigt, detrain, & 19 19 tau_cld_cv, coefw_cld_cv, & ! RomP+RL, AJ 20 20 !RomP <<< … … 138 138 REAL, DIMENSION(klon,klev), INTENT(INOUT) :: sig1, w01 139 139 140 REAL, DIMENSION(klon,klev), INTENT(OUT) :: d_t, d_q, d_ u, d_v140 REAL, DIMENSION(klon,klev), INTENT(OUT) :: d_t, d_q, d_qcomp, d_u, d_v 141 141 REAL, DIMENSION(klon,klev, nbtr),INTENT(OUT) :: d_tra 142 142 REAL, DIMENSION(klon), INTENT(OUT) :: rain, snow … … 186 186 REAL, DIMENSION(klon,klev), INTENT(OUT) :: wght !RL 187 187 REAL, DIMENSION(klon,klev), INTENT(OUT) :: qtc 188 REAL, DIMENSION(klon,klev), INTENT(OUT) :: sigt 188 REAL, DIMENSION(klon,klev), INTENT(OUT) :: sigt, detrain 189 189 REAL, INTENT(OUT) :: tau_cld_cv, coefw_cld_cv 190 190 REAL, DIMENSION(klon), INTENT(OUT) :: epmax_diag ! epmax_cape … … 588 588 Ale, Alp, omega, & 589 589 em_sig1feed, em_sig2feed, em_wght, & 590 iflag, d_t, d_q, d_ u, d_v, d_tra, rain, kbas, ktop, &590 iflag, d_t, d_q, d_qcomp, d_u, d_v, d_tra, rain, kbas, ktop, & 591 591 cbmf, plcl, plfc, wbeff, sig1, w01, ptop2, sigd, & 592 592 Ma, mip, Vprecip, Vprecipi, upwd, dnwd, dnwdbis, qcondc, wd, & … … 599 599 da, phi, mp, phii, d1a, dam, sij, wght, & ! RomP+RL 600 600 qta, clw, elij, evap, ep, epmlmMm, eplaMm, & ! RomP+RL 601 wdtrainA, wdtrainS, wdtrainM, qtc, sigt, &601 wdtrainA, wdtrainS, wdtrainM, qtc, sigt, detrain, & 602 602 tau_cld_cv, coefw_cld_cv, & ! RomP,AJ 603 603 !AC!+!RomP+jyg -
LMDZ6/trunk/libf/phylmdiso/cv3_routines.F90
r4143 r4613 4720 4720 tv, tvp, wghti, & 4721 4721 iflag, precip, Vprecip, Vprecipi, & ! jyg: Vprecipi 4722 ft, fr, f u, fv, ftra, & ! jyg4722 ft, fr, fr_comp, fu, fv, ftra, & ! jyg 4723 4723 cbmf, upwd, dnwd, dnwd0, ma, mip, & 4724 4724 !! tls, tps, ! useless . jyg 4725 4725 qcondc, wd, & 4726 ftd, fqd, qta, qtc, sigt, tau_cld_cv, coefw_cld_cv &4726 ftd, fqd, qta, qtc, sigt, detrain, tau_cld_cv, coefw_cld_cv & 4727 4727 #ifdef ISO 4728 4728 & ,xt,xt_wake,xtclw,xtp,xtwater,xtice,xtevap & … … 4816 4816 !outputs: 4817 4817 REAL, DIMENSION (nloc), INTENT (OUT) :: precip 4818 REAL, DIMENSION (nloc, nd), INTENT (OUT) :: ft, fr, fu, fv 4818 REAL, DIMENSION (nloc, nd), INTENT (OUT) :: ft, fr, fu, fv , fr_comp 4819 4819 REAL, DIMENSION (nloc, nd), INTENT (OUT) :: ftd, fqd 4820 4820 REAL, DIMENSION (nloc, nd, ntra), INTENT (OUT) :: ftra … … 4826 4826 REAL, DIMENSION (nloc, nd), INTENT (OUT) :: qcondc ! cld 4827 4827 REAL, DIMENSION (nloc, nd), INTENT (OUT) :: qtc, sigt ! cld 4828 REAL, DIMENSION (nloc, nd), INTENT (OUT) :: detrain ! Louis : pour le calcul de Klein du terme de variance qui détraine dans lenvironnement 4828 4829 REAL, DIMENSION (nloc), INTENT (OUT) :: wd ! gust 4829 4830 REAL, DIMENSION (nloc), INTENT (OUT) :: cbmf … … 4852 4853 REAL, DIMENSION (nloc) :: esum, fsum, gsum, hsum 4853 4854 REAL, DIMENSION (nloc, nd) :: th_wake 4855 REAL, DIMENSION (nloc, nd, nd) :: qdet 4854 4856 REAL, DIMENSION (nloc) :: alpha_qpos, alpha_qpos1 4855 4857 REAL, DIMENSION (nloc, nd) :: qcond, nqcond, wa ! cld … … 4940 4942 ft(il, i) = 0.0 4941 4943 fr(il, i) = 0.0 4944 fr_comp(il,i) = 0.0 4942 4945 fu(il, i) = 0.0 4943 4946 fv(il, i) = 0.0 … … 4950 4953 sigment(il, i) = 0.0 ! cld 4951 4954 sigt(il, i) = 0.0 ! cld 4955 qdet(il,i,:) = 0.0 ! cld 4956 detrain(il, i) = 0.0 ! cld 4952 4957 nqcond(il, i) = 0.0 ! cld 4953 4958 #ifdef ISO … … 5358 5363 IF (j<=inb(il) .AND. iflag(il)<=1) THEN 5359 5364 fr(il, 1) = fr(il, 1) + 0.01*grav*work(il)*ment(il, j, 1)*(qent(il,j,1)-rr(il,1)) 5365 fr_comp(il,1) = fr_comp(il,1) + 0.01*grav*work(il)*ment(il, j, 1)*(qent(il,j,1)-rr(il,1)) 5360 5366 5361 5367 #ifdef ISO … … 5627 5633 IF (i<=inb(il) .AND. iflag(il)<=1) num1 = num1 + 1 5628 5634 END DO 5635 qdet(il,i,i) = qent(il,i,i) ! cld Louis : specific humidity in detraining water 5629 5636 IF (num1<=0) GO TO 500 5630 5637 … … 6243 6250 fr(il, i) = fr(il, i) + 0.01*grav*dpinv*ment(il, k, i) * & 6244 6251 (qent(il,k,i)-awat(il)-rr(il,i)) 6252 fr_comp(il,i) = fr_comp(il,i) + 0.01*grav*dpinv*ment(il, k, i)*(qent(il,k,i)-awat(il)-rr(il,i)) 6245 6253 6246 6254 #ifdef ISO … … 6313 6321 ! (saturated updrafts resulting from mixing) ! cld 6314 6322 qcond(il, i) = qcond(il, i) + (elij(il,k,i)-awat(il)) ! cld 6323 qdet(il,k,i) = (qent(il,k,i)-awat(il)) ! cld Louis : specific humidity in detraining water 6315 6324 qtment(il, i) = qtment(il, i) + qent(il,k,i) ! cld 6316 6325 nqcond(il, i) = nqcond(il, i) + 1. ! cld … … 6460 6469 ! (saturated downdrafts resulting from mixing) ! cld 6461 6470 qcond(il, i) = qcond(il, i) + elij(il, k, i) ! cld 6471 qdet(il,k,i) = qent(il,k,i) ! cld Louis : specific humidity in detraining water 6462 6472 qtment(il, i) = qent(il,k,i) + qtment(il,i) ! cld 6463 6473 nqcond(il, i) = nqcond(il, i) + 1. ! cld … … 7255 7265 IF (k<=inb(il) .AND. i<=inb(il) .AND. iflag(il)<=1) THEN ! cld 7256 7266 sument(il) =sument(il) + abs(ment(il,k,i)) 7267 detrain(il,i) = detrain(il,i) + abs(ment(il,k,i))*(qdet(il,k,i) - rr(il,i))*(qdet(il,k,i) - rr(il,i)) ! Louis terme de détrainement dans le bilan de variance 7257 7268 ENDIF 7258 7269 ENDDO ! il -
LMDZ6/trunk/libf/phylmdiso/cv3a_uncompress.F90
r4143 r4613 2 2 iflag, kbas, ktop, & 3 3 precip, cbmf, plcl, plfc, wbeff, sig, w0, ptop2, & 4 ft, fq, f u, fv, ftra, &4 ft, fq, fqcomp, fu, fv, ftra, & 5 5 sigd, ma, mip, vprecip, vprecipi, upwd, dnwd, dnwd0, & 6 6 qcondc, wd, cape, cin, & … … 12 12 qta, clw, elij, evap, ep, epmlmMm, eplaMm, & ! RomP+jyg 13 13 wdtrainA, wdtrainS, wdtrainM, & ! RomP 14 qtc, sigt, &14 qtc, sigt, detrain, & 15 15 epmax_diag, & ! epmax_cape 16 16 iflag1, kbas1, ktop1, & 17 17 precip1, cbmf1, plcl1, plfc1, wbeff1, sig1, w01, ptop21, & 18 ft1, fq1, f u1, fv1, ftra1, &18 ft1, fq1, fqcomp1, fu1, fv1, ftra1, & 19 19 sigd1, ma1, mip1, vprecip1, vprecipi1, upwd1, dnwd1, dnwd01, & 20 20 qcondc1, wd1, cape1, cin1, & … … 26 26 qta1, clw1, elij1, evap1, ep1, epmlmMm1, eplaMm1, & ! RomP+jyg 27 27 wdtrainA1, wdtrainS1, wdtrainM1, & ! RomP 28 qtc1, sigt1, &28 qtc1, sigt1, detrain1, & 29 29 epmax_diag1 & ! epmax_cape 30 30 #ifdef ISO … … 72 72 REAL, DIMENSION (nloc), INTENT (IN) :: ptop2 73 73 REAL, DIMENSION (nloc), INTENT (IN) :: epmax_diag 74 REAL, DIMENSION (nloc, nd), INTENT (IN) :: ft, fq, f u, fv74 REAL, DIMENSION (nloc, nd), INTENT (IN) :: ft, fq, fqcomp, fu, fv 75 75 REAL, DIMENSION (nloc, nd, ntra), INTENT (IN) :: ftra 76 76 REAL, DIMENSION (nloc), INTENT (IN) :: sigd … … 99 99 REAL, DIMENSION (nloc, nd, nd), INTENT (IN) :: epmlmMm !RomP+jyg 100 100 REAL, DIMENSION (nloc, nd), INTENT (IN) :: eplamM !RomP+jyg 101 REAL, DIMENSION (nloc, nd), INTENT (IN) :: qtc, sigt !RomP101 REAL, DIMENSION (nloc, nd), INTENT (IN) :: qtc, sigt, detrain !RomP 102 102 REAL, DIMENSION (nloc, nd), INTENT (IN) :: wdtrainA, wdtrainS, wdtrainM !RomP 103 103 … … 120 120 REAL, DIMENSION (len), INTENT (OUT) :: epmax_diag1 ! epmax_cape 121 121 REAL, DIMENSION (len), INTENT (OUT) :: ptop21 122 REAL, DIMENSION (len, nd), INTENT (OUT) :: ft1, fq1, f u1, fv1122 REAL, DIMENSION (len, nd), INTENT (OUT) :: ft1, fq1, fqcomp1, fu1, fv1 123 123 REAL, DIMENSION (len, nd, ntra), INTENT (OUT) :: ftra1 124 124 REAL, DIMENSION (len), INTENT (OUT) :: sigd1 … … 147 147 REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: epmlmMm1 !RomP+jyg 148 148 REAL, DIMENSION (len, nd), INTENT (OUT) :: eplamM1 !RomP+jyg 149 REAL, DIMENSION (len, nd), INTENT (OUT) :: qtc1, sigt1 !RomP149 REAL, DIMENSION (len, nd), INTENT (OUT) :: qtc1, sigt1, detrain1 !RomP 150 150 REAL, DIMENSION (len, nd), INTENT (OUT) :: wdtrainA1, wdtrainS1, wdtrainM1 !RomP 151 151 … … 244 244 ft1(idcum(i), k) = ft(i, k) 245 245 fq1(idcum(i), k) = fq(i, k) 246 fqcomp1(idcum(i), k) = fqcomp(i, k) 246 247 fu1(idcum(i), k) = fu(i, k) 247 248 fv1(idcum(i), k) = fv(i, k) … … 273 274 qtc1(idcum(i), k) = qtc(i, k) 274 275 sigt1(idcum(i), k) = sigt(i, k) 276 detrain1(idcum(i), k) = detrain(i, k) 275 277 276 278 #ifdef ISO … … 418 420 ft1(:, 1:nl) = ft(:, 1:nl) 419 421 fq1(:, 1:nl) = fq(:, 1:nl) 422 fqcomp1(:, 1:nl) = fqcomp(:, 1:nl) 420 423 fu1(:, 1:nl) = fu(:, 1:nl) 421 424 fv1(:, 1:nl) = fv(:, 1:nl) … … 447 450 qtc1(:, 1:nl) = qtc(:, 1:nl) 448 451 sigt1(:, 1:nl) = sigt(:, 1:nl) 452 detrain1(:, 1:nl) = detrain(:, 1:nl) 449 453 ! 450 454 ma1(:, nlp) = 0. -
LMDZ6/trunk/libf/phylmdiso/cva_driver.F90
r4143 r4613 11 11 Ale1, Alp1, omega1, & 12 12 sig1feed1, sig2feed1, wght1, & 13 iflag1, ft1, fq1, f u1, fv1, ftra1, &13 iflag1, ft1, fq1, fqcomp1, fu1, fv1, ftra1, & 14 14 precip1, kbas1, ktop1, & 15 15 cbmf1, plcl1, plfc1, wbeff1, & … … 26 26 da1, phi1, mp1, phi21, d1a1, dam1, sigij1, wghti1, & ! RomP, RL 27 27 qta1, clw1, elij1, evap1, ep1, epmlmMm1, eplaMm1, & ! RomP, RL 28 wdtrainA1, wdtrainS1, wdtrainM1, qtc1, sigt1, tau_cld_cv, & !!jygprl28 wdtrainA1, wdtrainS1, wdtrainM1, qtc1, sigt1, detrain1, tau_cld_cv, & !!jygprl 29 29 coefw_cld_cv, & ! RomP, AJ 30 30 epmax_diag1 & ! epmax_cape … … 88 88 ! ntra Integer Input number of tracors 89 89 ! nloc Integer Input dimension of arrays for compressed fields 90 ! fqcomp1 Real Output spec hum tend (only mixed draughts) 90 91 ! k_upper Integer Input upmost level for vertical loops 91 92 ! iflag_con Integer Input version of convect (3/4) … … 135 136 ! upwd1 Real Output total upward mass flux (adiab+mixed) 136 137 ! dnwd1 Real Output saturated downward mass flux (mixed) 138 ! detrain1 Real Output detrainment terme klein 137 139 ! dnwd01 Real Output unsaturated downward mass flux 138 140 ! qcondc1 Real Output in-cld mixing ratio of condensed water … … 209 211 LOGICAL, INTENT (IN) :: ok_conserv_q 210 212 REAL, INTENT (IN) :: tau_cld_cv 213 REAL, DIMENSION (len, nd), INTENT (OUT) :: fqcomp1 211 214 REAL, INTENT (IN) :: coefw_cld_cv 212 215 REAL, INTENT (IN) :: delt … … 248 251 REAL, DIMENSION (len), INTENT (OUT) :: cbmf1 249 252 REAL, DIMENSION (len), INTENT (OUT) :: plcl1 253 REAL, DIMENSION (len, nd), INTENT (OUT) :: detrain1 ! detrainement term of mixed draughts in environment 250 254 REAL, DIMENSION (len), INTENT (OUT) :: plfc1 251 255 REAL, DIMENSION (len), INTENT (OUT) :: wbeff1 … … 572 576 REAL, DIMENSION(len,nd) :: ice, fondue, b 573 577 REAL, DIMENSION(len,nd) :: frac_a, frac_s, faci !!jygprl 574 REAL ft(nloc, nd), fq(nloc, nd) 578 REAL ft(nloc, nd), fq(nloc, nd), fqcomp(nloc, nd) 575 579 REAL ftd(nloc, nd), fqd(nloc, nd) 576 580 REAL fu(nloc, nd), fv(nloc, nd) … … 598 602 REAL qtc(nloc, nd) ! cld 599 603 REAL sigt(nloc, nd) ! cld 604 REAL detrain(nloc, nd) ! cld 600 605 601 606 ! RomP >>> … … 706 711 ft1(:, :) = 0.0 707 712 fq1(:, :) = 0.0 713 fqcomp1(:, :) = 0.0 708 714 fu1(:, :) = 0.0 709 715 fv1(:, :) = 0.0 … … 766 772 ! RomP >>> 767 773 sigt1(:, :) = 0. 774 detrain1(:, :) = 0. 768 775 qtc1(:, :) = 0. 769 776 wdtrainA1(:, :) = 0. … … 1561 1568 if (prt_level >= 9) & 1562 1569 PRINT *, 'cva_driver -> cv3_yield' 1570 1563 1571 CALL cv3_yield(nloc, ncum, nd, nd, ntra, ok_conserv_q, & ! na->nd 1564 1572 icb, inb, delt, & … … 1570 1578 nent, elij, traent, sig, & 1571 1579 tv, tvp, wghti, & 1572 iflag, precip, Vprecip, Vprecipi, ft, fq, f u, fv, ftra, & ! jyg1580 iflag, precip, Vprecip, Vprecipi, ft, fq, fqcomp, fu, fv, ftra, & ! jyg 1573 1581 cbmf, upwd, dnwd, dnwd0, ma, mip, & 1574 1582 !! tls, tps, & ! useless . jyg 1575 1583 qcondc, wd, & 1576 1584 !! ftd, fqd, qnk, qtc, sigt, tau_cld_cv, coefw_cld_cv) 1577 ftd, fqd, qta, qtc, sigt, 1585 ftd, fqd, qta, qtc, sigt,detrain,tau_cld_cv, coefw_cld_cv & !!jygprl 1578 1586 #ifdef ISO 1579 1587 & ,xt,xt_wake,xtclw,xtp,xtwater,xtice,xtevap & … … 1673 1681 iflag, icb, inb, & 1674 1682 precip, cbmf, plcl, plfc, wbeff, sig, w0, ptop2, & 1675 ft, fq, f u, fv, ftra, &1683 ft, fq, fqcomp, fu, fv, ftra, & 1676 1684 sigd, ma, mip, vprecip, vprecipi, upwd, dnwd, dnwd0, & 1677 1685 qcondc, wd, cape, cin, & … … 1683 1691 qta, clw, elij, evap, ep, epmlmMm, eplaMm, & ! RomP 1684 1692 wdtrainA, wdtrainS, wdtrainM, & ! RomP 1685 qtc, sigt, epmax_diag, & ! epmax_cape1693 qtc, sigt, detrain, epmax_diag, & ! epmax_cape 1686 1694 iflag1, kbas1, ktop1, & 1687 1695 precip1, cbmf1, plcl1, plfc1, wbeff1, sig1, w01, ptop21, & 1688 ft1, fq1, f u1, fv1, ftra1, &1696 ft1, fq1, fqcomp1, fu1, fv1, ftra1, & 1689 1697 sigd1, ma1, mip1, vprecip1, vprecipi1, upwd1, dnwd1, dnwd01, & 1690 1698 qcondc1, wd1, cape1, cin1, & … … 1696 1704 qta1, clw1, elij1, evap1, ep1, epmlmMm1, eplaMm1, & ! RomP 1697 1705 wdtrainA1, wdtrainS1, wdtrainM1, & ! RomP 1698 qtc1, sigt1, 1706 qtc1, sigt1,detrain1,epmax_diag1 & ! epmax_cape 1699 1707 #ifdef ISO 1700 1708 & ,xtprecip,fxt,fxtd, xtVprecip,xtVprecipi, xtclw,xtevap,xtwdtraina & -
LMDZ6/trunk/libf/phylmdiso/lmdz_ratqs_main.F90
r4612 r4613 1 link ../phylmd/ calcratqs.F901 link ../phylmd/lmdz_ratqs_main.F90 -
LMDZ6/trunk/libf/phylmdiso/lmdz_ratqs_multi.F90
r4612 r4613 1 link ../phylmd/ calcratqs_multi_mod.F901 link ../phylmd/lmdz_ratqs_multi.F90 -
LMDZ6/trunk/libf/phylmdiso/phyetat0_mod.F90
r4581 r4613 36 36 zstd, zthe, zval, ale_bl, ale_bl_trig, alp_bl, u10m, v10m, treedrg, & 37 37 ale_wake, ale_bl_stat, ds_ns, dt_ns, delta_sst, delta_sal, dter, dser, & 38 dt_ds, ratqs_inter 38 dt_ds, ratqs_inter_ 39 39 !FC 40 40 USE geometry_mod, ONLY: longitude_deg, latitude_deg … … 510 510 511 511 ! fisrtilp/Clouds 0.002 could be ratqsbas. But can stay like this as well 512 found=phyetat0_get(ratqs_inter ,"RATQS_INTER","Relative width of the lsc sugrid scale water",0.002)512 found=phyetat0_get(ratqs_inter_,"RATQS_INTER","Relative width of the lsc sugrid scale water",0.002) 513 513 514 514 !=========================================== -
LMDZ6/trunk/libf/phylmdiso/phyredem.F90
r4523 r4613 30 30 du_gwd_rando, du_gwd_front, u10m, v10m, & 31 31 treedrg, solswfdiff, delta_sal, ds_ns, dt_ns, & 32 delta_sst, ratqs_inter , dter, dser, dt_ds32 delta_sst, ratqs_inter_, dter, dser, dt_ds 33 33 #ifdef ISO 34 34 USE phys_state_var_mod, ONLY: xtsol, fxtevap,xtrain_fall, xtsnow_fall, & … … 347 347 348 348 ! fisrtilp/clouds 349 CALL put_field(pass,"RATQS_INTER","Relative width of the lsc sugrid scale water",ratqs_inter )349 CALL put_field(pass,"RATQS_INTER","Relative width of the lsc sugrid scale water",ratqs_inter_) 350 350 351 351 -
LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90
r4612 r4613 87 87 USE blowing_snow_ini_mod, ONLY : blowing_snow_ini , qbst_bs 88 88 USE lscp_ini_mod, ONLY : lscp_ini 89 USE lmdz_ratqs_main, ONLY : ratqs_main 90 USE lmdz_ratqs_ini, ONLY : ratqs_ini 89 91 90 92 !USE cmp_seri_mod … … 519 521 SAVE seuil_inversion 520 522 !$OMP THREADPRIVATE(seuil_inversion) 521 INTEGER iflag_ratqs522 SAVE iflag_ratqs523 !$OMP THREADPRIVATE(iflag_ratqs)523 524 525 524 526 real facteur 525 527 … … 1401 1403 solarlong0,seuil_inversion, & 1402 1404 fact_cldcon, facttemps,ok_newmicro,iflag_radia, & 1403 iflag_cld_th, iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs, &1405 iflag_cld_th,ratqsbas,ratqshaut,tau_ratqs, & 1404 1406 ok_ade, ok_aie, ok_alw, ok_cdnc, ok_volcan, flag_volc_surfstrat, aerosol_couple, & 1405 1407 chemistry_couple, flag_aerosol, flag_aerosol_strat, flag_aer_feedback, & … … 1917 1919 CALL thermcell_ini(iflag_thermals,prt_level,tau_thermals,lunout, & 1918 1920 & RG,RD,RCPD,RKAPPA,RLVTT,RETV) 1921 CALL ratqs_ini(klon,klev,iflag_thermals,lunout,nbsrf,is_lic,is_ter,RG,RV,RD,RCPD,RLSTT,RLVTT,RTT) 1919 1922 CALL lscp_ini(pdtphys,ok_ice_sursat,RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT,RD,RG) 1920 1923 CALL blowing_snow_ini(prt_level,lunout, & … … 3777 3780 ALE,ALP, & 3778 3781 sig1,w01, & 3779 d_t_con,d_q_con, d_u_con,d_v_con,d_tr, &3782 d_t_con,d_q_con,fqcomp,d_u_con,d_v_con,d_tr, & 3780 3783 rain_con, snow_con, ibas_con, itop_con, sigd, & 3781 3784 ema_cbmf,plcl,plfc,wbeff,convoccur,upwd,dnwd,dnwd0, & … … 3788 3791 ftd,fqd,lalim_conv,wght_th, & 3789 3792 ev, ep,epmlmMm,eplaMm, & 3790 wdtrainA, wdtrainS, wdtrainM,wght_cvfd,qtc_cv,sigt_cv, &3793 wdtrainA, wdtrainS, wdtrainM,wght_cvfd,qtc_cv,sigt_cv,detrain_cv, & 3791 3794 tau_cld_cv,coefw_cld_cv,epmax_diag & 3792 3795 #ifdef ISO … … 3840 3843 clwcon0=qcondc 3841 3844 pmfu(:,:)=upwd(:,:)+dnwd(:,:) 3845 fm_cv(:,:)=upwd(:,:)+dnwd(:,:)+dnwd0(:,:) 3842 3846 ! 3843 3847 !jyg< … … 4688 4692 ENDDO 4689 4693 4690 CALL calcratqs(klon,klev,prt_level,lunout, &4694 CALL ratqs_main(klon,klev,nbsrf,prt_level,lunout, & 4691 4695 iflag_ratqs,iflag_con,iflag_cld_th,pdtphys, & 4692 4696 ratqsbas,ratqshaut,ratqsp0, ratqsdp, & 4697 pctsrf,s_pblh,zstd, & 4693 4698 tau_ratqs,fact_cldcon,wake_s, wake_deltaq, & 4694 4699 ptconv,ptconvth,clwcon0th, rnebcon0th, & 4695 paprs,pplay,t_seri,q_seri, qtc_cv, sigt_cv, zqsat, & 4696 pbl_tke(:,:,is_ave),tke_dissip_ave,l_mix_ave,wprime_ave,t2m,q2m,fm_therm,cell_area, & 4697 ratqs,ratqsc,ratqs_inter) 4700 paprs,pplay,t_seri,q_seri, & 4701 qtc_cv, sigt_cv,detrain_cv,fm_cv,fqd,fqcomp,sigd,zqsat, & 4702 omega,pbl_tke(:,:,is_ave),tke_dissip_ave,l_mix_ave,wprime_ave, & 4703 t2m,q2m,fm_therm,entr_therm,detr_therm,cell_area, & 4704 ratqs,ratqsc,ratqs_inter_) 4698 4705 4699 4706 ! … … 6206 6213 #endif 6207 6214 6215 6208 6216 !=============================================================== 6209 6217 ! Additional tendency of TKE due to orography
Note: See TracChangeset
for help on using the changeset viewer.