1 Introduction

Turbulence measurements over complex terrain have recently been given increased attention, largely motivated by the need to quantify greenhouse gas fluxes (Baldocchi et al. 2000; Feigenwinter et al. 2008) and improve model parametrizations in numerical weather prediction models for wind power, hydrological and meteorological forecasting, which typically implement models that were developed for flat and statistically homogeneous terrain (e.g., Xue et al. 2001; Shamarock et al. 2008). For example, the flat-terrain relations developed through Monin–Obukhov similarity theory are widely implemented in models, but break down for steep, sloping terrain where the fluxes throughout the thin, slope-flow layer can vary by far more than 10 % (Nadeau et al. 2012). Given this increased attention to turbulence measurements over steep terrain, questions have arisen regarding discrepancies in the form of the governing flow equations applied to these flow scenarios. The roots of these concerns can be explained by the challenges that steep, sloping and/or geometrically variable terrain poses for the choice of coordinate systems, and subsequently how best to measure and then transform the velocity data into that coordinate system (Yuan et al. 2007, 2011; Ono et al. 2008; Ross and Grant 2014; Stiperski and Rotach 2014).

Near the surface in the atmospheric boundary layer (ABL), surface-normal wind shear acts parallel to the local terrain, whereas buoyancy always acts parallel to the gravitational force vector. In the case of flat terrain, it is obvious that the governing equations of motion should be written for a horizontal/vertical coordinate system because the terrain normal and gravitational vectors are parallel. However, for significantly steep terrain, the choice of coordinate system is not obvious, and implicitly, any choice consequently must consider that the forcings arising from buoyancy and shear are no longer perpendicular (Sun 2007). Most commonly, an orthogonal coordinate system that follows the sloping terrain (slope-normal/slope-parallel, hereafter SNSP; see Fig. 1c for a two-dimensional schematic) is used to simplify the momentum equations. However, in the SNSP coordinate system, the buoyancy force is no longer aligned with the terrain-normal direction. Clearly, the governing flow equations must be adapted to account for this reorientation. The SNSP forms of the momentum equations have been interpreted consistently between studies for pure upslope or downslope flows. However, the specific SNSP adaptations for slope flows with a cross-slope component have been largely unaddressed. In addition, formulations of the terms accounting for buoyant production or consumption of turbulence kinetic energy (TKE) in the TKE budget equation are inconsistent among various studies (see Sect. 8 for a more complete problem description). One of the primary goals of this study is to derive more generalized forms of the governing flow equations that are also appropriate for streamwise-oriented, terrain-following, SNSP coordinate systems, such that the adaptations are clear and that any discrepancies are easily rectified.

An additional complication for steep, complex terrain is that the velocity measurements must be taken within or transformed into the SNSP coordinate system. Herein, ‘complex terrain’ refers mainly to geometrical variability of the terrain that is significant enough that it cannot be lumped into a single roughness length or canopy scheme. It has been shown for sonic anemometer measurements over sloping terrain that mounting the sensor in an SNSP coordinate system reduces flow distortion, especially in the surface-normal direction (Geissbühler et al. 2000; Christen et al. 2001). However, since exact sensor alignment is difficult even for flat terrain, a tilt correction should also be performed to reduce cross-contamination between velocity components (Lee et al. 2004). This cross-contamination not only affects the mean velocity measurements through misalignment, but also contributes to greater errors in flux estimates, especially for the momentum fluxes (Kaimal and Haugen 1969; Wilczak et al. 2001).

The planar-fit tilt correction described by Wilczak et al. (2001) is a commonly-used technique employed to reduce the cross-contamination errors due to sensor misalignment. For measurements over more complex terrain, the sector-wise planar-fit (SPF) tilt correction is often used (Yuan et al. 2007, 2011; Ono et al. 2008). For the SPF, planar-fit tilt corrections are performed for individual wind-direction sectors. For example, it has been applied to a steeply sloping alpine site (Nadeau et al. 2012), at other mountainous sites (Yuan et al. 2007, 2011; Ono et al. 2008), and for benthic flux measurements in a river flow over a complex bedform (Lorke et al. 2013). This popularity has arisen because the SPF technique has been shown to provide better momentum flux estimates, compared to those of a single-sector planar fit, by accounting for the terrain-induced directional variability of the mean streamline plane (Ono et al. 2008). Implementation of the SPF approach requires selection of sector sizes, sector locations, and the planar-fit averaging time (see Sect. 3). These parameters are typically reported in studies with little or no justification and without sensitivity analyses. Since the appropriate SPF parameters are also site-dependent, their selection cannot be determined ad hoc. Therefore, another primary aim herein is to provide an objective methodology for determining the SPF degrees of freedom, and subsequently to quantify the implications of these choices on the resulting averaged momentum fluxes.

Overall, we seek to address issues associated with adapting common techniques, such as sensor tilt corrections and properly aligning the governing flow equations to SNSP coordinate systems, for field sites having steep and/or complex topography. More specifically, we address the governing assumptions and the most appropriate coordinate and equation alignments that compose a framework that best captures the turbulence statistics over steep and fully three-dimensional terrain. Field data from two sites, one flat and uniform, the other steep and variable, are used as examples for the methodologies introduced herein, and are presented in Sect. 2. Following Sect. 2 and with the exception of Sect. 10, the paper is organized into two parts: one addressing the optimization for sensor tilt corrections (Sects. 37) and the other addressing adaptations of the governing flow equations for SNSP coordinate systems (Sects. 8, 9). Each part begins with a more specific problem description, followed by methodologies, examples from field data, and discussions and recommendations. Finally, Sect. 10 summarizes the main conclusions and recommendations.

Fig. 1
figure 1

a The PLAYA and b SLOPE field experiment sites. c Schematic of a general slope-aligned (magenta, \(x_3,\,x_1\), for pure downslope flow, not drawn to scale with the SLOPE site) and horizontal–vertical (blue \(\hat{x}_3,\, \hat{x}_1\)) coordinate systems (the hat accent over a variable indicates the horizontal/vertical coordinate system). d Mountainous terrain surrounding the SLOPE site. For scale, the total slope length is \({\approx }1000~\hbox {m}\)

2 Field Experiment Sites

Datasets from two field experiment sites using the same sonic anemometer model-type are used to illustrate the methodologies and developments presented herein. The two sites were chosen because they represent drastically different topography (see Fig. 1), and therefore nicely elucidate the complexities associated with measurements over complex topography.

The first site (PLAYA) is essentially a control site for the sensor tilt-correction analysis. The PLAYA site (\(40.13498^\circ \)N, \(113.45158^\circ \)W) shown in Fig. 1a is located in the Great Salt Lake Desert on the dry lake bed of the prehistoric Lake Bonneville (surrounding what is presently The Great Salt Lake, Utah, USA). The terrain at the PLAYA site is flat, smooth (aerodynamic roughness length, \(z_o<1\) mm) and uniform (\({\approx }1\) m change in elevation per 10 km) (Metzger et al. 2007), and provides an idealized dataset for comparison and methodology validation. The site is so close to ideal that the nearby Surface Layer Turbulence and Environmental Science Test (SLTEST) site has historically been used for fundamental, high Reynolds number, wall-bounded flow studies (e.g., Klewicki et al. 1995; Kunkel and Marusic 2006; Hutchins and Marusic 2007) and measurements testing subgrid-scale schemes commonly used in large-eddy simulation models (e.g., Carper and Porté-Agel 2004; Higgins et al. 2007, 2009). The two dominant wind directions under fair weather conditions at the site are northerly and southerly. In the present study, 20-Hz data from a sonic anemometer (CSAT3, Campbell Scientific) mounted at 10.4 m above the ground on a 28-m tower during May 2013 are used. The sonic anemometer axis was oriented \(250^\circ \) from the north, such that the tower and mounting arm are located at \(047^\circ \). The data were collected as part of the Mountain Terrain Atmospheric Modeling and Observations (MATERHORN) Program (Fernando and Pardyjak 2013; Fernando et al. 2015). Details of the full set of flux observations made at the PLAYA site are given in Jensen et al. (2015).

The SLOPE site (\(45.90179^\circ {\hbox {N}}, 7.12374^\circ {\hbox {E}}\)) shown in Fig. 1b is located in Val Ferret, a narrow alpine valley in Switzerland near the Italian and French borders (see also Simoni et al. 2011; Mutzner et al. 2013; Nadeau et al. 2013; Oldroyd et al. 2014, for more site and hydrometeorological descriptions). The slope has a west-facing aspect, and locally, a slope angle of \(35.5^\circ \). Figure 1d shows the steep, complex terrain surrounding the SLOPE site tower, where vegetation surrounding the SLOPE tower is characterized by 0.3-m-high alpine grasses and flowers. The dominant fair weather wind directions are east (downslope, \(\phi \approx 85^\circ \), where \(\phi \) is defined as degrees from north) at night and north–west (upslope and up-valley, \(\phi \approx 285^\circ \)) during the day. The 20-Hz data from a sonic anemometer (CSAT3, Campbell Scientific) mounted at a surface-normal height of 1.27 m above the ground from 1 September to 5 October 2011 are used for methodology examples and subsequent flux analyses. The sonic anemometer axis was oriented to the north, such that the tower and mounting arms were located at \(180^\circ \) from the north. In addition, the anemometer was mounted with a SNSP tilt from the vertical (e.g., \(w_\mathrm{sonic}\) aligned with the surface normal and \(v_\mathrm{sonic}\) aligned with the along-slope axis) to reduce flow distortion (Geissbühler et al. 2000; Christen et al. 2001) and tilt-correction angles into the streamline-defined SNSP coordinate system. This particular measurement height was chosen for the analyses herein because wind speeds at this height are the most consistent between typically day (anabatic) and night (katabatic) flow regimes.

