/[lmdze]/trunk/phylmd/phytrac.f
ViewVC logotype

Diff of /trunk/phylmd/phytrac.f

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 266 by guez, Thu Apr 19 17:54:55 2018 UTC revision 298 by guez, Thu Jul 26 16:45:51 2018 UTC
# Line 7  module phytrac_m Line 7  module phytrac_m
7    
8  contains  contains
9    
10    SUBROUTINE phytrac(julien, gmtime, firstcal, lafin, pdtphys, t_seri, paprs, &    SUBROUTINE phytrac(julien, gmtime, firstcal, lafin, t_seri, paprs, pplay, &
11         pplay, pmfu, pmfd, pde_u, pen_d, coefh, cdragh, fm_therm, entr_therm, &         pmfu, pmfd, pde_u, pen_d, coefh, cdragh, fm_therm, entr_therm, yu1, &
12         yu1, yv1, ftsol, pctsrf, frac_impa, frac_nucl, da, phi, mp, upwd, dnwd, &         yv1, ftsol, pctsrf, frac_impa, frac_nucl, da, phi, mp, upwd, dnwd, &
13         tr_seri, zmasse, ncid_startphy)         tr_seri, zmasse, ncid_startphy)
14    
15      ! From phylmd/phytrac.F, version 1.15, 2006/02/21 08:08:30 (SVN      ! From phylmd/phytrac.F, version 1.15, 2006/02/21 08:08:30 (SVN
# Line 32  contains Line 32  contains
32      use clesphys2, only: conv_emanuel      use clesphys2, only: conv_emanuel
33      use cltrac_m, only: cltrac      use cltrac_m, only: cltrac
34      use cltracrn_m, only: cltracrn      use cltracrn_m, only: cltracrn
35        use comconst, only: dtphys
36      USE conf_gcm_m, ONLY: lmt_pas      USE conf_gcm_m, ONLY: lmt_pas
37      use ctherm, only: iflag_thermals      use ctherm, only: iflag_thermals
38      use cvltr_m, only: cvltr      use cvltr_m, only: cvltr
# Line 59  contains Line 60  contains
60      real, intent(in):: gmtime ! heure de la journ\'ee en fraction de jour      real, intent(in):: gmtime ! heure de la journ\'ee en fraction de jour
61      logical, intent(in):: firstcal ! first call to "calfis"      logical, intent(in):: firstcal ! first call to "calfis"
62      logical, intent(in):: lafin ! fin de la physique      logical, intent(in):: lafin ! fin de la physique
     real, intent(in):: pdtphys ! pas d'integration pour la physique (s)  
63      real, intent(in):: t_seri(klon, llm) ! temperature, in K      real, intent(in):: t_seri(klon, llm) ! temperature, in K
64    
65      real, intent(in):: paprs(klon, llm+1)      real, intent(in):: paprs(klon, llm+1)
# Line 217  contains Line 217  contains
217         ! Calcul de l'effet de la convection         ! Calcul de l'effet de la convection
218         DO it=1, nqmx - 2         DO it=1, nqmx - 2
219            if (conv_emanuel) then            if (conv_emanuel) then
220               call cvltr(pdtphys, da, phi, mp, paprs, tr_seri(:, :, it), upwd, &               call cvltr(dtphys, da, phi, mp, paprs, tr_seri(:, :, it), upwd, &
221                    dnwd, d_tr_cv(:, :, it))                    dnwd, d_tr_cv(:, :, it))
222            else            else
223               CALL nflxtr(pdtphys, pmfu, pmfd, pde_u, pen_d, paprs, &               CALL nflxtr(dtphys, pmfu, pmfd, pde_u, pen_d, paprs, &
224                    tr_seri(:, :, it), d_tr_cv(:, :, it))                    tr_seri(:, :, it), d_tr_cv(:, :, it))
225            endif            endif
226    
# Line 252  contains Line 252  contains
252         DO it=1, nqmx - 2         DO it=1, nqmx - 2
253            do isplit=1, nsplit            do isplit=1, nsplit
254               ! Thermiques               ! Thermiques
255               call dqthermcell(klon, llm, pdtphys/nsplit &               call dqthermcell(klon, llm, dtphys/nsplit &
256                    , fm_therm, entr_therm, zmasse &                    , fm_therm, entr_therm, zmasse &
257                    , tr_seri(1:klon, 1:llm, it), d_tr, ztra_th)                    , tr_seri(1:klon, 1:llm, it), d_tr, ztra_th)
258    
259               do k=1, llm               do k=1, llm
260                  do i=1, klon                  do i=1, klon
261                     d_tr(i, k)=pdtphys*d_tr(i, k)/nsplit                     d_tr(i, k)=dtphys*d_tr(i, k)/nsplit
262                     d_tr_th(i, k, it)=d_tr_th(i, k, it)+d_tr(i, k)                     d_tr_th(i, k, it)=d_tr_th(i, k, it)+d_tr(i, k)
263                     tr_seri(i, k, it)=max(tr_seri(i, k, it)+d_tr(i, k), 0.)                     tr_seri(i, k, it)=max(tr_seri(i, k, it)+d_tr(i, k), 0.)
264                  enddo                  enddo
# Line 279  contains Line 279  contains
279      DO it=1, nqmx - 2      DO it=1, nqmx - 2
280         if (clsol(it)) then         if (clsol(it)) then
281            ! couche limite avec quantite dans le sol calculee            ! couche limite avec quantite dans le sol calculee
282            CALL cltracrn(it, pdtphys, yu1, yv1, coefh, cdragh, t_seri, ftsol, &            CALL cltracrn(it, dtphys, yu1, yv1, coefh, cdragh, t_seri, ftsol, &
283                 pctsrf, tr_seri(:, :, it), trs(:, it), paprs, pplay, delp, &                 pctsrf, tr_seri(:, :, it), trs(:, it), paprs, pplay, delp, &
284                 masktr(1, it), fshtr(1, it), hsoltr(it), tautr(it), &                 masktr(1, it), fshtr(1, it), hsoltr(it), tautr(it), &
285                 vdeptr(it), rlat, d_tr_cl(1, 1, it), d_trs)                 vdeptr(it), rlat, d_tr_cl(1, 1, it), d_trs)
# Line 297  contains Line 297  contains
297               source(i) = 0. ! pas de source, pour l'instant               source(i) = 0. ! pas de source, pour l'instant
298            ENDDO            ENDDO
299    
300            CALL cltrac(pdtphys, coefh, t_seri, tr_seri(:, :, it), source, &            CALL cltrac(dtphys, coefh, t_seri, tr_seri(:, :, it), source, &
301                 paprs, pplay, delp, d_tr_cl(1, 1, it))                 paprs, pplay, delp, d_tr_cl(1, 1, it))
302            DO k = 1, llm            DO k = 1, llm
303               DO i = 1, klon               DO i = 1, klon
# Line 311  contains Line 311  contains
311    
312      ! MAF il faudrait faire une modification pour passer dans radiornpb      ! MAF il faudrait faire une modification pour passer dans radiornpb
313      ! si radio=true      ! si radio=true
314      d_tr_dec = radiornpb(tr_seri, pdtphys, tautr)      d_tr_dec = radiornpb(tr_seri, dtphys, tautr)
315      DO it = 1, nqmx - 2      DO it = 1, nqmx - 2
316         if (radio(it)) then         if (radio(it)) then
317            tr_seri(:, :, it) = tr_seri(:, :, it) + d_tr_dec(:, :, it)            tr_seri(:, :, it) = tr_seri(:, :, it) + d_tr_dec(:, :, it)
# Line 326  contains Line 326  contains
326            ! Once per day, update the coefficients for ozone chemistry:            ! Once per day, update the coefficients for ozone chemistry:
327            call regr_pr_comb_coefoz(julien, paprs, pplay)            call regr_pr_comb_coefoz(julien, paprs, pplay)
328         end if         end if
329         call o3_chem(julien, gmtime, t_seri, zmasse, pdtphys, tr_seri(:, :, 3))         call o3_chem(julien, gmtime, t_seri, zmasse, dtphys, tr_seri(:, :, 3))
330      end if      end if
331    
332      ! Calcul de l'effet de la precipitation      ! Calcul de l'effet de la precipitation
# Line 370  contains Line 370  contains
370            DO i = 1, klon            DO i = 1, klon
371               flestottr(i, k, it) = flestottr(i, k, it) &               flestottr(i, k, it) = flestottr(i, k, it) &
372                    - (d_tr_lessi_nucl(i, k, it) + d_tr_lessi_impa(i, k, it)) &                    - (d_tr_lessi_nucl(i, k, it) + d_tr_lessi_impa(i, k, it)) &
373                    * (paprs(i, k)-paprs(i, k+1)) / (RG * pdtphys)                    * (paprs(i, k)-paprs(i, k+1)) / (RG * dtphys)
374            ENDDO            ENDDO
375         ENDDO         ENDDO
376      ENDDO      ENDDO

Legend:
Removed from v.266  
changed lines
  Added in v.298

  ViewVC Help
Powered by ViewVC 1.1.21