Surface Layer Boundaries

The surface layer provides an abstraction layer for users to directly specify diffusive fluxes at a boundary via a multitude of methods. More specifically, the surface layer condition applies an impenetrable condition for the boundary normal velocity but higher order extrapolation for all the other variables and then allows a user to specify a method for calculating the diffusive fluxes

erf.surface_layer.flux_type    = STRING    #flux types (moeng, custom, bulk_coeff)

The bulk_coeff flux type employs bulk drag coefficients to compute the diffusive stresses while the moeng type employs Moeng’s formulation for Monin-Obukhov similarity theory (MOST) and custom allows the user to directly specify the fluxes through ustar; tstar; qstar. Currently, the MOST pathway is the primary flux type employed in ERF simulations and will be the focus in subsequent sections.

With bulk_coeff fluxes, and on land cells where a land-surface model supplies the stresses, the roughness length is replaced each step by the value diagnosed from the stress by inverting the log law, \(z_0 = z_{ref} \exp[-(\kappa \overline{u}/u_{\star} + \Psi_m(\zeta))]\), and bounded to \(10^{-7}\,\mathrm{m} \le z_0 \le \min(1.5\,\mathrm{m}, z_{ref}/2)\). When the stress is zero (erf.most.Cd = 0, or a land-surface model that returns no momentum flux) \(u_{\star}\) sits at its floor of machine epsilon and the exponent is far beyond the floating-point range; the lower bound is then returned without evaluating the exponential, so a run with amrex.fpe_trap_overflow = 1 keeps going.

MOST Theory

Monin-Obukhov similarity theory (MOST) is used to describe the atmospheric surface layer (ASL), the lowest part of the atmospheric boundary layer. The implementation of MOST in ERF follows that in AMR-Wind, which is based on the surface layer profiles presented in P. van der Laan, et al., Wind Energy, 2017 and D. Etling, “Modeling the vertical ABL structure”, 1999. MOST theory assumes that the ASL is in a steady state and horizontally homogeneous, and kinematic fluxes due to turbulent transport (\(\overline{u^{'}w^{'}}\), \(\overline{v^{'}w^{'}}\), and \(\overline{\theta^{'}w^{'}}\)) are constant with height. \(\Phi_m\) and \(\Phi_h\) are the nondimensional wind shear and temperature gradient, respectively, which are assumed to follow universal similarity laws based on dimensional arguments. With these assumptions, the MOST theory can be written as:

\[ \begin{align}\begin{aligned}\overline{u^{'}} \overline{w^{'}} = {\rm const} = -u^{2}_{\star},\\\overline{w^{'}} \overline{\theta^{'}} = {\rm const} = -u_{\star}\theta_{\star},\\\overline{w^{'}} \overline{q_{v}^{'}} = {\rm const} = -u_{\star}q_{v,\star},\\\Phi_{m}(\zeta) = \frac{\kappa z}{u_{\star}} \frac{\partial \overline{u}(z)}{\partial z},\\\Phi_{h}(\zeta) = \frac{\kappa z}{u_{\star}} \frac{\partial \overline{\theta}(z)}{\partial z}\end{aligned}\end{align} \]

where the nondimensional gradients are expressed in terms of the MOST stability parameter, \(\zeta = \frac{z}{L} = -\frac{\kappa z}{u_{\star}^{3}} \frac{g}{\overline{\theta}} \overline{w^{'}\theta^{'}}\), which serves as a surface layer scaling parameter. Here, \(L\) is the Monin-Obukhov length, \(u_{\star}\) is the friction velocity (defined for \(u\) aligned with the wind direction), \(\theta_{\star}\) is the surface layer temperature scale, \(\overline{\theta}\) is the reference virtual potential temperature for the ASL, and \(\kappa\) is the von Karman constant (taken to be \(0.41\)).

Integration of the MOST assumption equations give the classical MOST profiles of mean velocity, potential temperature, and water vapor

\[ \begin{align}\begin{aligned}\overline{u}(z) &= \frac{u_{\star}}{\kappa} \left[ \mathrm{ln} \left(\frac{z}{z_0}\right) - \Psi_m(\zeta)\right],\\\overline{\theta}(z) - \theta_0 &= \frac{\theta_{\star}}{\kappa} \left[ \mathrm{ln}\left(\frac{z}{z_0}\right) - \Psi_{h}(\zeta) \right]\\\overline{q_{v}}(z) - q_{v,0} &= \frac{q_{v,\star}}{\kappa} \left[ \mathrm{ln}\left(\frac{z}{z_0}\right) - \Psi_{h}(\zeta) \right]\end{aligned}\end{align} \]

where \(\theta_0\) and \(q_{v,0}\) are the surface values and \(z_0\) is a characteristic roughness height. The integrated similarity functions,

\[ \begin{align}\begin{aligned}\Psi_{m}(\zeta) &= \int_{0} ^{\frac{z}{L}} [1-\Phi_{m}(\zeta)]\frac{d\zeta}{\zeta},\\\Psi_{h}(\zeta) &= \int_{0} ^{\frac{z}{L}} [1-\Phi_{h}(\zeta)]\frac{d\zeta}{\zeta}\end{aligned}\end{align} \]

