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

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

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

revision 217 by guez, Thu Mar 30 14:25:18 2017 UTC revision 223 by guez, Fri Apr 28 13:22:36 2017 UTC
# Line 36  contains Line 36  contains
36      USE dimsoil, ONLY: nsoilmx      USE dimsoil, ONLY: nsoilmx
37      use drag_noro_m, only: drag_noro      use drag_noro_m, only: drag_noro
38      use dynetat0_m, only: day_ref, annee_ref      use dynetat0_m, only: day_ref, annee_ref
39      USE fcttre, ONLY: foeew, qsatl, qsats      USE fcttre, ONLY: foeew
40      use fisrtilp_m, only: fisrtilp      use fisrtilp_m, only: fisrtilp
41      USE hgardfou_m, ONLY: hgardfou      USE hgardfou_m, ONLY: hgardfou
42      USE histsync_m, ONLY: histsync      USE histsync_m, ONLY: histsync
# Line 219  contains Line 219  contains
219      real devap(klon) ! derivative of the evaporation flux at the surface      real devap(klon) ! derivative of the evaporation flux at the surface
220      REAL sens(klon) ! flux de chaleur sensible au sol      REAL sens(klon) ! flux de chaleur sensible au sol
221      real dsens(klon) ! derivee du flux de chaleur sensible au sol      real dsens(klon) ! derivee du flux de chaleur sensible au sol
222      REAL, save:: dlw(klon) ! derivee infra rouge      REAL, save:: dlw(klon) ! derivative of infra-red flux
223      REAL bils(klon) ! bilan de chaleur au sol      REAL bils(klon) ! bilan de chaleur au sol
224      REAL, save:: fder(klon) ! Derive de flux (sensible et latente)      REAL fder(klon) ! Derive de flux (sensible et latente)
225      REAL ve(klon) ! integr. verticale du transport meri. de l'energie      REAL ve(klon) ! integr. verticale du transport meri. de l'energie
226      REAL vq(klon) ! integr. verticale du transport meri. de l'eau      REAL vq(klon) ! integr. verticale du transport meri. de l'eau
227      REAL ue(klon) ! integr. verticale du transport zonal de l'energie      REAL ue(klon) ! integr. verticale du transport zonal de l'energie
# Line 274  contains Line 274  contains
274      REAL cldl(klon), cldm(klon), cldh(klon) ! nuages bas, moyen et haut      REAL cldl(klon), cldm(klon), cldh(klon) ! nuages bas, moyen et haut
275      REAL cldt(klon), cldq(klon) ! nuage total, eau liquide integree      REAL cldt(klon), cldq(klon) ! nuage total, eau liquide integree
276    
277      REAL zxqsurf(klon), zxfluxlat(klon)      REAL zxfluxlat(klon)
   
