/[lmdze]/trunk/phylmd/physiq.f90
ViewVC logotype

Diff of /trunk/phylmd/physiq.f90

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

revision 322 by guez, Thu Jan 24 16:17:39 2019 UTC revision 323 by guez, Thu Jan 24 17:19:06 2019 UTC
# Line 29  contains Line 29  contains
29      USE conf_gcm_m, ONLY: lmt_pas      USE conf_gcm_m, ONLY: lmt_pas
30      USE conf_phys_m, ONLY: conf_phys      USE conf_phys_m, ONLY: conf_phys
31      use conflx_m, only: conflx      use conflx_m, only: conflx
32      USE ctherm, ONLY: iflag_thermals, nsplit_thermals      USE ctherm_m, ONLY: iflag_thermals, ctherm
33      use diagcld2_m, only: diagcld2      use diagcld2_m, only: diagcld2
34      USE dimensions, ONLY: llm, nqmx      USE dimensions, ONLY: llm, nqmx
35      USE dimphy, ONLY: klon      USE dimphy, ONLY: klon
# Line 279  contains Line 279  contains
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)
281      REAL zb      REAL zb
282      REAL zx_t, zx_qs, zcor      REAL zx_qs, zcor
283      real zqsat(klon, llm)      real zqsat(klon, llm)
284      INTEGER i, k, iq, nsrf      INTEGER i, k, iq, nsrf
285      REAL zphi(klon, llm)      REAL zphi(klon, llm)
# Line 406  contains Line 406  contains
406      integer, save:: ncid_startphy      integer, save:: ncid_startphy
407    
408      namelist /physiq_nml/ fact_cldcon, facttemps, ok_newmicro, iflag_cldcon, &      namelist /physiq_nml/ fact_cldcon, facttemps, ok_newmicro, iflag_cldcon, &
409           ratqsbas, ratqshaut, ok_ade, bl95_b0, bl95_b1, iflag_thermals, &           ratqsbas, ratqshaut, ok_ade, bl95_b0, bl95_b1
          nsplit_thermals  
410    
411      !----------------------------------------------------------------      !----------------------------------------------------------------
412    
# Line 435  contains Line 434  contains
434         pblt =0.         pblt =0.
435         therm =0.         therm =0.
436    
        iflag_thermals = 0  
        nsplit_thermals = 1  
437         print *, "Enter namelist 'physiq_nml'."         print *, "Enter namelist 'physiq_nml'."
438         read(unit=*, nml=physiq_nml)         read(unit=*, nml=physiq_nml)
439         write(unit_nml, nml=physiq_nml)         write(unit_nml, nml=physiq_nml)
440    
441           call ctherm
442         call conf_phys         call conf_phys
443    
444         ! Initialiser les compteurs:         ! Initialiser les compteurs:
# Line 672  contains Line 670  contains
670      fm_therm = 0.      fm_therm = 0.
671      entr_therm = 0.      entr_therm = 0.
672    
673      if (iflag_thermals == 0) then      if (iflag_thermals) then
674           call calltherm(play, paprs, pphi, u_seri, v_seri, t_seri, q_seri, &
675                d_u_ajs, d_v_ajs, d_t_ajs, d_q_ajs, fm_therm, entr_therm)
676        else
677         CALL ajsec(paprs, play, t_seri, q_seri, d_t_ajs, d_q_ajs)         CALL ajsec(paprs, play, t_seri, q_seri, d_t_ajs, d_q_ajs)
678         t_seri = t_seri + d_t_ajs         t_seri = t_seri + d_t_ajs
679         q_seri = q_seri + d_q_ajs         q_seri = q_seri + d_q_ajs
     else  
        call calltherm(play, paprs, pphi, u_seri, v_seri, t_seri, q_seri, &  
             d_u_ajs, d_v_ajs, d_t_ajs, d_q_ajs, fm_therm, entr_therm)  
680      endif      endif
681    
682      ! Caclul des ratqs      ! Caclul des ratqs
# Line 811  contains Line 809  contains
809      ! Humidit\'e relative pour diagnostic :      ! Humidit\'e relative pour diagnostic :
810      DO k = 1, llm      DO k = 1, llm
811         DO i = 1, klon         DO i = 1, klon
812            zx_t = t_seri(i, k)            zx_qs = r2es * FOEEW(t_seri(i, k), rtt >= t_seri(i, k)) / play(i, k)
           zx_qs = r2es * FOEEW(zx_t, rtt >= zx_t) / play(i, k)  
813            zx_qs = MIN(0.5, zx_qs)            zx_qs = MIN(0.5, zx_qs)
814            zcor = 1. / (1. - retv * zx_qs)            zcor = 1. / (1. - retv * zx_qs)
815            zx_qs = zx_qs * zcor            zx_qs = zx_qs * zcor

Legend:
Removed from v.322  
changed lines
  Added in v.323

  ViewVC Help
Powered by ViewVC 1.1.21