PHYEX 0.9.5
PHYsique EXternalisée
Loading...
Searching...
No Matches
convect_satmixratio.h
Go to the documentation of this file.
1 ELEMENTAL SUBROUTINE convect_satmixratio(PPRES, PT, PEPS, PEW, PLV, PLS, PCPH)
2
3! ******* TO BE INCLUDED IN THE *CONTAINS* OF A SUBROUTINE, IN ORDER TO EASE AUTOMATIC INLINING ******
4! => Don't use drHook !!!
5
6! ################################################################
7!
8!!**** Compute vapor saturation mixing ratio over liquid water
9!!
10!!
11!! PDRPOSE
12!! -------
13!! The purpose of this routine is to determine saturation mixing ratio
14!! and to return values for L_v L_s and C_ph
15!!
16!!
17!!** METHOD
18!! ------
19!!
20!!
21!! EXTERNAL
22!! --------
23!! None
24!!
25!!
26!! IMPLICIT ARGUMENTS
27!! ------------------
28!! Module MODD_CST
29!! XALPW, XBETAW, XGAMW ! constants for water saturation pressure
30!! XRD, XRV ! gaz constants for dry air and water vapor
31!! XCPD, XCPV ! specific heat for dry air and water vapor
32!! XCL, XCI ! specific heat for liquid water and ice
33!! XTT ! triple point temperature
34!! XLVTT, XLSTT ! vaporization, sublimation heat constant
35!!
36!!
37!! REFERENCE
38!! ---------
39!!
40!! Book1,2 of documentation ( routine CONVECT_SATMIXRATIO)
41!!
42!! AUTHOR
43!! ------
44!! P. BECHTOLD * Laboratoire d'Aerologie *
45!!
46!! MODIFICATIONS
47!! -------------
48!! Original 07/11/95
49!! Last modified 04/10/97
50!! R. El Khatib 01-Jun-2023 written as a include file
51!------------------------- ------------------------------------------------------
52!
53!* 0. DECLARATIONS
54! ------------
55!
56!
57IMPLICIT NONE
58!
59!* 0.1 Declarations of dummy arguments :
60!
61!
62REAL, INTENT(IN) :: ppres ! pressure
63REAL, INTENT(IN) :: pt ! temperature
64REAL, INTENT(IN) :: peps ! CST%XRD / CST%XRV (ideally pre-computed in CST%)
65!
66REAL, INTENT(OUT):: pew ! vapor saturation mixing ratio
67REAL, INTENT(OUT):: plv ! latent heat L_v
68REAL, INTENT(OUT):: pls ! latent heat L_s
69REAL, INTENT(OUT):: pcph ! specific heat C_ph
70!
71!* 0.2 Declarations of local variables :
72!
73REAL :: zt ! temperature
74!
75!-------------------------------------------------------------------------------
76!
77 zt = min( 400., max( pt, 10. ) ) ! overflow bound
78 pew = exp( cst%XALPW - cst%XBETAW / zt - cst%XGAMW * log( zt ) )
79 pew = peps * pew / ( ppres - pew )
80!
81 plv = cst%XLVTT + ( cst%XCPV - cst%XCL ) * ( zt - cst%XTT ) ! compute L_v
82 pls = cst%XLSTT + ( cst%XCPV - cst%XCI ) * ( zt - cst%XTT ) ! compute L_i
83!
84 pcph = cst%XCPD + cst%XCPV * pew ! compute C_ph
85!
86END SUBROUTINE convect_satmixratio
elemental subroutine convect_satmixratio(ppres, pt, peps, pew, plv, pls, pcph)