278      REAL dist, mu0(klon), fract(klon)      REAL dist, mu0(klon), fract(klon)
279      real longi      real longi
280      REAL z_avant(klon), z_apres(klon), z_factor(klon)      REAL z_avant(klon), z_apres(klon), z_factor(klon)
# Line 339  contains Line 338  contains
338      real rain_lsc(klon)      real rain_lsc(klon)
339      REAL, save:: snow_con(klon) ! neige (mm / s)      REAL, save:: snow_con(klon) ! neige (mm / s)
340      real snow_lsc(klon)      real snow_lsc(klon)
341      REAL d_ts(klon, nbsrf)      REAL d_ts(klon, nbsrf) ! variation of ftsol
342    
343      REAL d_u_vdf(klon, llm), d_v_vdf(klon, llm)      REAL d_u_vdf(klon, llm), d_v_vdf(klon, llm)
344      REAL d_t_vdf(klon, llm), d_q_vdf(klon, llm)      REAL d_t_vdf(klon, llm), d_q_vdf(klon, llm)
# Line 382  contains Line 381  contains
381      REAL uq_lay(klon, llm) ! transport zonal de l'eau a chaque niveau vert.      REAL uq_lay(klon, llm) ! transport zonal de l'eau a chaque niveau vert.
382    
383      real date0      real date0
384      REAL ztsol(klon)      REAL tsol(klon)
385    
386      REAL d_t_ec(klon, llm)      REAL d_t_ec(klon, llm)
387      ! tendance due \`a la conversion d'\'energie cin\'etique en      ! tendance due \`a la conversion d'\'energie cin\'etique en
# Line 502  contains Line 501  contains
501      ql_seri = qx(:, :, iliq)      ql_seri = qx(:, :, iliq)
502      tr_seri = qx(:, :, 3:nqmx)      tr_seri = qx(:, :, 3:nqmx)
503    
504      ztsol = sum(ftsol * pctsrf, dim = 2)      tsol = sum(ftsol * pctsrf, dim = 2)
505    
506      ! Diagnostic de la tendance dynamique :      ! Diagnostic de la tendance dynamique :
507      IF (ancien_ok) THEN      IF (ancien_ok) THEN
# Line 563  contains Line 562  contains
562      ! R\'epartition du longwave par sous-surface lin\'earis\'ee      ! R\'epartition du longwave par sous-surface lin\'earis\'ee
563    
564      forall (nsrf = 1: nbsrf)      forall (nsrf = 1: nbsrf)
565         fsollw(:, nsrf) = sollw + 4. * RSIGMA * ztsol**3 &         fsollw(:, nsrf) = sollw + 4. * RSIGMA * tsol**3 &
566              * (ztsol - ftsol(:, nsrf))              * (tsol - ftsol(:, nsrf))
567         fsolsw(:, nsrf) = solsw * (1. - falbe(:, nsrf)) / (1. - albsol)         fsolsw(:, nsrf) = solsw * (1. - falbe(:, nsrf)) / (1. - albsol)
568      END forall      END forall
569    
     fder = dlw  
   
570      CALL clmain(dtphys, pctsrf, t_seri, q_seri, u_seri, v_seri, julien, mu0, &      CALL clmain(dtphys, pctsrf, t_seri, q_seri, u_seri, v_seri, julien, mu0, &
571           ftsol, cdmmax, cdhmax, ksta, ksta_ter, ok_kzmin, ftsoil, qsol, &           ftsol, cdmmax, cdhmax, ksta, ksta_ter, ok_kzmin, ftsoil, qsol, &
572           paprs, play, fsnow, fqsurf, fevap, falbe, fluxlat, rain_fall, &           paprs, play, fsnow, fqsurf, fevap, falbe, fluxlat, rain_fall, &
573           snow_fall, fsolsw, fsollw, fder, frugs, agesno, rugoro, d_t_vdf, &           snow_fall, fsolsw, fsollw, frugs, agesno, rugoro, d_t_vdf, d_q_vdf, &
574           d_q_vdf, d_u_vdf, d_v_vdf, d_ts, flux_t, flux_q, flux_u, flux_v, &           d_u_vdf, d_v_vdf, d_ts, flux_t, flux_q, flux_u, flux_v, cdragh, &
575           cdragh, cdragm, q2, dsens, devap, ycoefh, yu1, yv1, t2m, q2m, u10m, &           cdragm, q2, dsens, devap, ycoefh, yu1, yv1, t2m, q2m, u10m, v10m, &
576           v10m, pblh, capCL, oliqCL, cteiCL, pblT, therm, trmb1, trmb2, trmb3, &           pblh, capCL, oliqCL, cteiCL, pblT, therm, trmb1, trmb2, trmb3, plcl, &
577           plcl, fqcalving, ffonte, run_off_lic_0)           fqcalving, ffonte, run_off_lic_0)
578    
579      ! Incr\'ementation des flux      ! Incr\'ementation des flux
580    
# Line 598  contains Line 595  contains
595    
596      call assert(abs(sum(pctsrf, dim = 2) - 1.) <= EPSFRA, 'physiq: pctsrf')      call assert(abs(sum(pctsrf, dim = 2) - 1.) <= EPSFRA, 'physiq: pctsrf')
597      ftsol = ftsol + d_ts      ftsol = ftsol + d_ts
598      ztsol = sum(ftsol * pctsrf, dim = 2)      tsol = sum(ftsol * pctsrf, dim = 2)
599      zxfluxlat = sum(fluxlat * pctsrf, dim = 2)      zxfluxlat = sum(fluxlat * pctsrf, dim = 2)
600      zt2m = sum(t2m * pctsrf, dim = 2)      zt2m = sum(t2m * pctsrf, dim = 2)
601      zq2m = sum(q2m * pctsrf, dim = 2)      zq2m = sum(q2m * pctsrf, dim = 2)
# Line 621  contains Line 618  contains
618      DO nsrf = 1, nbsrf      DO nsrf = 1, nbsrf
619         DO i = 1, klon         DO i = 1, klon
620            IF (pctsrf(i, nsrf) < epsfra) then            IF (pctsrf(i, nsrf) < epsfra) then
621               ftsol(i, nsrf) = ztsol(i)               ftsol(i, nsrf) = tsol(i)
622               t2m(i, nsrf) = zt2m(i)               t2m(i, nsrf) = zt2m(i)
623               q2m(i, nsrf) = zq2m(i)               q2m(i, nsrf) = zq2m(i)
624               u10m(i, nsrf) = zu10m(i)               u10m(i, nsrf) = zu10m(i)
# Line 642  contains Line 639  contains
639         ENDDO         ENDDO
640      ENDDO      ENDDO
641    
642      ! Calculer la dérive du flux infrarouge      dlw = - 4. * RSIGMA * tsol**3
   
     DO i = 1, klon  
        dlw(i) = - 4. * RSIGMA * ztsol(i)**3  
     ENDDO  
643    
644      ! Appeler la convection      ! Appeler la convection
645    
# Line 881  contains Line 874  contains
874      IF (MOD(itap - 1, radpas) == 0) THEN      IF (MOD(itap - 1, radpas) == 0) THEN
875         wo = ozonecm(REAL(julien), paprs)         wo = ozonecm(REAL(julien), paprs)
876         albsol = sum(falbe * pctsrf, dim = 2)         albsol = sum(falbe * pctsrf, dim = 2)
877         CALL radlwsw(dist, mu0, fract, paprs, play, ztsol, albsol, t_seri, &         CALL radlwsw(dist, mu0, fract, paprs, play, tsol, albsol, t_seri, &
878              q_seri, wo, cldfra, cldemi, cldtau, heat, heat0, cool, cool0, &              q_seri, wo, cldfra, cldemi, cldtau, heat, heat0, cool, cool0, &
879              radsol, albpla, topsw, toplw, solsw, sollw, sollwdown, topsw0, &              radsol, albpla, topsw, toplw, solsw, sollw, sollwdown, topsw0, &
880              toplw0, solsw0, sollw0, lwdn0, lwdn, lwup0, lwup, swdn0, swdn, &              toplw0, solsw0, sollw0, lwdn0, lwdn, lwup0, lwup, swdn0, swdn, &
# Line 896  contains Line 889  contains
889         ENDDO         ENDDO
890      ENDDO      ENDDO
891    
     ! Calculer l'hydrologie de la surface  
     zxqsurf = sum(fqsurf * pctsrf, dim = 2)  
   
892      ! Calculer le bilan du sol et la d\'erive de temp\'erature (couplage)      ! Calculer le bilan du sol et la d\'erive de temp\'erature (couplage)
893      DO i = 1, klon      DO i = 1, klon
894         bils(i) = radsol(i) - sens(i) + zxfluxlat(i)         bils(i) = radsol(i) - sens(i) + zxfluxlat(i)
# Line 982  contains Line 972  contains
972    
973      IF (offline) call phystokenc(dtphys, t, mfu, mfd, pen_u, pde_u, pen_d, &      IF (offline) call phystokenc(dtphys, t, mfu, mfd, pen_u, pde_u, pen_d, &
974           pde_d, fm_therm, entr_therm, ycoefh, yu1, yv1, ftsol, pctsrf, &           pde_d, fm_therm, entr_therm, ycoefh, yu1, yv1, ftsol, pctsrf, &
975           frac_impa, frac_nucl, pphis, airephy, dtphys)           frac_impa, frac_nucl, pphis, airephy)
976    
977      ! Calculer le transport de l'eau et de l'energie (diagnostique)      ! Calculer le transport de l'eau et de l'energie (diagnostique)
978      CALL transp(paprs, t_seri, q_seri, u_seri, v_seri, zphi, ve, vq, ue, uq)      CALL transp(paprs, t_seri, q_seri, u_seri, v_seri, zphi, ve, vq, ue, uq)
# Line 1048  contains Line 1038  contains
1038      CALL histwrite_phy("precip", rain_fall + snow_fall)      CALL histwrite_phy("precip", rain_fall + snow_fall)
1039      CALL histwrite_phy("plul", rain_lsc + snow_lsc)      CALL histwrite_phy("plul", rain_lsc + snow_lsc)
1040      CALL histwrite_phy("pluc", rain_con + snow_con)      CALL histwrite_phy("pluc", rain_con + snow_con)
1041      CALL histwrite_phy("tsol", ztsol)      CALL histwrite_phy("tsol", tsol)
1042      CALL histwrite_phy("t2m", zt2m)      CALL histwrite_phy("t2m", zt2m)
1043      CALL histwrite_phy("q2m", zq2m)      CALL histwrite_phy("q2m", zq2m)
1044      CALL histwrite_phy("u10m", zu10m)      CALL histwrite_phy("u10m", zu10m)
# Line 1112  contains Line 1102  contains
1102      CALL histwrite_phy("dtsw0", heat0 / 86400.)      CALL histwrite_phy("dtsw0", heat0 / 86400.)
1103      CALL histwrite_phy("dtlw0", - cool0 / 86400.)      CALL histwrite_phy("dtlw0", - cool0 / 86400.)
1104      CALL histwrite_phy("msnow", sum(fsnow * pctsrf, dim = 2))      CALL histwrite_phy("msnow", sum(fsnow * pctsrf, dim = 2))
1105        call histwrite_phy("qsurf", sum(fqsurf * pctsrf, dim = 2))
1106    
1107      if (ok_instan) call histsync(nid_ins)      if (ok_instan) call histsync(nid_ins)
1108    

Legend:
Removed from v.217  
changed lines
  Added in v.223

  ViewVC Help
Powered by ViewVC 1.1.21