source: LMDZ5/trunk/libf/phylmd/tilft43.F @ 1990

Last change on this file since 1990 was 1907, checked in by lguez, 11 years ago

Added a copyright property to every file of the distribution, except
for the fcm files (which have their own copyright). Use svn propget on
a file to see the copyright. For instance:

$ svn propget copyright libf/phylmd/physiq.F90
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

Also added the files defining the CeCILL version 2 license, in French
and English, at the top of the LMDZ tree.

  • 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
Line 
1!
2! $Header$
3!
4        SUBROUTINE TLIFT43(P,T,Q,QS,GZ,ICB,NK,TVP,TPK,CLW,ND,NL,KK)
5        REAL GZ(ND),TPK(ND),CLW(ND),P(ND)
6        REAL T(ND),Q(ND),QS(ND),TVP(ND),LV0
7C
8C   ***   ASSIGN VALUES OF THERMODYNAMIC CONSTANTS     ***
9C
10c -- sb:
11c!      CPD=1005.7
12c!      CPV=1870.0
13c!      CL=4190.0
14c!      RV=461.5
15c!      RD=287.04
16c!      LV0=2.501E6
17c!      G=9.8
18c!      ROWL=1000.0
19c ajouts:
20#include "YOMCST.h"
21        CPD = RCPD
22        CPV = RCPV
23        CL = RCW
24        LV0 = RLVTT
25        G = RG
26        ROWL= RATM/100.
27        GRAVITY = RG !sb: Pr que gravite ne devienne pas humidite!
28C sb --
29C
30        CPVMCL=CL-CPV
31        EPS=RD/RV
32        EPSI=1./EPS
33C
34C   ***  CALCULATE CERTAIN PARCEL QUANTITIES, INCLUDING STATIC ENERGY   ***
35C
36        AH0=(CPD*(1.-Q(NK))+CL*Q(NK))*T(NK)+Q(NK)*(LV0-CPVMCL*(
37     1   T(NK)-273.15))+GZ(NK)
38        CPP=CPD*(1.-Q(NK))+Q(NK)*CPV
39        CPINV=1./CPP
40C
41        IF(KK.EQ.1)THEN
42C
43C   ***   CALCULATE LIFTED PARCEL QUANTITIES BELOW CLOUD BASE   ***
44C
45        DO 50 I=1,ICB-1
46         CLW(I)=0.0
47   50   CONTINUE
48        DO 100 I=NK,ICB-1
49         TPK(I)=T(NK)-(GZ(I)-GZ(NK))*CPINV
50         TVP(I)=TPK(I)*(1.+Q(NK)*EPSI)
51  100   CONTINUE
52        END IF
53C
54C    ***  FIND LIFTED PARCEL QUANTITIES ABOVE CLOUD BASE    ***
55C
56        NST=ICB
57        NSB=ICB
58        IF(KK.EQ.2)THEN 
59         NST=NL
60         NSB=ICB+1
61        END IF
62        DO 300 I=NSB,NST
63         TG=T(I)
64         QG=QS(I)
65         ALV=LV0-CPVMCL*(T(I)-273.15)
66         DO 200 J=1,2
67          S=CPD+ALV*ALV*QG/(RV*T(I)*T(I))
68          S=1./S
69          AHG=CPD*TG+(CL-CPD)*Q(NK)*T(I)+ALV*QG+GZ(I)
70          TG=TG+S*(AH0-AHG)
71          TG=MAX(TG,35.0)
72          TC=TG-273.15
73          DENOM=243.5+TC
74          IF(TC.GE.0.0)THEN 
75           ES=6.112*EXP(17.67*TC/DENOM)
76          ELSE 
77           ES=EXP(23.33086-6111.72784/TG+0.15215*LOG(TG))
78          END IF 
79          QG=EPS*ES/(P(I)-ES*(1.-EPS))
80  200    CONTINUE
81         ALV=LV0-CPVMCL*(T(I)-273.15)
82         TPK(I)=(AH0-(CL-CPD)*Q(NK)*T(I)-GZ(I)-ALV*QG)/CPD
83         CLW(I)=Q(NK)-QG
84         CLW(I)=MAX(0.0,CLW(I))
85         RG=QG/(1.-Q(NK))
86         TVP(I)=TPK(I)*(1.+RG*EPSI)
87  300   CONTINUE
88
89c -- sb:
90        RG = GRAVITY  ! RG redevient la gravite de YOMCST (sb)
91c sb --
92
93        RETURN
94        END
95
Note: See TracBrowser for help on using the repository browser.