are calculated analytically from empirical gradient functions \(\Phi_m\) and \(\Phi_h\), which are defined piecewise for stable and unstable values of the stability parameter.

Unstable: \((\zeta < 0)\)

\[ \begin{align}\begin{aligned}\Phi_{m} &= (1-\gamma_{1}\zeta)^{-\frac{1}{4}}, \quad \Psi_{m} = \mathrm{ln}\left[\frac{1}{8}(1+\Phi_{m}^{-2})(1+\Phi_{m}^{-1})^{2}\right]-2\arctan(\Phi_{m}^{-1})+\frac{\pi}{2},\\\Phi_{h} &= \sigma_{\theta}(1-\gamma_{2}\zeta)^{-\frac{1}{2}}, \quad \Psi_{h} = (1+\sigma_{\theta}) \mathrm{ln} \left[\frac{1}{2}(1+\Phi_{h}^{-1}) \right]+(1-\sigma_{\theta}) {\mathrm{ln}} \left[\frac{1}{2}(-1+\Phi_{h}^{-1})\right]\end{aligned}\end{align} \]

Stable: \((\zeta > 0)\)

\[ \begin{align}\begin{aligned}\Phi_{m} &= 1+\beta \zeta, \quad \Psi_{m}=-\beta \zeta,\\\Phi_{h} &= \sigma_{\theta}+\beta \zeta, \quad \Psi_{h}=(1-\sigma_{\theta})\mathrm{ln}(\zeta)-\beta \zeta,\end{aligned}\end{align} \]

where the constants take the values proposed in Dyer, Boundary Layer Meteorology, 1974:

\[\sigma_{\theta}=1, \quad \beta = 5, \quad \gamma_{1}=16, \quad \gamma_{2}=16\]

The stable side can instead take the quasi-normal scale elimination (QNSE) form of Sukoriansky, Galperin and Perov, Boundary-Layer Meteorology, 2005 with erf.most.stable_functions = qnse:

\[\Phi = \frac{1 + a\,\zeta}{1 + b\,\zeta}, \quad \Psi = -\frac{a - b}{b}\,\mathrm{ln}(1 + b\,\zeta),\]

with separate coefficients for momentum and heat (erf.most.qnse_am, erf.most.qnse_bm, erf.most.qnse_ah, erf.most.qnse_bh). The QNSE theory gives eddy viscosities and diffusivities as functions of the Richardson number; the rational form in \(\zeta\) and the default coefficients, 2.5 and 0.2 for both momentum and heat, are those of ERF’s MRF and YSU schemes (erf.qnse_* with erf.enable_qnse_stable_functions), not values quoted from the paper. The form changes the whole stable side, not only its tail: near neutral \(\Phi \approx 1 + (a - b)\,\zeta\), a slope of 2.3 with the defaults against the Businger-Dyer 5 (observations give 4.7 to 6), so at \(\zeta = 0.1\) the correction is about half the Businger-Dyer one and \(u_\star\) already moves by a few percent; far from neutral \(\Phi\) tends to \(a/b = 12.5\), so the surface stress and heat flux fall off more slowly than with the linear form, which is the limit \(b \to 0\) at \(a = \beta\). A choice such as \(a = 5.2\), \(b = 0.2\) keeps the Businger-Dyer slope near neutral with a bounded \(\Phi\) (asymptote 26). With \(a_h = a_m\) and \(b_h = b_m\), as in the defaults, \(\Phi_h = \Phi_m\) and the turbulent Prandtl number is 1 on the stable side, as with Businger-Dyer; a stability-dependent Prandtl number, the distinguishing feature of QNSE, needs heat coefficients of its own. The surface-layer keys are separate from the PBL schemes’ keys, which the surface layer does not read; ERF prints a warning at start-up when an MRF or YSU run sets the two differently. The 2 m and 10 m diagnostics hold \(\zeta\) at 1 with Businger-Dyer and at the kernels’ bound of 100 with QNSE, whose fold can lie above 1, so that they evaluate the profile at the \(\zeta\) of the flux. The unstable side is Businger-Dyer with either choice. The choice applies to the prescribed-flux (Moeng) kernels and to their companions: the surface gradients the PBL schemes take from the MOST profile at the first cell, the 2 m and 10 m diagnostics, the surface shear production of the MYNN TKE, and the immersed wall laws (the legacy law with erf.if_stability_correction and the fraction_stress law). The prescribed-temperature kernels use the Jimenez (2012) functions on both sides and refuse the option, as do the adiabatic kernels and the custom, rico and bulk_coeff fluxes, which use no stability function. The IBSEB building faces keep the Businger-Dyer functions, and the Cloud Chamber its Jimenez pair. A side-face surface layer reads its own erf.<face>.most.stable_functions; the immersed wall laws read the unqualified erf.most.* keys only.

