36 |
USE dimsoil, ONLY: nsoilmx |
USE dimsoil, ONLY: nsoilmx |
37 |
use drag_noro_m, only: drag_noro |
use drag_noro_m, only: drag_noro |
38 |
use dynetat0_m, only: day_ref, annee_ref |
use dynetat0_m, only: day_ref, annee_ref |
39 |
USE fcttre, ONLY: foeew, qsatl, qsats |
USE fcttre, ONLY: foeew |
40 |
use fisrtilp_m, only: fisrtilp |
use fisrtilp_m, only: fisrtilp |
41 |
USE hgardfou_m, ONLY: hgardfou |
USE hgardfou_m, ONLY: hgardfou |
42 |
USE histsync_m, ONLY: histsync |
USE histsync_m, ONLY: histsync |
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), zxfluxlat(klon) |
REAL zxfluxlat(klon) |
|
|
|
278 |
REAL dist, mu0(klon), fract(klon) |
REAL dist, mu0(klon), fract(klon) |
279 |
real longi |
real longi |
280 |
REAL z_avant(klon), z_apres(klon), z_factor(klon) |
REAL z_avant(klon), z_apres(klon), z_factor(klon) |
338 |
real rain_lsc(klon) |
real rain_lsc(klon) |
339 |
REAL, save:: snow_con(klon) ! neige (mm / s) |
REAL, save:: snow_con(klon) ! neige (mm / s) |
340 |
real snow_lsc(klon) |
real snow_lsc(klon) |
341 |
REAL d_ts(klon, nbsrf) |
REAL d_ts(klon, nbsrf) ! variation of ftsol |
342 |
|
|
343 |
REAL d_u_vdf(klon, llm), d_v_vdf(klon, llm) |
REAL d_u_vdf(klon, llm), d_v_vdf(klon, llm) |
344 |
REAL d_t_vdf(klon, llm), d_q_vdf(klon, llm) |
REAL d_t_vdf(klon, llm), d_q_vdf(klon, llm) |
381 |
REAL uq_lay(klon, llm) ! transport zonal de l'eau a chaque niveau vert. |
REAL uq_lay(klon, llm) ! transport zonal de l'eau a chaque niveau vert. |
382 |
|
|
383 |
real date0 |
real date0 |
384 |
REAL ztsol(klon) |
REAL tsol(klon) |
385 |
|
|
386 |
REAL d_t_ec(klon, llm) |
REAL d_t_ec(klon, llm) |
387 |
! tendance due \`a la conversion d'\'energie cin\'etique en |
! tendance due \`a la conversion d'\'energie cin\'etique en |
501 |
ql_seri = qx(:, :, iliq) |
ql_seri = qx(:, :, iliq) |
502 |
tr_seri = qx(:, :, 3:nqmx) |
tr_seri = qx(:, :, 3:nqmx) |
503 |
|
|
504 |
ztsol = sum(ftsol * pctsrf, dim = 2) |
tsol = sum(ftsol * pctsrf, dim = 2) |
505 |
|
|
506 |
! Diagnostic de la tendance dynamique : |
! Diagnostic de la tendance dynamique : |
507 |
IF (ancien_ok) THEN |
IF (ancien_ok) THEN |
562 |
! R\'epartition du longwave par sous-surface lin\'earis\'ee |
! R\'epartition du longwave par sous-surface lin\'earis\'ee |
563 |
|
|
564 |
forall (nsrf = 1: nbsrf) |
forall (nsrf = 1: nbsrf) |
565 |
fsollw(:, nsrf) = sollw + 4. * RSIGMA * ztsol**3 & |
fsollw(:, nsrf) = sollw + 4. * RSIGMA * tsol**3 & |
566 |
* (ztsol - ftsol(:, nsrf)) |
* (tsol - ftsol(:, nsrf)) |
567 |
fsolsw(:, nsrf) = solsw * (1. - falbe(:, nsrf)) / (1. - albsol) |
fsolsw(:, nsrf) = solsw * (1. - falbe(:, nsrf)) / (1. - albsol) |
568 |
END forall |
END forall |
569 |
|
|
597 |
|
|
598 |
call assert(abs(sum(pctsrf, dim = 2) - 1.) <= EPSFRA, 'physiq: pctsrf') |
call assert(abs(sum(pctsrf, dim = 2) - 1.) <= EPSFRA, 'physiq: pctsrf') |
599 |
ftsol = ftsol + d_ts |
ftsol = ftsol + d_ts |
600 |
ztsol = sum(ftsol * pctsrf, dim = 2) |
tsol = sum(ftsol * pctsrf, dim = 2) |
601 |
zxfluxlat = sum(fluxlat * pctsrf, dim = 2) |
zxfluxlat = sum(fluxlat * pctsrf, dim = 2) |
602 |
zt2m = sum(t2m * pctsrf, dim = 2) |
zt2m = sum(t2m * pctsrf, dim = 2) |
603 |
zq2m = sum(q2m * pctsrf, dim = 2) |
zq2m = sum(q2m * pctsrf, dim = 2) |
620 |
DO nsrf = 1, nbsrf |
DO nsrf = 1, nbsrf |
621 |
DO i = 1, klon |
DO i = 1, klon |
622 |
IF (pctsrf(i, nsrf) < epsfra) then |
IF (pctsrf(i, nsrf) < epsfra) then |
623 |
ftsol(i, nsrf) = ztsol(i) |
ftsol(i, nsrf) = tsol(i) |
624 |
t2m(i, nsrf) = zt2m(i) |
t2m(i, nsrf) = zt2m(i) |
625 |
q2m(i, nsrf) = zq2m(i) |
q2m(i, nsrf) = zq2m(i) |
626 |
u10m(i, nsrf) = zu10m(i) |
u10m(i, nsrf) = zu10m(i) |
644 |
! Calculer la dérive du flux infrarouge |
! Calculer la dérive du flux infrarouge |
645 |
|
|
646 |
DO i = 1, klon |
DO i = 1, klon |
647 |
dlw(i) = - 4. * RSIGMA * ztsol(i)**3 |
dlw(i) = - 4. * RSIGMA * tsol(i)**3 |
648 |
ENDDO |
ENDDO |
649 |
|
|
650 |
! Appeler la convection |
! Appeler la convection |
880 |
IF (MOD(itap - 1, radpas) == 0) THEN |
IF (MOD(itap - 1, radpas) == 0) THEN |
881 |
wo = ozonecm(REAL(julien), paprs) |
wo = ozonecm(REAL(julien), paprs) |
882 |
albsol = sum(falbe * pctsrf, dim = 2) |
albsol = sum(falbe * pctsrf, dim = 2) |
883 |
CALL radlwsw(dist, mu0, fract, paprs, play, ztsol, albsol, t_seri, & |
CALL radlwsw(dist, mu0, fract, paprs, play, tsol, albsol, t_seri, & |
884 |
q_seri, wo, cldfra, cldemi, cldtau, heat, heat0, cool, cool0, & |
q_seri, wo, cldfra, cldemi, cldtau, heat, heat0, cool, cool0, & |
885 |
radsol, albpla, topsw, toplw, solsw, sollw, sollwdown, topsw0, & |
radsol, albpla, topsw, toplw, solsw, sollw, sollwdown, topsw0, & |
886 |
toplw0, solsw0, sollw0, lwdn0, lwdn, lwup0, lwup, swdn0, swdn, & |
toplw0, solsw0, sollw0, lwdn0, lwdn, lwup0, lwup, swdn0, swdn, & |
895 |
ENDDO |
ENDDO |
896 |
ENDDO |
ENDDO |
897 |
|
|
|
! Calculer l'hydrologie de la surface |
|
|
zxqsurf = sum(fqsurf * pctsrf, dim = 2) |
|
|
|
|
898 |
! 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) |
899 |
DO i = 1, klon |
DO i = 1, klon |
900 |
bils(i) = radsol(i) - sens(i) + zxfluxlat(i) |
bils(i) = radsol(i) - sens(i) + zxfluxlat(i) |
978 |
|
|
979 |
IF (offline) call phystokenc(dtphys, t, mfu, mfd, pen_u, pde_u, pen_d, & |
IF (offline) call phystokenc(dtphys, t, mfu, mfd, pen_u, pde_u, pen_d, & |
980 |
pde_d, fm_therm, entr_therm, ycoefh, yu1, yv1, ftsol, pctsrf, & |
pde_d, fm_therm, entr_therm, ycoefh, yu1, yv1, ftsol, pctsrf, & |
981 |
frac_impa, frac_nucl, pphis, airephy, dtphys) |
frac_impa, frac_nucl, pphis, airephy) |
982 |
|
|
983 |
! Calculer le transport de l'eau et de l'energie (diagnostique) |
! Calculer le transport de l'eau et de l'energie (diagnostique) |
984 |
CALL transp(paprs, t_seri, q_seri, u_seri, v_seri, zphi, ve, vq, ue, uq) |
CALL transp(paprs, t_seri, q_seri, u_seri, v_seri, zphi, ve, vq, ue, uq) |
1044 |
CALL histwrite_phy("precip", rain_fall + snow_fall) |
CALL histwrite_phy("precip", rain_fall + snow_fall) |
1045 |
CALL histwrite_phy("plul", rain_lsc + snow_lsc) |
CALL histwrite_phy("plul", rain_lsc + snow_lsc) |
1046 |
CALL histwrite_phy("pluc", rain_con + snow_con) |
CALL histwrite_phy("pluc", rain_con + snow_con) |
1047 |
CALL histwrite_phy("tsol", ztsol) |
CALL histwrite_phy("tsol", tsol) |
1048 |
CALL histwrite_phy("t2m", zt2m) |
CALL histwrite_phy("t2m", zt2m) |
1049 |
CALL histwrite_phy("q2m", zq2m) |
CALL histwrite_phy("q2m", zq2m) |
1050 |
CALL histwrite_phy("u10m", zu10m) |
CALL histwrite_phy("u10m", zu10m) |
1108 |
CALL histwrite_phy("dtsw0", heat0 / 86400.) |
CALL histwrite_phy("dtsw0", heat0 / 86400.) |
1109 |
CALL histwrite_phy("dtlw0", - cool0 / 86400.) |
CALL histwrite_phy("dtlw0", - cool0 / 86400.) |
1110 |
CALL histwrite_phy("msnow", sum(fsnow * pctsrf, dim = 2)) |
CALL histwrite_phy("msnow", sum(fsnow * pctsrf, dim = 2)) |
1111 |
|
call histwrite_phy("qsurf", sum(fqsurf * pctsrf, dim = 2)) |
1112 |
|
|
1113 |
if (ok_instan) call histsync(nid_ins) |
if (ok_instan) call histsync(nid_ins) |
1114 |
|
|