2Simple bulk surface scheme with an evaporation efficiency (beta), following the simple surface
3of LMDZ (LMDZ6, libf/phylmd: calbeta_mod.f90, calcul_fluxs_mod.f90, cdrag_mod.f90):
4 - E = beta * rho * Ch * U * (qsat(Ts, Ps) - q1)
5 - H = rho * Ch * U * (cp * (Ts - T1) - g * z1)
7with U = min_wind + |V| (LMDZ min_wind_speed, gustiness not taken into account), the neutral
8coefficients (kappa / ln(1 + z1/z0))**2 (z0h for heat) and, optionally, the Louis (1982)
9stability functions of the bulk Richardson number (default choice of LMDZ cdrag,
10iflag_corr_sta=iflag_corr_insta=2). Over ocean, z0 can be computed with the Charnock formula
13The module also provides a friction velocity with a Monin-Obukhov stability correction computed
14from the surface fluxes (as in SURFEX, COUPLING_IDEAL_FLUX and MODE_SBLS), used when the wind
15forcing is given through a roughness length.
24CB, CC, CD = 5., 5., 5.
29CHARNOCK, NU_AIR = 0.018, 14.E-6
34 Bulk Richardson number (LMDZ cdrag)
35 :param z1: height of the first atmospheric level (m)
36 :param t1, q1: temperature (K) and specific humidity (kg/kg) at the first level
37 :param ts, qs: surface temperature (K) and specific humidity (kg/kg)
38 :param speed: wind speed at the first level (m/s)
41 retv = cst.Rv / cst.Rd - 1.
42 rvtmp2 = cst.Cpv / cst.Cpd - 1.
43 zdu2 = max(CEPDU2, speed**2)
44 tsolv = ts * (1. + retv * max(qs, 0.))
45 tvd = (t1 + cst.g * z1 / cst.Cpd / (1. + rvtmp2 * q1)) * (1. + retv * max(q1, 0.))
46 return cst.g * z1 * (tvd - tsolv) / (zdu2 * tvd)
51 Drag coefficients for momentum and heat (LMDZ cdrag)
52 :param z1: height of the first atmospheric level (m)
53 :param z0, z0h: roughness lengths for momentum and heat (m)
54 :param ri: bulk Richardson number
55 :param stability: True to apply the Louis (1982) stability functions
59 zzzcd = cst.Karman / math.log(1. + z1 / z0)
61 chn = zzzcd * cst.Karman / math.log(1. + z1 / z0h)
65 zucf = 1. / (1. + 3. * CB * CC * cdn * math.sqrt(abs(ri) * (1. + z1 / z0)))
66 fm = max(1. - 2. * CB * ri * zucf, F_RI_CD_MIN)
67 fh = max(1. - 3. * CB * ri * zucf, F_RI_CD_MIN)
70 zscf = math.sqrt(1. + CD * abs(ri))
71 fm = max(1. / (1. + 2. * CB * ri / zscf), F_RI_CD_MIN)
72 fh = max(1. / (1. + 3. * CB * ri * zscf), F_RI_CD_MIN)
73 return cdn * fm, chn * fh
78 Roughness length over ocean (Charnock formula with a smooth flow term, LMDZ cdrag)
79 :param ustar: friction velocity (m/s)
82 ustar = max(ustar, 1.E-3)
83 return CHARNOCK * ustar**2 / cst.g + 0.11 * NU_AIR / ustar
86def beta_fluxes(t1, q1, rho, u, v, z1, ts, ps, beta, z0, z0h, stability):
88 Surface fluxes of the beta scheme
89 :param t1, q1: temperature (K) and specific humidity (kg/kg) at the first level
90 :param rho: air density at the first level (kg/m3)
91 :param u, v: wind components at the first level (m/s)
92 :param z1: height of the first atmospheric level above the surface (m)
93 :param ts: surface temperature (K)
94 :param ps: surface pressure (Pa)
95 :param beta: evaporation efficiency (0-1)
96 :param z0: roughness length for momentum (m) or 'CHARNOCK'
97 :param z0h: roughness length for heat (m), None to use z0
98 :param stability: True to apply the stability functions
99 :return: (sensible heat flux (W/m2), water vapour flux (kg/m2/s), friction velocity (m/s))
102 qsat = QSAT(ts, ps,
'NEW')
103 qs = beta * qsat + (1. - beta) * q1
104 speed = math.sqrt(u**2 + v**2)
105 wind = MIN_WIND_SPEED + speed
107 if isinstance(z0, str):
115 sshf = rho * cdh * wind * (cst.Cpd * (ts - t1) - cst.g * z1)
116 swf = beta * rho * cdh * wind * (qsat - q1)
117 return sshf, swf, math.sqrt(cdm) * wind
121 """Paulson stability function for momentum (SURFEX MODE_SBLS)"""
123 x = (1. - 15. * z_o_lmo)**0.25
124 return math.log((1. + x**2) * (1. + x)**2 / 8.) - 2. * math.atan(x) + math.pi / 2.
125 return -4.7 * z_o_lmo
130 Friction velocity with a Monin-Obukhov stability correction computed from the surface
131 fluxes (SURFEX COUPLING_IDEAL_FLUX, MODE_SBLS: USTAR and LMO functions)
132 :param wind: wind speed at the first level (m/s)
133 :param z: height of the first level (m)
134 :param z0: roughness length (m)
135 :param sfth: kinematic surface flux of potential temperature (K m/s)
136 :param sfrv: kinematic surface flux of water vapour mixing ratio (kg/kg m/s)
137 :param theta, rv: potential temperature (K) and mixing ratio (kg/kg) at the first level
143 return wind * cst.Karman / math.log(z / z0)
144 return wind * cst.Karman / (math.log(z / z0) -
paulson_psim(z / lmo) +
148 eps = (cst.Rv - cst.Rd) / cst.Rd
149 thetav = theta * (1. + eps * rv)
150 q0 = sfth + thetav * eps * sfrv
153 lmo = - max(ustar, 1.E-6)**3 / (cst.Karman * cst.g / thetav * q0)
154 return None if abs(lmo) > 10000.
else lmo
156 ustar = ustar_func(
None)
157 if sfth != 0.
or sfrv != 0.:
158 ustar = max(ustar, 0.01)
160 ustar = ustar_func(lmo_func(ustar))
mo_ustar(wind, z, z0, sfth, sfrv, theta, rv)
beta_fluxes(t1, q1, rho, u, v, z1, ts, ps, beta, z0, z0h, stability)
drag_coefficients(z1, z0, z0h, ri, stability)
bulk_richardson(z1, t1, q1, ts, qs, speed)