Inverting the equations above, the MOST stability parameter,

\[\zeta=\frac{z}{L} = -\kappa z \frac{g}{\bar{\theta}} \frac{\theta_{\star}}{u^{2}_{\star}}\]

is determined by the friction velocity

\[u_{\star} = \kappa \overline{u}/[\mathrm{ln}(z/z_0)-\Psi_{m}({z}/{L})]\]

and the characteristic surface layer temperature

\[\theta_{\star} = \kappa (\overline{\theta}-\theta_0)/[\mathrm{ln}(z / z_0)-\Psi_{h}(z/L)]\]

MOST Implementation

As noted in Surface Layer Boundaries, the boundary conditions for velocity, temperature, and water vapor do not change with the flux type. Therefore, the MOST implementation in ERF is a specific method for computing the diffusive fluxes, which are directly written into the stress tensor/vector. The MOST pathway is structured to allow either the surface temperature (\(\theta_0\)) or surface temperature flux (\(\overline{w^{'}\theta^{'}}\)) to be enforced. To compute the MOST flux, the following algorithm is applied:

  1. Horizontal (planar) averages \(\bar{u}\), \(\bar{v}\) and \(\overline{\theta}\) are computed at a reference height \(z_{ref}\) assumed to be within the surface layer.

  2. Initially, neutral conditions (\(L=\infty, \zeta=0\)) are assumed and used to compute a provisional \(u_{\star}\) using the equation given above. If \(\theta_0\) is specified, the above equation for \(\theta_{\star}\) is applied and then the surface flux is computed \(\overline{w^{'}\theta^{'}} = -u_{\star} \theta_{\star}\). If \(\overline{w^{'}\theta^{'}}\) is specified, \(\theta_{\star}\) is computed as \(-\overline{w^{'}\theta^{'}}/u_{\star}\) and the previous equation is inverted to compute \(\theta_0\).

  3. The stability parameter \(\zeta\) is recomputed using the equation given above based on the provisional values of \(u_{\star}\) and \(\theta_{\star}\).

  4. The previous two steps are repeated iteratively, sequentially updating the values of \(u_{\star}\) and \(\zeta\), until the change in the value of \(u_{\star}\) on each iteration falls below a specified tolerance.

  5. Once the MOST iterations have converged, and the planar average surface flux values are known, the approach from Moeng, Journal of the Atmospheric Sciences, 1984 is applied to consistently compute local surface-normal stress/flux values (e.g., \(\tau_{xz} = - \rho \overline{u^{'}w^{'}}\)):

    \[ \begin{align}\begin{aligned}\left. \frac{\tau_{xz}}{\rho} \right|_0 &= u_{\star}^{2} \frac{(u - \bar{u})\overline{{\scriptstyle|}\mathbf{u}{\scriptstyle|}} + \bar{u}\sqrt{u^2 + v^2} }{\overline{{\scriptstyle|}\mathbf{u}{\scriptstyle|}}^2},\\\left. \frac{\tau_{yz}}{\rho} \right|_0 &= u_{\star}^{2} \frac{(v - \bar{v})\overline{{\scriptstyle|}\mathbf{u}{\scriptstyle|}} + \bar{v}\sqrt{u^2 + v^2} }{\overline{{\scriptstyle|}\mathbf{u}{\scriptstyle|}}^2},\\\left. \frac{\tau_{\theta z}}{\rho} \right|_0 &= \theta_\star u_{\star} \frac{\overline{{\scriptstyle|}\mathbf{u}{\scriptstyle|}} ({\theta} - \overline{\theta}) + \sqrt{u^2+v^2} (\overline{\theta} - \theta_0) }{ \overline{{\scriptstyle|}\mathbf{u}{\scriptstyle|}} (\overline{\theta} -\theta_0) } = u_{\star} \kappa \frac{\overline{{\scriptstyle|}\mathbf{u}{\scriptstyle|}} ({\theta} - \overline{\theta}) + \sqrt{u^2+v^2} (\overline{\theta} - \theta_0) }{ \overline{{\scriptstyle|}\mathbf{u}{\scriptstyle|}} [ \mathrm{ln}(z_{ref} / z_0)-\Psi_{h}(z_{ref}/L)] }\\\left. \frac{\tau_{q_{v} z}}{\rho} \right|_0 &= q_{v,\star} u_{\star} \frac{\overline{{\scriptstyle|}\mathbf{u}{\scriptstyle|}} ({q_{v}} - \overline{q_{v}}) + \sqrt{u^2+v^2} (\overline{q_{v}} - q_{v,0}) }{ \overline{{\scriptstyle|}\mathbf{u}{\scriptstyle|}} (\overline{q_{v}} - q_{v,0}) } = u_{\star} \kappa \frac{\overline{{\scriptstyle|}\mathbf{u}{\scriptstyle|}} ({q_{v}} - \overline{q_{v}}) + \sqrt{u^2+v^2} (\overline{q_{v}} - q_{v,0}) }{ \overline{{\scriptstyle|}\mathbf{u}{\scriptstyle|}} [ \mathrm{ln}(z_{ref} / z_0)-\Psi_{h}(z_{ref}/L)] }\end{aligned}\end{align} \]

    where \(\bar{\psi}\) are plane averaged values (at \(z_{ref}\)) and \(\overline{{\scriptstyle|}\mathbf{u}{\scriptstyle|}}\) is the plane averaged magnitude of horizontal velocity (plane averaged wind speed). We note a slight variation in the denominator of the velocity terms from the form of the equations presented in Moeng. This difference is due to how the stress components are computed — i.e., the stress componen in Moeng’s work, \(\tau_{xz,0}\), is given by \(\tau_{xz,0} = u_{\star}^{2} \bar{u}/\overline{{\scriptstyle|}\mathbf{u}{\scriptstyle|}}\), where \(\bar{u}/\overline{{\scriptstyle|}\mathbf{u}{\scriptstyle|}}\) is the unit vector component applied to the total stress \(u_{\star}^{2}\).

    Finally, it must be noted that using terrain-fitted coorindates will modify the surface normal and tangent vectors. Consequently, the MOST implementation with terrain-fitted coorindates will formally require local vector rotations. Stress rotations with MOST are a work in progress but may be activated with erf.use_rotate_surface_flux = true. Therefore, running with terrain (erf.terrain_type = StaticFittedMesh) and with MOST (surface_flux.flux_type = "moeng") is not recommended.