Planar-fit and SPF tilt-correction methods require a long-term dataset to generate statistically robust fitting planes. Yuan et al. (2007) have shown for their SPF corrections that one to two weeks of data are sufficient. However, the exact minimum ensemble averaging time likely varies by site and SPF composition. Therefore, to ensure a sufficiently long ensemble averaging time, data from approximately one month at the PLAYA and SLOPE sites were selected. In addition, velocity data for flow behind sonic anemometers are often not used in practice because the mounting arms can disturb the flow field (Foken 2008). Li et al. (2013) suggest separating these sectors when performing SPF tilt corrections. However, these data have been retained in the present study so as not to impose any sector definitions a priori. Therefore, it should be assumed that data from these sectors are potentially of lower quality (see also Li et al. 2013).

3 Tilt Corrections for Complex Terrain: Problem Description

Consider a time series of velocity, \(u_i\), measured by a stationary sensor (in this case a three-dimensional sonic anemometer) over, or surrounded by, complex and variable terrain. Here, standard index notation is adopted such that \(u_1 = u\) is the streamwise velocity component, \(u_2 = v\) is the spanwise velocity component, and \(u_3 = w\) is the surface-normal velocity component. Assuming that the flow near the surface follows the terrain, as shown by Sun (2007), the total \(u_i\) signal potentially contains a turbulent signal, an atmospheric wave-induced signal (e.g., gravity waves or Kelvin–Helmholtz shear instabilities), and a terrain-induced signal generated by departures from a purely planar underlying surface (local topographical features such as dips, tilts and curvature as are typical of real terrain) or larger-scale terrain features surrounding the measurement site (hills, valleys etc.) that can influence the flow field (see Ono et al. 2008). Following a time series decomposition analogy, similar to a typical triple decomposition (e.g., Cheng et al. 2005), the time series can be expressed by,

$$\begin{aligned} u_i = \overline{u}_i + u_i^\prime + \tilde{u}_i + \breve{u}_i, \end{aligned}$$
(1)

where \(\overline{u}_i\) is the mean, \(u_i^\prime \) is the turbulent departure from the mean, \(\tilde{u}_i\) is the wave signal, and \(\breve{u}_i\) is the terrain-induced signal. A major difference between \(\tilde{u}_i\) and \(\breve{u}_i\) is that \(\tilde{u}_i\) is typically identifiable by scale differences from \(u_i^\prime \) (see Cheng et al. 2005; Vickers and Mahrt 2005), whereas \(\breve{u}_i\) is wind-direction dependent and not necessarily scale dependent. If the analysis of any component of the time series (e.g., \(u_i^\prime \) to calculate turbulent fluxes) is the objective, then \(\breve{u}_i\) must be removed from the time series, since it will contaminate the other signals. However, defining \(\breve{u}_i\) exactly and explicitly requires complete knowledge of the sensor’s orientation with respect to the terrain for all possible sensor footprints and wind directions. This is a task that is nearly impossible even for flat terrain. Therefore, the goal of implementing a tilt-correction scheme for complex terrain is to use the measurements to reduce cross-contamination between the directional velocity components, as previously mentioned, but also to simultaneously reduce \(\breve{u}_i\) as much as possible.

The classical double-rotation tilt-correction scheme (traditionally used for uniform and flat terrain) transforms the mean velocity components for the desired flux-averaging time, \(\tau _\mathrm{f}\), such that, \(\overline{u}_3=\overline{u}_2=0\), for which an overbar indicates time averaging (Kaimal and Finnigan 1994). However, for situations where the real \(\overline{u}_3\) in the atmosphere may or may not be zero (e.g., a non-zero \(\overline{u}_3\) due to subsidence), the planar-fit tilt-correction scheme is advantageous because it allows for \(\overline{u}_3\ne 0\), and instead imposes that \(\langle u_3 \rangle =0\), where the angle brackets indicate the ensemble mean over several averaging periods (Lee 1998; Wilczak et al. 2001). Hence, in planar-fit tilt-correction schemes, the tilt-corrected velocity time series maintains the original sampling frequency, as opposed to the double-rotation scheme for which the tilting transformations are performed on the flux-averaging windows. This has additional advantages, for example, in performing spectral analyses with the tilt-corrected time series. For planar-fit schemes, \(\langle u_3 \rangle =0\) is established by fitting a plane to the mean streamlines of the flow. The best-fit plane is determined through a multiple linear regression by minimizing S, the function given in Wilczak et al. (2001) (on p. 142, Eq. 47; the nomenclature has been altered for consistency with the present usage),

$$\begin{aligned} S = \sum _{j=1}^N (\overline{u}_{3m,j}-b_0-b_1\overline{u}_{1m,j}-b_2\overline{u}_{2m,j})^2, \end{aligned}$$
(2)

where subscript m indicates the measured velocity components (in this case, in the sonic anemometer coordinate system), and subscript j indicates an individual averaged segment ranging from 1 to N, the total number of averaged segments used to generate the planar fit; the b-coefficients (subscripts do not invoke summation notation in this case) determine the planar shift and tilt angles in order to transform the measurement coordinate system into a streamline coordinate system; \(b_0\) is the mean offset instrument error in the measured \(u_3\) component, the pitch angle, \(\gamma \), can be determined by \(\mathrm {sin}\gamma =-b_1/\sqrt{b_1^2 +b_2^2 +1}\) and the roll angle, \(\beta \), by \(\mathrm {sin}\beta =b_2/\sqrt{1+b_2^2}\) (Wilczak et al. 2001): refer to Wilczak et al. (2001) for a complete description of the planar-fit tilt-correction methodology. The planar-fit tilt correction generates an orthonormal, streamline-aligned coordinate system; it is therefore also assumed that it generates a terrain-following coordinate system (Wilczak et al. 2001). However, if the complexity of the terrain causes significant variability in the streamline plane for varying wind directions, then a single planar-fit tilt correction will be biased towards the terrain over which the wind-direction sectors have the highest probability distribution. Since the SPF technique performs the planar fitting for individual wind sectors, it can reduce this wind-direction-dependent bias in the tilt corrections, leading to more accurate turbulent flux estimates in complex environments (Ono et al. 2008). Therefore, it is assumed that a SPF scheme can remove a significant amount of \(\breve{u}_i\) from the time series, as well as reduce cross-contamination between velocity components.

However, very little has been documented regarding how to select the degrees of freedom for the SPF, such as the sector size, \(\varLambda \), the sector centre location, and the planar-fit averaging time, \(\tau _\mathrm{PF}\), which is the averaging time used to generate the input data segments (e.g., \(\overline{u}_{1m,j}\) in Eq. 2) that are used to generate the planar fit. For example, Vickers and Mahrt (2006) show that the choice of \(\tau _\mathrm{PF}\) can affect flux estimates, but they make no suggestion as to which \(\tau _\mathrm{PF}\) is most appropriate. In the following sections, we propose objective methods to quantitatively evaluate how well a particular \(\varLambda \) and \(\tau _\mathrm{PF}\) define the tilt-correction fitting planes and present hypotheses regarding the optimal choices for \(\varLambda \) and \(\tau _\mathrm{PF}\).

3.1 Objectives for SPF Optimization

The primary objective is to find the optimal SPF that accounts for terrain irregularities by ‘tilting’ the sensors a posteriori into a streamline-oriented, terrain-following, orthogonal coordinate system given a set of measured three-dimensional velocities. The primary hypothesis is that the best transformation for each wind-direction sector will minimize a set of objective ‘cost functions’. The first proposed cost function is a root-mean-square (r.m.s.) error, \(S_{rms}\), that describes how well the measured streamlines define the fitting plane for a particular \(\varLambda \) and \(\tau _\mathrm{PF}\), such that

$$\begin{aligned} S_{rms} = \frac{\sqrt{S}}{\sqrt{N}}= f(\tau _\mathrm{PF},\varLambda ), \end{aligned}$$
(3)

where N is the number of averaged streamline segments generating the planar fit and S is the planar-fit least-squares minimization function (Eq. 2). Note that increasing N increases the statistical significance of the fitting plane, and it has been shown, for example by Yuan et al. (2007), that some minimal N is required to converge the planar-fit tilt coefficients for any given wind sector and \(\tau _\mathrm{PF}\). This minimal N dictates the minimum ensemble averaging time, or amount of data necessary to perform a statistically robust planar fit (see Yuan et al. 2007, for more details). Its exact value will vary by site and SPF composition, but in practice, typically a few weeks or months provide a sufficient quantity of data (Wilczak et al. 2001; Yuan et al. 2007, 2011; Ono et al. 2008). For a time series of finite length, \(\varLambda \), \(\tau _\mathrm{PF}\) and N are interlinked in such a way that the minimum \(S_{rms}\) corresponds to large \(\tau _\mathrm{PF}\) and small \(\varLambda \) (as will be shown in Sect. 4) because fitting a plane to a single set of streamlines, as in the most extreme case, will always be a better fit (smaller r.m.s. error) than multiple sets of streamlines. This idea is similar to that where two points define a perfect line. In summary, \(S_{rms}\) provides information regarding the quality of the fitting plane, but its minimization is an insufficient criterion for selecting optimal \(\varLambda \) and \(\tau _\mathrm{PF}\). Hence, additional cost functions are necessary. These additional six cost functions seek to locate ‘regions of converged’ tilt coefficients by minimizing the absolute variability of the planar-fit b-coefficients for changing \(\varLambda \),

