8 |
contains |
contains |
9 |
|
|
10 |
SUBROUTINE phytrac(itap, lmt_pas, julien, gmtime, firstcal, lafin, pdtphys, & |
SUBROUTINE phytrac(itap, lmt_pas, julien, gmtime, firstcal, lafin, pdtphys, & |
11 |
u, t_seri, paprs, pplay, pmfu, pmfd, pde_u, pen_d, coefh, fm_therm, & |
t_seri, paprs, pplay, pmfu, pmfd, pde_u, pen_d, coefh, fm_therm, & |
12 |
entr_therm, yu1, yv1, ftsol, pctsrf, frac_impa, frac_nucl, pphis, & |
entr_therm, yu1, yv1, ftsol, pctsrf, frac_impa, frac_nucl, pphis, da, & |
13 |
albsol, rh, cldfra, rneb, diafra, cldliq, pmflxr, pmflxs, prfl, psfl, & |
phi, mp, upwd, dnwd, tr_seri, zmasse) |
|
da, phi, mp, upwd, dnwd, tr_seri, zmasse) |
|
14 |
|
|
15 |
! From phylmd/phytrac.F, version 1.15 2006/02/21 08:08:30 (SVN revision 679) |
! From phylmd/phytrac.F, version 1.15 2006/02/21 08:08:30 (SVN revision 679) |
16 |
|
|
29 |
use abort_gcm_m, only: abort_gcm |
use abort_gcm_m, only: abort_gcm |
30 |
use clesphys, only: ecrit_tra |
use clesphys, only: ecrit_tra |
31 |
use clesphys2, only: iflag_con |
use clesphys2, only: iflag_con |
32 |
|
use cltrac_m, only: cltrac |
33 |
use cltracrn_m, only: cltracrn |
use cltracrn_m, only: cltracrn |
34 |
use ctherm, only: iflag_thermals |
use ctherm, only: iflag_thermals |
35 |
|
use cvltr_m, only: cvltr |
36 |
use dimens_m, only: llm, nqmx |
use dimens_m, only: llm, nqmx |
37 |
use dimphy, only: klon |
use dimphy, only: klon |
38 |
use indicesol, only: nbsrf |
use indicesol, only: nbsrf |
55 |
logical, intent(in):: firstcal ! first call to "calfis" |
logical, intent(in):: firstcal ! first call to "calfis" |
56 |
logical, intent(in):: lafin ! fin de la physique |
logical, intent(in):: lafin ! fin de la physique |
57 |
real, intent(in):: pdtphys ! pas d'integration pour la physique (s) |
real, intent(in):: pdtphys ! pas d'integration pour la physique (s) |
|
real, intent(in):: u(klon, llm) |
|
58 |
real, intent(in):: t_seri(klon, llm) ! temperature, in K |
real, intent(in):: t_seri(klon, llm) ! temperature, in K |
59 |
|
|
60 |
real, intent(in):: paprs(klon, llm+1) |
real, intent(in):: paprs(klon, llm+1) |
82 |
REAL yv1(klon) ! vents au premier niveau |
REAL yv1(klon) ! vents au premier niveau |
83 |
|
|
84 |
! Arguments n\'ecessaires pour les sources et puits de traceur : |
! Arguments n\'ecessaires pour les sources et puits de traceur : |
85 |
real ftsol(klon, nbsrf) ! Temperature du sol (surf)(Kelvin) |
real, intent(in):: ftsol(klon, nbsrf) ! Temperature du sol (surf)(Kelvin) |
86 |
real pctsrf(klon, nbsrf) ! Pourcentage de sol f(nature du sol) |
real pctsrf(klon, nbsrf) ! Pourcentage de sol f(nature du sol) |
87 |
|
|
88 |
! Lessivage pour le on-line |
! Lessivage pour le on-line |
90 |
REAL frac_nucl(klon, llm) ! fraction d'aerosols nuclees |
REAL frac_nucl(klon, llm) ! fraction d'aerosols nuclees |
91 |
|
|
92 |
real, intent(in):: pphis(klon) |
real, intent(in):: pphis(klon) |
|
real albsol(klon) ! albedo surface |
|
|
real rh(klon, llm) ! humidite relative |
|
|
real cldfra(klon, llm) ! fraction nuageuse (tous les nuages) |
|
|
real rneb(klon, llm) ! fraction nuageuse (grande echelle) |
|
|
|
|
|
real diafra(klon, llm) |
|
|
! (fraction nuageuse (convection ou stratus artificiels)) |
|
|
|
|
|
real cldliq(klon, llm) ! eau liquide nuageuse |
|
|
REAL pmflxr(klon, llm+1), pmflxs(klon, llm+1) !--lessivage convection |
|
|
REAL prfl(klon, llm+1), psfl(klon, llm+1) !--lessivage large-scale |
|
93 |
|
|
94 |
! Kerry Emanuel |
! Kerry Emanuel |
95 |
real, intent(in):: da(klon, llm), phi(klon, llm, llm), mp(klon, llm) |
real, intent(in):: da(klon, llm), phi(klon, llm, llm), mp(klon, llm) |
236 |
tr_seri(:, :, it), d_tr_cv(:, :, it)) |
tr_seri(:, :, it), d_tr_cv(:, :, it)) |
237 |
else if (iflag_con == 3) then |
else if (iflag_con == 3) then |
238 |
! Emanuel |
! Emanuel |
239 |
call cvltr(pdtphys, da, phi, mp, paprs, tr_seri(1, 1, it), upwd, & |
call cvltr(pdtphys, da, phi, mp, paprs, tr_seri(:, :, it), upwd, & |
240 |
dnwd, d_tr_cv(1, 1, it)) |
dnwd, d_tr_cv(:, :, it)) |
241 |
endif |
endif |
242 |
|
|
243 |
DO k = 1, llm |
DO k = 1, llm |
321 |
source(i) = 0.0 ! pas de source, pour l'instant |
source(i) = 0.0 ! pas de source, pour l'instant |
322 |
ENDDO |
ENDDO |
323 |
|
|
324 |
CALL cltrac(pdtphys, coefh, t_seri, & |
CALL cltrac(pdtphys, coefh, t_seri, tr_seri(:, :, it), source, & |
325 |
tr_seri(1, 1, it), source, & |
paprs, pplay, delp, d_tr_cl(1, 1, it)) |
|
paprs, pplay, delp, & |
|
|
d_tr_cl(1, 1, it)) |
|
326 |
DO k = 1, llm |
DO k = 1, llm |
327 |
DO i = 1, klon |
DO i = 1, klon |
328 |
tr_seri(i, k, it) = tr_seri(i, k, it) + d_tr_cl(i, k, it) |
tr_seri(i, k, it) = tr_seri(i, k, it) + d_tr_cl(i, k, it) |
426 |
use histsync_m, only: histsync |
use histsync_m, only: histsync |
427 |
use histwrite_m, only: histwrite |
use histwrite_m, only: histwrite |
428 |
use temps, only: itau_phy |
use temps, only: itau_phy |
429 |
use iniadvtrac_m, only: tnom |
use iniadvtrac_m, only: tname |
430 |
use comgeomphy, only: airephy |
use comgeomphy, only: airephy |
431 |
use dimphy, only: klon |
use dimphy, only: klon |
432 |
use grid_change, only: gr_phy_write_2d |
use grid_change, only: gr_phy_write_2d |
450 |
CALL histwrite(nid_tra, "zmasse", itau_w, gr_phy_write_3d(zmasse)) |
CALL histwrite(nid_tra, "zmasse", itau_w, gr_phy_write_3d(zmasse)) |
451 |
|
|
452 |
DO it=1, nqmx - 2 |
DO it=1, nqmx - 2 |
453 |
CALL histwrite(nid_tra, tnom(it+2), itau_w, & |
CALL histwrite(nid_tra, tname(it+2), itau_w, & |
454 |
gr_phy_write_3d(tr_seri(:, :, it))) |
gr_phy_write_3d(tr_seri(:, :, it))) |
455 |
if (lessivage) THEN |
if (lessivage) THEN |
456 |
CALL histwrite(nid_tra, "fl"//tnom(it+2), itau_w, & |
CALL histwrite(nid_tra, "fl"//tname(it+2), itau_w, & |
457 |
gr_phy_write_3d(flestottr(:, :, it))) |
gr_phy_write_3d(flestottr(:, :, it))) |
458 |
endif |
endif |
459 |
CALL histwrite(nid_tra, "d_tr_th_"//tnom(it+2), itau_w, & |
CALL histwrite(nid_tra, "d_tr_th_"//tname(it+2), itau_w, & |
460 |
gr_phy_write_3d(d_tr_th(:, :, it))) |
gr_phy_write_3d(d_tr_th(:, :, it))) |
461 |
CALL histwrite(nid_tra, "d_tr_cv_"//tnom(it+2), itau_w, & |
CALL histwrite(nid_tra, "d_tr_cv_"//tname(it+2), itau_w, & |
462 |
gr_phy_write_3d(d_tr_cv(:, :, it))) |
gr_phy_write_3d(d_tr_cv(:, :, it))) |
463 |
CALL histwrite(nid_tra, "d_tr_cl_"//tnom(it+2), itau_w, & |
CALL histwrite(nid_tra, "d_tr_cl_"//tname(it+2), itau_w, & |
464 |
gr_phy_write_3d(d_tr_cl(:, :, it))) |
gr_phy_write_3d(d_tr_cl(:, :, it))) |
465 |
ENDDO |
ENDDO |
466 |
|
|