MOST Inputs

To evaluate the fluxes with MOST, the surface rougness parameter \(z_{0}\) must be specified. This quantity may be considered a constant or may be parameterized through the friction velocity \(u_{\star}\). ERF supports five methods for parameterizing the surface roughness: constant, charnock, modified_charnock, donelan, and wave_coupled. The latter four methods parameterize \(z_{0} = f(u_{\star})\) and are described in Jimenez & Dudhia, American Meteorological Society, 2018 and Warner et. al, Ocean Modelling, 2010. The rougness calculation method may be specified with

erf.most.roughness_type_land = STRING  # Z_0 type over land (constant)
erf.most.roughness_type_sea  = STRING  # Z_0 type over water (charnock, coare3.0,
                                       # donelan, modified_charnock, wave_coupled,
                                       # constant)

Land and water are set separately. The older single erf.most.roughness_type input was replaced by these two and now aborts the run if it is present. The complete list of surface-layer inputs, with acceptable values and defaults, is in Surface Layer (MOST).

If the charnock method is employed, the \(a\) constant may be specified with erf.most.charnock_constant (defaults to 0.0185). If the modified_charnock method is employed, the depth \(d\) may be specified with erf.most.modified_charnock_depth (defaults to 30 m). If the wave_coupled method is employed, the user must provide wave height and mean wavelength data.

While the MOST methods relevant to air-sea interfaces (charnock, modified_charnock, and wave_coupled) dynamically compute \(z_{0}\), the constant case can also allow for spatially varying \(z_{0}\) if an inputs file is employed. More specifically, one may specify

erf.most.roughness_file_name    = STRING    #Name of file that contains (x,y,z_0)

in the inputs file. The file contains headerless x y z0 triples, ordered with x varying fastest at xlo + i*dx, ylo + j*dy for zero-based indices. Cover the full horizontal grid with finite, positive z0 in meters. Non-EB terrain fills the surface slab; EB extends each value through the vertical column, including ghosts. One file supplies level 0 and interpolates to finer levels; per-level files preserve sharp material boundaries.

When computing an average \(\overline{\phi}\) for the MOST boundary, where \(\phi\) denotes a generic variable, ERF supports a variety of approaches. Specifically, planar averages and local region averages may be computed with or without time averaging. With each averaging methodology, the query point \(z\) may be determined from the following procedures: specified distance \(z_{ref}\) inward from the selected boundary, specified \(k_{index}\), or (when employing terrain-fitted coordinates) specified normal vector length \(z_{ref}\). The available inputs to the MOST boundary and their associated data types are

erf.most.average_policy    = INT    #POLICY FOR AVERAGING
erf.most.use_normal_vector = BOOL   #USE NORMAL VECTOR W/ TERRAIN?
erf.most.use_interpolation = BOOL   #INTERPOLATE QUERY POINT W/ TERRAIN?
erf.most.time_average      = BOOL   #USE TIME AVERAGING?
erf.most.z0                = FLOAT  #SURFACE ROUGHNESS [m]
erf.most.zref              = FLOAT  #QUERY DISTANCE (HEIGHT OR NORM LENGTH) [m]
erf.most.pot_surf_temp     = FLOAT  #SPECIFIED SURFACE POTENTIAL TEMP [K]
erf.most.abs_surf_temp     = FLOAT  #SPECIFIED SURFACE ABSOLUTE TEMP [K]
erf.most.surf_temp_flux    = FLOAT  #SPECIFIED SURFACE TEMP FLUX [K-m/s]
erf.most.surf_heating_rate = FLOAT  #SPECIFIED RATE OF SURFACE TEMP CHANGE [K/h]
erf.most.surf_moist        = FLOAT  #SPECIFIED SURFACE MOISTURE [-]
erf.most.surf_moist_flux   = FLOAT  #SPECIFIED SURFACE MOISTURE FLUX [m/s]
erf.most.k_arr_in          = INT    #SPECIFIED K INDEX ARRAY (MAXLEV)
erf.most.radius            = INT    #SPECIFIED REGION RADIUS [grid cells]
erf.most.time_window       = FLOAT  #WINDOW FOR TIME AVG [s]