$$\begin{aligned} \left| \frac{\partial (b_{0,1,2})}{\partial \varLambda }\right| = f(\tau _\mathrm{PF},\varLambda ), \end{aligned}$$
(4)

and for changing \(\tau _\mathrm{PF}\),

$$\begin{aligned} \left| \frac{\partial (b_{0,1,2})}{\partial \tau _\mathrm{PF}}\right| = f(\tau _\mathrm{PF},\varLambda ). \end{aligned}$$
(5)

In practice, these partial derivatives can be estimated with finite differencing or other numerical methods. In total, seven cost functions (Eqs. 3, 4, 5) have been proposed, and their minimizations can be utilized individually and/or in some combination, for example by summing or weighted summing, to search for optimal \(\varLambda \) and \(\tau _\mathrm{PF}\). Since the units of the cost functions are innately incongruent, it is recommended to use a normalized weighted sum (i.e, normalizing each by its maximum), when analyzing their combined effects. Applied examples of using the cost functions are shown in Sects. 4 and 5.

3.2 Hypotheses for the Optimal Planar-Fit Averaging Time, \(\tau _\mathrm{PF}\)

Much has been written regarding the importance of selecting an appropriate averaging time for computing turbulent fluxes, \(\tau _\mathrm{f}\) (e.g., Vickers and Mahrt 2005; Babić et al. 2012). However, little has been written regarding the appropriate averaging time for the data segments used to compute the planar-fit coefficients, \(\tau _\mathrm{PF}\). These two averaging times are not necessarily the same for planar-fit methods, as opposed to double or triple-rotation tilt-correction methods, for which \(\tau _\mathrm{f}\) also imposes the averaging time of the velocity vector transformation. In fact, selecting the appropriate \(\tau _\mathrm{PF}\) aims to meet a different objective from selecting an appropriate \(\tau _\mathrm{f}\) for converged flux estimates. In general, \(\tau _\mathrm{PF}\) should be large enough such that the mean streamlines do not vary excessively and are representative of the mean flow, but small enough such that the velocity signal is reasonably stationary. In addition, a smaller \(\tau _\mathrm{PF}\) provides a larger N for the planar-fit plane to be well-defined with reduced uncertainty, and for the b-coefficients to be well converged. Since statistical significance increases with N, it makes sense to maximize N by choosing the smallest reasonable (minimizes the cost functions) \(\tau _\mathrm{PF}\), that converges the tilt coefficients for a particular sector size.

3.3 Hypotheses for Optimal SPF Sector Size, \(\varLambda \)

An optimal SPF wind sector will be large enough if it envelopes enough of the variability in wind direction; for example, it should encompass some a priori unknown majority of the fluctuations in wind direction, \(\sigma _{\phi }\). However, it should be small enough to reduce the terrain-induced perturbations to the velocity signal, \(\breve{u}_i\), which is the reason for using multiple sectors in the first place. An important distinction must be noted for implementing a cost function methodology to determine \(\varLambda \) for a dominant wind direction (i.e., a peak in a wind-direction histogram) and a secondary wind direction (i.e., in the tails of the wind-direction histogram). For sectors containing a dominant wind direction, the cost functions beyond a certain \(\varLambda \) are insensitive to increasing \(\varLambda \) because the streamlines in the tails of the wind-direction distribution are not statistically frequent enough to have an impact on the cost functions (see examples of this insensitivity in Sect. 4). However, whatever transformation is determined for that sector affects the whole sector, and the more statistically frequent streamlines will determine the tilting angles, and subsequently bias the transformation for the streamlines in the tails of the distribution (similar to the problems with using a single planar fit). Hence for dominant wind directions, the optimal \(\varLambda \) should be the smallest \(\varLambda \) that minimizes the cost functions. For secondary wind directions, it is more likely that a larger \(\varLambda \) will optimize the planar fit because some threshold for N (which increases with \(\varLambda \)) is necessary to converge the tilt coefficients (minimize the six b-coefficient cost functions in Eqs. 4 and 5).

4 Cost Function Examples

Examples of the cost function analyses provided for the PLAYA and SLOPE sites are for \(\varLambda \) centred on a dominant wind direction (at \(\phi =5^\circ \) and \(\phi =85^\circ \), respectively). Since the PLAYA site is characterized by extremely flat terrain, very little change is expected in the cost functions and planar-fit tilt angles for changing \(\varLambda \) and \(\tau _\mathrm{PF}\). Therefore, to test extrema, the test ranges for \(\varLambda \) and \(\tau _\mathrm{PF}\) are larger for the PLAYA site than those used for the more complex SLOPE site. Figure 2 shows the \(S_{rms}\) cost functions for the PLAYA and SLOPE sites. As expected, this shows that \(S_{rms}\) is largest for large \(\varLambda \), and in particular for small \(\tau _\mathrm{PF}\), because the mean streamlines require longer averaging times to be representative of the mean flow patterns. As discussed previously, the general trend in \(S_{rms}\) tends toward minimization with small \(\varLambda \) and large \(\tau _\mathrm{PF}\) as N decreases. This result is expected because the r.m.s. error is lowest for a single set of streamlines. However, for a given \(\varLambda \) and \(\tau _\mathrm{PF}\), increasing N increases the convergence of the planar-fit tilt coefficients and the overall statistical significance of the fitting plane. For datasets of finite length, insufficient N (due to the overall size of the dataset, a small \(\varLambda \), a wind-direction sector with a low probability density and/or a long \(\tau _\mathrm{PF}\)) will result in non-representative planar-fit tilt angles.

Fig. 2
figure 2

\(S_{rms}\,(\hbox {m}~\hbox {s}^{-1})\) cost function for a the PLAYA (dominant wind-direction sector is centred at \(\phi =5^\circ \)) and b the SLOPE sites (dominant wind-direction sector is centred at \(\phi =85^\circ \)). Note the different scales for \(\varLambda \) and \(\tau _\mathrm{PF}\) for the two sites, and that the colour data ranges have been rescaled to show details. The original ranges are 0.015–0.13 and 0.007– \(0.037~\hbox {m}~\hbox {s}^{-1}\) for the PLAYA and SLOPE sites, respectively

These competing, site-dependent effects and lack of sufficient minimization criteria are the reasons for introducing the six additional cost functions (Eqs. 4, 5). Figure 3 shows an example of the \(\partial b_1/\partial \tau _\mathrm{PF}\) cost function. Since the \(b_1\) coefficient is used to determine the planar-fit pitch correction angle, \(\gamma \), Fig. 3 shows that \(\gamma \) is highly sensitive to changes in \(\tau _\mathrm{PF}\) for very small \(\varLambda \) (\({<}20^\circ \)) at both sites. Additionally, since Fig. 3 shows results for dominant wind directions, it shows the insensitivity to increasing \(\varLambda \) for the variability cost functions (Eqs. 4, 5). As previously discussed, this insensitivity is due to the limited influence that streamlines in the tails of the wind-direction histograms can have relative to the more frequently represented streamlines in the peaks. In addition, the relatively high cost function values for large \(\tau _\mathrm{PF}\) in Fig. 3a show that non-stationarity in the velocity measurements can be reflected in the cost functions.

Figure 4 shows examples of the normalized weighted sum of all seven cost functions for both field sites. The normalized weighted sum was computed by normalizing each cost function field by its maximum, then summing over the seven cost functions. This is just one possible method for analyzing the combined effects of the cost functions and it has two advantages over a simple, unweighted sum. The first is that it ameliorates the problem of having incongruent units between cost functions. The second is that it places all seven cost functions on the same scale from zero to one, such that each cost function contributes equally relative to the sum. The colour data in Fig. 4 have been rescaled to better show the details. For both sites the maxima of the normalized cost function sums along the coordinate axes are associated with very small \(\tau _\mathrm{PF}\) and very small \(\varLambda \), as expected. In addition to the cost functions, it is useful to also examine how the actual planar-fit pitch, \(\gamma \), and roll, \(\beta \), tilt angles vary with \(\varLambda \) and \(\tau _\mathrm{PF}\), as shown in Fig. 5 for both sites. This provides a tangible sense of the physical consequences of a particular choice for \(\varLambda \) and \(\tau _\mathrm{PF}\). Figure 5a, c show that, for the PLAYA site, the planar-fit tilt angles vary by less than \(1^\circ \) for \(\varLambda > 20^\circ \) and all \(\tau _\mathrm{PF}\) in the test ranges. In contrast, Fig. 5b, d containing the planar-fit tilt angles for the SLOPE site, show much more variability (especially for \(\gamma \)) over even the smaller test ranges of \(\varLambda \) and \(\tau _\mathrm{PF}\).

Fig. 3
figure 3

The \(\partial b_1/\partial \tau _\mathrm{PF}\) cost function for a the PLAYA site for the dominant wind-direction sector centred at \(\phi =5^\circ \), and b the SLOPE site for the dominant wind-direction sector centred at \(\phi =85^\circ \). The colour data ranges have been rescaled to show details. The original scales for each are: a 0–0.06 and b 0– 0.05

Fig. 4
figure 4

The normalized weighted sum of all seven cost functions for a the PLAYA site for the dominant wind-direction sector centred at \(\phi =5^\circ \), and b the SLOPE site for the dominant wind-direction sector centred at \(\phi =85^\circ \). The colour data ranges have been rescaled to show details. The original scales for each are: a 0.3–4.2 and b 0.35–4.6

Fig. 5
figure 5

