--- trunk/phylmd/phytrac.f 2014/05/13 17:23:16 98 +++ trunk/Sources/phylmd/phytrac.f 2015/07/16 17:39:10 156 @@ -8,10 +8,9 @@ contains SUBROUTINE phytrac(itap, lmt_pas, julien, gmtime, firstcal, lafin, pdtphys, & - u, t_seri, paprs, pplay, pmfu, pmfd, pde_u, pen_d, coefh, fm_therm, & - entr_therm, yu1, yv1, ftsol, pctsrf, frac_impa, frac_nucl, pphis, & - albsol, rh, cldfra, rneb, diafra, cldliq, pmflxr, pmflxs, prfl, psfl, & - da, phi, mp, upwd, dnwd, tr_seri, zmasse) + t_seri, paprs, pplay, pmfu, pmfd, pde_u, pen_d, coefh, fm_therm, & + entr_therm, yu1, yv1, ftsol, pctsrf, frac_impa, frac_nucl, pphis, da, & + phi, mp, upwd, dnwd, tr_seri, zmasse) ! From phylmd/phytrac.F, version 1.15 2006/02/21 08:08:30 (SVN revision 679) @@ -30,8 +29,10 @@ use abort_gcm_m, only: abort_gcm use clesphys, only: ecrit_tra use clesphys2, only: iflag_con + use cltrac_m, only: cltrac use cltracrn_m, only: cltracrn use ctherm, only: iflag_thermals + use cvltr_m, only: cvltr use dimens_m, only: llm, nqmx use dimphy, only: klon use indicesol, only: nbsrf @@ -54,7 +55,6 @@ logical, intent(in):: firstcal ! first call to "calfis" logical, intent(in):: lafin ! fin de la physique real, intent(in):: pdtphys ! pas d'integration pour la physique (s) - real, intent(in):: u(klon, llm) real, intent(in):: t_seri(klon, llm) ! temperature, in K real, intent(in):: paprs(klon, llm+1) @@ -82,7 +82,7 @@ REAL yv1(klon) ! vents au premier niveau ! Arguments n\'ecessaires pour les sources et puits de traceur : - real ftsol(klon, nbsrf) ! Temperature du sol (surf)(Kelvin) + real, intent(in):: ftsol(klon, nbsrf) ! Temperature du sol (surf)(Kelvin) real pctsrf(klon, nbsrf) ! Pourcentage de sol f(nature du sol) ! Lessivage pour le on-line @@ -90,20 +90,9 @@ REAL frac_nucl(klon, llm) ! fraction d'aerosols nuclees 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 ! Kerry Emanuel - real da(klon, llm), phi(klon, llm, llm), mp(klon, llm) + real, intent(in):: da(klon, llm), phi(klon, llm, llm), mp(klon, llm) REAL, intent(in):: upwd(klon, llm) ! saturated updraft mass flux REAL, intent(in):: dnwd(klon, llm) ! saturated downdraft mass flux @@ -127,7 +116,7 @@ ! ! Pour la source de radon et son reservoir de sol - REAL, save:: trs(klon, nqmx - 2) ! Concentration de radon dans le sol + REAL, save:: trs(klon, nqmx - 2) ! Concentration de traceur dans le sol REAL masktr(klon, nqmx - 2) ! Masque reservoir de sol traceur ! Masque de l'echange avec la surface @@ -166,7 +155,10 @@ REAL d_tr(klon, llm), d_trs(klon) ! tendances de traceurs REAL d_tr_cl(klon, llm, nqmx - 2) ! tendance de traceurs couche limite - REAL d_tr_cv(klon, llm, nqmx - 2) ! tendance de traceurs conv pour chq traceur + + REAL d_tr_cv(klon, llm, nqmx - 2) + ! tendance de traceurs conv pour chq traceur + REAL d_tr_th(klon, llm, nqmx - 2) ! la tendance des thermiques REAL d_tr_dec(klon, llm, 2) ! la tendance de la decroissance ! ! radioactive du rn - > pb @@ -247,8 +239,8 @@ tr_seri(:, :, it), d_tr_cv(:, :, it)) else if (iflag_con == 3) then ! Emanuel - call cvltr(pdtphys, da, phi, mp, paprs, tr_seri(1, 1, it), upwd, & - dnwd, d_tr_cv(1, 1, it)) + call cvltr(pdtphys, da, phi, mp, paprs, tr_seri(:, :, it), upwd, & + dnwd, d_tr_cv(:, :, it)) endif DO k = 1, llm @@ -307,35 +299,26 @@ DO it=1, nqmx - 2 if (clsol(it)) then ! couche limite avec quantite dans le sol calculee - CALL cltracrn(it, pdtphys, yu1, yv1, & - coefh, t_seri, ftsol, pctsrf, & - tr_seri(:, :, it), trs(1, it), & - paprs, pplay, delp, & - masktr(1, it), fshtr(1, it), hsoltr(it), & - tautr(it), vdeptr(it), & - rlat, & - d_tr_cl(1, 1, it), d_trs) + CALL cltracrn(it, pdtphys, yu1, yv1, coefh, t_seri, ftsol, & + pctsrf, tr_seri(:, :, it), trs(:, it), paprs, pplay, delp, & + masktr(1, it), fshtr(1, it), hsoltr(it), tautr(it), & + vdeptr(it), rlat, d_tr_cl(1, 1, it), d_trs) DO k = 1, llm DO i = 1, klon tr_seri(i, k, it) = tr_seri(i, k, it) + d_tr_cl(i, k, it) ENDDO ENDDO - ! Traceur ds sol - - DO i = 1, klon - trs(i, it) = trs(i, it) + d_trs(i) - END DO - else ! couche limite avec flux prescrit + trs(:, it) = trs(:, it) + d_trs + else + ! couche limite avec flux prescrit !MAF provisoire source / traceur a creer DO i=1, klon - source(i) = 0.0 ! pas de source, pour l'instant + source(i) = 0. ! pas de source, pour l'instant ENDDO - CALL cltrac(pdtphys, coefh, t_seri, & - tr_seri(1, 1, it), source, & - paprs, pplay, delp, & - d_tr_cl(1, 1, it)) + CALL cltrac(pdtphys, coefh, t_seri, tr_seri(:, :, it), source, & + paprs, pplay, delp, d_tr_cl(1, 1, it)) DO k = 1, llm DO i = 1, klon tr_seri(i, k, it) = tr_seri(i, k, it) + d_tr_cl(i, k, it) @@ -439,7 +422,7 @@ use histsync_m, only: histsync use histwrite_m, only: histwrite use temps, only: itau_phy - use iniadvtrac_m, only: tnom + use iniadvtrac_m, only: tname use comgeomphy, only: airephy use dimphy, only: klon use grid_change, only: gr_phy_write_2d @@ -463,17 +446,17 @@ CALL histwrite(nid_tra, "zmasse", itau_w, gr_phy_write_3d(zmasse)) DO it=1, nqmx - 2 - CALL histwrite(nid_tra, tnom(it+2), itau_w, & + CALL histwrite(nid_tra, tname(it+2), itau_w, & gr_phy_write_3d(tr_seri(:, :, it))) if (lessivage) THEN - CALL histwrite(nid_tra, "fl"//tnom(it+2), itau_w, & + CALL histwrite(nid_tra, "fl"//tname(it+2), itau_w, & gr_phy_write_3d(flestottr(:, :, it))) endif - CALL histwrite(nid_tra, "d_tr_th_"//tnom(it+2), itau_w, & + CALL histwrite(nid_tra, "d_tr_th_"//tname(it+2), itau_w, & gr_phy_write_3d(d_tr_th(:, :, it))) - CALL histwrite(nid_tra, "d_tr_cv_"//tnom(it+2), itau_w, & + CALL histwrite(nid_tra, "d_tr_cv_"//tname(it+2), itau_w, & gr_phy_write_3d(d_tr_cv(:, :, it))) - CALL histwrite(nid_tra, "d_tr_cl_"//tnom(it+2), itau_w, & + CALL histwrite(nid_tra, "d_tr_cl_"//tname(it+2), itau_w, & gr_phy_write_3d(d_tr_cl(:, :, it))) ENDDO