On the surface-temperature moisture path, when no positive most.surf_moist is available, the surface moisture used in the thermodynamic MOST state falls back to the atmospheric value.

When neither erf.most.zref nor erf.most.k_arr_in is given, every mesh uses the center of the first cell above the surface as \(z_{ref}\). On a vertically stretched mesh (erf.grid_stretching_ratio or erf.terrain_z_levels) that center, and the cell holding a specified \(z_{ref}\), come from the actual z levels rather than from a uniform spacing. On a mesh with terrain-fitted coordinates (which a stretched mesh without erf.terrain_type becomes) the first cell’s height above the surface varies with the terrain, so the default is set column by column: half of the local first-cell thickness, with the query point at that cell’s center (no displacement along the surface normal and nothing to interpolate) whichever of erf.most.use_normal_vector and erf.most.use_interpolation is set, and on a refined level that level’s own first cell. erf.most.radius must be 0 with the default. A terrain-fitted mesh used to query 10 m above the surface instead; set erf.most.zref = 10 to keep that query. Every terrain-fitted deck without erf.most.zref changes: when the first cell is thicker than 10 m the same cell’s wind is used, but the log law now takes the cell center height rather than 10 m, and when it is thinner the cell changes too. The YSU scheme requires the reference at 10 m, so on a terrain-fitted mesh it needs erf.most.zref = 10 with erf.most.use_interpolation = true. A specified query height that lies exactly on a cell face belongs to the cell above the face, or is interpolated across it when erf.most.use_interpolation is true. The height in use, or its range over the columns, is printed at start-up (MOST reference height at level ...). It is always the height above the surface; on the low z face of a constant-dz mesh, however, a value given in erf.most.zref is read as an absolute z, the height plus geometry.prob_lo[2], and erf.most.k_arr_in as an absolute cell index.

We now consider two concrete examples. To employ an instantaneous planar average at a specified vertical height above the bottom surface, one would specify:

erf.most.average_policy    = 0
erf.most.use_normal_vector = false
erf.most.time_average      = false
erf.most.z0                = 0.1
erf.most.zref              = 1.0
erf.most.surf_temp_flux    = 0.0
erf.most.surf_moist_flux   = 0.0

By contrast, local region averaging would be employed in conjunction with time averaging for the following inputs:

erf.most.average_policy    = 1
erf.most.use_normal_vector = true
erf.most.use_interpolation = true
erf.most.time_average      = true
erf.most.z0                = 0.1
erf.most.zref              = 1.0
erf.most.surf_temp_flux    = 0.0
erf.most.surf_moist_flux   = 0.0
erf.most.radius            = 1
erf.most.time_window       = 10.0

In the above case, use_normal_vector utilizes the a local surface-normal vector with length \(z_{ref}\) to construct the positions of the query points. Each query point, and surrounding points that are within erf.most.radius from the query point, are interpolated to and averaged; for a radius of 1, 27 points are averaged. The time average is completed by way of an exponential filter function whose peak coincides with the current time step and tail extends backwards in time

\[\frac{1}{\tau} \int_{-\infty}^{0} \exp{\left(t/\tau\right)} \, f(t) \; \rm{d}t.\]

Due to the form of the above integral, it is advantageous to consider \(\tau\) as a multiple of the simulation time step \(\Delta t\), which is specified by erf.most.time_window. As erf.most.time_window is reduced to 0, the exponential filter function tends to a Dirac delta function (prior averages are irrelevant). Increasing erf.most.time_window extends the tail of the exponential and more heavily weights prior averages.

The state of this filter is written to and read from checkpoint files, so a restarted run continues the average rather than beginning it again from the instantaneous value; see Checkpoint / Restart. Note that regridding rebuilds the averaging containers and therefore restarts the filter on the affected level.

Low-speed corrections

The following options are available:

erf.most.include_wstar       = true
erf.most.include_subgrid_vel = true
erf.most.pblh_calc           = MYNN25

These correspond to a mean surface velocity of

\[|\bar{\mathbf{u}}| = \sqrt{u^2 + v^2 + (\beta w_*)^2 + V_{sg}^2}\]

where \(w_*\) is the (Deardorff) convective velocity scale and \(\beta=1.2\) (Beljaars 1995, QJRMS). Because \(w_*\) is computed from the boundary layer depth, erf.most.include_wstar requires erf.most.pblh_calc to name a PBL height scheme; leaving it at its default of none is an error, since no boundary layer depth would ever be diagnosed. The surface layer diagnoses the MYNN25 height itself, but YSU and MRF take the height from the PBL scheme of the same name, so erf.most.pblh_calc = YSU or MRF requires the same erf.pbl_type on every level; any other combination is an error.

