1 | module sens_heat_rain_m |
---|
2 | |
---|
3 | IMPLICIT NONE |
---|
4 | |
---|
5 | CONTAINS |
---|
6 | |
---|
7 | #ifdef IN_LMDZ |
---|
8 | REAL function sens_heat_rain(rain, t, q, rhoa, xlv, t_int, p) |
---|
9 | #else |
---|
10 | elemental real function sens_heat_rain(rain, t, q, rhoa, xlv, t_int, p) |
---|
11 | #endif |
---|
12 | |
---|
13 | ! Computes heat flux due to rainfall, in W m-2, positive |
---|
14 | ! upward. |
---|
15 | |
---|
16 | ! If in LMDZ, do not declare this function as elemental because |
---|
17 | ! YOMCST.h contains an OpenMP directive, and that only works in |
---|
18 | ! OpenMP 5.0. |
---|
19 | |
---|
20 | USE const, ONLY: cpa, cpw, rgas |
---|
21 | #ifndef IN_LMDZ |
---|
22 | USE const, ONLY: eps_w |
---|
23 | #endif |
---|
24 | USE esat_m, ONLY: esat |
---|
25 | |
---|
26 | #ifdef IN_LMDZ |
---|
27 | USE lmdz_yomcst, ONLY: eps_w |
---|
28 | #endif |
---|
29 | |
---|
30 | REAL, INTENT(IN) :: rain ! rain mass flux, in kg m-2 s-1 |
---|
31 | REAL, INTENT(IN) :: t ! air temperature at 10 m, in K |
---|
32 | REAL, INTENT(IN) :: q ! specific humidity at 10 m |
---|
33 | REAL, INTENT(IN) :: rhoa ! density of moist air (kg / m3) |
---|
34 | REAL, INTENT(IN) :: xlv ! latent heat of evaporation (J / kg) |
---|
35 | REAL, INTENT(IN) :: t_int ! interface temperature, in K |
---|
36 | REAL, INTENT(IN) :: p ! surface pressure, in Pa |
---|
37 | |
---|
38 | ! Local: |
---|
39 | |
---|
40 | REAL es ! saturation pressure of wator vapor, in Pa |
---|
41 | REAL alfac ! wet bulb factor |
---|
42 | REAL dwat ! water vapour diffusivity |
---|
43 | REAL dtmp ! heat diffusivity |
---|
44 | REAL q_int ! specific (saturation) humidity at ocean interface |
---|
45 | REAL t_celsius ! air temperature at 10 m, in Celsius degrees |
---|
46 | |
---|
47 | REAL wetc |
---|
48 | ! derivative of saturated mass fraction of water vapor with |
---|
49 | ! respect to temperature, at constant total pressure |
---|
50 | |
---|
51 | !--------------------------------------------------------------------- |
---|
52 | |
---|
53 | es = esat(t_int, p) * 0.98 ! reduced for salinity, Kraus 1972 page 46 |
---|
54 | q_int = eps_w * (es / (p - (1. - eps_w) * es)) |
---|
55 | wetc = eps_w * xlv * q_int / (rgas * t_int**2) |
---|
56 | dwat = 2.11e-5 * (t / 273.15)**1.94 |
---|
57 | t_celsius = t - 273.15 |
---|
58 | dtmp = (1. + 3.309e-3 * t_celsius - 1.44e-6 * t_celsius**2) * 0.02411 & |
---|
59 | / (rhoa * cpa) |
---|
60 | |
---|
61 | ! Gosnell 1995 k0991, equation (11): |
---|
62 | alfac = 1. / (1. + (wetc * xlv * dwat) / (cpa * dtmp)) |
---|
63 | |
---|
64 | ! Gosnell 1995 k0991, equation (12): |
---|
65 | sens_heat_rain = rain * alfac * cpw * (t_int - t + (q_int - q) * xlv / cpa) |
---|
66 | |
---|
67 | END FUNCTION sens_heat_rain |
---|
68 | |
---|
69 | END MODULE sens_heat_rain_m |
---|