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 |
146 |
! "physiq". |
! "physiq". |
147 |
|
|
148 |
REAL, save:: radsol(klon) ! bilan radiatif au sol calcule par code radiatif |
REAL, save:: radsol(klon) ! bilan radiatif au sol calcule par code radiatif |
|
|
|
149 |
REAL, save:: ftsol(klon, nbsrf) ! skin temperature of surface fraction |
REAL, save:: ftsol(klon, nbsrf) ! skin temperature of surface fraction |
150 |
|
|
151 |
REAL, save:: ftsoil(klon, nsoilmx, nbsrf) |
REAL, save:: ftsoil(klon, nsoilmx, nbsrf) |
285 |
REAL zx_t, zx_qs, zcor |
REAL zx_t, zx_qs, zcor |
286 |
real zqsat(klon, llm) |
real zqsat(klon, llm) |
287 |
INTEGER i, k, iq, nsrf |
INTEGER i, k, iq, nsrf |
|
REAL, PARAMETER:: t_coup = 234. |
|
288 |
REAL zphi(klon, llm) |
REAL zphi(klon, llm) |
289 |
|
|
290 |
! cf. Anne Mathieu, variables pour la couche limite atmosphérique (hbtm) |
! cf. Anne Mathieu, variables pour la couche limite atmosphérique (hbtm) |
294 |
REAL, SAVE:: capCL(klon, nbsrf) ! CAPE de couche limite |
REAL, SAVE:: capCL(klon, nbsrf) ! CAPE de couche limite |
295 |
REAL, SAVE:: oliqCL(klon, nbsrf) ! eau_liqu integree de couche limite |
REAL, SAVE:: oliqCL(klon, nbsrf) ! eau_liqu integree de couche limite |
296 |
REAL, SAVE:: cteiCL(klon, nbsrf) ! cloud top instab. crit. couche limite |
REAL, SAVE:: cteiCL(klon, nbsrf) ! cloud top instab. crit. couche limite |
297 |
REAL, SAVE:: pblt(klon, nbsrf) ! T a la Hauteur de couche limite |
REAL, SAVE:: pblt(klon, nbsrf) ! T \`a la hauteur de couche limite |
298 |
REAL, SAVE:: therm(klon, nbsrf) |
REAL, SAVE:: therm(klon, nbsrf) |
299 |
REAL, SAVE:: trmb1(klon, nbsrf) ! deep_cape |
REAL, SAVE:: trmb1(klon, nbsrf) ! deep_cape |
300 |
REAL, SAVE:: trmb2(klon, nbsrf) ! inhibition |
REAL, SAVE:: trmb2(klon, nbsrf) ! inhibition |
395 |
! temperature and humidity at 2 m |
! temperature and humidity at 2 m |
396 |
|
|
397 |
REAL, save:: u10m(klon, nbsrf), v10m(klon, nbsrf) ! vents a 10 m |
REAL, save:: u10m(klon, nbsrf), v10m(klon, nbsrf) ! vents a 10 m |
398 |
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 |
399 |
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 |
400 |
|
|
401 |
! Aerosol effects: |
! Aerosol effects: |
402 |
|
|
470 |
capCL =0. ! CAPE de couche limite |
capCL =0. ! CAPE de couche limite |
471 |
oliqCL =0. ! eau_liqu integree de couche limite |
oliqCL =0. ! eau_liqu integree de couche limite |
472 |
cteiCL =0. ! cloud top instab. crit. couche limite |
cteiCL =0. ! cloud top instab. crit. couche limite |
473 |
pblt =0. ! T a la Hauteur de couche limite |
pblt =0. |
474 |
therm =0. |
therm =0. |
475 |
trmb1 =0. ! deep_cape |
trmb1 =0. ! deep_cape |
476 |
trmb2 =0. ! inhibition |
trmb2 =0. ! inhibition |
635 |
|
|
636 |
! Update surface temperature: |
! Update surface temperature: |
637 |
|
|
|
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 |
|
|
|
|
638 |
call assert(abs(sum(pctsrf, dim = 2) - 1.) <= EPSFRA, 'physiq: pctsrf') |
call assert(abs(sum(pctsrf, dim = 2) - 1.) <= EPSFRA, 'physiq: pctsrf') |
|
|
|
639 |
ftsol = ftsol + d_ts |
ftsol = ftsol + d_ts |
640 |
ztsol = sum(ftsol * pctsrf, dim = 2) |
ztsol = sum(ftsol * pctsrf, dim = 2) |
641 |
DO nsrf = 1, nbsrf |
zxfluxlat = sum(fluxlat * pctsrf, dim = 2) |
642 |
DO i = 1, klon |
zt2m = sum(t2m * pctsrf, dim = 2) |
643 |
zxfluxlat(i) = zxfluxlat(i) + fluxlat(i, nsrf) * pctsrf(i, nsrf) |
zq2m = sum(q2m * pctsrf, dim = 2) |
644 |
|
zu10m = sum(u10m * pctsrf, dim = 2) |
645 |
zt2m(i) = zt2m(i) + t2m(i, nsrf) * pctsrf(i, nsrf) |
zv10m = sum(v10m * pctsrf, dim = 2) |
646 |
zq2m(i) = zq2m(i) + q2m(i, nsrf) * pctsrf(i, nsrf) |
zxffonte = sum(ffonte * pctsrf, dim = 2) |
647 |
zu10m(i) = zu10m(i) + u10m(i, nsrf) * pctsrf(i, nsrf) |
zxfqcalving = sum(fqcalving * pctsrf, dim = 2) |
648 |
zv10m(i) = zv10m(i) + v10m(i, nsrf) * pctsrf(i, nsrf) |
s_pblh = sum(pblh * pctsrf, dim = 2) |
649 |
zxffonte(i) = zxffonte(i) + ffonte(i, nsrf) * pctsrf(i, nsrf) |
s_lcl = sum(plcl * pctsrf, dim = 2) |
650 |
zxfqcalving(i) = zxfqcalving(i) + & |
s_capCL = sum(capCL * pctsrf, dim = 2) |
651 |
fqcalving(i, nsrf) * pctsrf(i, nsrf) |
s_oliqCL = sum(oliqCL * pctsrf, dim = 2) |
652 |
s_pblh(i) = s_pblh(i) + pblh(i, nsrf) * pctsrf(i, nsrf) |
s_cteiCL = sum(cteiCL * pctsrf, dim = 2) |
653 |
s_lcl(i) = s_lcl(i) + plcl(i, nsrf) * pctsrf(i, nsrf) |
s_pblT = sum(pblT * pctsrf, dim = 2) |
654 |
s_capCL(i) = s_capCL(i) + capCL(i, nsrf) * pctsrf(i, nsrf) |
s_therm = sum(therm * pctsrf, dim = 2) |
655 |
s_oliqCL(i) = s_oliqCL(i) + oliqCL(i, nsrf) * pctsrf(i, nsrf) |
s_trmb1 = sum(trmb1 * pctsrf, dim = 2) |
656 |
s_cteiCL(i) = s_cteiCL(i) + cteiCL(i, nsrf) * pctsrf(i, nsrf) |
s_trmb2 = sum(trmb2 * pctsrf, dim = 2) |
657 |
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 |
|
658 |
|
|
659 |
! Si une sous-fraction n'existe pas, elle prend la valeur moyenne : |
! Si une sous-fraction n'existe pas, elle prend la valeur moyenne : |
660 |
DO nsrf = 1, nbsrf |
DO nsrf = 1, nbsrf |
697 |
clwcon0 = qcondc |
clwcon0 = qcondc |
698 |
mfu = upwd + dnwd |
mfu = upwd + dnwd |
699 |
|
|
700 |
IF (thermcep) THEN |
zqsat = MIN(0.5, r2es * FOEEW(t_seri, rtt >= t_seri) / play) |
701 |
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 |
|
702 |
|
|
703 |
! Properties of convective clouds |
! Properties of convective clouds |
704 |
clwcon0 = fact_cldcon * clwcon0 |
clwcon0 = fact_cldcon * clwcon0 |
898 |
DO k = 1, llm |
DO k = 1, llm |
899 |
DO i = 1, klon |
DO i = 1, klon |
900 |
zx_t = t_seri(i, k) |
zx_t = t_seri(i, k) |
901 |
IF (thermcep) THEN |
zx_qs = r2es * FOEEW(zx_t, rtt >= zx_t) / play(i, k) |
902 |
zx_qs = r2es * FOEEW(zx_t, rtt >= zx_t) / play(i, k) |
zx_qs = MIN(0.5, zx_qs) |
903 |
zx_qs = MIN(0.5, zx_qs) |
zcor = 1. / (1. - retv * zx_qs) |
904 |
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 |
|
905 |
zx_rh(i, k) = q_seri(i, k) / zx_qs |
zx_rh(i, k) = q_seri(i, k) / zx_qs |
906 |
zqsat(i, k) = zx_qs |
zqsat(i, k) = zx_qs |
907 |
ENDDO |
ENDDO |
939 |
ENDIF |
ENDIF |
940 |
|
|
941 |
! Ajouter la tendance des rayonnements (tous les pas) |
! Ajouter la tendance des rayonnements (tous les pas) |
|
|
|
942 |
DO k = 1, llm |
DO k = 1, llm |
943 |
DO i = 1, klon |
DO i = 1, klon |
944 |
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 & |
947 |
ENDDO |
ENDDO |
948 |
|
|
949 |
! Calculer l'hydrologie de la surface |
! Calculer l'hydrologie de la surface |
950 |
DO i = 1, klon |
zxqsurf = sum(fqsurf * pctsrf, dim = 2) |
951 |
zxqsurf(i) = 0. |
zxsnow = sum(fsnow * pctsrf, dim = 2) |
|
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 |
|
952 |
|
|
953 |
! 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) |
|
|
|
954 |
DO i = 1, klon |
DO i = 1, klon |
955 |
bils(i) = radsol(i) - sens(i) + zxfluxlat(i) |
bils(i) = radsol(i) - sens(i) + zxfluxlat(i) |
956 |
ENDDO |
ENDDO |