Moving surface

Over an ocean the surface moves with the current, and the stress depends on the wind relative to it (e.g. Bye and Wolff 1999, JPO). With

erf.most.surface_current = 0.5 0.2

the water surface moves at \((u_s, v_s)\) = (0.5, 0.2) m/s along the grid’s x and y axes, not east and north: on a rotated or projected grid an earth-relative current must first be turned into the grid’s directions. The surface layer takes \((u - u_s, v - v_s)\) wherever it uses the near-surface wind: in the mean speed \(|\bar{\mathbf{u}}|\) and mean components behind \(u_*\), the Obukhov length and the roughness, in the direction and magnitude of the stresses, and in the wind speed of the heat and moisture fluxes. The 10 m wind diagnostics u_10m and v_10m are the relative wind from the similarity profile plus the current, so they remain winds over the ground.

PBL schemes take \(u_*\), \(\theta_*\) and the Obukhov length from the surface layer, so these are relative to the surface, while the winds a scheme reads from the grid itself stay absolute. The vertical shear does not depend on the frame, since the current is the same at every height of a column, but a wind speed does. YSU, for example, forms its surface bulk Richardson number from the relative mean speed of the surface layer but those of the levels above from the absolute wind, and the countergradient momentum terms of the newer YSU use the absolute wind at the lowest level. MRF likewise forms the bulk Richardson numbers of its boundary-layer height from the absolute wind. MYNN reads only the shear and the surface-layer scales from the wind, so it is consistent with the moving surface.

Only water moves. A face of the lowest cells takes the current where the cells on both sides of it are water (land mask 0), and is at rest over land and buildings. A water cell on the coast therefore has one face at rest across the coastline, and where the surface layer works at cell centers, averaging the two faces of the cell, it sees half the current along that direction. A current set with erf.most.surface_current is uniform and takes no account of where the water is: lakes and rivers in the land mask move with it as well as the sea, so it is meant for idealized domains and domains whose only water is the ocean. A surface with no water is an error, since the current would do nothing; idealized cases are all land unless erf.is_land = 0. The current is applied at the z-low face on every level, and is not supported with EB terrain.

With erf.use_coupled_currents an ocean coupler supplies the current instead, as eastward and northward components at the cell centers of the level-0 surface, through ERF::ApplyOceanSurfaceState. They are turned to the grid axes with the grid orientation from the latitude and longitude (a grid without them is taken to be aligned with east) and averaged to the faces. A face takes the current where the cells on both sides of it are water and covered by the ocean, and is at rest elsewhere, including before the coupler’s first call; lakes the ocean model does not reach stay at rest. The surface is therefore at rest when ERF initializes, so the initial fluxes, and the TKE initialized from \(u_{\star}\), use the absolute wind; the relative wind takes over from the first step after the coupler’s first call. A regridded level 0 takes the coupler’s last current again. Like the coupled SST, it is applied on level 0 only; refined levels are at rest, so their fluxes use the absolute wind and differ from level 0’s where they meet, and ERF warns at start-up when there are any. The option needs a surface-layer boundary at the z-low face, or ERF stops at start-up.

Limits on the similarity solution

In every flux kernel the log-law brackets \(C - \psi_m\) and \(C - \psi_h\), with \(C = \ln(z_{ref}/z_0)\), are held at or above \(C/2\) clamped to \([1/2,\,1]\). In strongly unstable, weak-wind air over rough ground \(\psi\) exceeds \(C\), and without the floor \(u_{\star}\) turns negative and, for a prescribed heat flux, the diagnosed surface temperature falls below the air under an upward flux. The floor is 1 wherever \(z_{ref} \geq e^2 z_0\), stays under the neutral value \(C\) wherever \(z_{ref} \geq e^{1/2} z_0\), and keeps \(u_{\star}\) positive and finite where the roughness length reaches or exceeds \(z_{ref}\) (\(C \leq 0\), e.g. tall canopies on a fine vertical grid). The value of the floor is tied to the 0.5 under-relaxation of the \(u_{\star}\) iteration, which converges on the unstable branch only for brackets above about 0.8.

With a prescribed surface temperature, \(z_{ref}/L\) solves \(z_{ref}/L = Ri_b\,(C - \psi_m)^2/(C - \psi_h)\) by under-relaxed iteration. In stable air with \(z_0\) comparable to or above \(z_{ref}\) the residual of this equation can come within the tolerance of zero without crossing it, and the iteration then creeps instead of converging. If it has not converged after the maximum number of passes, the constant-roughness kernels (surface_temp and its EB counterpart) solve the same equation by bracketing and bisection, starting from where the iteration started, instead of stopping the run.