Variation in planar-fit tilt angles, \(\gamma \), or pitch (top), and \(\beta \), or roll (bottom), for the PLAYA site (left) for the dominant wind-direction sector centred at \(\phi =5^\circ \), and the SLOPE site (right) for the dominant wind-direction sector centred at \(\phi =85^\circ \). The colour data ranges for the PLAYA site have been rescaled to show details. The original scales for these panels are: a \(-1.3^\circ \) to \(2.6^\circ \) and c \(-3.2^\circ \) to \(-1.1^\circ \)

5 Methodology for SPF Optimization

Since the planar-fit tilt angles for the PLAYA site show very little variability with \(\varLambda \) and \(\tau _\mathrm{PF}\) (see Fig. 5a, c), a single planar fit is sufficient. Therefore, this section details the methodology used to select \(\varLambda \), \(\tau _\mathrm{PF}\) and wind-sector centres for only the more complex SLOPE site. To aid in the methodology description, Fig. 6 shows the 20-Hz wind-direction histogram for the SLOPE site and the SPF sectors determined by the methodology presented herein. For ease of reference, the sector labels in Fig. 6 identify the sector (A, B, C...) and show the order in which the sectors were assigned (1 for dominant, 2 for secondary wind directions).

Fig. 6
figure 6

Wind-direction histogram and results of the complete cost function analysis for the SLOPE site. The optimal SPF sector assignments are marked by the red vertical lines and the optimal \(\tau _\mathrm{PF}\) was found to be 25 min. The labels at the top of each sector indicate the sector name (A, B, C...) for ease in reference and the number indicates the order in which the sectors were defined (1 for dominant wind directions, 2 for the secondary wind directions). In addition, the planar-fit tilt-correction angles (\(\gamma \) and \(\beta \)) for each segment are reported at the top of the figure

The following methodology was the one found most useful and objective for selecting \(\varLambda \) and \(\tau _\mathrm{PF}\) for the SLOPE site. However, the cost functions could potentially be used in other ways to select these same SPF parameters.

  1. 1.

    We identify the dominant wind directions (i.e., the peaks in the wind-direction histogram), since most sites have at least one or two dominant wind directions. We recommend starting with the dominant wind directions because they account for the majority of wind vectors, and so the SPF optimization of these sectors should take precedence.

  2. 2.

    For each of the dominant wind directions we calculate all the cost functions, and the corresponding cost function sum (weighted or not) for a range of \(\varLambda \) (centred on each of the dominant wind directions) and a range of \(\tau _\mathrm{PF}\). For the SLOPE site example the test ranges used were \(10^\circ \le \varLambda \le 180^\circ \) with \(\Delta \varLambda =10^\circ \) and \(1~\hbox {min}~\le \tau _\mathrm{PF}\le 171~\hbox {min}\) with \(\Delta \tau _\mathrm{PF}=10~\hbox {min}\), where \(\Delta \) represents the respective step sizes within the test range.

  3. 3.

    We analyze the fields of the cost functions and the normalized cost function sum looking for minima. For this analysis recall that for dominant wind directions the smallest reasonable \(\varLambda \) should be used due to the insensitivity of the variability cost functions to large \(\varLambda \), as previously discussed. Additionally, recall that the selected \(\tau _\mathrm{PF}\) must be the same for all SPF sectors, otherwise individual velocity points could be assigned more than one planar-fit tilt due to overlapping averaged segments. Hence, for the analysis of the dominant wind directions the objective is to select a sector size (smallest reasonable) and a range of \(\tau _\mathrm{PF}\) that minimize the cost functions.

For example, using Fig. 4b and searching for the smallest reasonable \(\varLambda \), a region between \(30^\circ < \varLambda < 60^\circ \) and \(20~\hbox {min}<\tau _\mathrm{PF}<50~\hbox {min}\) can be found, which is characterized by a clear minimum. In addition, the resulting planar-fit tilt angles (Fig. 5b, d) within this minimization region show low variability between \(40^\circ < \varLambda < 60^\circ \) for the same \(\tau _\mathrm{PF}\) range. Therefore, \(\varLambda =40^\circ \) and an initial range of 20 min \(<\tau _\mathrm{PF}<\) 50 min were chosen for the wind sector centred at \(\phi =85^\circ \) as shown in Fig. 6, sector A. Similarly using the same procedures, \(\varLambda =40^\circ \) and an initial range of 20 min \(<\tau _\mathrm{PF}<\) 50 min were also chosen for the other dominant wind direction centred at \(\phi =285^\circ \) to define sector B in Fig. 6. Even though \(\varLambda =40^\circ \) for both dominant wind sectors in the example case, the result is somewhat coincidental and could be different for a different site, or even another measurement height at the same site. In fact, it was expected that the optimal \(\varLambda \) would be slightly smaller for the sector centred at \(\phi = 285^\circ \) because the observed daytime wind directions are typically less variable than those observed during the night. Now that the sectors have been assigned for all of the dominant wind directions, the remaining sectors can be assigned. The optimal \(\tau _\mathrm{PF}\), from within the initial minimizing range, can be selected after all SPF sectors are determined, as discussed below.

For the secondary wind-direction sectors, the cost function analyses are performed for varied \(\varLambda \) over the remaining, or unassigned, wind-direction sectors and the same \(\Delta \varLambda \), \(\tau _\mathrm{PF}\) range and \(\Delta \tau _\mathrm{PF}\) as were used for the dominant wind-direction sectors. The main difference in the cost function analyses for secondary wind-direction sectors is in how the \(\varLambda \) test ranges and sector centres are assigned, as enumerated below:

  1. 1.

    We first determine the limits for each test range. These are set as the edges of the sectors that were previously defined for the dominant wind directions. For the example data, this means that one of the four secondary test sector ranges starts at \(\phi >105^\circ \) (the upper edge of sector A), increases by \(\Delta \varLambda =10^\circ \) and ends at the maximum \(\varLambda =160^\circ \), which corresponds with \(\phi <265^\circ \), the lower edge of sector B. Hence, the sector centres for the off-wind directions change with \(\varLambda \), as opposed to the dominant wind directions, for which the sector centres are constant.

  2. 2.

    Once test ranges have been determined for the secondary directions, the computation and minimization analyses of the cost functions are the same as for the dominant wind directions, recalling that \(\tau _\mathrm{PF}\) must be the same for all SPF sectors.

This process should be repeated for all secondary test sectors until all \(\phi \) in the dataset have been assigned to a sector. Finally, the optimal \(\tau _\mathrm{PF}\) can be chosen from the initial range depending on the cost function results for all wind-direction sectors. If the secondary wind-direction sectors do not narrow the initial range, then the shortest \(\tau _\mathrm{PF}\) in the initial range should be chosen because it is associated with a larger N. In the example case for the SLOPE site, it was possible to assign all of the secondary sectors (sectors D through F in Fig. 6) with these four test ranges, making in total six optimized SPF sectors. However, it may be necessary for other datasets or sites to have more than six sectors if the optimal \(\varLambda \) for the secondary sectors are not large enough to include all remaining \(\phi \) and if N is sufficiently large.

This methodology shows that the optimal sector sizes vary due to variable topography and available data. As Fig. 6 shows, typically the optimal sectors for the \(\phi \) in the tails of the distribution have a larger \(\varLambda \) likely because increased N was necessary to improve the planar-fit convergence. This illustrates the competing effects implied by the degrees of freedom for the SPF approach, and that selecting evenly distributed sectors of a single sector size, as typically done for the SPF approach (e.g., Yuan et al. 2007; Ono et al. 2008; Nadeau et al. 2013), may not objectively account for these competing effects. It is important to note (as shown in the cost functions examples for the SLOPE vs. PLAYA sites) that the resulting optimization is site-specific, and that the available data at any given site will determine the optimization. For example, the sector labeled C in Fig. 6 is relatively small (\(\varLambda =30^\circ \)), which likely indicates influences from site heterogeneity caused by some \({\approx }2\) to 3-m-high shrubs that run parallel to upper portions of the main slope axis (see Fig. 1d). These shrubs are located \({\approx }50~\hbox {m}\) north of the main slope axis that intersects with the tower and likely affect streamlines from \(\phi \approx 0^\circ \) to \(35^\circ \).

In addition, the planar-fit method requires that sensors are not moved during the time series, and if they are moved throughout the experiment duration, a separate planar fit or SPF must be performed for the respective datasets (Wilczak et al. 2001). This implies that seasonal changes in vegetation or surface roughness may also require that a time series might need to be split-up for the planar-fit or SPF methods. In fact at the SLOPE site, SPF tilt-correction angles for the lower sonic anemometers are significantly different for June and July when the alpine grasses are tall and green from those in September and October when the grasses are senescent and shorter (the analysis is not shown herein, but is mentioned as a word of caution). This is one example of how even small differences in terrain (vegetation and topography), can perturb the velocity time series, especially near the surface. However, this significant seasonal difference in tilt-correction angles was not seen in the higher sonic anemometers (at \(x_3\approx 4\) to 6 m) at the SLOPE site probably because they sample larger scale velocities over more extensive terrain and the change in vegetation is not significant enough to perturb the velocities at that scale.

6 Resulting Momentum Fluxes for Varied SPF Schemes

As stated previously, the sensor tilt corrections have been shown to have a greater effect on the momentum fluxes than on the heat fluxes (Kaimal and Haugen 1969; Wilczak et al. 2001). Therefore, to quantify the effects of, and sensitivities to, non-optimized sensor tilt corrections for varied \(\varLambda \) and \(\tau _\mathrm{PF}\), this section focuses on the resulting momentum fluxes for varied SPF tilt corrections. The Ogive analyses (Babić et al. 2012) of the daytime and nighttime turbulent fluxes at the SLOPE site (not shown herein) have indicated that the appropriate flux-averaging time, \(\tau _\mathrm{f}\), that converges fluxes is 30 min; this averaging time is implemented for all flux calculations herein (recall the differences between \(\tau _\mathrm{f}\) and \(\tau _\mathrm{PF}\) as detailed in Sect. 3.2). Additionally, linear detrending in time of the tilted velocities was implemented before calculating mean and fluctuating components of \(u_i\).

