/[lmdze]/trunk/Sources/phylmd/phystokenc.f
ViewVC logotype

Diff of /trunk/Sources/phylmd/phystokenc.f

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

revision 178 by guez, Fri Mar 11 18:47:26 2016 UTC revision 191 by guez, Mon May 9 19:56:28 2016 UTC
# Line 4  module phystokenc_m Line 4  module phystokenc_m
4    
5  contains  contains
6    
7    SUBROUTINE phystokenc(pdtphys, rlon, rlat, pt, pmfu, pmfd, pen_u, pde_u, &    SUBROUTINE phystokenc(pdtphys, pt, pmfu, pmfd, pen_u, pde_u, pen_d, pde_d, &
8         pen_d, pde_d, pfm_therm, pentr_therm, pcoefh, yu1, yv1, ftsol, pctsrf, &         pfm_therm, pentr_therm, pcoefh, yu1, yv1, ftsol, pctsrf, frac_impa, &
9         frac_impa, frac_nucl, pphis, paire, dtime, itap)         frac_nucl, pphis, paire, dtime)
10    
11      ! From phylmd/phystokenc.F, version 1.2 2004/06/22 11:45:35      ! From phylmd/phystokenc.F, version 1.2 2004/06/22 11:45:35
12      ! Author: Fr\'ed\'eric Hourdin      ! Author: Fr\'ed\'eric Hourdin
13      ! Objet : \'ecriture des variables pour transport offline      ! Objet : \'ecriture des variables pour transport offline
14    
15        use gr_phy_write_m, only: gr_phy_write
16      USE histwrite_m, ONLY: histwrite      USE histwrite_m, ONLY: histwrite
17      USE histsync_m, ONLY: histsync      USE histsync_m, ONLY: histsync
18      USE dimens_m, ONLY: iim, jjm      USE dimens_m, ONLY: iim, jjm
19      USE indicesol, ONLY: nbsrf      USE indicesol, ONLY: nbsrf
20      use initphysto_m, only: initphysto      use initphysto_m, only: initphysto
21      USE dimphy, ONLY: klev, klon      USE dimphy, ONLY: klev, klon
22        use time_phylmdz, only: itap
23      USE tracstoke, ONLY: istphy      USE tracstoke, ONLY: istphy
24    
25      REAL, INTENT (IN):: pdtphys ! pas d'integration pour la physique (seconde)      REAL, INTENT (IN):: pdtphys ! pas d'integration pour la physique (seconde)
     REAL, INTENT (IN):: rlon(klon), rlat(klon)  
26      REAL, intent(in):: pt(klon, klev)      REAL, intent(in):: pt(klon, klev)
27    
28      ! convection:      ! convection:
# Line 63  contains Line 64  contains
64      REAL, INTENT(IN):: pphis(klon)      REAL, INTENT(IN):: pphis(klon)
65      real paire(klon)      real paire(klon)
66      REAL, INTENT (IN):: dtime      REAL, INTENT (IN):: dtime
     INTEGER, INTENT (IN):: itap  
67    
68      ! Variables local to the procedure:      ! Variables local to the procedure:
69    
70      real t(klon, klev)      real t(klon, klev)
71      INTEGER, SAVE:: physid      INTEGER, SAVE:: physid
     REAL zx_tmp_3d(iim, jjm+1, klev), zx_tmp_2d(iim, jjm+1)  
72    
73      ! Les Thermiques      ! Les Thermiques
74    
# Line 108  contains Line 107  contains
107    
108      ok_sync = .TRUE.      ok_sync = .TRUE.
109    
110      IF (iadvtr==0) THEN      IF (iadvtr==0) CALL initphysto('phystoke', dtime, dtime*istphy, dtime*istphy, physid)
        CALL initphysto('phystoke', rlon, rlat, dtime, dtime*istphy, &  
             dtime*istphy, physid)  
     END IF  
   
     i = itap  
     CALL gr_fi_ecrit(1, klon, iim, jjm+1, pphis, zx_tmp_2d)  
     CALL histwrite(physid, 'phis', i, zx_tmp_2d)  
   
     i = itap  
     CALL gr_fi_ecrit(1, klon, iim, jjm+1, paire, zx_tmp_2d)  
     CALL histwrite(physid, 'aire', i, zx_tmp_2d)  