A prescribed stable flux (erf.most.surf_temp_flux < 0) can only be carried down to a minimum wind at \(z_{ref}\): with the Businger-Dyer functions the wind a friction velocity supports, \(u_{\star}(C + 5\,z_{ref}/L)/\kappa\), is smallest at \(z_{ref}/L = C/10\), and below that wind the flux has no similarity solution (Basu et al., “An inconvenient ‘truth’ about using sensible heat flux as a surface boundary condition in models under stably stratified regimes”, Boundary-Layer Meteorol., 2008). Where the bracket floor binds first (\(C < 1/3\)), the minimum is instead where \(C + 5\,z_{ref}/L\) reaches the floor. With the QNSE functions the supported wind is \(u_{\star}(C + c\,\mathrm{ln}(1 + b_m z_{ref}/L))/\kappa\) with \(c = (a_m - b_m)/b_m\); its first minimum, found by a safeguarded Newton iteration on the bracket where the supported wind falls, sits at a lower wind than Businger-Dyer’s (0.53 against 0.70 m/s at \(z_{ref}\) = 4.43 m, \(z_0\) = 0.5 m and a flux of -0.0025 K m/s), and for \(C\) above \(c\,(2 - \mathrm{ln}\,3)\) (10.4 with the default coefficients) there is none below the bound \(z_{ref}/L = 100\) of the kernels, which then hold \(z_{ref}/L\) there and reduce the flux as at a fold. Wherever the wind is below the minimum, for example under a forest canopy that slows the first-cell wind to about 1 m/s, ERF holds \(z_{ref}/L\) at the fold and applies only the virtual heat flux that the wind carries there, which is weaker than the prescribed one. Only the downward prescribed components are reduced: a prescribed evaporation flux that offsets part of the cooling is applied in full, and so is an upward sensible flux when a prescribed condensation flux makes the net flux stable. Prescribing the surface temperature (erf.most.pot_surf_temp, optionally with erf.most.surf_heating_rate to cool it in time, as the GABLS1 and Stable_ABL_Flat inputs do) avoids this limit. For weak-wind convective runs, erf.most.include_wstar adds the convective velocity scale to the wind and keeps the solution away from the bracket floor.

On a refined level, the MYNN25 diagnostic runs on the level’s own columns only when its grids run from the ground to the top of the domain in every column. A refined region that ends lower (a patch near the ground, say) cannot see the top of a boundary layer deeper than itself, and one that does not reach the ground (a region aloft) has no column to scan, so either takes the PBL height of the next coarser level at each of its columns instead: each fine column gets the height of the coarse column that holds it. With subcycling that is the coarse height of the start of the coarse step. With EB terrain every level still diagnoses its own.

The subgrid velocity scale \(V_{sg}\) handles weak large-scale flow that is underresolved (Mahrt & Sun 1995, MWR). This is parameterized as

\[V_{sg} = 0.32 \left(\frac{\Delta x}{5000} - 1 \right)^{0.33}\]

which vanishes for grid spacings of \(\Delta x < 5\) km.

The MYNN25 PBL height is found by scanning each column upwards from the ground, so it does not depend on how the grids are decomposed: where boxes are stacked in z, the scan runs on the whole column they make up. The scan ends at the top of the grids, so on a refined level that stops below the top of the domain a PBL top above the refined region is not found. The PBL height is zero wherever it is not found, and wherever the grids of a level do not reach the ground. With erf.terrain_type = EB the PBL height is stored on the three-dimensional grids, and every grid must start at the bottom of the domain (no decomposition in z); the run aborts otherwise.

Surface Layer boundary on all faces

While the surface layer boundary condition is primarily used on the bottom z face (zlo), it can also be applied to all other domain sides. This can allow MOST theory to be used on faces for simulating closed environments (e.g, cloud chamber).

To use the surface layer boundary on different faces, all existing MOST options are prefixed with the corresponding face name (xlo, ylo, zlo, xhi, yhi zhi). For example,

xlo.type = "surface_layer"
ylo.type = "surface_layer"

erf.xlo.surface_layer.flux_type = MOENG
erf.xlo.most.pot_surf_temp = 289.5
erf.xlo.most.surf_moist = 0.00765
erf.xlo.most.z0 = 0.000035
erf.xlo.most.zref = 0.03125
erf.xlo.most.average_policy = 1
erf.xlo.most.radius = 0

erf.ylo.surface_layer.flux_type = MOENG
erf.ylo.most.pot_surf_temp = 289.5
erf.ylo.most.surf_moist = 0.00765
erf.ylo.most.z0 = 0.000035
erf.ylo.most.zref = 0.03125
erf.ylo.most.average_policy = 1
erf.ylo.most.radius = 0

The face name is omitted when zlo is the only surface-layer face, so an input file written before this capability existed keeps working unchanged: with zlo.type = "surface_layer" and no other surface-layer face, erf.most.* and erf.surface_layer.* are read as before.