Figure 7 shows the differences between the momentum fluxes calculated from a variety of non-optimized SPF tilt corrections and the momentum fluxes calculated from the optimized SPF tilt corrections for the SLOPE site. The legend labels refer to the sector definitions and the \(\tau _\mathrm{PF}\). The sector definitions called ‘optimized’ refer to the sectors defined by the proposed SPF optimization methodology, and shown in Fig. 6; the remaining sector definitions refer to the number of evenly divided/distributed sectors of size \(\varLambda \) (i.e., \(36\times 10^\circ \) means the SPF was performed on 36 evenly distributed, \(10^\circ \) wind sectors). For the test cases with evenly distributed sectors, the sector centres are aligned as much as possible with the dominant wind directions. Figure 7a shows a direct comparison scatter plot of momentum fluxes from the varied, non-optimized SPF versus those from the fully optimized SPF as defined in Fig. 6. Figure 7b quantifies the errors between the momentum fluxes from the varied SPF schemes and those from the fully optimized SPF. It shows a segment of the absolute percentage-difference time series for three consecutive clear-sky days. In general, the errors (absolute percentage differences) are lower for clear-sky days, and in addition, the times series (Fig. 7b) shows that the errors are lower for the daytime fluxes. This is not surprising since the daytime flows are typically stronger and less variable than the nighttime flows. This could also indicate a potential wind-speed dependence for planar-fit tilt-correction schemes, which was not considered in these analyses.

Fig. 7
figure 7

Sensitivity of the momentum fluxes (\(\overline{u_1^\prime u_3^\prime }\)) to varied SPF degrees of freedom (see text for more details about the legend labels). The plots show how the momentum fluxes from non-optimized SPF schemes compare to the optimized SPF momentum fluxes: a correlations with reporting of the respective biases [mean offsets in (\(\hbox {m}^2\,\hbox {s}^{-2}\))] and sums of the squared residuals [SSR in (\(\hbox {m}^4\,\hbox {s}^{-4}\))] and b a portion of the absolute percentage-difference time series for three consecutive clear-sky days. Note the logarithmic scale on b. Date and local time are shown on the x-axis

Table 1 Summary of statistics over the full month of data (1224 total averaged segments with \(\tau _\mathrm{PF}=25\hbox { min}\)) comparing \(\overline{u_1^\prime u_3^\prime }\) resulting from the various SPF parameters for the SLOPE site

Table 1 shows the overall statistics for the complete September–October time series. As expected, a single planar fit (\(1\times 360^\circ \)) performs poorly for the complex SLOPE site. However, surprisingly, selecting small \(\varLambda \) (\(36\times 10^\circ \)) results in the highest absolute percentage difference in the momentum fluxes from the optimized SPF. This can be explained by the fact that smaller sector sizes are likely to have a significant percentage of \(\sigma _{\phi }\) in each streamline segment that are larger than or fall outside of the sector itself. In fact, for this dataset, choosing \(\varLambda \) values that are too large provides better momentum-flux estimates than choosing \(\varLambda \) values that are too small. Large \(\tau _\mathrm{PF}\) (200 min) also behaves poorly because high \(\tau _\mathrm{PF}\) values coincide with smaller N so fewer representative streamlines are available to define the fitting plane. In addition, large \(\tau _\mathrm{PF}\) potentially averages over events for which a separate planar fit might be optimal (potentially non-stationary events). Not surprisingly, the SPF with the ‘optimized’ sector definitions and with \(\tau _\mathrm{PF}=45~\hbox {min}\) provided momentum fluxes most similar to those from the fully optimized SPF. Recall that 45 min is in the initial range of \(\tau _\mathrm{PF}\) from the dominant wind-direction sector analyses (see Sect. 5; Fig. 4) and was later ruled out based on the secondary wind-direction cost function analyses. Hence, the resulting fluxes should be far less sensitive to the \(\tau _\mathrm{PF}=\)45 min variation of the SPF. Finally, it is important to reiterate that these results are site specific, and that only the methodologies are transferable to other sites.

7 SPF Discussion

The SPF methodology presented herein is appropriate for measurements over complex terrain where the streamline-normal velocity component (\(\overline{u}_3\)) may be non-zero. However, in general, the planar-fit and SPF tilt-correction approaches have drawbacks that should be discussed.

First, since the planar-fit tilt correction is not a pure rotation technique, the magnitudes of the individual velocity vectors may not be conserved during the tilt-correction process. This issue has been discussed previously (e.g., Sun 2007), but is typically not quantified or reported. For the SLOPE site this lack of vector conservation before and after the tilt correction was found to be small for the resultants of the velocity vectors (0.15 % absolute mean percentage difference), especially over the flux-averaging time, \(\tau _\mathrm{f}\). However, for some individual vectors the error is as high as 300 %, and since the focus has been on flux measurements, it makes sense to quantify how this error translates to TKE conservation. The mean percentage differences for TKE (0.09 %) and mean TKE (0.007 %) are smaller than for velocity (0.15 %). Hence, for the SLOPE site this error is acceptable. However, this error is specific to the SLOPE site example and should be quantified and verified as a general practice for other datasets.

Second, the SPF optimization methodology is not automated, since it requires an objective analysis of the cost functions and the making of decisions. Furthermore, an automated algorithm may not be possible due to the insensitivities of the cost functions to increased sector size (as discussed above in Sect. 3.3) and the fact that the global minima for the cost functions cannot reflect this insensitivity. For example, in Fig. 4d the true minimum indicates that \(\varLambda \) should be near \(110^\circ \) and \(\tau _\mathrm{PF}\) should be near 120 min. However, this would result in significantly different tilting angles for the sector (see also Fig. 5) and would not reduce \(\breve{u}_i\) adequately. The lack of an automated algorithm makes the SPF optimization methodology inefficient. Future work should include using the optimized SPF methodology to indicate other, more efficiently determinable, predictors for the optimal \(\varLambda \) and \(\tau _\mathrm{PF}\). For example, the data from the SLOPE site (including those from the other four measurement heights) suggest that the optimal \(\varLambda \) can be predicted by a factor of \(\overline{\sigma }_{\phi }\), the mean standard deviation in wind direction encompassed within the sector. This relationship requires future verification with data from other sites, and a similar predictor is simultaneously needed for the optimal \(\tau _\mathrm{PF}\) since \(\overline{\sigma }_{\phi }=f(\varLambda ,\tau _\mathrm{PF})\).

Third, the SPF technique inherently generates discontinuities in the tilting angles at the wind-sector boundaries (Ross and Grant 2014). The uncertainties that these discontinuities contribute to analyses will depend on the sizes of the discontinuities and the number of affected data points in a particular mean segment. Researchers should at least flag affected mean data segments and consider neglecting these segments if they contribute significantly to the overall mean. Methods to address the discontinuity problems, such as curve fitting the tilt-correction angles near the discontinuities or using overlapping SPF segments, should be considered.

Fourth, selecting the best SPF parameters for sectors characterized by very low wind speeds (i.e., above the katabatic layer for downslope flow at the SLOPE site or during transition periods) can be very difficult with the current cost function methodology. This is likely because the streamlines are too weak to define a clear fitting plane. An alternative methodology for very low-wind-speed sectors should be considered in future work. Finally, the cost functions defined in Eqs. 35 were written as functions of \(\varLambda \) and \(\tau _\mathrm{PF}\) alone. However, a wind-speed or an atmospheric stability dependence on the SPF parameters cannot be ruled out and should be investigated further.

8 Adaptations of the Governing Flow Equations: Problem Description

Now that the sonic anemometer tilt corrections have been optimized for the complex SLOPE site, the adaptations of the governing flow equations can be addressed. This work focuses on the momentum, velocity variance and TKE budget equations, but the transformations from horizontal/vertical to slope-normal/slope-parallel (SNSP) coordinate systems presented in Sect. 9 are generalized and applicable to other governing equations where gravity plays a role, such as the turbulent flux or the higher-order moment prognostic equations. However, prior to showing these adaptations, it is useful to examine the governing flow equations in the horizontal/vertical coordinate system to better assess the complications associated with adapting them to the SNSP system.

For flat terrain, neglecting Coriolis forces near the surface and viscous effects on the mean motions, and employing the shallow-convection Boussinesq approximations (Dutton and Fichtl 1969; Mahrt 1986), the mean momentum equations are, following Mahrt (1986)

$$\begin{aligned} \frac{\partial \bar{\hat{u}}_i}{\partial t} + \bar{\hat{u}}_j\frac{\partial \bar{\hat{u}}_i}{\partial \hat{x}_j} = -\frac{1}{\bar{\rho }_a}\frac{\partial \bar{P}}{\partial \hat{x}_i} - \delta _{i3} g \frac{\Delta \overline{\theta }}{\overline{\theta _a}} -\frac{\partial \overline{\hat{u}_i^\prime \hat{u}_j^\prime }}{\partial \hat{x}_j}, \end{aligned}$$
(6)

