source: LMDZ6/trunk/libf/phylmd/tilft43.f90 @ 5445

Last change on this file since 5445 was 5285, checked in by abarral, 8 weeks ago

As discussed internally, remove generic ONLY: ... for new _mod_h modules

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
RevLine 
[1992]1
[524]2! $Header$
3
[1992]4SUBROUTINE tlift43(p, t, q, qs, gz, icb, nk, tvp, tpk, clw, nd, nl, kk)
[5285]5  USE yomcst_mod_h
[2197]6  IMPLICIT NONE
[1992]7  REAL gz(nd), tpk(nd), clw(nd), p(nd)
8  REAL t(nd), q(nd), qs(nd), tvp(nd), lv0
[2197]9  INTEGER icb, nk, nd, nl, kk
10  REAL cpd, cpv,  cl, g, rowl, gravity, cpvmcl, eps, epsi
11  REAL ah0, cpp, cpinv, tg, qg, alv, s, ahg, tc, denom, es
[5274]12  INTEGER i, nst, nsb, j
[1992]13  ! ***   ASSIGN VALUES OF THERMODYNAMIC CONSTANTS     ***
[524]14
[1992]15  ! -- sb:
16  ! !      CPD=1005.7
17  ! !      CPV=1870.0
18  ! !      CL=4190.0
19  ! !      RV=461.5
20  ! !      RD=287.04
21  ! !      LV0=2.501E6
22  ! !      G=9.8
23  ! !      ROWL=1000.0
24  ! ajouts:
25  cpd = rcpd
26  cpv = rcpv
27  cl = rcw
28  lv0 = rlvtt
29  g = rg
30  rowl = ratm/100.
31  gravity = rg !sb: Pr que gravite ne devienne pas humidite!
32  ! sb --
33
34  cpvmcl = cl - cpv
35  eps = rd/rv
36  epsi = 1./eps
37
38  ! ***  CALCULATE CERTAIN PARCEL QUANTITIES, INCLUDING STATIC ENERGY   ***
39
40  ah0 = (cpd*(1.-q(nk))+cl*q(nk))*t(nk) + q(nk)*(lv0-cpvmcl*(t(nk)-273.15)) + &
41    gz(nk)
42  cpp = cpd*(1.-q(nk)) + q(nk)*cpv
43  cpinv = 1./cpp
44
45  IF (kk==1) THEN
46
47    ! ***   CALCULATE LIFTED PARCEL QUANTITIES BELOW CLOUD BASE   ***
48
49    DO i = 1, icb - 1
50      clw(i) = 0.0
51    END DO
52    DO i = nk, icb - 1
53      tpk(i) = t(nk) - (gz(i)-gz(nk))*cpinv
54      tvp(i) = tpk(i)*(1.+q(nk)*epsi)
55    END DO
56  END IF
57
58  ! ***  FIND LIFTED PARCEL QUANTITIES ABOVE CLOUD BASE    ***
59
60  nst = icb
61  nsb = icb
62  IF (kk==2) THEN
63    nst = nl
64    nsb = icb + 1
65  END IF
66  DO i = nsb, nst
67    tg = t(i)
68    qg = qs(i)
69    alv = lv0 - cpvmcl*(t(i)-273.15)
70    DO j = 1, 2
71      s = cpd + alv*alv*qg/(rv*t(i)*t(i))
72      s = 1./s
73      ahg = cpd*tg + (cl-cpd)*q(nk)*t(i) + alv*qg + gz(i)
74      tg = tg + s*(ah0-ahg)
75      tg = max(tg, 35.0)
76      tc = tg - 273.15
77      denom = 243.5 + tc
78      IF (tc>=0.0) THEN
79        es = 6.112*exp(17.67*tc/denom)
80      ELSE
81        es = exp(23.33086-6111.72784/tg+0.15215*log(tg))
82      END IF
83      qg = eps*es/(p(i)-es*(1.-eps))
84    END DO
85    alv = lv0 - cpvmcl*(t(i)-273.15)
86    tpk(i) = (ah0-(cl-cpd)*q(nk)*t(i)-gz(i)-alv*qg)/cpd
87    clw(i) = q(nk) - qg
88    clw(i) = max(0.0, clw(i))
89    rg = qg/(1.-q(nk))
90    tvp(i) = tpk(i)*(1.+rg*epsi)
91  END DO
92
93  ! -- sb:
94  rg = gravity ! RG redevient la gravite de YOMCST (sb)
95  ! sb --
96
97  RETURN
98END SUBROUTINE tlift43
99
Note: See TracBrowser for help on using the repository browser.