111    
112        CALL histwrite(physid, 'phis', itap, gr_phy_write(pphis))
113        CALL histwrite(physid, 'aire', itap, gr_phy_write(paire))
114      iadvtr = iadvtr + 1      iadvtr = iadvtr + 1
115    
116      IF (mod(iadvtr, istphy) == 1 .OR. istphy == 1) THEN      IF (mod(iadvtr, istphy) == 1 .OR. istphy == 1) THEN
# Line 221  contains Line 211  contains
211    
212         irec = irec + 1         irec = irec + 1
213    
214         CALL gr_fi_ecrit(klev, klon, iim, jjm+1, t, zx_tmp_3d)         CALL histwrite(physid, 't', itap, gr_phy_write(t))
215         CALL histwrite(physid, 't', itap, zx_tmp_3d)         CALL histwrite(physid, 'mfu', itap, gr_phy_write(mfu))
216           CALL histwrite(physid, 'mfd', itap, gr_phy_write(mfd))
217         CALL gr_fi_ecrit(klev, klon, iim, jjm+1, mfu, zx_tmp_3d)         CALL histwrite(physid, 'en_u', itap, gr_phy_write(en_u))
218         CALL histwrite(physid, 'mfu', itap, zx_tmp_3d)         CALL histwrite(physid, 'de_u', itap, gr_phy_write(de_u))
219         CALL gr_fi_ecrit(klev, klon, iim, jjm+1, mfd, zx_tmp_3d)         CALL histwrite(physid, 'en_d', itap, gr_phy_write(en_d))
220         CALL histwrite(physid, 'mfd', itap, zx_tmp_3d)         CALL histwrite(physid, 'de_d', itap, gr_phy_write(de_d))
221         CALL gr_fi_ecrit(klev, klon, iim, jjm+1, en_u, zx_tmp_3d)         CALL histwrite(physid, 'coefh', itap, gr_phy_write(coefh))
        CALL histwrite(physid, 'en_u', itap, zx_tmp_3d)  
        CALL gr_fi_ecrit(klev, klon, iim, jjm+1, de_u, zx_tmp_3d)  
        CALL histwrite(physid, 'de_u', itap, zx_tmp_3d)  
        CALL gr_fi_ecrit(klev, klon, iim, jjm+1, en_d, zx_tmp_3d)  
        CALL histwrite(physid, 'en_d', itap, zx_tmp_3d)  
        CALL gr_fi_ecrit(klev, klon, iim, jjm+1, de_d, zx_tmp_3d)  
        CALL histwrite(physid, 'de_d', itap, zx_tmp_3d)  
        CALL gr_fi_ecrit(klev, klon, iim, jjm+1, coefh, zx_tmp_3d)  
        CALL histwrite(physid, 'coefh', itap, zx_tmp_3d)  
   
222         DO k = 1, klev         DO k = 1, klev
223            DO i = 1, klon            DO i = 1, klon
224               fm_therm1(i, k) = fm_therm(i, k)               fm_therm1(i, k) = fm_therm(i, k)
225            END DO            END DO
226         END DO         END DO
227    
228         CALL gr_fi_ecrit(klev, klon, iim, jjm+1, fm_therm1, zx_tmp_3d)         CALL histwrite(physid, 'fm_th', itap, gr_phy_write(fm_therm1))
229         CALL histwrite(physid, 'fm_th', itap, zx_tmp_3d)         CALL histwrite(physid, 'en_th', itap, gr_phy_write(entr_therm))
   
        CALL gr_fi_ecrit(klev, klon, iim, jjm+1, entr_therm, zx_tmp_3d)  
        CALL histwrite(physid, 'en_th', itap, zx_tmp_3d)  