where again employing index notation, \(\hat{u}_1\) is the streamwise velocity component in the mean flow direction, \(\hat{x}_1\), \(\hat{u}_2\) is the spanwise velocity component in the \(\hat{x}_2\) direction, and \(\hat{u}_3\) is the vertical velocity in the \(\hat{x}_3\) direction; the overbar indicates time averaging, the primes indicate turbulent excursions from the mean, and the ‘hat’ accent above a variable indicates that the variable is in the horizontal/vertical coordinate system (see Fig. 1c); t is time, \(\rho _a\) is the ambient air density at a reference height (note that hereafter, variables with the subscripted a are taken at the reference level.), P is pressure, \(\delta _{i3}\) is the Kronecker delta operating on the acceleration due to gravity, g, in the vertical direction, and the buoyancy forces under the above assumptions are generated by the difference in virtual potential temperature, from the ambient virtual potential temperature, \(\Delta \bar{\theta } = \bar{\theta }_a - \bar{\theta }\). The momentum equations in the SNSP coordinate system have been presented consistently in the literature for flows aligned with the main slope axis (e.g., Manins and Sawford 1979; Mahrt 1982; Haiden and Whiteman 2005; Nadeau et al. 2013). This transformation results in modifications to the gravitational term (the fourth term in Eq. 6). Since the SNSP coordinate system is no longer aligned with the gravitational force, the vertical projections of the SNSP buoyancy forces must be used. With these transformations the buoyancy term in the \(u_1\) (along-slope) component momentum equations is \(+ g ({\Delta \bar{\theta }}/{\bar{\theta }_a}) \mathrm {sin}(\alpha _\mathrm{slope})\), and the \(u_3\) (slope-normal) component equation now has \(-g ({\Delta \bar{\theta }}/{\bar{\theta _a}}) \mathrm {cos}(\alpha _\mathrm{slope})\) as the buoyancy forcing, where \(\alpha _\mathrm{slope}\) is the main slope angle, and the plus sign for the \(u_1\) component clarifies that the buoyancy force drives the flow, providing positive momentum. This formulation of the momentum equations is suitable for flows aligned with the main slope axis (purely upslope or downslope flows). However, for slope flows having a cross-slope component (e.g., the daytime thermally-driven flows for the SLOPE site are aligned with \(\phi =185^\circ \), or the upslope/up-valley direction) the proper SNSP alignment has gone largely undocumented. A more general form of the momentum equations that will appropriately hold for SNSP coordinate systems aligned with a cross-slope component in \(\bar{u}_1\) is developed below (Sect. 9).

In addition, the TKE budget equation for slope flows in the SNSP coordinate system has been presented inconsistently in the literature. For flat terrain, the mean TKE budget equation is (Stull 1988, pp. 115–195),

