source: LMDZ6/trunk/libf/phylmd/Ocean_skin/sens_heat_rain.F90 @ 3816

Last change on this file since 3816 was 3816, checked in by lguez, 3 years ago

Forgot to add subdirectory in commit [3815]

File size: 1.9 KB
Line 
1module sens_heat_rain_m
2
3  implicit none
4
5contains
6
7  elemental real function sens_heat_rain(rain, t, q, rhoa, xlv, t_int, p)
8
9    ! Computes heat flux due to rainfall, in W m-2, positive upward.
10
11    use const, only: cpa, cpw, rgas
12#ifndef IN_LMDZ
13    use const, only: eps_w
14#endif
15    use esat_m, only: esat
16
17#ifdef IN_LMDZ
18    include "YOMCST.h"
19    ! for eps_w
20#endif
21
22    real, intent(in):: rain ! rain mass flux, in kg m-2 s-1
23    real, intent(in):: t ! air temperature at 10 m, in K
24    real, intent(in):: q ! specific humidity at 10 m
25    real, intent(in):: rhoa ! density of moist air  (kg / m3)
26    real, intent(in):: xlv ! latent heat of evaporation (J / kg)
27    real, intent(in):: t_int ! interface temperature, in K
28    real, intent(in):: p ! surface pressure, in Pa
29
30    ! Local:
31   
32    real es ! saturation pressure of wator vapor, in Pa
33    real alfac ! wet bulb factor
34    real dwat ! water vapour diffusivity
35    real dtmp ! heat diffusivity
36    real q_int ! specific (saturation) humidity at ocean interface
37    real t_celsius ! air temperature at 10 m, in Celsius degrees
38
39    real wetc
40    ! derivative of saturated mass fraction of water vapor with
41    ! respect to temperature, at constant total pressure
42
43    !---------------------------------------------------------------------
44
45    es = esat(t_int, p) * 0.98 ! reduced for salinity, Kraus 1972 page 46
46    q_int = eps_w * (es / (p - (1. - eps_w) * es))
47    wetc = eps_w * xlv * q_int / (rgas * t_int**2)
48    dwat = 2.11e-5 * (t / 273.15)**1.94
49    t_celsius = t - 273.15
50    dtmp = (1. + 3.309e-3 * t_celsius - 1.44e-6 * t_celsius**2) * 0.02411 &
51         / (rhoa * cpa)
52
53    ! Gosnell 1995 k0991, equation (11):
54    alfac =  1. / (1. + (wetc * xlv * dwat) / (cpa * dtmp))
55
56    ! Gosnell 1995 k0991, equation (12):
57    sens_heat_rain =  rain * alfac * cpw * (t_int - t + (q_int - q) * xlv / cpa)
58
59  end function sens_heat_rain
60 
61end module sens_heat_rain_m
Note: See TracBrowser for help on using the repository browser.