230         !ccc         !ccc
231         CALL gr_fi_ecrit(klev, klon, iim, jjm+1, frac_impa, zx_tmp_3d)         CALL histwrite(physid, 'frac_impa', itap, gr_phy_write(frac_impa))
232         CALL histwrite(physid, 'frac_impa', itap, zx_tmp_3d)         CALL histwrite(physid, 'frac_nucl', itap, gr_phy_write(frac_nucl))
233           CALL histwrite(physid, 'pyu1', itap, gr_phy_write(pyu1))
234         CALL gr_fi_ecrit(klev, klon, iim, jjm+1, frac_nucl, zx_tmp_3d)         CALL histwrite(physid, 'pyv1', itap, gr_phy_write(pyv1))
235         CALL histwrite(physid, 'frac_nucl', itap, zx_tmp_3d)         CALL histwrite(physid, 'ftsol1', itap, gr_phy_write(pftsol1))
236           CALL histwrite(physid, 'ftsol2', itap, gr_phy_write(pftsol2))
237         CALL gr_fi_ecrit(1, klon, iim, jjm+1, pyu1, zx_tmp_2d)         CALL histwrite(physid, 'ftsol3', itap, gr_phy_write(pftsol3))
238         CALL histwrite(physid, 'pyu1', itap, zx_tmp_2d)         CALL histwrite(physid, 'ftsol4', itap, gr_phy_write(pftsol4))
239           CALL histwrite(physid, 'psrf1', itap, gr_phy_write(ppsrf1))
240         CALL gr_fi_ecrit(1, klon, iim, jjm+1, pyv1, zx_tmp_2d)         CALL histwrite(physid, 'psrf2', itap, gr_phy_write(ppsrf2))
241         CALL histwrite(physid, 'pyv1', itap, zx_tmp_2d)         CALL histwrite(physid, 'psrf3', itap, gr_phy_write(ppsrf3))
242           CALL histwrite(physid, 'psrf4', itap, gr_phy_write(ppsrf4))
        CALL gr_fi_ecrit(1, klon, iim, jjm+1, pftsol1, zx_tmp_2d)  
        CALL histwrite(physid, 'ftsol1', itap, zx_tmp_2d)  
        CALL gr_fi_ecrit(1, klon, iim, jjm+1, pftsol2, zx_tmp_2d)  
        CALL histwrite(physid, 'ftsol2', itap, zx_tmp_2d)  
        CALL gr_fi_ecrit(1, klon, iim, jjm+1, pftsol3, zx_tmp_2d)  
        CALL histwrite(physid, 'ftsol3', itap, zx_tmp_2d)  
        CALL gr_fi_ecrit(1, klon, iim, jjm+1, pftsol4, zx_tmp_2d)  
        CALL histwrite(physid, 'ftsol4', itap, zx_tmp_2d)  
   
        CALL gr_fi_ecrit(1, klon, iim, jjm+1, ppsrf1, zx_tmp_2d)  
        CALL histwrite(physid, 'psrf1', itap, zx_tmp_2d)  
        CALL gr_fi_ecrit(1, klon, iim, jjm+1, ppsrf2, zx_tmp_2d)  
        CALL histwrite(physid, 'psrf2', itap, zx_tmp_2d)  
        CALL gr_fi_ecrit(1, klon, iim, jjm+1, ppsrf3, zx_tmp_2d)  
        CALL histwrite(physid, 'psrf3', itap, zx_tmp_2d)  
        CALL gr_fi_ecrit(1, klon, iim, jjm+1, ppsrf4, zx_tmp_2d)  
        CALL histwrite(physid, 'psrf4', itap, zx_tmp_2d)  
   
243         IF (ok_sync) CALL histsync(physid)         IF (ok_sync) CALL histsync(physid)
244    
245         ! Test sur la valeur des coefficients de lessivage         ! Test sur la valeur des coefficients de lessivage

Legend:
Removed from v.178  
changed lines
  Added in v.191

  ViewVC Help
Powered by ViewVC 1.1.21