As soon as a second surface-layer face is declared, every face is expected to qualify its inputs, zlo included. Unqualified inputs are still honored in that case – they are applied to zlo, with a warning asking that they be migrated to erf.zlo.most.* and erf.zlo.surface_layer.* – so that adding a wall to a working deck cannot silently fall back to the built-in defaults. Giving both spellings at once (erf.most.z0 together with erf.zlo.most.z0, say) is an error and aborts, since there is no way to tell which one was meant.

Note that not all existing options are supported when using MOST on other faces (such as interpolation and time averaging). Currently the MOENG flux type is supported on all faces; bulk_coeff, custom and rico abort anywhere else. Of the surface thermodynamic pathways, only the prescribed surface potential temperature (most.pot_surf_temp) carries the orientation through to the flux, so a prescribed surface heat flux (most.surf_temp_flux), the fully adiabatic case, and any variable sea roughness (most.roughness_type_sea other than constant over water cells) abort on a face other than zlo rather than run with the zlo sign convention. The MOST PBL-height diagnostic (most.pblh_calc) and the free-convection correction it feeds (most.include_wstar) are likewise zlo-only. Lateral (x/y) surface-layer boundaries currently require every grid on that level to span its full vertical extent. Grids decomposed in z and partial-height refined grids are not supported; configure amr.max_grid_size_z accordingly. Deardorff LES, RANS, and PBL models, including SHOC, support SurfaceLayer only at zlo; they cannot be combined with lateral or upper surface-layer boundaries. Smagorinsky LES, including its 2-D variant, uses the generic all-face diffusion path and is supported.

Prescribed time-varying surface forcing

Instead of computing fluxes directly through MOST, the surface land/ocean fluxes can be prescribed over time from a text file.

Additionally, the sea-surface temperature can be prescribed while allowing MOST to compute the surface fluxes.

For prescribing surface fluxes from H, LE, and TAU:

erf.most.use_sfc_fluxes = true     # flag for prescribing surface fluxes
erf.most.sfc_file       = sfc.txt  # path to file containing surface data

where erf.most.sfc_file is the path to a text file with the following example format:

day sst(K) H(W/m2) LE(W/m2) TAU(m2/s2)
205.500 293.65   4.43  22.73 0.00
205.542 295.63  43.55  88.67 0.00
205.583 298.40 104.08 154.39 0.00

H and LE are dynamic fluxes and are applied as \(H/c_{p}\) and \(LE/L_{v}\); TAU is the kinematic stress \(u_{\star}^{2}\) and is multiplied by the local density, so the applied surface stress is \(\rho \, \mathrm{TAU}\).

This mode implies erf.most.flux_type = custom and is not compatible with an active land surface model, EB, or erf.most.rhosurf. The existing text-file forcing restriction with EB remains in effect.

For prescribing sea-surface temperature:

erf.most.use_sfc_sst = true     # flag for prescribing sea-surface temperature
erf.most.sfc_file    = sfc.txt  # path to file containing surface data

where erf.most.sfc_file is the path to a text file with the same format as above, or purely time and SST information, such as:

day sst(K)
203.000000  292.800
204.000000  294.580

The SST column in this file is absolute temperature in kelvin. ERF converts it to the SurfaceLayer’s canonical potential-temperature field using the physical surface pressure diagnosed from the lowest atmospheric cell. In contrast, erf.most.pot_surf_temp and erf.most.surf_heating_rate are already specified in the SurfaceLayer potential-temperature convention, while erf.most.abs_surf_temp (with erf.most.surf_heating_rate then a rate of change of the absolute temperature) is converted every step with the same diagnosed surface pressure. erf.most.surf_temp is the deprecated spelling of erf.most.pot_surf_temp. SST and skin-temperature data from WRFInput, wrflowinp, and Metgrid are kept as absolute temperature and converted the same way, with the current diagnosed surface pressure, each time the SurfaceLayer uses them; coupled SST is converted when it enters the SurfaceLayer, while Noah-MP’s absolute t_sfc remains owned by the radiation path and is not adopted as the SurfaceLayer field.

Notes

With erf.terrain_type = EB, erf.eb_boundary_type = SurfaceLayer activates MOST independently of zlo.type, which may remain SlipWall when covered by EB terrain. A diffusive closure is required. Prescribe roughness with erf.most.z0 or erf.most.roughness_file_name, using erf.is_land = 1 and erf.most.roughness_type_land = constant.

For any zlo.type, the first erf.data_log file reports u_star, t_star, and olen as nan (unavailable). The existing surface sum samples the lowest grid plane of the 3D EB fields, not the embedded surface; an average over that surface is not implemented.

EB SurfaceLayer does not support sea surface-flux models, planar SST/TSK, coupled-ocean SST, or LSM surface-temperature/flux providers. These planar providers have no defined mapping to EB cut cells.

  • For both flux and sst modes, the time column is reset relative to the simulation elapsed time (t=0s). This might cause issues with simulations initialized with real data, such as WRFInput.

  • The sst mode only applies the surface temperature where there are ocean cells (landmask=0). This can be forced with erf.is_land = 0.

  • The surface fluxes are currently applied regardless of land mask (both ocean and land).