$$\begin{aligned} \frac{\partial \overline{e}}{\partial t} + \bar{\hat{u}}_j\frac{\partial \overline{e}}{\partial \hat{x}_j} = +\delta _{i3} \frac{g}{\bar{\theta }} (\overline{\hat{u}_i^{'}\theta ^{'}}) - \overline{\hat{u}_i^{'}\hat{u}_j^{'}}\frac{\partial \overline{\hat{u}_i}}{\partial \hat{x}_j} - \frac{\partial (\overline{\hat{u}_j^{'}{\overline{e}}})}{\partial \hat{x}_j} - \frac{1}{\overline{\rho }}\frac{\partial (\overline{\hat{u}_i^{'}P^{'}})}{\partial \hat{x}_i} - \varepsilon , \end{aligned}$$
(7)

where e is TKE and \(\varepsilon \) is the dissipation rate of TKE. The third term in Eq. 7 represents the buoyant production or consumption of TKE, and the \(\delta _{i3}\) Kronecker delta, again, makes this term act only in the vertical direction. The main discrepancy found in the literature for the SNSP transformation of the TKE budget equation is in the treatment of the buoyancy term, arising from the physical constraint of the vertical gravitational force. For example, Horst and Doran (1988) and Łobocki (2014) use \(-(g/\bar{\theta })(\mathrm {sin}\alpha _\mathrm{slope} ({\overline{u_1^\prime \theta ^\prime }}) - \mathrm {cos}\alpha _\mathrm{slope} ({\overline{u_3^\prime \theta ^\prime }}))\), whereas Arritt and Pielke (1986) and Nadeau et al. (2013) use the slope-normal component of buoyancy (\(g\overline{u_3^\prime \theta ^\prime }/\bar{\theta }\)). A third approach might be to use the covariance of the vertical velocity and virtual potential temperature for the buoyancy term, \(g(\overline{\hat{u}_3^\prime \theta ^\prime })/\bar{\theta }\). However, this potentially limits the possible physical interpretations provided by analyzing the components separately. A plausible reason for these discrepancies/confusions is that TKE is a scalar quantity, and when non-orthogonality exists between the coordinate system and buoyant mechanisms (as in the case of SNSP coordinate systems), it is not readily clear which approach is most appropriate.

The final complication for adapting the governing equations to the SNSP coordinate system for flows over steep, complex terrain is that the streamwise slope angle changes with varying wind direction, \(\phi \). Therefore, the coordinate system, and subsequently the tilt from the horizontal of the mean streamline plane, change within the time series. This changing coordinate system poses additional difficulties in applying the governing flow equations, especially for the terms associated with gravitational forcing. The following section proposes adaptations that can be used to generalize the governing flow equations, such that transformation to the streamwise SNSP coordinate system for all \(\phi \) becomes clear, and can be used consistently.

9 Governing Flow Equations for Slope-Aligned Coordinate Systems

To derive more general forms of the governing flow equations that are easily adaptable for SNSP and other orthogonal coordinate systems requires a more general formulation for gravitational acceleration. The Kronecker delta convention used in Eqs. 6 and 7 for the horizontal/vertical coordinates makes the quantity \(\delta _{i3}g\) for the gravitational acceleration act in only the vertical direction, as expected. However, in a fixed SNSP coordinate system, the directional vectors, \(i,j,k=1,2,3\), correspond respectively, to slope-parallel, slope-span and slope-normal directions and in a SNSP coordinate system that follows the mean wind, \(i,j,k=1,2,3\) correspond to streamwise, span-wise and slope-normal directions, respectively. Therefore, in both SNSP coordinate systems the Kronecker delta convention used in the horizontal/vertical forms of the equations no longer correctly applies the gravitational forcing. If, instead, a more generalized Kronecker delta convention for the gravitational acceleration is used, the proper projections of the buoyancy forces can be made for all directions, \(x_i\), in the SNSP coordinate system. This more general form of the Kronecker delta convention is

$$\begin{aligned} {-}g(\delta _{i1}\mathrm {sin} \alpha _1 + \delta _{i2}\mathrm {sin} \alpha _2 - \delta _{i3} \mathrm {cos} \alpha _3). \end{aligned}$$
(8)

Equation 8 shows three different slope angles: \(\alpha _1\), \(\alpha _2\) and \(\alpha _3\). The slope angles \(\alpha _1\) and \(\alpha _2\) are defined as the angles from the horizontal aligned with \(x_1\) and \(x_2\), respectively. If \(x_1\) and \(u_1\) follow the mean wind, then \(\alpha _1\) and \(\alpha _2\) will change with changing wind direction (i.e., the angles of the terrain ‘seen’ by the mean wind, \(u_1\) and \(u_2\)). Park and Park (2006) also observe this changing slope angle over larger scales. The slope angle \(\alpha _3\) is defined as the angle between the planar slope-normal direction, \(x_3\), and the vertical direction, and is a constant angle (assuming a planar slope) that represents the main planar tilt of the terrain. Since \(\alpha _1\) and \(\alpha _2\) change with wind direction (in a coordinate system aligned with the mean wind direction), a convention relating wind direction to the sloping plane must first be defined and established to generalize the mathematical definitions of \(\alpha _i\) for any slope aspect. This generalized wind direction, \(\psi \), is defined by a clockwise wind direction compass aligned with zero at the top of the slope, such that for pure downslope flow, \(\psi =0^\circ =360^\circ \) and for pure upslope flow \(\psi =180^\circ \). Hence to transform the SNSP forms of the equations developed herein to any site, a site-specific relationship between \(\psi \), the generalized, slope-referenced wind direction and \(\phi \), the meteorological wind direction defined from north is needed. For example, \(\psi = \phi - 90^\circ \) for the west-facing SLOPE site, where northerly winds are cross-slope from left to right when looking up from the base of the slope. Subsequently, assuming a planar slope \(\alpha _1\) and \(\alpha _2\) are given by

$$\begin{aligned} \alpha _1 = \mathrm {arcsin}(\mathrm {cos}\psi \mathrm {sin}\alpha _3), \end{aligned}$$
(9)

and

$$\begin{aligned} \alpha _2 = \mathrm {arcsin}(\mathrm {cos}(\psi -90)\mathrm {sin}\alpha _3). \end{aligned}$$
(10)

Figure 8 shows an example schematic of how \(\psi \), \(\phi \) and \(\alpha _i\) are defined for a west-facing, planar slope of \(\alpha _\mathrm{slope} = 35.5^\circ =\alpha _3\) (an idealization of the SLOPE site). If the planar-slope assumption is not reasonable for a particular site, then \(\alpha _{1,2,3}=f({\phi })\) can alternatively come from a high-resolution digital elevation model (DEM) with advanced geographic information system (GIS) tools. To evaluate the planar-slope assumption for the SLOPE site, Fig. 9 shows the elevation profiles for the \(\phi = 90^\circ \) and \(\phi = 285^\circ \) meteorological wind directions for the SLOPE site. By visual inspection, the slope near the tower appears to be quite uniform, and locally the planar-slope assumption seems reasonable. To better quantify this assumption, the local slope angles given in the inset of Fig. 9 were estimated from a 10-m by 10-m grid taken from a 1-m resolution DEM and centred at the observation tower. The local slope angle for \(\phi = 285^\circ \), \(\alpha =33.6^\circ \) is reasonably close to the mathematically derived (Eq. 9), planar-slope angle, \(\alpha =34.1^\circ \). Table 2 summarizes the departures in local \(\alpha _1\)-slope angles for various \(\phi \), determined by comparing estimates from the DEM at the SLOPE site and the theoretical slope angles assuming a purely planar slope. For most wind directions at the SLOPE site, this departure is minimal, especially for the dominant wind directions (the first two rows in Table 2). The largest percentage difference, 100 %, is for the pure cross-slope wind direction (\(\phi =0^\circ \)) because the theoretical slope angle is zero and the DEM slope angle is non-zero. The next largest percentage difference, 18.6 %, would add significant uncertainly to buoyancy flux estimates for wind directions \(\phi =20^\circ \) or \(\phi =200^\circ \). However, these wind directions occur infrequently at the SLOPE site (see Fig. 6).

Fig. 8
figure 8

Idealized planar slope schematic for a west-facing (\(\psi = \phi - 90^\circ \)) slope with \(\alpha _3 = 35.5^\circ \). a The front side of the slope showing the dominant wind directions for night (downslope flow; \(\phi = 90^\circ \); magenta vectors, \(x_{1,n}\), \(x_{2,n}n\)) and day (upslope/up-valley flow; \(\phi = 285^\circ \); green vectors, \(x_{1,d}\), \(x_{2,d}\)). b The back, or underside, of the slope showing \(\alpha _1\) and \(\alpha _2\) for \(\phi = 285^\circ \), a wind direction not aligned with the main slope angle

Fig. 9
figure 9

Elevation profiles from the valley floor to the ridge top for the \(\phi = 90^\circ \) and \(\phi = 285^\circ \) wind directions at the SLOPE site. The circles indicate the observation tower location at 1976 m a.s.l., where the two profiles physically intersect. The inset shows a zoomed-in region near the tower and the local slope angles that were estimated from a 1-m resolution digital elevation map over a 10-m by 10-m grid centred at the tower

Substituting the generalized Kronecker delta convention (Eq. 8) into the gravitational term for Eq. 6 gives the generalized mean momentum equations,

$$\begin{aligned} \frac{\partial \bar{u}_i}{\partial t} + \bar{u}_j\frac{\partial \bar{u}_i}{\partial x_j} = -\frac{1}{\bar{\rho }_a }\frac{\partial \bar{P}}{\partial x_i}+\frac{\Delta \theta g}{\bar{\theta }_a}( \delta _{i1}\mathrm {sin} \alpha _1 + \delta _{i2}\mathrm {sin} \alpha _2 - \delta _{i3} \mathrm {cos} \alpha _3) -\frac{\partial \overline{u_i^\prime u_j^\prime }}{\partial x_j}. \end{aligned}$$
(11)

To compare with the slope-aligned forms of the mean momentum equations in the literature for pure downslope flow, requires that \(\alpha _1=\alpha _3=\alpha _\mathrm{slope}\) and \(\alpha _2=0\). With these slope angles, \(\mathrm {sin} \alpha _2=0\) and the standard forms of the \(u_1\) and \(u_3\) momentum balances given in Manins and Sawford (1979), Mahrt (1982) and others are recovered. In addition, Eq. 11 is now also appropriate for slope flows having a cross-slope component, a topic that has gone largely undocumented. For example, at the SLOPE site the dominant daytime wind direction is \(\phi =285^\circ \) (upslope/up-valley flow), making \(\psi = 195^\circ \) and \(\alpha _1=-34.1^\circ \). In contrest to the pure downslope flow case, \(\alpha _1\ne \alpha _3\), and the local gravitational forcing in the \(u_1\) mean momentum balance is slightly reduced due to the reduced slope angle ‘seen’ by the mean wind.

Table 2 Magnitudes of the terrain slope angles estimated from the DEM at the SLOPE site, and determined theoretically assuming a perfectly planar slope with \(\alpha _3=35.5^\circ \) for various wind directions, and percentage differences of the sine of these angles calculated by \(100(\mathrm {sin}|\alpha _{1,\mathrm{DEM}}| - \mathrm {sin}|\alpha _{1,\mathrm{TH}}|)/\mathrm {sin}|\alpha _{1,\mathrm{DEM}}|\)

Similarly for the TKE budget equation, one could simply insert the generalized Kronecker delta convention (Eq. 8) to obtain the SNSP appropriate adaptations. However, since documented discrepancies (as discussed in Sect. 8) have characterized the SNSP form of the TKE budget equation, a more complete derivation is presented here. TKE is defined as (Stull 1988, pp. 115–195),

$$\begin{aligned} \overline{e} = 0.5 \overline{u_i^{\prime 2}}. \end{aligned}$$
(12)

From Eq. 12, and also following Stull (1988, pp. 115–195), derivation of the TKE budget equation requires summing the prognostic equations for velocity variances and dividing by 2. The prognostic equations for velocity variances (Stull 1988, pp. 115–195),

$$\begin{aligned} \frac{\partial \overline{\hat{u}_i^{' 2}}}{\partial t} + \overline{\hat{u}}_j\frac{\partial \overline{\hat{u}_i^{' 2}}}{\partial \hat{x}_j} = +2 \delta _{i3}\frac{g \overline{(\hat{u}_i^{'}\theta ^{'})}}{\overline{\theta }} - 2\overline{\hat{u}_i^{'}\hat{u}_j^{'}}\frac{\partial \overline{\hat{u}_i}}{\partial \hat{x}_j} - \frac{\partial \overline{(\hat{u}_j^{'}\hat{u}_i^{'2})}}{\partial \hat{x}_j} - \frac{2}{\overline{\rho }}\frac{\partial \overline{(\hat{u}_i^{'}P^{'})}}{\partial \hat{x}_i} - 2\varepsilon , \end{aligned}$$
(13)

were derived for a horizontal/vertical coordinate system as indicated by the Kronecker delta convention in the third term. In the SNSP coordinate system, each of the three components of the velocity variance can potentially have a contribution from buoyant forcing. To account for these contributions, the more generalized Kronecker delta formulation (Eq. 8) is used, and then Eq. 13 can be written for the SNSP system without violating the physical law of gravity acting vertically. With these substitutions, Eq. 13 is now,

$$\begin{aligned} \frac{\partial \overline{u_i^{' 2}}}{\partial t} + \overline{u}_j\frac{\partial \overline{u_i^{' 2}}}{\partial x_j}= & {} -2 \delta _{i1}\mathrm {sin} \alpha _1 \frac{g \overline{(u_i^{'}\theta ^{'})}}{\overline{\theta }} -2 \delta _{i2}\mathrm {sin} \alpha _2 \frac{g \overline{(u_i^{'}\theta ^{'})}}{\overline{\theta }}+ 2 \delta _{i3}\mathrm {cos} \alpha _3\frac{g \overline{(u_i^{'}\theta ^{'})}}{\overline{\theta }} \nonumber \\&- 2\overline{u_i^{'}u_j^{'}}\frac{\partial \overline{u}_i}{\partial x_j} - \frac{\partial \overline{(u_j^{'}u_i^{'2})}}{\partial x_j} - \frac{2}{\overline{\rho }}\frac{\partial \overline{(u_i^{'}P^{'})}}{\partial x_i} - 2\varepsilon . \end{aligned}$$
(14)

If now Eq. 14 is substituted into the definition for mean TKE, \(2\overline{e} = \overline{u_i^{\prime 2}}\) (Eq. 12), the TKE budget equation for a general, planar-slope coordinate system is,

$$\begin{aligned} \frac{\partial \overline{e}}{\partial t} + \overline{u}_j\frac{\partial \overline{e}}{\partial x_j}= & {} -\mathrm {sin} \alpha _1 \frac{g \overline{(u_1^{'}\theta ^{'})}}{\overline{\theta }}-\mathrm {sin} \alpha _2 \frac{g \overline{(u_2^{'}\theta ^{'})}}{\overline{\theta }}+ \mathrm {cos} \alpha _3\frac{g \overline{(u_3^{'}\theta ^{'})}}{\overline{\theta }} \nonumber \\&- \overline{u_i^{'}u_j^{'}}\frac{\partial \overline{u}_i}{\partial x_j} - \frac{\partial \overline{(u_j^{'}{\overline{e}})}}{\partial x_j} - \frac{1}{\overline{\rho }}\frac{\partial \overline{(u_i^{'}P^{'})}}{\partial x_i} - \varepsilon , \end{aligned}$$
(15)

and for flat terrain, \(\alpha _1 = \alpha _2=\alpha _3=0\) and the flat terrain form of the TKE budget (Eq. 7) is recovered. Theoretically, for a planar slope, all three components of the buoyancy term must be retained. To our knowledge, the \(\alpha _2\) buoyancy term has not been shown in the literature, an oversight that is probably explained by two reasons. First, when \(\bar{u}_1\) is rotated into the mean wind direction, \(\bar{u}_2=0\) so it is easy to overlook any contributions from \(u_2^\prime \). The second reason can be explained using the magenta vectors (\(x_{i,n}\)) sketched in Fig. 8 for pure downslope flow. In this case, \(\alpha _1=\alpha _3=\alpha _\mathrm{slope}=35.5^\circ \) and \(\alpha _2=0^\circ \) so \( (g/\bar{\theta }) (-\overline{u_2^\prime \theta ^\prime }\mathrm {sin}\alpha _2)=0 \), and the formulations in Horst and Doran (1988) and Łobocki (2014) are recovered. However, pure upslope or downslope flows are special cases, and for a wind direction not aligned with the main slope axis (i.e., the green vectors in Fig. 8, \(x_{i,d}\)) \(\mathrm {sin} \alpha _2\ne 0\) and \( (g/\bar{\theta }) (-\overline{u_2^\prime \theta ^\prime }\mathrm {sin}\alpha _2)\) is also not necessarily equal to zero.

Fig. 10
figure 10

Three consecutive clear-sky diurnal cycles showing a SNSP components of the buoyancy flux from Eq. 15 and the resultant buoyancy flux computed by two equivalent methods, summing the SNSP components and using the vertical velocity component, and b the respective slope angles (blue left axis) for each component. For reference, the corresponding time series of wind-direction angles, \(\phi \) and \(\psi \) are also shown (grey right axis). The shaded regions indicate the nighttime, downslope flow regimes. Note the diurnal sign changes in \(\alpha _1\) corresponding to the diurnal patterns in \(\phi \) (see also Fig. 6). Date and local time are shown on the x-axis

Since it is unclear from the theoretical formulations if the \(\alpha _2\) component of the buoyancy term is significant with respect to the other two components, Fig. 10 uses the data from the SLOPE site to investigate this. Figure 10a shows all three buoyancy components from the TKE budget equation for three consecutive clear-sky days. Figure 10b shows the corresponding time series of their respective slope angles on the left, blue axis and the wind-direction angles, \(\phi \) and \(\psi \) on the right, grey axis for reference. Above all, Fig. 10 shows that, except in the case of pure downslope flow, for example at night, all three components of the buoyancy term can be significant and should be retained in TKE budget analyses. In this example, the \( (g/\bar{\theta }) (-\overline{u_2^\prime \theta ^\prime }\mathrm {sin}\alpha _2) \) term contributes little to the vertical buoyancy flux; however, it is non-zero. This implies that for a SNSP coordinate system for which \(u_1\) follows the mean wind direction, the \( (g/\bar{\theta }) (-\overline{u_2^\prime \theta ^\prime }\mathrm {sin}\alpha _2) \) term is potentially significant for some sites, and should not be neglected a priori.

In addition, Fig. 10a shows that the resultant buoyancy flux computed by summing the three flux components is equivalent to the buoyancy flux computed by using the vertical velocity component, \(\overline{\hat{u}_3^\prime \theta ^\prime } \), as expected (note the ‘hat’ notation for the horizontal/vertical coordinate system). Using the vertical velocity component to calculate the total buoyancy flux, \(g/\bar{\theta _v}\overline{\hat{u}_3^\prime \theta ^\prime }\), may appear as a more simple formulation to use. However, using the three components can elucidate a richness of information regarding physical mechanisms because it clarifies how fluxes over sloping terrain differ from their flat terrain counterparts. For example, since the along-slope buoyancy fluxes are now aligned with the momentum fluxes one can explore how the two interact. These results also have implications for the flux Richardson number, \(Ri_\mathrm{f}\), that is defined as the ratio of shear production terms to the buoyant production/destruction terms from the TKE budget equation. Therefore, in a SNSP coordinate system, the flux Richardson number is

$$\begin{aligned} Ri_\mathrm{f} = \frac{\frac{g}{\overline{\theta }}\left( -\mathrm {sin}\alpha _1\, \overline{u_1^\prime \theta ^\prime } - \mathrm {sin}\alpha _2\, \overline{u_2^\prime \theta ^\prime } + \mathrm {cos}\alpha _3 \, \overline{u_3^\prime \theta ^\prime }\right) }{ \overline{u_i^{'}u_j^{'}}\frac{\partial \overline{U_i}}{\partial x_j}} =\frac{\frac{g}{\overline{\theta }}\overline{\hat{u}_3^\prime \theta ^\prime }}{\overline{u_i^{'}u_j^{'}}\frac{\partial \overline{U_i}}{\partial x_j}}. \end{aligned}$$
(16)

These results show that, in using the SNSP coordinate system, the buoyancy terms in the governing equations must retain extra terms. In addition, when \(x_1\) and \(\bar{u}_1\) follow the mean wind direction the physical interpretations of the buoyancy fluxes in the TKE budget equation become more complex because \(\alpha _1\) and \(\alpha _2\) change in magnitude and sign throughout a diurnal cycle. Therefore, in future studies where a planar-slope assumption is reasonable, it is recommended that a fixed SNSP coordinate system is adopted. In such a case, \(x_1\) and \(\bar{u}_1\) are not rotated into the mean wind direction and are aligned with the main slope axis. Hence, \(\bar{u}_2\ne 0\), necessarily, and \(x_2\) and \(\bar{u}_2\) are aligned with the cross-slope direction. For the fixed SNSP coordinate system the general SNSP forms of the governing equations derived herein remain valid and \(\alpha _1=\pm \alpha _3=\alpha _\mathrm{slope}\) and \(\alpha _2=\mathrm {sin}\alpha _2=0\), which is a significant simplification when analyzing the buoyancy fluxes in the TKE budget. However, care must be taken to ensure that the signs for \(\alpha _1\) align properly with the fixed coordinate system chosen. For example, if positive \(x_1\) is aligned with the upslope direction, then \(\alpha _1=-\alpha _3\). Conversely, if positive \(x_1\) is aligned with the downslope direction, then \(\alpha _1=\alpha _3\) for the equations herein to produce the correct signs. One disadvantage associated with using a fixed SNSP coordinate system, is that analysis of the momentum budget becomes more complicated because the \(\bar{u}_2\) component of the momentum balance equations must be retained for flows not aligned with the dominant slope axis.

10 Summary and Conclusions

Herein, solutions for addressing challenges associated with adapting field data and the governing flow equations to coordinate systems aligned with steep slopes in three-dimensional, complex terrain have been proposed and developed for practical use. First, to reduce the artificial, terrain-induced portion of the measured velocity signal, \(\breve{u}_i\), a methodology is developed that provides objective cost functions for selecting appropriate sector sizes, \(\varLambda \), and planar-fit averaging time \(\tau _\mathrm{PF}\) for the sector-wise planar-fit (SPF) tilt-correction scheme. Through the ensemble minimization of these cost functions an optimized SPF helps to place the three-dimensional velocity measurements into a more planar, terrain-following coordinate system. Field data from an alpine, steep-slope site show that significant deviations from the optimized SPF produce large errors in the momentum flux estimates as shown in Fig. 7 and summarized in Table 1. In particular, some of the highest errors in the momentum fluxes are produced by using small \(\varLambda \) (422 % mean absolute percentage difference for \(\varLambda =10^\circ \)) or very large \(\tau _\mathrm{PF}\) (160 % mean absolute percentage difference for \(\tau _\mathrm{PF}=\)200 min) for the SPF because the data segments defining each planar fit contain too much variability such that the mean streamlines are not representative of observed velocity signals. In addition, using a single planar fit also performed poorly because of the geometrically variable terrain surrounding the SLOPE site. The cost functions also show that, for the very idealized, flat site (PLAYA), a single planar fit is likely sufficient because the planar-fit coefficients, and subsequent planar-fit tilt angles, do not change much for varying \(\varLambda \) and \(\tau _\mathrm{PF}\), except for very large \(\tau _\mathrm{PF}\).

Second, simplifications, inconsistencies and oversights found in the slope-flow literature that can be associated with improper treatment of the buoyancy terms for the governing flow equations in the slope-normal/slope-parallel (SNSP) coordinate system are addressed. New and generalized adaptations for the governing flow equations are developed for slope-aligned coordinate systems. In particular, these SNSP forms of mean momentum equations can properly account for a coordinate system changing in time to follow the terrain in the mean wind direction and hence, a slope flow that is not aligned with the main slope axis (i.e., has a cross-slope component). In such cases, the buoyancy forces are reduced in the streamwise (\(\bar{u}_1\) component) equation because the slope angle ‘seen’ by \(\bar{u}_1\) is less steep than the angle experienced by pure upslope or downslope flows. In addition, a generalized, terrain-following, TKE budget equation is derived that is appropriate for orthogonal, planar coordinate systems. Therefore, it is appropriate for both flat and sloping terrain if the \(x_3\) and \(\bar{u}_3\) components are aligned with the surface-normal direction. This equation contains all three directional contributions to the buoyancy flux, and therefore,the buoyant production/destruction term of the full budget equation. Data from the SLOPE site show that the typically omitted \(\mathrm {sin}( \alpha _2 ) g \overline{(u_2^\prime \theta ^\prime )}/\bar{\theta }\) component of the buoyancy flux was found to be non-zero for slope flows having a cross-slope component, and should not necessarily be neglected. Subsequently for these cases, the flux Richardson number must also contain all three components. For pure upslope or downslope flows the \(\mathrm {sin}( \alpha _2 ) g \overline{(u_2^\prime \theta ^\prime )}/\bar{\theta }\) term is zero because \(\alpha _2=0\), and the Horst and Doran (1988) and Łobocki (2014) formulations are sufficient.

In summary, the study was motivated by a need to revisit traditional methodologies for more complex measurement sites. The results presented herein are largely site specific, though the methodologies and especially the derivations are adaptable to other sites. The standardization of methodologies for properly handling atmospheric measurements over very complex sites is still in the developmental stage. Even the optimized SPF scheme presented herein has some imperfections that need attention, such as discontinuities in tilting angles, problems fitting a plane to very low-wind-speed sectors, the efficiency in selecting optimized SPF parameters, the wind-speed-dependence on the SPF parameters, and velocity-vector conservation. However, this SPF scheme is an important step towards improved and standardized methodologies because it offers a clear technique with which more objective decisions can be made for SPF implementations over complex terrain.