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 |
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 |
206 |
REAL, save:: pfrac_1nucl(klon, llm) |
REAL, save:: pfrac_1nucl(klon, llm) |
207 |
! Produits des coefs lessi nucl (alpha = 1) |
! Produits des coefs lessi nucl (alpha = 1) |
208 |
|
|
209 |
REAL frac_impa(klon, llm) ! fractions d'aerosols lessivees (impaction) |
REAL frac_impa(klon, llm) ! fraction d'a\'erosols lessiv\'es (impaction) |
210 |
REAL frac_nucl(klon, llm) ! idem (nucleation) |
REAL frac_nucl(klon, llm) ! idem (nucleation) |
211 |
|
|
212 |
REAL, save:: rain_fall(klon) |
REAL, save:: rain_fall(klon) |
238 |
REAL, save:: pctsrf(klon, nbsrf) ! percentage of surface |
REAL, save:: pctsrf(klon, nbsrf) ! percentage of surface |
239 |
REAL, save:: albsol(klon) ! albedo du sol total visible |
REAL, save:: albsol(klon) ! albedo du sol total visible |
240 |
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 |
241 |
|
real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 |
242 |
|
|
243 |
real, save:: clwcon(klon, llm), rnebcon(klon, llm) |
real, save:: clwcon(klon, llm), rnebcon(klon, llm) |
244 |
real, save:: clwcon0(klon, llm), rnebcon0(klon, llm) |
real, save:: clwcon0(klon, llm), rnebcon0(klon, llm) |
387 |
REAL ztsol(klon) |
REAL ztsol(klon) |
388 |
|
|
389 |
REAL d_t_ec(klon, llm) |
REAL d_t_ec(klon, llm) |
390 |
! tendance due \`a la conversion Ec en énergie thermique |
! tendance due \`a la conversion d'\'energie cin\'etique en |
391 |
|
! énergie thermique |
|
REAL ZRCPD |
|
392 |
|
|
393 |
REAL, save:: t2m(klon, nbsrf), q2m(klon, nbsrf) |
REAL, save:: t2m(klon, nbsrf), q2m(klon, nbsrf) |
394 |
! temperature and humidity at 2 m |
! temperature and humidity at 2 m |
567 |
|
|
568 |
forall (k = 1: llm) zmasse(:, k) = (paprs(:, k) - paprs(:, k + 1)) / rg |
forall (k = 1: llm) zmasse(:, k) = (paprs(:, k) - paprs(:, k + 1)) / rg |
569 |
|
|
|
! Prescrire l'ozone : |
|
|
wo = ozonecm(REAL(julien), paprs) |
|
|
|
|
570 |
! \'Evaporation de l'eau liquide nuageuse : |
! \'Evaporation de l'eau liquide nuageuse : |
571 |
DO k = 1, llm |
DO k = 1, llm |
572 |
DO i = 1, klon |
DO i = 1, klon |
585 |
! la surface. |
! la surface. |
586 |
|
|
587 |
CALL orbite(REAL(julien), longi, dist) |
CALL orbite(REAL(julien), longi, dist) |
588 |
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 |
|
589 |
|
|
590 |
! Calcul de l'abedo moyen par maille |
! Calcul de l'abedo moyen par maille |
591 |
albsol = sum(falbe * pctsrf, dim = 2) |
albsol = sum(falbe * pctsrf, dim = 2) |
604 |
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, & |
605 |
ftsol, cdmmax, cdhmax, ksta, ksta_ter, ok_kzmin, ftsoil, qsol, & |
ftsol, cdmmax, cdhmax, ksta, ksta_ter, ok_kzmin, ftsoil, qsol, & |
606 |
paprs, play, fsnow, fqsurf, fevap, falbe, fluxlat, rain_fall, & |
paprs, play, fsnow, fqsurf, fevap, falbe, fluxlat, rain_fall, & |
607 |
snow_fall, fsolsw, fsollw, fder, rlat, frugs, agesno, rugoro, & |
snow_fall, fsolsw, fsollw, fder, frugs, agesno, rugoro, d_t_vdf, & |
608 |
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, & |
609 |
flux_v, cdragh, cdragm, q2, dsens, devap, ycoefh, yu1, yv1, t2m, q2m, & |
cdragh, cdragm, q2, dsens, devap, ycoefh, yu1, yv1, t2m, q2m, u10m, & |
610 |
u10m, v10m, pblh, capCL, oliqCL, cteiCL, pblT, therm, trmb1, trmb2, & |
v10m, pblh, capCL, oliqCL, cteiCL, pblT, therm, trmb1, trmb2, trmb3, & |
611 |
trmb3, plcl, fqcalving, ffonte, run_off_lic_0) |
plcl, fqcalving, ffonte, run_off_lic_0) |
612 |
|
|
613 |
! Incr\'ementation des flux |
! Incr\'ementation des flux |
614 |
|
|
917 |
endif |
endif |
918 |
|
|
919 |
IF (MOD(itap - 1, radpas) == 0) THEN |
IF (MOD(itap - 1, radpas) == 0) THEN |
920 |
|
! Prescrire l'ozone : |
921 |
|
wo = ozonecm(REAL(julien), paprs) |
922 |
|
|
923 |
! Appeler le rayonnement mais calculer tout d'abord l'albedo du sol. |
! Appeler le rayonnement mais calculer tout d'abord l'albedo du sol. |
924 |
! Calcul de l'abedo moyen par maille |
! Calcul de l'abedo moyen par maille |
925 |
albsol = sum(falbe * pctsrf, dim = 2) |
albsol = sum(falbe * pctsrf, dim = 2) |
1043 |
! conversion Ec en énergie thermique |
! conversion Ec en énergie thermique |
1044 |
DO k = 1, llm |
DO k = 1, llm |
1045 |
DO i = 1, klon |
DO i = 1, klon |
1046 |
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 & |
|
1047 |
* (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) |
1048 |
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) |
1049 |
d_t_ec(i, k) = d_t_ec(i, k) / dtphys |
d_t_ec(i, k) = d_t_ec(i, k) / dtphys |
1128 |
END DO |
END DO |
1129 |
|
|
1130 |
CALL histwrite_phy("albs", albsol) |
CALL histwrite_phy("albs", albsol) |
1131 |
|
CALL histwrite_phy("tro3", wo * dobson_u * 1e3 / zmasse / rmo3 * md) |
1132 |
CALL histwrite_phy("rugs", zxrugs) |
CALL histwrite_phy("rugs", zxrugs) |
1133 |
CALL histwrite_phy("s_pblh", s_pblh) |
CALL histwrite_phy("s_pblh", s_pblh) |
1134 |
CALL histwrite_phy("s_pblt", s_pblt) |
CALL histwrite_phy("s_pblt", s_pblt) |
1154 |
CALL histwrite_phy("dtvdf", d_t_vdf) |
CALL histwrite_phy("dtvdf", d_t_vdf) |
1155 |
CALL histwrite_phy("dqvdf", d_q_vdf) |
CALL histwrite_phy("dqvdf", d_q_vdf) |
1156 |
CALL histwrite_phy("rhum", zx_rh) |
CALL histwrite_phy("rhum", zx_rh) |
1157 |
|
CALL histwrite_phy("d_t_ec", d_t_ec) |
1158 |
|
CALL histwrite_phy("dtsw0", heat0 / 86400.) |
1159 |
|
CALL histwrite_phy("dtlw0", - cool0 / 86400.) |
1160 |
|
|
1161 |
if (ok_instan) call histsync(nid_ins) |
if (ok_instan) call histsync(nid_ins) |
1162 |
|
|