/[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 191 by guez, Mon May 9 19:56:28 2016 UTC revision 207 by guez, Thu Sep 1 10:30:53 2016 UTC
# Line 15  contains Line 15  contains
15      use gr_phy_write_m, only: gr_phy_write      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
     USE dimens_m, ONLY: iim, jjm  
18      USE indicesol, ONLY: nbsrf      USE indicesol, ONLY: nbsrf
19      use initphysto_m, only: initphysto      use initphysto_m, only: initphysto
20      USE dimphy, ONLY: klev, klon      USE dimphy, ONLY: klev, klon
# Line 42  contains Line 41  contains
41      ! flux detraine dans le panache descendant      ! flux detraine dans le panache descendant
42    
43      ! Les Thermiques      ! Les Thermiques
44      REAL pfm_therm(klon, klev+1)      REAL, intent(in):: pfm_therm(klon, klev+1)
45      REAL pentr_therm(klon, klev)      REAL, intent(in):: pentr_therm(klon, klev)
46    
47      ! Couche limite:      ! Couche limite:
48        REAL, intent(in):: pcoefh(klon, klev) ! coeff melange Couche limite
49      REAL pcoefh(klon, klev) ! coeff melange Couche limite      REAL, intent(in):: yu1(klon)
50      REAL yu1(klon)      REAL, intent(in):: yv1(klon)
     REAL yv1(klon)  
51    
52      ! Arguments necessaires pour les sources et puits de traceur      ! Arguments necessaires pour les sources et puits de traceur
53    
54      REAL ftsol(klon, nbsrf) ! Temperature du sol (surf)(Kelvin)      REAL, intent(in):: ftsol(klon, nbsrf) ! Temperature du sol (surf)(Kelvin)
55      REAL pctsrf(klon, nbsrf) ! Pourcentage de sol f(nature du sol)      REAL, intent(in):: pctsrf(klon, nbsrf) ! Pourcentage de sol f(nature du sol)
   
     ! Lessivage:  
56    
57      REAL frac_impa(klon, klev)      ! Coefficients de lessivage:
58      REAL frac_nucl(klon, klev)      REAL, intent(in):: frac_impa(klon, klev) ! facteur d'impaction
59        REAL, intent(in):: frac_nucl(klon, klev) ! facteur de nucleation
60    
61      REAL, INTENT(IN):: pphis(klon)      REAL, INTENT(IN):: pphis(klon)
62      real paire(klon)      real, intent(in):: paire(klon)
63      REAL, INTENT (IN):: dtime      REAL, INTENT (IN):: dtime
64    
65      ! Variables local to the procedure:      ! Local:
66    
67      real t(klon, klev)      real t(klon, klev)
68      INTEGER, SAVE:: physid      INTEGER, SAVE:: physid
# Line 94  contains Line 91  contains
91      REAL dtcum      REAL dtcum
92    
93      INTEGER:: iadvtr = 0, irec = 1      INTEGER:: iadvtr = 0, irec = 1
     REAL zmin, zmax  
     LOGICAL ok_sync  
94    
95      SAVE t, mfd, en_u, de_u, en_d, de_d, coefh, dtcum      SAVE t, mfd, en_u, de_u, en_d, de_d, coefh, dtcum
96      SAVE fm_therm, entr_therm      SAVE fm_therm, entr_therm
# Line 105  contains Line 100  contains
100    
101      ! Couche limite:      ! Couche limite:
102    
103      ok_sync = .TRUE.      IF (iadvtr==0) CALL initphysto('phystoke', dtime, dtime * istphy, &
104             dtime * istphy, physid)
     IF (iadvtr==0) CALL initphysto('phystoke', dtime, dtime*istphy, dtime*istphy, physid)  
105    
106      CALL histwrite(physid, 'phis', itap, gr_phy_write(pphis))      CALL histwrite(physid, 'phis', itap, gr_phy_write(pphis))
107      CALL histwrite(physid, 'aire', itap, gr_phy_write(paire))      CALL histwrite(physid, 'aire', itap, gr_phy_write(paire))
# Line 145  contains Line 139  contains
139    
140      DO k = 1, klev      DO k = 1, klev
141         DO i = 1, klon         DO i = 1, klon
142            mfu(i, k) = mfu(i, k) + pmfu(i, k)*pdtphys            mfu(i, k) = mfu(i, k) + pmfu(i, k) * pdtphys
143            mfd(i, k) = mfd(i, k) + pmfd(i, k)*pdtphys            mfd(i, k) = mfd(i, k) + pmfd(i, k) * pdtphys
144            en_u(i, k) = en_u(i, k) + pen_u(i, k)*pdtphys            en_u(i, k) = en_u(i, k) + pen_u(i, k) * pdtphys
145            de_u(i, k) = de_u(i, k) + pde_u(i, k)*pdtphys            de_u(i, k) = de_u(i, k) + pde_u(i, k) * pdtphys
146            en_d(i, k) = en_d(i, k) + pen_d(i, k)*pdtphys            en_d(i, k) = en_d(i, k) + pen_d(i, k) * pdtphys
147            de_d(i, k) = de_d(i, k) + pde_d(i, k)*pdtphys            de_d(i, k) = de_d(i, k) + pde_d(i, k) * pdtphys
148            coefh(i, k) = coefh(i, k) + pcoefh(i, k)*pdtphys            coefh(i, k) = coefh(i, k) + pcoefh(i, k) * pdtphys
149            t(i, k) = t(i, k) + pt(i, k)*pdtphys            t(i, k) = t(i, k) + pt(i, k) * pdtphys
150            fm_therm(i, k) = fm_therm(i, k) + pfm_therm(i, k)*pdtphys            fm_therm(i, k) = fm_therm(i, k) + pfm_therm(i, k) * pdtphys
151            entr_therm(i, k) = entr_therm(i, k) + pentr_therm(i, k)*pdtphys            entr_therm(i, k) = entr_therm(i, k) + pentr_therm(i, k) * pdtphys
152         END DO         END DO
153      END DO      END DO
154      DO i = 1, klon      DO i = 1, klon
155         pyv1(i) = pyv1(i) + yv1(i)*pdtphys         pyv1(i) = pyv1(i) + yv1(i) * pdtphys
156         pyu1(i) = pyu1(i) + yu1(i)*pdtphys         pyu1(i) = pyu1(i) + yu1(i) * pdtphys
157      END DO      END DO
158      DO k = 1, nbsrf      DO k = 1, nbsrf
159         DO i = 1, klon         DO i = 1, klon
160            pftsol(i, k) = pftsol(i, k) + ftsol(i, k)*pdtphys            pftsol(i, k) = pftsol(i, k) + ftsol(i, k) * pdtphys
161            ppsrf(i, k) = ppsrf(i, k) + pctsrf(i, k)*pdtphys            ppsrf(i, k) = ppsrf(i, k) + pctsrf(i, k) * pdtphys
162         END DO         END DO
163      END DO      END DO
164    
# Line 181  contains Line 175  contains
175               en_d(i, k) = en_d(i, k)/dtcum               en_d(i, k) = en_d(i, k)/dtcum
176               de_d(i, k) = de_d(i, k)/dtcum               de_d(i, k) = de_d(i, k)/dtcum
177               coefh(i, k) = coefh(i, k)/dtcum               coefh(i, k) = coefh(i, k)/dtcum
              ! Unitel a enlever  
178               t(i, k) = t(i, k)/dtcum               t(i, k) = t(i, k)/dtcum
179               fm_therm(i, k) = fm_therm(i, k)/dtcum               fm_therm(i, k) = fm_therm(i, k)/dtcum
180               entr_therm(i, k) = entr_therm(i, k)/dtcum               entr_therm(i, k) = entr_therm(i, k)/dtcum
# Line 207  contains Line 200  contains
200            END DO            END DO
201         END DO         END DO
202    
203         ! ecriture des champs         ! \'Ecriture des champs
204    
205         irec = irec + 1         irec = irec + 1
206    
# Line 227  contains Line 220  contains
220    
221         CALL histwrite(physid, 'fm_th', itap, gr_phy_write(fm_therm1))         CALL histwrite(physid, 'fm_th', itap, gr_phy_write(fm_therm1))
222         CALL histwrite(physid, 'en_th', itap, gr_phy_write(entr_therm))         CALL histwrite(physid, 'en_th', itap, gr_phy_write(entr_therm))
        !ccc  
223         CALL histwrite(physid, 'frac_impa', itap, gr_phy_write(frac_impa))         CALL histwrite(physid, 'frac_impa', itap, gr_phy_write(frac_impa))
224         CALL histwrite(physid, 'frac_nucl', itap, gr_phy_write(frac_nucl))         CALL histwrite(physid, 'frac_nucl', itap, gr_phy_write(frac_nucl))
225         CALL histwrite(physid, 'pyu1', itap, gr_phy_write(pyu1))         CALL histwrite(physid, 'pyu1', itap, gr_phy_write(pyu1))
# Line 240  contains Line 232  contains
232         CALL histwrite(physid, 'psrf2', itap, gr_phy_write(ppsrf2))         CALL histwrite(physid, 'psrf2', itap, gr_phy_write(ppsrf2))
233         CALL histwrite(physid, 'psrf3', itap, gr_phy_write(ppsrf3))         CALL histwrite(physid, 'psrf3', itap, gr_phy_write(ppsrf3))
234         CALL histwrite(physid, 'psrf4', itap, gr_phy_write(ppsrf4))         CALL histwrite(physid, 'psrf4', itap, gr_phy_write(ppsrf4))
        IF (ok_sync) CALL histsync(physid)  
235    
236         ! Test sur la valeur des coefficients de lessivage         CALL histsync(physid)
   
        zmin = 1E33  
        zmax = -1E33  
        DO k = 1, klev  
           DO i = 1, klon  
              zmax = max(zmax, frac_nucl(i, k))  
              zmin = min(zmin, frac_nucl(i, k))  
           END DO  
        END DO  
        PRINT *, 'coefs de lessivage (min et max)'  
        PRINT *, 'facteur de nucleation ', zmin, zmax  
        zmin = 1E33  
        zmax = -1E33  
        DO k = 1, klev  
           DO i = 1, klon  
              zmax = max(zmax, frac_impa(i, k))  
              zmin = min(zmin, frac_impa(i, k))  
           END DO  
        END DO  
        PRINT *, 'facteur d impaction ', zmin, zmax  
237      END IF      END IF
238    
239    END SUBROUTINE phystokenc    END SUBROUTINE phystokenc

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

  ViewVC Help
Powered by ViewVC 1.1.21