18 |
USE abort_gcm_m, ONLY: abort_gcm |
USE abort_gcm_m, ONLY: abort_gcm |
19 |
use ajsec_m, only: ajsec |
use ajsec_m, only: ajsec |
20 |
use calltherm_m, only: calltherm |
use calltherm_m, only: calltherm |
21 |
USE clesphys, ONLY: cdhmax, cdmmax, ecrit_hf, ecrit_ins, ecrit_mth, & |
USE clesphys, ONLY: cdhmax, cdmmax, ecrit_ins, ksta, ksta_ter, ok_kzmin, & |
22 |
ecrit_reg, ecrit_tra, ksta, ksta_ter, ok_kzmin, ok_instan |
ok_instan |
23 |
USE clesphys2, ONLY: cycle_diurne, conv_emanuel, nbapp_rad, new_oliq, & |
USE clesphys2, ONLY: cycle_diurne, conv_emanuel, nbapp_rad, new_oliq, & |
24 |
ok_orodr, ok_orolf |
ok_orodr, ok_orolf |
25 |
USE clmain_m, ONLY: clmain |
USE clmain_m, ONLY: clmain |
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 |
USE conf_gcm_m, ONLY: offline, day_step, iphysiq, 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 |
34 |
use diagcld2_m, only: diagcld2 |
use diagcld2_m, only: diagcld2 |
|
use diagetpq_m, only: diagetpq |
|
|
use diagphy_m, only: diagphy |
|
35 |
USE dimens_m, ONLY: llm, nqmx |
USE dimens_m, ONLY: llm, nqmx |
36 |
USE dimphy, ONLY: klon |
USE dimphy, ONLY: klon |
37 |
USE dimsoil, ONLY: nsoilmx |
USE dimsoil, ONLY: nsoilmx |
87 |
REAL, intent(in):: pphis(:) ! (klon) géopotentiel du sol |
REAL, intent(in):: pphis(:) ! (klon) géopotentiel du sol |
88 |
|
|
89 |
REAL, intent(in):: u(:, :) ! (klon, llm) |
REAL, intent(in):: u(:, :) ! (klon, llm) |
90 |
! vitesse dans la direction X (de O a E) en m/s |
! vitesse dans la direction X (de O a E) en m / s |
91 |
|
|
92 |
REAL, intent(in):: v(:, :) ! (klon, llm) vitesse Y (de S a N) en m/s |
REAL, intent(in):: v(:, :) ! (klon, llm) vitesse Y (de S a N) en m / s |
93 |
REAL, intent(in):: t(:, :) ! (klon, llm) temperature (K) |
REAL, intent(in):: t(:, :) ! (klon, llm) temperature (K) |
94 |
|
|
95 |
REAL, intent(in):: qx(:, :, :) ! (klon, llm, nqmx) |
REAL, intent(in):: qx(:, :, :) ! (klon, llm, nqmx) |
96 |
! (humidit\'e sp\'ecifique et fractions massiques des autres traceurs) |
! (humidit\'e sp\'ecifique et fractions massiques des autres traceurs) |
97 |
|
|
98 |
REAL, intent(in):: omega(:, :) ! (klon, llm) vitesse verticale en Pa/s |
REAL, intent(in):: omega(:, :) ! (klon, llm) vitesse verticale en Pa / s |
99 |
REAL, intent(out):: d_u(:, :) ! (klon, llm) tendance physique de "u" (m s-2) |
REAL, intent(out):: d_u(:, :) ! (klon, llm) tendance physique de "u" (m s-2) |
100 |
REAL, intent(out):: d_v(:, :) ! (klon, llm) tendance physique de "v" (m s-2) |
REAL, intent(out):: d_v(:, :) ! (klon, llm) tendance physique de "v" (m s-2) |
101 |
REAL, intent(out):: d_t(:, :) ! (klon, llm) tendance physique de "t" (K/s) |
REAL, intent(out):: d_t(:, :) ! (klon, llm) tendance physique de "t" (K / s) |
102 |
|
|
103 |
REAL, intent(out):: d_qx(:, :, :) ! (klon, llm, nqmx) |
REAL, intent(out):: d_qx(:, :, :) ! (klon, llm, nqmx) |
104 |
! tendance physique de "qx" (s-1) |
! tendance physique de "qx" (s-1) |
124 |
REAL, save:: t_ancien(klon, llm), q_ancien(klon, llm) |
REAL, save:: t_ancien(klon, llm), q_ancien(klon, llm) |
125 |
LOGICAL, save:: ancien_ok |
LOGICAL, save:: ancien_ok |
126 |
|
|
127 |
REAL d_t_dyn(klon, llm) ! tendance dynamique pour "t" (K/s) |
REAL d_t_dyn(klon, llm) ! tendance dynamique pour "t" (K / s) |
128 |
REAL d_q_dyn(klon, llm) ! tendance dynamique pour "q" (kg/kg/s) |
REAL d_q_dyn(klon, llm) ! tendance dynamique pour "q" (kg / kg / s) |
129 |
|
|
130 |
real da(klon, llm), phi(klon, llm, llm), mp(klon, llm) |
real da(klon, llm), phi(klon, llm, llm), mp(klon, llm) |
131 |
|
|
140 |
! prw: precipitable water |
! prw: precipitable water |
141 |
real prw(klon) |
real prw(klon) |
142 |
|
|
143 |
! flwp, fiwp = Liquid Water Path & Ice Water Path (kg/m2) |
! flwp, fiwp = Liquid Water Path & Ice Water Path (kg / m2) |
144 |
! flwc, fiwc = Liquid Water Content & Ice Water Content (kg/kg) |
! flwc, fiwc = Liquid Water Content & Ice Water Content (kg / kg) |
145 |
REAL flwp(klon), fiwp(klon) |
REAL flwp(klon), fiwp(klon) |
146 |
REAL flwc(klon, llm), fiwc(klon, llm) |
REAL flwc(klon, llm), fiwc(klon, llm) |
147 |
|
|
204 |
|
|
205 |
REAL fqcalving(klon, nbsrf) |
REAL fqcalving(klon, nbsrf) |
206 |
! flux d'eau "perdue" par la surface et necessaire pour limiter la |
! flux d'eau "perdue" par la surface et necessaire pour limiter la |
207 |
! hauteur de neige, en kg/m2/s |
! hauteur de neige, en kg / m2 / s |
208 |
|
|
209 |
REAL zxffonte(klon), zxfqcalving(klon) |
REAL zxffonte(klon), zxfqcalving(klon) |
210 |
|
|
218 |
REAL frac_nucl(klon, llm) ! idem (nucleation) |
REAL frac_nucl(klon, llm) ! idem (nucleation) |
219 |
|
|
220 |
REAL, save:: rain_fall(klon) |
REAL, save:: rain_fall(klon) |
221 |
! liquid water mass flux (kg/m2/s), positive down |
! liquid water mass flux (kg / m2 / s), positive down |
222 |
|
|
223 |
REAL, save:: snow_fall(klon) |
REAL, save:: snow_fall(klon) |
224 |
! solid water mass flux (kg/m2/s), positive down |
! solid water mass flux (kg / m2 / s), positive down |
225 |
|
|
226 |
REAL rain_tiedtke(klon), snow_tiedtke(klon) |
REAL rain_tiedtke(klon), snow_tiedtke(klon) |
227 |
|
|
242 |
! Conditions aux limites |
! Conditions aux limites |
243 |
|
|
244 |
INTEGER julien |
INTEGER julien |
|
INTEGER, SAVE:: lmt_pas ! number of time steps of "physics" per day |
|
245 |
REAL, save:: pctsrf(klon, nbsrf) ! percentage of surface |
REAL, save:: pctsrf(klon, nbsrf) ! percentage of surface |
|
REAL pctsrf_new(klon, nbsrf) ! pourcentage surfaces issus d'ORCHIDEE |
|
246 |
REAL, save:: albsol(klon) ! albedo du sol total visible |
REAL, save:: albsol(klon) ! albedo du sol total visible |
247 |
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 |
248 |
|
|
281 |
REAL fsollw(klon, nbsrf) ! bilan flux IR pour chaque sous-surface |
REAL fsollw(klon, nbsrf) ! bilan flux IR pour chaque sous-surface |
282 |
REAL fsolsw(klon, nbsrf) ! flux solaire absorb\'e pour chaque sous-surface |
REAL fsolsw(klon, nbsrf) ! flux solaire absorb\'e pour chaque sous-surface |
283 |
|
|
284 |
REAL conv_q(klon, llm) ! convergence de l'humidite (kg/kg/s) |
REAL conv_q(klon, llm) ! convergence de l'humidite (kg / kg / s) |
285 |
REAL conv_t(klon, llm) ! convergence of temperature (K/s) |
REAL conv_t(klon, llm) ! convergence of temperature (K / s) |
286 |
|
|
287 |
REAL cldl(klon), cldm(klon), cldh(klon) ! nuages bas, moyen et haut |
REAL cldl(klon), cldm(klon), cldh(klon) ! nuages bas, moyen et haut |
288 |
REAL cldt(klon), cldq(klon) ! nuage total, eau liquide integree |
REAL cldt(klon), cldq(klon) ! nuage total, eau liquide integree |
400 |
|
|
401 |
! Variables li\'ees au bilan d'\'energie et d'enthalpie : |
! Variables li\'ees au bilan d'\'energie et d'enthalpie : |
402 |
REAL ztsol(klon) |
REAL ztsol(klon) |
|
REAL d_h_vcol, d_qt, d_ec |
|
|
REAL, SAVE:: d_h_vcol_phy |
|
|
REAL zero_v(klon) |
|
|
CHARACTER(LEN = 20) tit |
|
|
INTEGER:: ip_ebil = 0 ! print level for energy conservation diagnostics |
|
|
INTEGER:: if_ebil = 0 ! verbosity for diagnostics of energy conservation |
|
403 |
|
|
404 |
REAL d_t_ec(klon, llm) |
REAL d_t_ec(klon, llm) |
405 |
! tendance due \`a la conversion Ec en énergie thermique |
! tendance due \`a la conversion Ec en énergie thermique |
406 |
|
|
407 |
REAL ZRCPD |
REAL ZRCPD |
413 |
|
|
414 |
! Aerosol effects: |
! Aerosol effects: |
415 |
|
|
416 |
REAL sulfate(klon, llm) ! SO4 aerosol concentration (micro g/m3) |
REAL sulfate(klon, llm) ! SO4 aerosol concentration (micro g / m3) |
417 |
|
|
418 |
REAL, save:: sulfate_pi(klon, llm) |
REAL, save:: sulfate_pi(klon, llm) |
419 |
! SO4 aerosol concentration, in \mu g/m3, pre-industrial value |
! SO4 aerosol concentration, in \mu g / m3, pre-industrial value |
420 |
|
|
421 |
REAL cldtaupi(klon, llm) |
REAL cldtaupi(klon, llm) |
422 |
! cloud optical thickness for pre-industrial aerosols |
! cloud optical thickness for pre-industrial aerosols |
458 |
|
|
459 |
integer, save:: ncid_startphy |
integer, save:: ncid_startphy |
460 |
|
|
461 |
namelist /physiq_nml/ fact_cldcon, facttemps, ok_newmicro, & |
namelist /physiq_nml/ fact_cldcon, facttemps, ok_newmicro, iflag_cldcon, & |
462 |
iflag_cldcon, ratqsbas, ratqshaut, if_ebil, ok_ade, ok_aie, bl95_b0, & |
ratqsbas, ratqshaut, ok_ade, ok_aie, bl95_b0, bl95_b1, & |
463 |
bl95_b1, iflag_thermals, nsplit_thermals |
iflag_thermals, nsplit_thermals |
464 |
|
|
465 |
!---------------------------------------------------------------- |
!---------------------------------------------------------------- |
466 |
|
|
|
IF (if_ebil >= 1) zero_v = 0. |
|
467 |
IF (nqmx < 2) CALL abort_gcm('physiq', & |
IF (nqmx < 2) CALL abort_gcm('physiq', & |
468 |
'eaux vapeur et liquide sont indispensables') |
'eaux vapeur et liquide sont indispensables') |
469 |
|
|
503 |
trmb2 =0. ! inhibition |
trmb2 =0. ! inhibition |
504 |
trmb3 =0. ! Point Omega |
trmb3 =0. ! Point Omega |
505 |
|
|
|
IF (if_ebil >= 1) d_h_vcol_phy = 0. |
|
|
|
|
506 |
iflag_thermals = 0 |
iflag_thermals = 0 |
507 |
nsplit_thermals = 1 |
nsplit_thermals = 1 |
508 |
print *, "Enter namelist 'physiq_nml'." |
print *, "Enter namelist 'physiq_nml'." |
523 |
! ATTENTION : il faudra a terme relire q2 dans l'etat initial |
! ATTENTION : il faudra a terme relire q2 dans l'etat initial |
524 |
q2 = 1e-8 |
q2 = 1e-8 |
525 |
|
|
|
lmt_pas = day_step / iphysiq |
|
|
print *, 'Number of time steps of "physics" per day: ', lmt_pas |
|
|
|
|
526 |
radpas = lmt_pas / nbapp_rad |
radpas = lmt_pas / nbapp_rad |
527 |
print *, "radpas = ", radpas |
print *, "radpas = ", radpas |
528 |
|
|
539 |
rugoro = 0. |
rugoro = 0. |
540 |
ENDIF |
ENDIF |
541 |
|
|
542 |
ecrit_ins = NINT(ecrit_ins/dtphys) |
ecrit_ins = NINT(ecrit_ins / dtphys) |
|
ecrit_hf = NINT(ecrit_hf/dtphys) |
|
|
ecrit_mth = NINT(ecrit_mth/dtphys) |
|
|
ecrit_tra = NINT(86400.*ecrit_tra/dtphys) |
|
|
ecrit_reg = NINT(ecrit_reg/dtphys) |
|
543 |
|
|
544 |
! Initialisation des sorties |
! Initialisation des sorties |
545 |
|
|
547 |
CALL ymds2ju(annee_ref, 1, day_ref, 0., date0) |
CALL ymds2ju(annee_ref, 1, day_ref, 0., date0) |
548 |
! Positionner date0 pour initialisation de ORCHIDEE |
! Positionner date0 pour initialisation de ORCHIDEE |
549 |
print *, 'physiq date0: ', date0 |
print *, 'physiq date0: ', date0 |
550 |
CALL phyredem0(lmt_pas) |
CALL phyredem0 |
551 |
ENDIF test_firstcal |
ENDIF test_firstcal |
552 |
|
|
553 |
! We will modify variables *_seri and we will not touch variables |
! We will modify variables *_seri and we will not touch variables |
561 |
|
|
562 |
ztsol = sum(ftsol * pctsrf, dim = 2) |
ztsol = sum(ftsol * pctsrf, dim = 2) |
563 |
|
|
|
IF (if_ebil >= 1) THEN |
|
|
tit = 'after dynamics' |
|
|
CALL diagetpq(airephy, tit, ip_ebil, 1, 1, dtphys, t_seri, q_seri, & |
|
|
ql_seri, u_seri, v_seri, paprs, d_h_vcol, d_qt, d_ec) |
|
|
! Comme les tendances de la physique sont ajout\'es dans la |
|
|
! dynamique, la variation d'enthalpie par la dynamique devrait |
|
|
! \^etre \'egale \`a la variation de la physique au pas de temps |
|
|
! pr\'ec\'edent. Donc la somme de ces 2 variations devrait \^etre |
|
|
! nulle. |
|
|
call diagphy(airephy, tit, ip_ebil, zero_v, zero_v, zero_v, zero_v, & |
|
|
zero_v, zero_v, zero_v, zero_v, ztsol, d_h_vcol + d_h_vcol_phy, & |
|
|
d_qt, 0.) |
|
|
END IF |
|
|
|
|
564 |
! Diagnostic de la tendance dynamique : |
! Diagnostic de la tendance dynamique : |
565 |
IF (ancien_ok) THEN |
IF (ancien_ok) THEN |
566 |
DO k = 1, llm |
DO k = 1, llm |
609 |
ENDDO |
ENDDO |
610 |
ql_seri = 0. |
ql_seri = 0. |
611 |
|
|
|
IF (if_ebil >= 2) THEN |
|
|
tit = 'after reevap' |
|
|
CALL diagetpq(airephy, tit, ip_ebil, 2, 1, dtphys, t_seri, q_seri, & |
|
|
ql_seri, u_seri, v_seri, paprs, d_h_vcol, d_qt, d_ec) |
|
|
call diagphy(airephy, tit, ip_ebil, zero_v, zero_v, zero_v, zero_v, & |
|
|
zero_v, zero_v, zero_v, zero_v, ztsol, d_h_vcol, d_qt, d_ec) |
|
|
END IF |
|
|
|
|
612 |
frugs = MAX(frugs, 0.000015) |
frugs = MAX(frugs, 0.000015) |
613 |
zxrugs = sum(frugs * pctsrf, dim = 2) |
zxrugs = sum(frugs * pctsrf, dim = 2) |
614 |
|
|
638 |
|
|
639 |
! Couche limite: |
! Couche limite: |
640 |
|
|
641 |
CALL clmain(dtphys, pctsrf, pctsrf_new, t_seri, q_seri, u_seri, v_seri, & |
CALL clmain(dtphys, pctsrf, t_seri, q_seri, u_seri, v_seri, julien, mu0, & |
642 |
julien, mu0, ftsol, cdmmax, cdhmax, ksta, ksta_ter, ok_kzmin, & |
ftsol, cdmmax, cdhmax, ksta, ksta_ter, ok_kzmin, ftsoil, qsol, & |
643 |
ftsoil, qsol, paprs, play, fsnow, fqsurf, fevap, falbe, fluxlat, & |
paprs, play, fsnow, fqsurf, fevap, falbe, fluxlat, rain_fall, & |
644 |
rain_fall, snow_fall, fsolsw, fsollw, fder, rlat, frugs, firstcal, & |
snow_fall, fsolsw, fsollw, fder, rlat, frugs, agesno, rugoro, & |
645 |
agesno, rugoro, d_t_vdf, d_q_vdf, d_u_vdf, d_v_vdf, d_ts, fluxt, & |
d_t_vdf, d_q_vdf, d_u_vdf, d_v_vdf, d_ts, fluxt, fluxq, fluxu, & |
646 |
fluxq, fluxu, fluxv, cdragh, cdragm, q2, dsens, devap, ycoefh, yu1, & |
fluxv, cdragh, cdragm, q2, dsens, devap, ycoefh, yu1, yv1, t2m, q2m, & |
647 |
yv1, t2m, q2m, u10m, v10m, pblh, capCL, oliqCL, cteiCL, pblT, therm, & |
u10m, v10m, pblh, capCL, oliqCL, cteiCL, pblT, therm, trmb1, trmb2, & |
648 |
trmb1, trmb2, trmb3, plcl, fqcalving, ffonte, run_off_lic_0) |
trmb3, plcl, fqcalving, ffonte, run_off_lic_0) |
649 |
|
|
650 |
! Incr\'ementation des flux |
! Incr\'ementation des flux |
651 |
|
|
678 |
ENDDO |
ENDDO |
679 |
ENDDO |
ENDDO |
680 |
|
|
|
IF (if_ebil >= 2) THEN |
|
|
tit = 'after clmain' |
|
|
CALL diagetpq(airephy, tit, ip_ebil, 2, 2, dtphys, t_seri, q_seri, & |
|
|
ql_seri, u_seri, v_seri, paprs, d_h_vcol, d_qt, d_ec) |
|
|
call diagphy(airephy, tit, ip_ebil, zero_v, zero_v, zero_v, zero_v, & |
|
|
sens, evap, zero_v, zero_v, ztsol, d_h_vcol, d_qt, d_ec) |
|
|
END IF |
|
|
|
|
681 |
! Update surface temperature: |
! Update surface temperature: |
682 |
|
|
683 |
DO i = 1, klon |
DO i = 1, klon |
|
zxtsol(i) = 0. |
|
684 |
zxfluxlat(i) = 0. |
zxfluxlat(i) = 0. |
685 |
|
|
686 |
zt2m(i) = 0. |
zt2m(i) = 0. |
704 |
|
|
705 |
call assert(abs(sum(pctsrf, dim = 2) - 1.) <= EPSFRA, 'physiq: pctsrf') |
call assert(abs(sum(pctsrf, dim = 2) - 1.) <= EPSFRA, 'physiq: pctsrf') |
706 |
|
|
707 |
|
ftsol = ftsol + d_ts |
708 |
|
zxtsol = sum(ftsol * pctsrf, dim = 2) |
709 |
DO nsrf = 1, nbsrf |
DO nsrf = 1, nbsrf |
710 |
DO i = 1, klon |
DO i = 1, klon |
711 |
ftsol(i, nsrf) = ftsol(i, nsrf) + d_ts(i, nsrf) |
zxfluxlat(i) = zxfluxlat(i) + fluxlat(i, nsrf) * pctsrf(i, nsrf) |
712 |
zxtsol(i) = zxtsol(i) + ftsol(i, nsrf)*pctsrf(i, nsrf) |
|
713 |
zxfluxlat(i) = zxfluxlat(i) + fluxlat(i, nsrf)*pctsrf(i, nsrf) |
zt2m(i) = zt2m(i) + t2m(i, nsrf) * pctsrf(i, nsrf) |
714 |
|
zq2m(i) = zq2m(i) + q2m(i, nsrf) * pctsrf(i, nsrf) |
715 |
zt2m(i) = zt2m(i) + t2m(i, nsrf)*pctsrf(i, nsrf) |
zu10m(i) = zu10m(i) + u10m(i, nsrf) * pctsrf(i, nsrf) |
716 |
zq2m(i) = zq2m(i) + q2m(i, nsrf)*pctsrf(i, nsrf) |
zv10m(i) = zv10m(i) + v10m(i, nsrf) * pctsrf(i, nsrf) |
717 |
zu10m(i) = zu10m(i) + u10m(i, nsrf)*pctsrf(i, nsrf) |
zxffonte(i) = zxffonte(i) + ffonte(i, nsrf) * pctsrf(i, nsrf) |
|
zv10m(i) = zv10m(i) + v10m(i, nsrf)*pctsrf(i, nsrf) |
|
|
zxffonte(i) = zxffonte(i) + ffonte(i, nsrf)*pctsrf(i, nsrf) |
|
718 |
zxfqcalving(i) = zxfqcalving(i) + & |
zxfqcalving(i) = zxfqcalving(i) + & |
719 |
fqcalving(i, nsrf)*pctsrf(i, nsrf) |
fqcalving(i, nsrf) * pctsrf(i, nsrf) |
720 |
s_pblh(i) = s_pblh(i) + pblh(i, nsrf)*pctsrf(i, nsrf) |
s_pblh(i) = s_pblh(i) + pblh(i, nsrf) * pctsrf(i, nsrf) |
721 |
s_lcl(i) = s_lcl(i) + plcl(i, nsrf)*pctsrf(i, nsrf) |
s_lcl(i) = s_lcl(i) + plcl(i, nsrf) * pctsrf(i, nsrf) |
722 |
s_capCL(i) = s_capCL(i) + capCL(i, nsrf) *pctsrf(i, nsrf) |
s_capCL(i) = s_capCL(i) + capCL(i, nsrf) * pctsrf(i, nsrf) |
723 |
s_oliqCL(i) = s_oliqCL(i) + oliqCL(i, nsrf) *pctsrf(i, nsrf) |
s_oliqCL(i) = s_oliqCL(i) + oliqCL(i, nsrf) * pctsrf(i, nsrf) |
724 |
s_cteiCL(i) = s_cteiCL(i) + cteiCL(i, nsrf) *pctsrf(i, nsrf) |
s_cteiCL(i) = s_cteiCL(i) + cteiCL(i, nsrf) * pctsrf(i, nsrf) |
725 |
s_pblT(i) = s_pblT(i) + pblT(i, nsrf) *pctsrf(i, nsrf) |
s_pblT(i) = s_pblT(i) + pblT(i, nsrf) * pctsrf(i, nsrf) |
726 |
s_therm(i) = s_therm(i) + therm(i, nsrf) *pctsrf(i, nsrf) |
s_therm(i) = s_therm(i) + therm(i, nsrf) * pctsrf(i, nsrf) |
727 |
s_trmb1(i) = s_trmb1(i) + trmb1(i, nsrf) *pctsrf(i, nsrf) |
s_trmb1(i) = s_trmb1(i) + trmb1(i, nsrf) * pctsrf(i, nsrf) |
728 |
s_trmb2(i) = s_trmb2(i) + trmb2(i, nsrf) *pctsrf(i, nsrf) |
s_trmb2(i) = s_trmb2(i) + trmb2(i, nsrf) * pctsrf(i, nsrf) |
729 |
s_trmb3(i) = s_trmb3(i) + trmb3(i, nsrf) *pctsrf(i, nsrf) |
s_trmb3(i) = s_trmb3(i) + trmb3(i, nsrf) * pctsrf(i, nsrf) |
730 |
ENDDO |
ENDDO |
731 |
ENDDO |
ENDDO |
732 |
|
|
818 |
ENDDO |
ENDDO |
819 |
ENDDO |
ENDDO |
820 |
|
|
|
IF (if_ebil >= 2) THEN |
|
|
tit = 'after convect' |
|
|
CALL diagetpq(airephy, tit, ip_ebil, 2, 2, dtphys, t_seri, q_seri, & |
|
|
ql_seri, u_seri, v_seri, paprs, d_h_vcol, d_qt, d_ec) |
|
|
call diagphy(airephy, tit, ip_ebil, zero_v, zero_v, zero_v, zero_v, & |
|
|
zero_v, zero_v, rain_con, snow_con, ztsol, d_h_vcol, d_qt, d_ec) |
|
|
END IF |
|
|
|
|
821 |
IF (check) THEN |
IF (check) THEN |
822 |
za = qcheck(paprs, q_seri, ql_seri) |
za = qcheck(paprs, q_seri, ql_seri) |
823 |
print *, "aprescon = ", za |
print *, "aprescon = ", za |
824 |
zx_t = 0. |
zx_t = 0. |
825 |
za = 0. |
za = 0. |
826 |
DO i = 1, klon |
DO i = 1, klon |
827 |
za = za + airephy(i)/REAL(klon) |
za = za + airephy(i) / REAL(klon) |
828 |
zx_t = zx_t + (rain_con(i)+ & |
zx_t = zx_t + (rain_con(i)+ & |
829 |
snow_con(i))*airephy(i)/REAL(klon) |
snow_con(i)) * airephy(i) / REAL(klon) |
830 |
ENDDO |
ENDDO |
831 |
zx_t = zx_t/za*dtphys |
zx_t = zx_t / za * dtphys |
832 |
print *, "Precip = ", zx_t |
print *, "Precip = ", zx_t |
833 |
ENDIF |
ENDIF |
834 |
|
|
863 |
q_seri, d_u_ajs, d_v_ajs, d_t_ajs, d_q_ajs, fm_therm, entr_therm) |
q_seri, d_u_ajs, d_v_ajs, d_t_ajs, d_q_ajs, fm_therm, entr_therm) |
864 |
endif |
endif |
865 |
|
|
|
IF (if_ebil >= 2) THEN |
|
|
tit = 'after dry_adjust' |
|
|
CALL diagetpq(airephy, tit, ip_ebil, 2, 2, dtphys, t_seri, q_seri, & |
|
|
ql_seri, u_seri, v_seri, paprs, d_h_vcol, d_qt, d_ec) |
|
|
END IF |
|
|
|
|
866 |
! Caclul des ratqs |
! Caclul des ratqs |
867 |
|
|
868 |
! ratqs convectifs \`a l'ancienne en fonction de (q(z = 0) - q) / q |
! ratqs convectifs \`a l'ancienne en fonction de (q(z = 0) - q) / q |
923 |
zx_t = 0. |
zx_t = 0. |
924 |
za = 0. |
za = 0. |
925 |
DO i = 1, klon |
DO i = 1, klon |
926 |
za = za + airephy(i)/REAL(klon) |
za = za + airephy(i) / REAL(klon) |
927 |
zx_t = zx_t + (rain_lsc(i) & |
zx_t = zx_t + (rain_lsc(i) & |
928 |
+ snow_lsc(i))*airephy(i)/REAL(klon) |
+ snow_lsc(i)) * airephy(i) / REAL(klon) |
929 |
ENDDO |
ENDDO |
930 |
zx_t = zx_t/za*dtphys |
zx_t = zx_t / za * dtphys |
931 |
print *, "Precip = ", zx_t |
print *, "Precip = ", zx_t |
932 |
ENDIF |
ENDIF |
933 |
|
|
|
IF (if_ebil >= 2) THEN |
|
|
tit = 'after fisrt' |
|
|
CALL diagetpq(airephy, tit, ip_ebil, 2, 2, dtphys, t_seri, q_seri, & |
|
|
ql_seri, u_seri, v_seri, paprs, d_h_vcol, d_qt, d_ec) |
|
|
call diagphy(airephy, tit, ip_ebil, zero_v, zero_v, zero_v, zero_v, & |
|
|
zero_v, zero_v, rain_lsc, snow_lsc, ztsol, d_h_vcol, d_qt, d_ec) |
|
|
END IF |
|
|
|
|
934 |
! PRESCRIPTION DES NUAGES POUR LE RAYONNEMENT |
! PRESCRIPTION DES NUAGES POUR LE RAYONNEMENT |
935 |
|
|
936 |
! 1. NUAGES CONVECTIFS |
! 1. NUAGES CONVECTIFS |
945 |
do k = 1, llm |
do k = 1, llm |
946 |
do i = 1, klon |
do i = 1, klon |
947 |
if (d_q_con(i, k) < 0.) then |
if (d_q_con(i, k) < 0.) then |
948 |
rain_tiedtke(i) = rain_tiedtke(i) - d_q_con(i, k)/dtphys & |
rain_tiedtke(i) = rain_tiedtke(i) - d_q_con(i, k) / dtphys & |
949 |
*zmasse(i, k) |
* zmasse(i, k) |
950 |
endif |
endif |
951 |
enddo |
enddo |
952 |
enddo |
enddo |
981 |
|
|
982 |
! On prend la somme des fractions nuageuses et des contenus en eau |
! On prend la somme des fractions nuageuses et des contenus en eau |
983 |
cldfra = min(max(cldfra, rnebcon), 1.) |
cldfra = min(max(cldfra, rnebcon), 1.) |
984 |
cldliq = cldliq + rnebcon*clwcon |
cldliq = cldliq + rnebcon * clwcon |
985 |
ENDIF |
ENDIF |
986 |
|
|
987 |
! 2. Nuages stratiformes |
! 2. Nuages stratiformes |
1004 |
snow_fall(i) = snow_con(i) + snow_lsc(i) |
snow_fall(i) = snow_con(i) + snow_lsc(i) |
1005 |
ENDDO |
ENDDO |
1006 |
|
|
|
IF (if_ebil >= 2) CALL diagetpq(airephy, "after diagcld", ip_ebil, 2, 2, & |
|
|
dtphys, t_seri, q_seri, ql_seri, u_seri, v_seri, paprs, d_h_vcol, & |
|
|
d_qt, d_ec) |
|
|
|
|
1007 |
! Humidit\'e relative pour diagnostic : |
! Humidit\'e relative pour diagnostic : |
1008 |
DO k = 1, llm |
DO k = 1, llm |
1009 |
DO i = 1, klon |
DO i = 1, klon |
1010 |
zx_t = t_seri(i, k) |
zx_t = t_seri(i, k) |
1011 |
IF (thermcep) THEN |
IF (thermcep) THEN |
1012 |
zx_qs = r2es * FOEEW(zx_t, rtt >= zx_t)/play(i, k) |
zx_qs = r2es * FOEEW(zx_t, rtt >= zx_t) / play(i, k) |
1013 |
zx_qs = MIN(0.5, zx_qs) |
zx_qs = MIN(0.5, zx_qs) |
1014 |
zcor = 1./(1. - retv*zx_qs) |
zcor = 1. / (1. - retv * zx_qs) |
1015 |
zx_qs = zx_qs*zcor |
zx_qs = zx_qs * zcor |
1016 |
ELSE |
ELSE |
1017 |
IF (zx_t < t_coup) THEN |
IF (zx_t < t_coup) THEN |
1018 |
zx_qs = qsats(zx_t)/play(i, k) |
zx_qs = qsats(zx_t) / play(i, k) |
1019 |
ELSE |
ELSE |
1020 |
zx_qs = qsatl(zx_t)/play(i, k) |
zx_qs = qsatl(zx_t) / play(i, k) |
1021 |
ENDIF |
ENDIF |
1022 |
ENDIF |
ENDIF |
1023 |
zx_rh(i, k) = q_seri(i, k)/zx_qs |
zx_rh(i, k) = q_seri(i, k) / zx_qs |
1024 |
zqsat(i, k) = zx_qs |
zqsat(i, k) = zx_qs |
1025 |
ENDDO |
ENDDO |
1026 |
ENDDO |
ENDDO |
1060 |
|
|
1061 |
DO k = 1, llm |
DO k = 1, llm |
1062 |
DO i = 1, klon |
DO i = 1, klon |
1063 |
t_seri(i, k) = t_seri(i, k) + (heat(i, k) - cool(i, k)) * dtphys/86400. |
t_seri(i, k) = t_seri(i, k) + (heat(i, k) - cool(i, k)) * dtphys & |
1064 |
|
/ 86400. |
1065 |
ENDDO |
ENDDO |
1066 |
ENDDO |
ENDDO |
1067 |
|
|
|
IF (if_ebil >= 2) THEN |
|
|
tit = 'after rad' |
|
|
CALL diagetpq(airephy, tit, ip_ebil, 2, 2, dtphys, t_seri, q_seri, & |
|
|
ql_seri, u_seri, v_seri, paprs, d_h_vcol, d_qt, d_ec) |
|
|
call diagphy(airephy, tit, ip_ebil, topsw, toplw, solsw, sollw, & |
|
|
zero_v, zero_v, zero_v, zero_v, ztsol, d_h_vcol, d_qt, d_ec) |
|
|
END IF |
|
|
|
|
1068 |
! Calculer l'hydrologie de la surface |
! Calculer l'hydrologie de la surface |
1069 |
DO i = 1, klon |
DO i = 1, klon |
1070 |
zxqsurf(i) = 0. |
zxqsurf(i) = 0. |
1072 |
ENDDO |
ENDDO |
1073 |
DO nsrf = 1, nbsrf |
DO nsrf = 1, nbsrf |
1074 |
DO i = 1, klon |
DO i = 1, klon |
1075 |
zxqsurf(i) = zxqsurf(i) + fqsurf(i, nsrf)*pctsrf(i, nsrf) |
zxqsurf(i) = zxqsurf(i) + fqsurf(i, nsrf) * pctsrf(i, nsrf) |
1076 |
zxsnow(i) = zxsnow(i) + fsnow(i, nsrf)*pctsrf(i, nsrf) |
zxsnow(i) = zxsnow(i) + fsnow(i, nsrf) * pctsrf(i, nsrf) |
1077 |
ENDDO |
ENDDO |
1078 |
ENDDO |
ENDDO |
1079 |
|
|
1153 |
CALL aaam_bud(rg, romega, rlat, rlon, pphis, zustrdr, zustrli, zustrph, & |
CALL aaam_bud(rg, romega, rlat, rlon, pphis, zustrdr, zustrli, zustrph, & |
1154 |
zvstrdr, zvstrli, zvstrph, paprs, u, v, aam, torsfc) |
zvstrdr, zvstrli, zvstrph, paprs, u, v, aam, torsfc) |
1155 |
|
|
|
IF (if_ebil >= 2) CALL diagetpq(airephy, 'after orography', ip_ebil, 2, & |
|
|
2, dtphys, t_seri, q_seri, ql_seri, u_seri, v_seri, paprs, d_h_vcol, & |
|
|
d_qt, d_ec) |
|
|
|
|
1156 |
! Calcul des tendances traceurs |
! Calcul des tendances traceurs |
1157 |
call phytrac(lmt_pas, julien, time, firstcal, lafin, dtphys, t, paprs, & |
call phytrac(julien, time, firstcal, lafin, dtphys, t, paprs, play, mfu, & |
1158 |
play, mfu, mfd, pde_u, pen_d, ycoefh, fm_therm, entr_therm, yu1, & |
mfd, pde_u, pen_d, ycoefh, fm_therm, entr_therm, yu1, yv1, ftsol, & |
1159 |
yv1, ftsol, pctsrf, frac_impa, frac_nucl, da, phi, mp, upwd, dnwd, & |
pctsrf, frac_impa, frac_nucl, da, phi, mp, upwd, dnwd, tr_seri, & |
1160 |
tr_seri, zmasse, ncid_startphy) |
zmasse, ncid_startphy) |
1161 |
|
|
1162 |
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, & |
1163 |
pde_d, fm_therm, entr_therm, ycoefh, yu1, yv1, ftsol, pctsrf, & |
pde_d, fm_therm, entr_therm, ycoefh, yu1, yv1, ftsol, pctsrf, & |
1184 |
END DO |
END DO |
1185 |
END DO |
END DO |
1186 |
|
|
|
IF (if_ebil >= 1) THEN |
|
|
tit = 'after physic' |
|
|
CALL diagetpq(airephy, tit, ip_ebil, 1, 1, dtphys, t_seri, q_seri, & |
|
|
ql_seri, u_seri, v_seri, paprs, d_h_vcol, d_qt, d_ec) |
|
|
! Comme les tendances de la physique sont ajoute dans la dynamique, |
|
|
! on devrait avoir que la variation d'entalpie par la dynamique |
|
|
! est egale a la variation de la physique au pas de temps precedent. |
|
|
! Donc la somme de ces 2 variations devrait etre nulle. |
|
|
call diagphy(airephy, tit, ip_ebil, topsw, toplw, solsw, sollw, sens, & |
|
|
evap, rain_fall, snow_fall, ztsol, d_h_vcol, d_qt, d_ec) |
|
|
d_h_vcol_phy = d_h_vcol |
|
|
END IF |
|
|
|
|
1187 |
! SORTIES |
! SORTIES |
1188 |
|
|
1189 |
! prw = eau precipitable |
! prw = eau precipitable |
1190 |
DO i = 1, klon |
DO i = 1, klon |
1191 |
prw(i) = 0. |
prw(i) = 0. |
1192 |
DO k = 1, llm |
DO k = 1, llm |
1193 |
prw(i) = prw(i) + q_seri(i, k)*zmasse(i, k) |
prw(i) = prw(i) + q_seri(i, k) * zmasse(i, k) |
1194 |
ENDDO |
ENDDO |
1195 |
ENDDO |
ENDDO |
1196 |
|
|
1250 |
CALL histwrite_phy("dtsvdfi", d_ts(:, is_sic)) |
CALL histwrite_phy("dtsvdfi", d_ts(:, is_sic)) |
1251 |
|
|
1252 |
DO nsrf = 1, nbsrf |
DO nsrf = 1, nbsrf |
1253 |
CALL histwrite_phy("pourc_"//clnsurf(nsrf), pctsrf(:, nsrf)*100.) |
CALL histwrite_phy("pourc_"//clnsurf(nsrf), pctsrf(:, nsrf) * 100.) |
1254 |
CALL histwrite_phy("fract_"//clnsurf(nsrf), pctsrf(:, nsrf)) |
CALL histwrite_phy("fract_"//clnsurf(nsrf), pctsrf(:, nsrf)) |
1255 |
CALL histwrite_phy("sens_"//clnsurf(nsrf), fluxt(:, 1, nsrf)) |
CALL histwrite_phy("sens_"//clnsurf(nsrf), fluxt(:, 1, nsrf)) |
1256 |
CALL histwrite_phy("lat_"//clnsurf(nsrf), fluxlat(:, nsrf)) |
CALL histwrite_phy("lat_"//clnsurf(nsrf), fluxlat(:, nsrf)) |