20 |
use calltherm_m, only: calltherm |
use calltherm_m, only: calltherm |
21 |
USE clesphys, ONLY: cdhmax, cdmmax, ecrit_ins, ksta, ksta_ter, ok_kzmin, & |
USE clesphys, ONLY: cdhmax, cdmmax, ecrit_ins, ksta, ksta_ter, ok_kzmin, & |
22 |
ok_instan |
ok_instan |
23 |
USE clesphys2, ONLY: cycle_diurne, conv_emanuel, nbapp_rad, new_oliq, & |
USE clesphys2, ONLY: conv_emanuel, nbapp_rad, new_oliq, ok_orodr, ok_orolf |
|
ok_orodr, ok_orolf |
|
24 |
USE clmain_m, ONLY: clmain |
USE clmain_m, ONLY: clmain |
25 |
use clouds_gno_m, only: clouds_gno |
use clouds_gno_m, only: clouds_gno |
26 |
use comconst, only: dtphys |
use comconst, only: dtphys |
57 |
USE phytrac_m, ONLY: phytrac |
USE phytrac_m, ONLY: phytrac |
58 |
use radlwsw_m, only: radlwsw |
use radlwsw_m, only: radlwsw |
59 |
use yoegwd, only: sugwd |
use yoegwd, only: sugwd |
60 |
USE suphec_m, ONLY: rcpd, retv, rg, rlvtt, romega, rsigma, rtt |
USE suphec_m, ONLY: rcpd, retv, rg, rlvtt, romega, rsigma, rtt, rmo3, md |
61 |
use time_phylmdz, only: itap, increment_itap |
use time_phylmdz, only: itap, increment_itap |
62 |
use transp_m, only: transp |
use transp_m, only: transp |
63 |
use transp_lay_m, only: transp_lay |
use transp_lay_m, only: transp_lay |
145 |
! "physiq". |
! "physiq". |
146 |
|
|
147 |
REAL, save:: radsol(klon) ! bilan radiatif au sol calcule par code radiatif |
REAL, save:: radsol(klon) ! bilan radiatif au sol calcule par code radiatif |
|
|
|
148 |
REAL, save:: ftsol(klon, nbsrf) ! skin temperature of surface fraction |
REAL, save:: ftsol(klon, nbsrf) ! skin temperature of surface fraction |
149 |
|
|
150 |
REAL, save:: ftsoil(klon, nsoilmx, nbsrf) |
REAL, save:: ftsoil(klon, nsoilmx, nbsrf) |
151 |
! soil temperature of surface fraction |
! soil temperature of surface fraction |
152 |
|
|
153 |
REAL, save:: fevap(klon, nbsrf) ! evaporation |
REAL, save:: fevap(klon, nbsrf) ! evaporation |
154 |
REAL, save:: fluxlat(klon, nbsrf) |
REAL fluxlat(klon, nbsrf) |
155 |
|
|
156 |
REAL, save:: fqsurf(klon, nbsrf) |
REAL, save:: fqsurf(klon, nbsrf) |
157 |
! humidite de l'air au contact de la surface |
! humidite de l'air au contact de la surface |
158 |
|
|
159 |
REAL, save:: qsol(klon) |
REAL, save:: qsol(klon) ! column-density of water in soil, in kg m-2 |
160 |
! column-density of water in soil, in kg m-2 |
REAL, save:: fsnow(klon, nbsrf) ! \'epaisseur neigeuse |
|
|
|
|
REAL, save:: fsnow(klon, nbsrf) ! epaisseur neigeuse |
|
161 |
REAL, save:: falbe(klon, nbsrf) ! albedo visible par type de surface |
REAL, save:: falbe(klon, nbsrf) ! albedo visible par type de surface |
162 |
|
|
163 |
! Param\`etres de l'orographie \`a l'\'echelle sous-maille (OESM) : |
! Param\`etres de l'orographie \`a l'\'echelle sous-maille (OESM) : |
204 |
REAL, save:: pfrac_1nucl(klon, llm) |
REAL, save:: pfrac_1nucl(klon, llm) |
205 |
! Produits des coefs lessi nucl (alpha = 1) |
! Produits des coefs lessi nucl (alpha = 1) |
206 |
|
|
207 |
REAL frac_impa(klon, llm) ! fractions d'aerosols lessivees (impaction) |
REAL frac_impa(klon, llm) ! fraction d'a\'erosols lessiv\'es (impaction) |
208 |
REAL frac_nucl(klon, llm) ! idem (nucleation) |
REAL frac_nucl(klon, llm) ! idem (nucleation) |
209 |
|
|
210 |
REAL, save:: rain_fall(klon) |
REAL, save:: rain_fall(klon) |
236 |
REAL, save:: pctsrf(klon, nbsrf) ! percentage of surface |
REAL, save:: pctsrf(klon, nbsrf) ! percentage of surface |
237 |
REAL, save:: albsol(klon) ! albedo du sol total visible |
REAL, save:: albsol(klon) ! albedo du sol total visible |
238 |
REAL, SAVE:: wo(klon, llm) ! column density of ozone in a cell, in kDU |
REAL, SAVE:: wo(klon, llm) ! column density of ozone in a cell, in kDU |
239 |
|
real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 |
240 |
|
|
241 |
real, save:: clwcon(klon, llm), rnebcon(klon, llm) |
real, save:: clwcon(klon, llm), rnebcon(klon, llm) |
242 |
real, save:: clwcon0(klon, llm), rnebcon0(klon, llm) |
real, save:: clwcon0(klon, llm), rnebcon0(klon, llm) |
274 |
REAL cldl(klon), cldm(klon), cldh(klon) ! nuages bas, moyen et haut |
REAL cldl(klon), cldm(klon), cldh(klon) ! nuages bas, moyen et haut |
275 |
REAL cldt(klon), cldq(klon) ! nuage total, eau liquide integree |
REAL cldt(klon), cldq(klon) ! nuage total, eau liquide integree |
276 |
|
|
277 |
REAL zxqsurf(klon), zxsnow(klon), zxfluxlat(klon) |
REAL zxqsurf(klon), zxfluxlat(klon) |
278 |
|
|
279 |
REAL dist, mu0(klon), fract(klon) |
REAL dist, mu0(klon), fract(klon) |
280 |
real longi |
real longi |
385 |
REAL ztsol(klon) |
REAL ztsol(klon) |
386 |
|
|
387 |
REAL d_t_ec(klon, llm) |
REAL d_t_ec(klon, llm) |
388 |
! tendance due \`a la conversion Ec en énergie thermique |
! tendance due \`a la conversion d'\'energie cin\'etique en |
389 |
|
! énergie thermique |
|
REAL ZRCPD |
|
390 |
|
|
391 |
REAL, save:: t2m(klon, nbsrf), q2m(klon, nbsrf) |
REAL, save:: t2m(klon, nbsrf), q2m(klon, nbsrf) |
392 |
! temperature and humidity at 2 m |
! temperature and humidity at 2 m |
565 |
|
|
566 |
forall (k = 1: llm) zmasse(:, k) = (paprs(:, k) - paprs(:, k + 1)) / rg |
forall (k = 1: llm) zmasse(:, k) = (paprs(:, k) - paprs(:, k + 1)) / rg |
567 |
|
|
|
! Prescrire l'ozone : |
|
|
wo = ozonecm(REAL(julien), paprs) |
|
|
|
|
568 |
! \'Evaporation de l'eau liquide nuageuse : |
! \'Evaporation de l'eau liquide nuageuse : |
569 |
DO k = 1, llm |
DO k = 1, llm |
570 |
DO i = 1, klon |
DO i = 1, klon |
583 |
! la surface. |
! la surface. |
584 |
|
|
585 |
CALL orbite(REAL(julien), longi, dist) |
CALL orbite(REAL(julien), longi, dist) |
586 |
IF (cycle_diurne) THEN |
CALL zenang(longi, time, dtphys * radpas, mu0, fract) |
|
CALL zenang(longi, time, dtphys * radpas, mu0, fract) |
|
|
ELSE |
|
|
mu0 = - 999.999 |
|
|
ENDIF |
|
587 |
|
|
588 |
! Calcul de l'abedo moyen par maille |
! Calcul de l'abedo moyen par maille |
589 |
albsol = sum(falbe * pctsrf, dim = 2) |
albsol = sum(falbe * pctsrf, dim = 2) |
602 |
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, & |
603 |
ftsol, cdmmax, cdhmax, ksta, ksta_ter, ok_kzmin, ftsoil, qsol, & |
ftsol, cdmmax, cdhmax, ksta, ksta_ter, ok_kzmin, ftsoil, qsol, & |
604 |
paprs, play, fsnow, fqsurf, fevap, falbe, fluxlat, rain_fall, & |
paprs, play, fsnow, fqsurf, fevap, falbe, fluxlat, rain_fall, & |
605 |
snow_fall, fsolsw, fsollw, fder, rlat, frugs, agesno, rugoro, & |
snow_fall, fsolsw, fsollw, fder, frugs, agesno, rugoro, d_t_vdf, & |
606 |
d_t_vdf, d_q_vdf, d_u_vdf, d_v_vdf, d_ts, flux_t, flux_q, flux_u, & |
d_q_vdf, d_u_vdf, d_v_vdf, d_ts, flux_t, flux_q, flux_u, flux_v, & |
607 |
flux_v, cdragh, cdragm, q2, dsens, devap, ycoefh, yu1, yv1, t2m, q2m, & |
cdragh, cdragm, q2, dsens, devap, ycoefh, yu1, yv1, t2m, q2m, u10m, & |
608 |
u10m, v10m, pblh, capCL, oliqCL, cteiCL, pblT, therm, trmb1, trmb2, & |
v10m, pblh, capCL, oliqCL, cteiCL, pblT, therm, trmb1, trmb2, trmb3, & |
609 |
trmb3, plcl, fqcalving, ffonte, run_off_lic_0) |
plcl, fqcalving, ffonte, run_off_lic_0) |
610 |
|
|
611 |
! Incr\'ementation des flux |
! Incr\'ementation des flux |
612 |
|
|
625 |
|
|
626 |
! Update surface temperature: |
! Update surface temperature: |
627 |
|
|
|
DO i = 1, klon |
|
|
zxfluxlat(i) = 0. |
|
|
|
|
|
zt2m(i) = 0. |
|
|
zq2m(i) = 0. |
|
|
zu10m(i) = 0. |
|
|
zv10m(i) = 0. |
|
|
zxffonte(i) = 0. |
|
|
zxfqcalving(i) = 0. |
|
|
|
|
|
s_pblh(i) = 0. |
|
|
s_lcl(i) = 0. |
|
|
s_capCL(i) = 0. |
|
|
s_oliqCL(i) = 0. |
|
|
s_cteiCL(i) = 0. |
|
|
s_pblT(i) = 0. |
|
|
s_therm(i) = 0. |
|
|
s_trmb1(i) = 0. |
|
|
s_trmb2(i) = 0. |
|
|
s_trmb3(i) = 0. |
|
|
ENDDO |
|
|
|
|
628 |
call assert(abs(sum(pctsrf, dim = 2) - 1.) <= EPSFRA, 'physiq: pctsrf') |
call assert(abs(sum(pctsrf, dim = 2) - 1.) <= EPSFRA, 'physiq: pctsrf') |
|
|
|
629 |
ftsol = ftsol + d_ts |
ftsol = ftsol + d_ts |
630 |
ztsol = sum(ftsol * pctsrf, dim = 2) |
ztsol = sum(ftsol * pctsrf, dim = 2) |
631 |
DO nsrf = 1, nbsrf |
zxfluxlat = sum(fluxlat * pctsrf, dim = 2) |
632 |
DO i = 1, klon |
zt2m = sum(t2m * pctsrf, dim = 2) |
633 |
zxfluxlat(i) = zxfluxlat(i) + fluxlat(i, nsrf) * pctsrf(i, nsrf) |
zq2m = sum(q2m * pctsrf, dim = 2) |
634 |
|
zu10m = sum(u10m * pctsrf, dim = 2) |
635 |
zt2m(i) = zt2m(i) + t2m(i, nsrf) * pctsrf(i, nsrf) |
zv10m = sum(v10m * pctsrf, dim = 2) |
636 |
zq2m(i) = zq2m(i) + q2m(i, nsrf) * pctsrf(i, nsrf) |
zxffonte = sum(ffonte * pctsrf, dim = 2) |
637 |
zu10m(i) = zu10m(i) + u10m(i, nsrf) * pctsrf(i, nsrf) |
zxfqcalving = sum(fqcalving * pctsrf, dim = 2) |
638 |
zv10m(i) = zv10m(i) + v10m(i, nsrf) * pctsrf(i, nsrf) |
s_pblh = sum(pblh * pctsrf, dim = 2) |
639 |
zxffonte(i) = zxffonte(i) + ffonte(i, nsrf) * pctsrf(i, nsrf) |
s_lcl = sum(plcl * pctsrf, dim = 2) |
640 |
zxfqcalving(i) = zxfqcalving(i) + & |
s_capCL = sum(capCL * pctsrf, dim = 2) |
641 |
fqcalving(i, nsrf) * pctsrf(i, nsrf) |
s_oliqCL = sum(oliqCL * pctsrf, dim = 2) |
642 |
s_pblh(i) = s_pblh(i) + pblh(i, nsrf) * pctsrf(i, nsrf) |
s_cteiCL = sum(cteiCL * pctsrf, dim = 2) |
643 |
s_lcl(i) = s_lcl(i) + plcl(i, nsrf) * pctsrf(i, nsrf) |
s_pblT = sum(pblT * pctsrf, dim = 2) |
644 |
s_capCL(i) = s_capCL(i) + capCL(i, nsrf) * pctsrf(i, nsrf) |
s_therm = sum(therm * pctsrf, dim = 2) |
645 |
s_oliqCL(i) = s_oliqCL(i) + oliqCL(i, nsrf) * pctsrf(i, nsrf) |
s_trmb1 = sum(trmb1 * pctsrf, dim = 2) |
646 |
s_cteiCL(i) = s_cteiCL(i) + cteiCL(i, nsrf) * pctsrf(i, nsrf) |
s_trmb2 = sum(trmb2 * pctsrf, dim = 2) |
647 |
s_pblT(i) = s_pblT(i) + pblT(i, nsrf) * pctsrf(i, nsrf) |
s_trmb3 = sum(trmb3 * pctsrf, dim = 2) |
|
s_therm(i) = s_therm(i) + therm(i, nsrf) * pctsrf(i, nsrf) |
|
|
s_trmb1(i) = s_trmb1(i) + trmb1(i, nsrf) * pctsrf(i, nsrf) |
|
|
s_trmb2(i) = s_trmb2(i) + trmb2(i, nsrf) * pctsrf(i, nsrf) |
|
|
s_trmb3(i) = s_trmb3(i) + trmb3(i, nsrf) * pctsrf(i, nsrf) |
|
|
ENDDO |
|
|
ENDDO |
|
648 |
|
|
649 |
! Si une sous-fraction n'existe pas, elle prend la valeur moyenne : |
! Si une sous-fraction n'existe pas, elle prend la valeur moyenne : |
650 |
DO nsrf = 1, nbsrf |
DO nsrf = 1, nbsrf |
915 |
endif |
endif |
916 |
|
|
917 |
IF (MOD(itap - 1, radpas) == 0) THEN |
IF (MOD(itap - 1, radpas) == 0) THEN |
918 |
|
! Prescrire l'ozone : |
919 |
|
wo = ozonecm(REAL(julien), paprs) |
920 |
|
|
921 |
! Appeler le rayonnement mais calculer tout d'abord l'albedo du sol. |
! Appeler le rayonnement mais calculer tout d'abord l'albedo du sol. |
922 |
! Calcul de l'abedo moyen par maille |
! Calcul de l'abedo moyen par maille |
923 |
albsol = sum(falbe * pctsrf, dim = 2) |
albsol = sum(falbe * pctsrf, dim = 2) |
932 |
ENDIF |
ENDIF |
933 |
|
|
934 |
! Ajouter la tendance des rayonnements (tous les pas) |
! Ajouter la tendance des rayonnements (tous les pas) |
|
|
|
935 |
DO k = 1, llm |
DO k = 1, llm |
936 |
DO i = 1, klon |
DO i = 1, klon |
937 |
t_seri(i, k) = t_seri(i, k) + (heat(i, k) - cool(i, k)) * dtphys & |
t_seri(i, k) = t_seri(i, k) + (heat(i, k) - cool(i, k)) * dtphys & |
940 |
ENDDO |
ENDDO |
941 |
|
|
942 |
! Calculer l'hydrologie de la surface |
! Calculer l'hydrologie de la surface |
943 |
DO i = 1, klon |
zxqsurf = sum(fqsurf * pctsrf, dim = 2) |
|
zxqsurf(i) = 0. |
|
|
zxsnow(i) = 0. |
|
|
ENDDO |
|
|
DO nsrf = 1, nbsrf |
|
|
DO i = 1, klon |
|
|
zxqsurf(i) = zxqsurf(i) + fqsurf(i, nsrf) * pctsrf(i, nsrf) |
|
|
zxsnow(i) = zxsnow(i) + fsnow(i, nsrf) * pctsrf(i, nsrf) |
|
|
ENDDO |
|
|
ENDDO |
|
944 |
|
|
945 |
! Calculer le bilan du sol et la d\'erive de temp\'erature (couplage) |
! Calculer le bilan du sol et la d\'erive de temp\'erature (couplage) |
|
|
|
946 |
DO i = 1, klon |
DO i = 1, klon |
947 |
bils(i) = radsol(i) - sens(i) + zxfluxlat(i) |
bils(i) = radsol(i) - sens(i) + zxfluxlat(i) |
948 |
ENDDO |
ENDDO |
1040 |
! conversion Ec en énergie thermique |
! conversion Ec en énergie thermique |
1041 |
DO k = 1, llm |
DO k = 1, llm |
1042 |
DO i = 1, klon |
DO i = 1, klon |
1043 |
ZRCPD = RCPD * (1. + RVTMP2 * q_seri(i, k)) |
d_t_ec(i, k) = 0.5 / (RCPD * (1. + RVTMP2 * q_seri(i, k))) & |
|
d_t_ec(i, k) = 0.5 / ZRCPD & |
|
1044 |
* (u(i, k)**2 + v(i, k)**2 - u_seri(i, k)**2 - v_seri(i, k)**2) |
* (u(i, k)**2 + v(i, k)**2 - u_seri(i, k)**2 - v_seri(i, k)**2) |
1045 |
t_seri(i, k) = t_seri(i, k) + d_t_ec(i, k) |
t_seri(i, k) = t_seri(i, k) + d_t_ec(i, k) |
1046 |
d_t_ec(i, k) = d_t_ec(i, k) / dtphys |
d_t_ec(i, k) = d_t_ec(i, k) / dtphys |
1125 |
END DO |
END DO |
1126 |
|
|
1127 |
CALL histwrite_phy("albs", albsol) |
CALL histwrite_phy("albs", albsol) |
1128 |
|
CALL histwrite_phy("tro3", wo * dobson_u * 1e3 / zmasse / rmo3 * md) |
1129 |
CALL histwrite_phy("rugs", zxrugs) |
CALL histwrite_phy("rugs", zxrugs) |
1130 |
CALL histwrite_phy("s_pblh", s_pblh) |
CALL histwrite_phy("s_pblh", s_pblh) |
1131 |
CALL histwrite_phy("s_pblt", s_pblt) |
CALL histwrite_phy("s_pblt", s_pblt) |
1151 |
CALL histwrite_phy("dtvdf", d_t_vdf) |
CALL histwrite_phy("dtvdf", d_t_vdf) |
1152 |
CALL histwrite_phy("dqvdf", d_q_vdf) |
CALL histwrite_phy("dqvdf", d_q_vdf) |
1153 |
CALL histwrite_phy("rhum", zx_rh) |
CALL histwrite_phy("rhum", zx_rh) |
1154 |
|
CALL histwrite_phy("d_t_ec", d_t_ec) |
1155 |
|
CALL histwrite_phy("dtsw0", heat0 / 86400.) |
1156 |
|
CALL histwrite_phy("dtlw0", - cool0 / 86400.) |
1157 |
|
CALL histwrite_phy("msnow", sum(fsnow * pctsrf, dim = 2)) |
1158 |
|
|
1159 |
if (ok_instan) call histsync(nid_ins) |
if (ok_instan) call histsync(nid_ins) |
1160 |
|
|