27 |
use comconst, only: dtphys |
use comconst, only: dtphys |
28 |
USE comgeomphy, ONLY: airephy |
USE comgeomphy, ONLY: airephy |
29 |
USE concvl_m, ONLY: concvl |
USE concvl_m, ONLY: concvl |
30 |
USE conf_gcm_m, ONLY: offline, day_step, iphysiq, lmt_pas |
USE conf_gcm_m, ONLY: offline, lmt_pas |
31 |
USE conf_phys_m, ONLY: conf_phys |
USE conf_phys_m, ONLY: conf_phys |
32 |
use conflx_m, only: conflx |
use conflx_m, only: conflx |
33 |
USE ctherm, ONLY: iflag_thermals, nsplit_thermals |
USE ctherm, ONLY: iflag_thermals, nsplit_thermals |
37 |
USE dimsoil, ONLY: nsoilmx |
USE dimsoil, ONLY: nsoilmx |
38 |
use drag_noro_m, only: drag_noro |
use drag_noro_m, only: drag_noro |
39 |
use dynetat0_m, only: day_ref, annee_ref |
use dynetat0_m, only: day_ref, annee_ref |
40 |
USE fcttre, ONLY: foeew, qsatl, qsats, thermcep |
USE fcttre, ONLY: foeew, qsatl, qsats |
41 |
use fisrtilp_m, only: fisrtilp |
use fisrtilp_m, only: fisrtilp |
42 |
USE hgardfou_m, ONLY: hgardfou |
USE hgardfou_m, ONLY: hgardfou |
43 |
USE histsync_m, ONLY: histsync |
USE histsync_m, ONLY: histsync |
219 |
|
|
220 |
REAL rain_tiedtke(klon), snow_tiedtke(klon) |
REAL rain_tiedtke(klon), snow_tiedtke(klon) |
221 |
|
|
222 |
REAL evap(klon), devap(klon) ! evaporation and its derivative |
REAL evap(klon) ! flux d'\'evaporation au sol |
223 |
REAL sens(klon), dsens(klon) ! chaleur sensible et sa derivee |
real devap(klon) ! derivative of the evaporation flux at the surface |
224 |
|
REAL sens(klon) ! flux de chaleur sensible au sol |
225 |
|
real dsens(klon) ! derivee du flux de chaleur sensible au sol |
226 |
REAL, save:: dlw(klon) ! derivee infra rouge |
REAL, save:: dlw(klon) ! derivee infra rouge |
227 |
REAL bils(klon) ! bilan de chaleur au sol |
REAL bils(klon) ! bilan de chaleur au sol |
228 |
REAL, save:: fder(klon) ! Derive de flux (sensible et latente) |
REAL, save:: fder(klon) ! Derive de flux (sensible et latente) |
252 |
REAL cldtau(klon, llm) ! epaisseur optique |
REAL cldtau(klon, llm) ! epaisseur optique |
253 |
REAL cldemi(klon, llm) ! emissivite infrarouge |
REAL cldemi(klon, llm) ! emissivite infrarouge |
254 |
|
|
255 |
REAL fluxq(klon, llm, nbsrf) ! flux turbulent d'humidite |
REAL flux_q(klon, nbsrf) ! flux turbulent d'humidite à la surface |
256 |
REAL fluxt(klon, llm, nbsrf) ! flux turbulent de chaleur |
REAL flux_t(klon, nbsrf) ! flux turbulent de chaleur à la surface |
257 |
REAL fluxu(klon, llm, nbsrf) ! flux turbulent de vitesse u |
REAL flux_u(klon, nbsrf) ! flux turbulent de vitesse u à la surface |
258 |
REAL fluxv(klon, llm, nbsrf) ! flux turbulent de vitesse v |
REAL flux_v(klon, nbsrf) ! flux turbulent de vitesse v à la surface |
|
|
|
|
REAL zxfluxt(klon, llm) |
|
|
REAL zxfluxq(klon, llm) |
|
|
REAL zxfluxu(klon, llm) |
|
|
REAL zxfluxv(klon, llm) |
|
259 |
|
|
260 |
! Le rayonnement n'est pas calcul\'e tous les pas, il faut donc que |
! Le rayonnement n'est pas calcul\'e tous les pas, il faut donc que |
261 |
! les variables soient r\'emanentes. |
! les variables soient r\'emanentes. |
286 |
REAL zx_t, zx_qs, zcor |
REAL zx_t, zx_qs, zcor |
287 |
real zqsat(klon, llm) |
real zqsat(klon, llm) |
288 |
INTEGER i, k, iq, nsrf |
INTEGER i, k, iq, nsrf |
|
REAL, PARAMETER:: t_coup = 234. |
|
289 |
REAL zphi(klon, llm) |
REAL zphi(klon, llm) |
290 |
|
|
291 |
! cf. Anne Mathieu, variables pour la couche limite atmosphérique (hbtm) |
! cf. Anne Mathieu, variables pour la couche limite atmosphérique (hbtm) |
295 |
REAL, SAVE:: capCL(klon, nbsrf) ! CAPE de couche limite |
REAL, SAVE:: capCL(klon, nbsrf) ! CAPE de couche limite |
296 |
REAL, SAVE:: oliqCL(klon, nbsrf) ! eau_liqu integree de couche limite |
REAL, SAVE:: oliqCL(klon, nbsrf) ! eau_liqu integree de couche limite |
297 |
REAL, SAVE:: cteiCL(klon, nbsrf) ! cloud top instab. crit. couche limite |
REAL, SAVE:: cteiCL(klon, nbsrf) ! cloud top instab. crit. couche limite |
298 |
REAL, SAVE:: pblt(klon, nbsrf) ! T a la Hauteur de couche limite |
REAL, SAVE:: pblt(klon, nbsrf) ! T \`a la hauteur de couche limite |
299 |
REAL, SAVE:: therm(klon, nbsrf) |
REAL, SAVE:: therm(klon, nbsrf) |
300 |
REAL, SAVE:: trmb1(klon, nbsrf) ! deep_cape |
REAL, SAVE:: trmb1(klon, nbsrf) ! deep_cape |
301 |
REAL, SAVE:: trmb2(klon, nbsrf) ! inhibition |
REAL, SAVE:: trmb2(klon, nbsrf) ! inhibition |
310 |
|
|
311 |
REAL upwd(klon, llm) ! saturated updraft mass flux |
REAL upwd(klon, llm) ! saturated updraft mass flux |
312 |
REAL dnwd(klon, llm) ! saturated downdraft mass flux |
REAL dnwd(klon, llm) ! saturated downdraft mass flux |
|
REAL dnwd0(klon, llm) ! unsaturated downdraft mass flux |
|
313 |
REAL, save:: cape(klon) |
REAL, save:: cape(klon) |
314 |
|
|
315 |
INTEGER iflagctrl(klon) ! flag fonctionnement de convect |
INTEGER iflagctrl(klon) ! flag fonctionnement de convect |
396 |
! temperature and humidity at 2 m |
! temperature and humidity at 2 m |
397 |
|
|
398 |
REAL, save:: u10m(klon, nbsrf), v10m(klon, nbsrf) ! vents a 10 m |
REAL, save:: u10m(klon, nbsrf), v10m(klon, nbsrf) ! vents a 10 m |
399 |
REAL zt2m(klon), zq2m(klon) ! temp., hum. 2 m moyenne s/ 1 maille |
REAL zt2m(klon), zq2m(klon) ! température, humidité 2 m moyenne sur 1 maille |
400 |
REAL zu10m(klon), zv10m(klon) ! vents a 10 m moyennes s/1 maille |
REAL zu10m(klon), zv10m(klon) ! vents a 10 m moyennes sur 1 maille |
401 |
|
|
402 |
! Aerosol effects: |
! Aerosol effects: |
403 |
|
|
471 |
capCL =0. ! CAPE de couche limite |
capCL =0. ! CAPE de couche limite |
472 |
oliqCL =0. ! eau_liqu integree de couche limite |
oliqCL =0. ! eau_liqu integree de couche limite |
473 |
cteiCL =0. ! cloud top instab. crit. couche limite |
cteiCL =0. ! cloud top instab. crit. couche limite |
474 |
pblt =0. ! T a la Hauteur de couche limite |
pblt =0. |
475 |
therm =0. |
therm =0. |
476 |
trmb1 =0. ! deep_cape |
trmb1 =0. ! deep_cape |
477 |
trmb2 =0. ! inhibition |
trmb2 =0. ! inhibition |
610 |
|
|
611 |
fder = dlw |
fder = dlw |
612 |
|
|
|
! Couche limite: |
|
|
|
|
613 |
CALL clmain(dtphys, pctsrf, t_seri, q_seri, u_seri, v_seri, julien, mu0, & |
CALL clmain(dtphys, pctsrf, t_seri, q_seri, u_seri, v_seri, julien, mu0, & |
614 |
ftsol, cdmmax, cdhmax, ksta, ksta_ter, ok_kzmin, ftsoil, qsol, & |
ftsol, cdmmax, cdhmax, ksta, ksta_ter, ok_kzmin, ftsoil, qsol, & |
615 |
paprs, play, fsnow, fqsurf, fevap, falbe, fluxlat, rain_fall, & |
paprs, play, fsnow, fqsurf, fevap, falbe, fluxlat, rain_fall, & |
616 |
snow_fall, fsolsw, fsollw, fder, rlat, frugs, agesno, rugoro, & |
snow_fall, fsolsw, fsollw, fder, rlat, frugs, agesno, rugoro, & |
617 |
d_t_vdf, d_q_vdf, d_u_vdf, d_v_vdf, d_ts, fluxt, fluxq, fluxu, & |
d_t_vdf, d_q_vdf, d_u_vdf, d_v_vdf, d_ts, flux_t, flux_q, flux_u, & |
618 |
fluxv, cdragh, cdragm, q2, dsens, devap, ycoefh, yu1, yv1, t2m, q2m, & |
flux_v, cdragh, cdragm, q2, dsens, devap, ycoefh, yu1, yv1, t2m, q2m, & |
619 |
u10m, v10m, pblh, capCL, oliqCL, cteiCL, pblT, therm, trmb1, trmb2, & |
u10m, v10m, pblh, capCL, oliqCL, cteiCL, pblT, therm, trmb1, trmb2, & |
620 |
trmb3, plcl, fqcalving, ffonte, run_off_lic_0) |
trmb3, plcl, fqcalving, ffonte, run_off_lic_0) |
621 |
|
|
622 |
! Incr\'ementation des flux |
! Incr\'ementation des flux |
623 |
|
|
624 |
zxfluxt = 0. |
sens = - sum(flux_t * pctsrf, dim = 2) |
625 |
zxfluxq = 0. |
evap = - sum(flux_q * pctsrf, dim = 2) |
626 |
zxfluxu = 0. |
fder = dlw + dsens + devap |
|
zxfluxv = 0. |
|
|
DO nsrf = 1, nbsrf |
|
|
DO k = 1, llm |
|
|
DO i = 1, klon |
|
|
zxfluxt(i, k) = zxfluxt(i, k) + fluxt(i, k, nsrf) * pctsrf(i, nsrf) |
|
|
zxfluxq(i, k) = zxfluxq(i, k) + fluxq(i, k, nsrf) * pctsrf(i, nsrf) |
|
|
zxfluxu(i, k) = zxfluxu(i, k) + fluxu(i, k, nsrf) * pctsrf(i, nsrf) |
|
|
zxfluxv(i, k) = zxfluxv(i, k) + fluxv(i, k, nsrf) * pctsrf(i, nsrf) |
|
|
END DO |
|
|
END DO |
|
|
END DO |
|
|
DO i = 1, klon |
|
|
sens(i) = - zxfluxt(i, 1) ! flux de chaleur sensible au sol |
|
|
evap(i) = - zxfluxq(i, 1) ! flux d'\'evaporation au sol |
|
|
fder(i) = dlw(i) + dsens(i) + devap(i) |
|
|
ENDDO |
|
627 |
|
|
628 |
DO k = 1, llm |
DO k = 1, llm |
629 |
DO i = 1, klon |
DO i = 1, klon |
722 |
if (conv_emanuel) then |
if (conv_emanuel) then |
723 |
CALL concvl(paprs, play, t_seri, q_seri, u_seri, v_seri, sig1, w01, & |
CALL concvl(paprs, play, t_seri, q_seri, u_seri, v_seri, sig1, w01, & |
724 |
d_t_con, d_q_con, d_u_con, d_v_con, rain_con, ibas_con, itop_con, & |
d_t_con, d_q_con, d_u_con, d_v_con, rain_con, ibas_con, itop_con, & |
725 |
upwd, dnwd, dnwd0, Ma, cape, iflagctrl, qcondc, pmflxr, da, phi, mp) |
upwd, dnwd, Ma, cape, iflagctrl, qcondc, pmflxr, da, phi, mp) |
726 |
snow_con = 0. |
snow_con = 0. |
727 |
clwcon0 = qcondc |
clwcon0 = qcondc |
728 |
mfu = upwd + dnwd |
mfu = upwd + dnwd |
729 |
|
|
730 |
IF (thermcep) THEN |
zqsat = MIN(0.5, r2es * FOEEW(t_seri, rtt >= t_seri) / play) |
731 |
zqsat = MIN(0.5, r2es * FOEEW(t_seri, rtt >= t_seri) / play) |
zqsat = zqsat / (1. - retv * zqsat) |
|
zqsat = zqsat / (1. - retv * zqsat) |
|
|
ELSE |
|
|
zqsat = merge(qsats(t_seri), qsatl(t_seri), t_seri < t_coup) / play |
|
|
ENDIF |
|
732 |
|
|
733 |
! Properties of convective clouds |
! Properties of convective clouds |
734 |
clwcon0 = fact_cldcon * clwcon0 |
clwcon0 = fact_cldcon * clwcon0 |
746 |
conv_t = d_t_dyn + d_t_vdf / dtphys |
conv_t = d_t_dyn + d_t_vdf / dtphys |
747 |
z_avant = sum((q_seri + ql_seri) * zmasse, dim=2) |
z_avant = sum((q_seri + ql_seri) * zmasse, dim=2) |
748 |
CALL conflx(dtphys, paprs, play, t_seri(:, llm:1:- 1), & |
CALL conflx(dtphys, paprs, play, t_seri(:, llm:1:- 1), & |
749 |
q_seri(:, llm:1:- 1), conv_t, conv_q, zxfluxq(:, 1), omega, & |
q_seri(:, llm:1:- 1), conv_t, conv_q, - evap, omega, & |
750 |
d_t_con, d_q_con, rain_con, snow_con, mfu(:, llm:1:- 1), & |
d_t_con, d_q_con, rain_con, snow_con, mfu(:, llm:1:- 1), & |
751 |
mfd(:, llm:1:- 1), pen_u, pde_u, pen_d, pde_d, kcbot, kctop, & |
mfd(:, llm:1:- 1), pen_u, pde_u, pen_d, pde_d, kcbot, kctop, & |
752 |
kdtop, pmflxr, pmflxs) |
kdtop, pmflxr, pmflxs) |
928 |
DO k = 1, llm |
DO k = 1, llm |
929 |
DO i = 1, klon |
DO i = 1, klon |
930 |
zx_t = t_seri(i, k) |
zx_t = t_seri(i, k) |
931 |
IF (thermcep) THEN |
zx_qs = r2es * FOEEW(zx_t, rtt >= zx_t) / play(i, k) |
932 |
zx_qs = r2es * FOEEW(zx_t, rtt >= zx_t) / play(i, k) |
zx_qs = MIN(0.5, zx_qs) |
933 |
zx_qs = MIN(0.5, zx_qs) |
zcor = 1. / (1. - retv * zx_qs) |
934 |
zcor = 1. / (1. - retv * zx_qs) |
zx_qs = zx_qs * zcor |
|
zx_qs = zx_qs * zcor |
|
|
ELSE |
|
|
IF (zx_t < t_coup) THEN |
|
|
zx_qs = qsats(zx_t) / play(i, k) |
|
|
ELSE |
|
|
zx_qs = qsatl(zx_t) / play(i, k) |
|
|
ENDIF |
|
|
ENDIF |
|
935 |
zx_rh(i, k) = q_seri(i, k) / zx_qs |
zx_rh(i, k) = q_seri(i, k) / zx_qs |
936 |
zqsat(i, k) = zx_qs |
zqsat(i, k) = zx_qs |
937 |
ENDDO |
ENDDO |
1164 |
DO nsrf = 1, nbsrf |
DO nsrf = 1, nbsrf |
1165 |
CALL histwrite_phy("pourc_"//clnsurf(nsrf), pctsrf(:, nsrf) * 100.) |
CALL histwrite_phy("pourc_"//clnsurf(nsrf), pctsrf(:, nsrf) * 100.) |
1166 |
CALL histwrite_phy("fract_"//clnsurf(nsrf), pctsrf(:, nsrf)) |
CALL histwrite_phy("fract_"//clnsurf(nsrf), pctsrf(:, nsrf)) |
1167 |
CALL histwrite_phy("sens_"//clnsurf(nsrf), fluxt(:, 1, nsrf)) |
CALL histwrite_phy("sens_"//clnsurf(nsrf), flux_t(:, nsrf)) |
1168 |
CALL histwrite_phy("lat_"//clnsurf(nsrf), fluxlat(:, nsrf)) |
CALL histwrite_phy("lat_"//clnsurf(nsrf), fluxlat(:, nsrf)) |
1169 |
CALL histwrite_phy("tsol_"//clnsurf(nsrf), ftsol(:, nsrf)) |
CALL histwrite_phy("tsol_"//clnsurf(nsrf), ftsol(:, nsrf)) |
1170 |
CALL histwrite_phy("taux_"//clnsurf(nsrf), fluxu(:, 1, nsrf)) |
CALL histwrite_phy("taux_"//clnsurf(nsrf), flux_u(:, nsrf)) |
1171 |
CALL histwrite_phy("tauy_"//clnsurf(nsrf), fluxv(:, 1, nsrf)) |
CALL histwrite_phy("tauy_"//clnsurf(nsrf), flux_v(:, nsrf)) |
1172 |
CALL histwrite_phy("rugs_"//clnsurf(nsrf), frugs(:, nsrf)) |
CALL histwrite_phy("rugs_"//clnsurf(nsrf), frugs(:, nsrf)) |
1173 |
CALL histwrite_phy("albe_"//clnsurf(nsrf), falbe(:, nsrf)) |
CALL histwrite_phy("albe_"//clnsurf(nsrf), falbe(:, nsrf)) |
1174 |
END DO |
END DO |
1185 |
CALL histwrite_phy("s_trmb1", s_trmb1) |
CALL histwrite_phy("s_trmb1", s_trmb1) |
1186 |
CALL histwrite_phy("s_trmb2", s_trmb2) |
CALL histwrite_phy("s_trmb2", s_trmb2) |
1187 |
CALL histwrite_phy("s_trmb3", s_trmb3) |
CALL histwrite_phy("s_trmb3", s_trmb3) |
1188 |
if (conv_emanuel) CALL histwrite_phy("ptop", ema_pct) |
|
1189 |
|
if (conv_emanuel) then |
1190 |
|
CALL histwrite_phy("ptop", ema_pct) |
1191 |
|
CALL histwrite_phy("dnwd0", - mp) |
1192 |
|
end if |
1193 |
|
|
1194 |
CALL histwrite_phy("temp", t_seri) |
CALL histwrite_phy("temp", t_seri) |
1195 |
CALL histwrite_phy("vitu", u_seri) |
CALL histwrite_phy("vitu", u_seri) |
1196 |
CALL histwrite_phy("vitv", v_seri) |
CALL histwrite_phy("vitv", v_seri) |