PHYEX 0.9.5
PHYsique EXternalisée
Loading...
Searching...
No Matches
mode_coefj.F90
Go to the documentation of this file.
1!MNH_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
3!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4!MNH_LIC for details. version 1.
5!-----------------------------------------------------------------
6!--------------- special set of characters for RCS information
7!-----------------------------------------------------------------
8! $Source$ $Revision$
9! MASDEV4_7 turb 2006/05/18 13:07:25
10!-----------------------------------------------------------------
11!################
13IMPLICIT NONE
14CONTAINS
15! #######################################################
16 FUNCTION coefj(PTHL,PEXNREF,PFRAC_ICE) RESULT(PCOEFJ)
17! #######################################################
18!
19! PURPOSE
20!! -------
21! COEFJ computes the coefficient J of the documentation.
22!
23!!** METHOD
24!! ------ rvs(Tl) Lv(Tl)
25!! The value of this coefficient is J = --------------, for rc only
26!! Rv Tl THETAl
27!!
28!! rvsw(Tl) Lv(Tl) rvsi(Tl) Ls(Tl)
29!! or --------------- (1-Pfrac_ri) + --------------- Pfrac_ri, for rc+ri.
30!! Rv Tl THETAl Rv Tl THETAl
31!!
32!! EXTERNAL
33!! --------
34!! None.
35!!
36!! IMPLICIT ARGUMENTS
37!! ------------------
38!! Module MODD_CST : contains physical constants.
39!!
40!! REFERENCE
41!! ---------
42!! Book 1 of documentation of Meso-NH
43!! Book 2 of documentation of Meso-NH
44!!
45!!
46!! AUTHOR
47!! ------
48!! Jean-Marie Carriere * Meteo-France *
49!!
50!! MODIFICATIONS
51!! -------------
52!! Original 20/03/95
53!! J.-P. Pinty 20/02/03 add non-precipitating ice
54!!
55!! ----------------------------------------------------------------------
56!
57!* 0. DECLARATIONS
58! ------------
60 xmd, xmv, xp00, xrd, xrv, xtt
61!
62IMPLICIT NONE
63!
64!* 0.1 declarations of arguments and result
65!
66REAL, DIMENSION(:,:,:), INTENT(IN) :: pthl ! Temperature variable
67REAL, DIMENSION(:,:,:), INTENT(IN) :: pexnref ! Exner function of the
68! reference state
69REAL, DIMENSION(:,:,:), INTENT(IN), OPTIONAL :: pfrac_ice
70 ! Fraction of ri in the
71 ! non-precipating
72 ! "rc+ri" condensate
73!
74REAL,DIMENSION(SIZE(PTHL,1),SIZE(PTHL,2),SIZE(PTHL,3)):: pcoefj ! result
75!
76!* 0.2 declarations of local variables
77!
78REAL,DIMENSION(SIZE(PTHL,1),SIZE(PTHL,2),SIZE(PTHL,3)) :: &
79 ztl, zl, zes, zrvs, zp
80! ZTL = Tl, ZL = Lv(Tl) or Ls(Tl), ZES = esw(Tl) or esi(Tl)
81! ZRVS = rvsw(Tl) or rvsi(Tl), ZP = p
82!
83REAL :: zeps ! = Mv/Md
84!---------------------------------------------------------------------------
85!
86!* 1. COMPUTATION OF Tl
87! -----------------
88!
89ztl(:,:,:) = pthl(:,:,:) * pexnref(:,:,:)
90!
91!* 2. COMPUTATION OF Lv(Tl)
92! ---------------------
93!
94zl(:,:,:) = xlvtt + ( xcpv - xcl ) * ( ztl(:,:,:) -xtt )
95!
96!* 3. COMPUTATION OF rvs(Tl)
97! ----------------------
98!
99zeps = xmv/xmd
100zp(:,:,:) = (pexnref(:,:,:)**(xcpd/xrd))*xp00
101zes(:,:,:) = exp( xalpw - xbetaw/ztl(:,:,:) - xgamw*log(ztl(:,:,:) ) )
102zrvs(:,:,:) = zes(:,:,:) * zeps / ( zp(:,:,:) - zes(:,:,:) )
103!
104! 4. RESULT FOR rc only
105! ------------------
106!
107pcoefj(:,:,:) = zrvs(:,:,:)*zl(:,:,:)/ &
108 ( xrv*ztl(:,:,:)*pthl(:,:,:) )
109!
110! Add case when rc+ri
111!
112IF(PRESENT(pfrac_ice)) THEN
113!
114!* 5. COMPUTATION OF Ls(Tl)
115! ---------------------
116!
117 zl(:,:,:) = xlstt + ( xcpv - xci ) * ( ztl(:,:,:) -xtt )
118!
119!* 6. COMPUTATION OF rvs(Tl)
120! ----------------------
121!
122 zes(:,:,:) = exp( xalpi - xbetai/ztl(:,:,:) - xgami*log(ztl(:,:,:) ) )
123 zrvs(:,:,:) = zes(:,:,:) * zeps / ( zp(:,:,:) - zes(:,:,:) )
124!
125! 7. RESULT FOR rc and ri
126! --------------------
127!
128 pcoefj(:,:,:) = (1.0 - pfrac_ice(:,:,:))*pcoefj(:,:,:) &
129 + pfrac_ice(:,:,:) *zrvs(:,:,:)*zl(:,:,:)/ &
130 ( xrv*ztl(:,:,:)*pthl(:,:,:) )
131END IF
132!
133!---------------------------------------------------------------------------
134!
135END FUNCTION coefj
136END MODULE mode_coefj
real, pointer xgamw
Definition modd_cst.F90:163
real, pointer xci
Definition modd_cst.F90:157
real, pointer xalpi
Definition modd_cst.F90:164
real, pointer xrv
Definition modd_cst.F90:153
real, pointer xbetaw
Definition modd_cst.F90:163
real, pointer xlstt
Definition modd_cst.F90:160
real, pointer xtt
Definition modd_cst.F90:158
real, pointer xcpd
Definition modd_cst.F90:155
real, pointer xalpw
Definition modd_cst.F90:163
real, pointer xcpv
Definition modd_cst.F90:155
real, pointer xbetai
Definition modd_cst.F90:164
real, pointer xp00
Definition modd_cst.F90:148
real, pointer xmv
Definition modd_cst.F90:152
real, pointer xgami
Definition modd_cst.F90:164
real, pointer xrd
Definition modd_cst.F90:153
real, pointer xlvtt
Definition modd_cst.F90:159
real, pointer xmd
Definition modd_cst.F90:152
real, pointer xcl
Definition modd_cst.F90:157
real function, dimension(size(pthl, 1), size(pthl, 2), size(pthl, 3)) coefj(pthl, pexnref, pfrac_ice)