/[lmdze]/trunk/phylmd/Interface_surf/clqh.f
ViewVC logotype

Diff of /trunk/phylmd/Interface_surf/clqh.f

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

revision 293 by guez, Tue Jul 24 16:57:36 2018 UTC revision 294 by guez, Thu Jul 26 13:11:22 2018 UTC
# Line 99  contains Line 99  contains
99    
100      ! Local:      ! Local:
101    
102      INTEGER knon, k      INTEGER k
103      REAL evap(size(knindex)) ! (knon) evaporation au sol      REAL evap(size(knindex)) ! (knon) evaporation au sol
104      REAL, dimension(size(knindex), klev):: cq, dq, ch, dh ! (knon, klev)      REAL, dimension(size(knindex), klev):: cq, dq, ch, dh ! (knon, klev)
105      REAL buf1(size(knindex)), buf2(size(knindex))      REAL buf1(size(knindex)), buf2(size(knindex))
# Line 120  contains Line 120  contains
120    
121      !----------------------------------------------------------------      !----------------------------------------------------------------
122    
     knon = size(knindex)  
   
     if (iflag_pbl == 1) then  
        gamt(:, 2) = - 2.5e-3  
        gamt(:, 3:)= - 1e-3  
     else  
        gamt = 0.  
     endif  
   
123      psref = paprs(:, 1) ! pression de reference est celle au sol      psref = paprs(:, 1) ! pression de reference est celle au sol
124      forall (k = 1:klev) pkf(:, k) = (psref / pplay(:, k))**RKAPPA      forall (k = 1:klev) pkf(:, k) = (psref / pplay(:, k))**RKAPPA
125      h = RCPD * t * pkf      h = RCPD * t * pkf
# Line 139  contains Line 130  contains
130           * (paprs(:, k) * 2 / (t(:, k) + t(:, k - 1)) / RD)**2 * dtime * RG**2           * (paprs(:, k) * 2 / (t(:, k) + t(:, k - 1)) / RD)**2 * dtime * RG**2
131    
132      ! Preparer les flux lies aux contre-gardients      ! Preparer les flux lies aux contre-gardients
133      forall (k = 2:klev) gamah(:, k) = gamt(:, k) * (RD * (t(:, k - 1) &  
134           + t(:, k)) / 2. / RG / paprs(:, k) * (pplay(:, k - 1) - pplay(:, k))) &      if (iflag_pbl == 1) then
135           * RCPD * (psref / paprs(:, k))**RKAPPA         gamt(:, 2) = - 2.5e-3
136           gamt(:, 3:)= - 1e-3
137           forall (k = 2:klev) gamah(:, k) = gamt(:, k) * (RD * (t(:, k - 1) &
138                + t(:, k)) / 2. / RG / paprs(:, k) * (pplay(:, k - 1) &
139                - pplay(:, k))) * RCPD * (psref / paprs(:, k))**RKAPPA
140        else
141           gamah = 0.
142        endif
143    
144      buf1 = zx_coef(:, klev) + delp(:, klev)      buf1 = zx_coef(:, klev) + delp(:, klev)
145      cq(:, klev) = q(:, klev) * delp(:, klev) / buf1      cq(:, klev) = q(:, klev) * delp(:, klev) / buf1
# Line 178  contains Line 176  contains
176      dh(:, 1) = - 1. * RG / buf2      dh(:, 1) = - 1. * RG / buf2
177    
178      CALL interfsurf_hq(dtime, julien, rmu0, nisurf, knindex, debut, tsoil, &      CALL interfsurf_hq(dtime, julien, rmu0, nisurf, knindex, debut, tsoil, &
179           qsol, u1lay, v1lay, t(:, 1), q(:, 1), tq_cdrag(:knon), ch(:, 1), &           qsol, u1lay, v1lay, t(:, 1), q(:, 1), tq_cdrag, ch(:, 1), cq(:, 1), &
180           cq(:, 1), dh(:, 1), dq(:, 1), precip_rain, precip_snow, rugos, &           dh(:, 1), dq(:, 1), precip_rain, precip_snow, rugos, rugoro, snow, &
181           rugoro, snow, qsurf, ts, pplay(:, 1), psref, radsol, evap, flux_t, &           qsurf, ts, pplay(:, 1), psref, radsol, evap, flux_t, fluxlat, &
182           fluxlat, dflux_l, dflux_s, tsurf_new, albedo, z0_new, pctsrf_new_sic, &           dflux_l, dflux_s, tsurf_new, albedo, z0_new, pctsrf_new_sic, agesno, &
183           agesno, fqcalving, ffonte, run_off_lic_0)           fqcalving, ffonte, run_off_lic_0)
184    
185      flux_q = - evap      flux_q = - evap
186      d_ts = tsurf_new - ts      d_ts = tsurf_new - ts

Legend:
Removed from v.293  
changed lines
  Added in v.294

  ViewVC Help
Powered by ViewVC 1.1.21