## 1. Introduction

Wind-driven upwelling and downwelling are key processes in the coastal ocean circulation that connect the surface and interior ocean. The onshore/offshore Ekman transport in the surface layer provides downwelling/upwelling, which is supplied by a combination of offshore/onshore return flow below the Ekman layer and flow along the boundary. These processes play important roles not only in the water exchange between the surface Ekman layer and interior but also in the primary production and chlorophyll redistribution (Hickey 1998).

Wind-driven coastal upwelling theory has been studied in many works. The upwelling can bring deep isopycnals to the upper layer, resulting in sloping isopycnals over a horizontal scale of the baroclinic deformations radius (Charney 1955), which builds an alongshore, geostrophic flow. Using a two-dimensional, nondissipative, nonlinear model, Pedlosky (1978) showed a sharp gradient on scales much less than the Rossby deformation radius was forced by coastal upwelling, which can be observed to form during the initiation of upwelling (Halpern 1974). In the time-dependent, two-dimensional, inviscid model of Choboter et al. (2005), an equatorward boundary current develops more rapidly in the upper ocean followed by a deeper poleward undercurrent. There is a near-surface offshore flux of faster alongshore flow and an onshore flux of slower alongshore flow throughout the interior. Compared to the flat bottom ocean, the cross-shore topography plays an important role in the cross-slope flow and the along-slope baroclinic flow. The cross-slope flow is slow and surface intensified over steep slopes, while the along-slope velocity has a strong vertical dependence and develops an undercurrent (Choboter et al. 2011), and vice versa for shallow slopes. The partition between onshore flow in a bottom Ekman layer and onshore flow in the interior depends on the slope Burger number (Lentz and Chapman 2004). When the Burger number is small (weak stratification) the onshore flow is carried in a bottom Ekman layer and the wind stress is balanced by bottom stress. However, when the Burger number is large (strong stratification or steep slope) the onshore flow is carried in the interior and the cross-shelf momentum flux divergence balances the wind stress.

However, these studies are two-dimensional in the depth-offshore plane and thus require that the offshore Ekman transport be balanced by onshore flow below the Ekman layer, either in the interior or in a viscous bottom boundary layer. Consideration of a third dimension introduces a potential source to balance the offshore Ekman transport from along the boundary. Using a two-layer model with an idealized continental shelf and slope bottom topography, Allen (1976) showed that the alongshore and time-dependent behavior of the baroclinic and barotropic components are governed by forced coastally trapped waves. Therefore, the region of forced upward motion of density surfaces may propagate alongshore to locations distant from that of the wind stress, which results in the setup of alongshore barotropic currents at locations in the downwave direction of the wind stress that forces them. Yoon and Philander (1982) demonstrated that baroclinic Kelvin waves excited by the onset of winds that adjust the pressure field arrest the acceleration of the coastal jet and the upwelling. Meanwhile, a coastal undercurrent is established by the difference between the vertical structure of the waves and the coastal jet.

As reported in many studies, the response of the coastal upwelling forced by nonuniform wind stress is three dimensional. Using a simple three-dimensional model of a time-dependent coastal upwelling forced by wind stress with alongshore variability, Yoshida (1980) pointed out the coastal jet and the poleward undercurrent can be interpreted simply as the orbital velocities of the forced Kelvin-type waves. The alongshore variations are introduced by Kelvin waves forced by fluctuating wind, which permit certain three-dimensional solutions (Philander and Yoon 1982). The response of the coastal wind-driven current forced by the wind stress with a limited longshore extent can also be three-dimensional (Suginohara 1982; McCreary and Chao 1985; McCreary et al. 1992). Barotropic shelf waves play an essential role in determining the upwelling circulation (Suginohara 1982), which leads to the upwelling circulation being balanced three-dimensionally. The compensation for the upwelling confined to the coastal area is performed by the divergence due to the equatorward coastal jet as well as the onshore flow (Suginohara 1982). The westward Rossby dispersion from an eastern boundary of the equatorward flow associated with the second coastal-trapped mode response helps to build the poleward undercurrent, which may represent the one observed off Oregon and California (Suginohara and Kitamura 1984). The three-dimensional coastal upwelling system is sensitive to the bottom topographic profile, which results in usually weak undercurrent if the shelf depth is sufficiently shallow or vertical mixing is sufficiently strong (McCreary and Chao 1985). The spatial distribution and strength of the wind stress also play important roles in modifying the coastal upwelling system. The circulation forced by a steady positive wind stress curl will result in a deep, broad, poleward surface current near the coast, consistent with Sverdrup theory (McCreary et al. 1987). When the wind is sufficiently strong nonlinear solutions retain a reasonably strong coastal circulation, which reverses the propagation direction of mode-2 Rossby waves by the strong onshore geostrophic flow (McCreary et al. 1992).

Most of these previous studies were applied to eastern boundaries because upwelling-favorable winds are often found at midlatitudes during the summer months. However, upwelling-favorable winds are also often found along western boundaries. During the southwest monsoon, the offshore Ekman transport owing to an intense alongshore wind generates coastal upwelling in the western Indian Ocean, along the coast of Somalia and Oman. This coastal upwelling builds a northward boundary current and a subsurface countercurrent (McCreary and Kundu 1985; Schott 1983; Vic et al. 2017). The surface jet off the Oman coast resulting from the coastal upwelling is associated with the thermal wind balance, while the dynamical explanation for the undercurrent remains unknown (Vic et al. 2017). Intense, upwelling-favorable winds are also often found during the monsoon season in the Bay of Bengal, in the marginal seas of the western Pacific Ocean (South China Sea, East China Sea), and along the east coast of Greenland. These are a few examples of situations in which winds along the western boundary of the ocean will give rise to an offshore Ekman transport.

Given the diversity represented by these examples (shelf width, depth, stratification, wind strength), we seek to develop a general theory for the ocean response on western boundaries to upwelling-favorable winds. We are interested in the magnitude and three-dimensional structure of currents forced by coastal upwelling along a western boundary under homogeneous wind stress. We focus on the much less studied western boundaries because, as will be demonstrated below, it is only on western boundaries that steady, inviscid upwelling solutions are possible. We recognize that western boundary coastal regions often include complicating factors not considered here such as western boundary currents and strong mixing. Our main focus is to demonstrate that consideration of a third dimension fundamentally alters the circulation and source regions for waters upwelling into the Ekman layer. With this in mind, we explore the currents derived from perhaps the simplest model of coastal upwelling: steady uniform wind stress applied to a stratified, adiabatic, inviscid quasigeostrophic fluid over a sloping bottom. Applications include the western boundaries of the major ocean basins, particularly in regions with wide shelves that separate western boundary currents from the coast. Large lakes and marginal seas that lack strong western boundary currents are also potential applications. Although our theory is inviscid, favorable comparison with numerical model results, which include viscosity and diapycnal mixing, suggests that the basic predictions from the theory remain useful even in the presence of mixing.

## 2. Theory

### a. Equations

We consider a nonlinear model for the steady-state circulation in a uniformly stratified ocean, with bottom topography declining in the cross-shore direction from an elevation *h*^{*} at the western boundary. The model is adiabatic and inviscid and conserves quasigeostrophic potential vorticity. To most clearly expose the parameter sensitivity and the structure of the circulation forced by the interaction of the Ekman transport with a boundary, we consider the nondimensional form of the equations. The vertical coordinate is scaled by the ocean depth far from the western boundary, *H*^{*}, and the horizontal length is scaled by *L*^{*}, which could be chosen to be the deformation radius. All variables with an asterisk are dimensional, and henceforth those lacking an asterisk are nondimensional.

The flow is driven by a uniform northward wind stress on a beta plane, therefore, a nearly meridionally uniform zonal transport within the Ekman layer is drawn away from the western boundary. The wind stress has no curl so that there is no Ekman pumping in the interior, allowing us to focus on the interaction between the Ekman layer and western boundary. It is assumed that, away from the boundary, the eastward Ekman transport is balanced by a westward interior geostrophic flow of strength *f*_{0} is the dimensional Coriolis parameter at the meridional center of the model domain, and *ρ*_{0} is the mean density in the Boussinesq approximation. The previously discussed theories (e.g., Choboter et al. 2005; Pedlosky 1978, 2013) illustrate that the response of the boundary current to the Ekman source and sink is baroclinic. For three-dimensional flows, the alongshore current is surface intensified with a vertical scale less than the full depth of the ocean, while the lower layer is not directly affected by the source and sink (Pedlosky 2013). This formulation is similar to the two-dimensional inviscid models of Pedlosky (1978) and Choboter et al. (2005, 2011). The primary difference is the addition of a third, along-coast, dimension, which will be shown to fundamentally alter the circulation and source waters for the Ekman upwelling.

*β*is the dimensional planetary vorticity gradient, and

*N*is the uniform buoyancy frequency.

Given that we have scaled the velocity with the barotropic interior flow *U*^{*}, *U* = 1. However, we keep the variable *U* in the following derivation because it helps to interpret the governing dynamics. Since *q* is conserved following the flow, the potential vorticity is a function of the streamfunction. This relationship will continue to hold on all streamlines as they approach the western boundary.

*z*= 0. Since both ∂

*ψ*/∂

*z*and

*h*are zero far from the western boundary, if we integrate (3) far from the boundary to an arbitrary position over the topography,

*h*

_{0}at the western boundary to zero over a horizontal

*e*-folding length scale

*λ*,

*x*= 0,

*z*= 1, similar to Pedlosky (1978) and Choboter et al. (2005, 2011). Therefore, we use a Dirac function to represent this source at the western boundary. That is,

### b. Solutions

*φ*is the perturbation streamfunction representing the adjustment of the interior geostrophic pressure due to the presence of the boundary and the sink at the corner. Therefore,

*φ*satisfies

*ψ*

_{0}is the pressure on the boundary, which determines the position of the stagnation point and we are free to specify as a boundary condition. Anticipating a boundary layer structure, the alongshore scale is assumed to be much greater than the cross-shore scale, therefore, in (10a) derivatives in the

*y*direction have been dropped.

It is clear that the homogeneous component contains two independent solutions, that forced by interaction between the zonal flow and the bottom topography and the source/sink solution due to Ekman pumping/sucking at the corner. These solutions will be labeled

Note that the source/sink solution has no barotropic component, which is not surprising because the vertical integral of the first two terms on the left side of (12) is equal to the integral of the right-hand side.

*υ*, where

*ε*≪ 1,

*y*and thus has no zonal geostrophic component, the balance is between friction, acceleration, and the ageostrophic zonal velocity

*u*. In the limit of vanishing

_{a}*ε*, the no normal flow condition requires that ∂

*υ*/∂

*t*= 0 which, for a problem spinning up from rest, requires that

*υ*= 0. The momentum balance remains valid even for finite values of friction and steady flows. Higher-order frictional parameterizations will produce a more complicated boundary condition, but this linear form allows for simple analytic solutions. Therefore, the alongshore velocity

*υ*is set to zero for the topographic relevant solutions, from which it follows

## 3. Discussion

*ρ*

_{0}= 10

^{3}kg m

^{−3},

*f*

_{0}= 10

^{−4}s

^{−1},

*N*= 10

^{−2}s

^{−1}. This results in an onshore barotropic velocity of

This scaling represents a deep, stratified ocean, which would be appropriate for a deep ocean adjacent to a narrow shelf. On the other hand, applications to a wide shelf, for which *H*^{*} = *O*(10^{2}) m, can result in *bS* = *O*(1) for strong stratification and *bS* ≪ 1 for weak stratification. As will be shown below, in this limit the vertical scale of the boundary current exceeds the bottom depth and the response is nearly barotropic. To focus on the vertical structure of the boundary current, we set the parameters *S* = 1, *U* = 1, *b* = 100, and *λ* = 5 for the example presented in this section. Owing to the large range of potential values for different applications, the sensitivity to these parameters will also be discussed. It is also worth noting that our solutions are uniformly valid for all values of *b* and *S*, no assumptions about their relative magnitudes are required.

### a. The boundary pressure ψ_{0}

A representative solution for the streamfunction is shown in Figs. 1a and 1b at two depths, one averaged between *z* = 0.8 and 1.0 and the other near the bottom (*z* = 0.1). For this choice of *ψ*_{0} = 5, the flow is symmetric in the meridional direction about *y* = 5. Deep in the water column, the interior flow approaches the western boundary and is diverted northward and southward in a narrow boundary layer. Note that, because the flow is inviscid, there is no bottom boundary layer and the onshore flow is limited in its ability to reach the boundary and upwell into the Ekman layer. However, near the surface, the flow develops a narrow boundary current with increasing strength away from the *ψ*_{0} streamline. The flow in the boundary current is directed toward the latitude *ψ*_{0} from both the north and south, in the opposite direction to the deep flow. There is also a component of the flow directed toward the boundary. This provides some of the source waters that are drawn into the Ekman layer in the corner. The balance in the potential vorticity terms is between relative vorticity and stretching vorticity, variations in planetary vorticity are locally relatively unimportant.

The solution depends on the choice of *ψ*_{0}, the pressure on the boundary. A choice of *ψ*_{0} = 0 would result in all of the deep onshore transport turning toward the north with a strong boundary current near the surface, as seen in Fig. 1b for *y* > 5. It can be most easily understood by recognizing that the streamfunction holds as a constant line along the reference latitude far from the ocean interior to the boundary. Therefore, to the north (south) of this latitude, the pressure at the boundary is smaller (larger) than the ocean interior, which supports a northward (southward) flow near the boundary. It can also be understood from the vorticity balance. Since we assume the ocean interior is frictionless, the vorticity balance of the deep circulation within the boundary layer is between the relative vorticity and planetary vorticity. Furthermore, the main component of the relative vorticity is attributable to the meridional velocity because in the boundary layer the zonal scale is much smaller than the meridional scale. Therefore, the deep impinging flow moves either northward or southward, which depends on the boundary condition that we choose at *x* = 0.

The value of *ψ*_{0} is determined by processes outside the local region of wind forcing. The boundary pressure is propagated along the boundary by waves (Allen 1976; Yoon and Philander 1982). In the case of spatially limited wind stress, the boundary pressure at the upstream (in the wave phase speed sense) limit of the wind stress would determine *ψ*_{0}. In that case the flow in the boundary current would be from the south toward the latitude where the wind stress ceases, as in the two-layer solutions of Allen (1976). For the cases considered here, with spatially uniform wind stress in a closed basin, the boundary pressure is determined by a contour integral around the whole basin, which would presumably involve distant wind forcing and dissipation. One can imagine a similar downwelling boundary layer on the eastern boundary that exports water to the south in a narrow boundary current that closes the circulation with this western boundary current in a Fofonoff-like inertial gyre. Although the flow direction depends on the boundary constant, the boundary layer width and vertical scale, the primary quantities of interest here, do not depend on *ψ*_{0}. Therefore, in the further analysis, we diagnose the boundary current structure at *y* = 0 without loss of generality.

### b. The total solution

The total solution for the velocity shows that a southward meridional flow arises as the boundary is approached at all depths, with a stronger, narrower boundary current in the upper layers compared to the lower layers (Fig. 2a). An adjacent northward velocity develops in the upper ocean on the offshore side of this narrow flow. The deep meridional velocities have very weak vertical shear and are trapped near the western boundary with scale

Pedlosky (2013) found similar results for the interaction of surface Ekman transport with an island, with some of the streamlines feeding the eastern upwelling directly from the interior and some from along the island perimeter. If the island radius in Pedlosky (2013) is much larger than the deformation radius, the streamlines around *y* = 0 are similar to our straight boundary solution.

The total solution contains three parts, the flat bottom source/sink forcing solution, the particular solution, and the topographic homogeneous solution. Because the problem is linear, we may consider each of these components separately.

### c. Flat bottom contribution

The flat bottom source/sink solution is much stronger than the particular and homogeneous solutions forced by topography (Fig. 2b). For the barotropic part of the interior flow, the stretching vorticity is negligible because the height variations are small over a length scale less than the order of the deformation radius in the quasigeostrophic framework. The deep flow potential vorticity balance of the source/sink solution is mainly between the relative vorticity and planetary vorticity, which are the first and third terms in (10a). Therefore, the streamfunction anomaly owing to the source/sink forcing is intensified at the western boundary, which decays eastward with the inertial boundary layer width. This is demonstrated in Fig. 3a in which the horizontal scale of the deep flow was diagnosed from a series of solutions with different values for *b*, as summarized in Table 1. The horizontal scale was diagnosed as the location of the *e*-folding of the boundary streamfunction anomaly at *z* = 0.5. The diagnosed boundary current width scales with *S* (not shown).

Parameters for the theory calculation used in Fig. 3. The sensitivity calculations are based on the standard calculation, where *S* = 1, *U* = 1, *b* = 100, and *λ* = 5. In each calculation, only one parameter was altered.

The source/sink solution shows strong baroclinicity, especially as the flow in the upper ocean enters into the inertial boundary layer. The streamfunction of the source/sink solution shows a sharper gradient in the upper ocean than in the deep ocean (Figs. 1a,b). The delta function forcing at the surface results an intense, narrow structure, particularly as the surface is approached (Fig. 2b). The baroclinic structure shows a local maximum southward flow lying below the strong northward boundary current. However, if one averages the transport in the vertical, the upper-ocean baroclinic flow becomes evident (Fig. 1a). Below this the southward flow becomes independent of depth. The horizontal width of this baroclinic meridional boundary current scales as 1/*α*, which can be demonstrated from (13). The parameter scaling (18) shows that, for deep ocean scaling, the typical value of the nondimensional number *b* is much larger than *S* and *U*. Therefore, in the series solution, *b*/*U* > *n*^{2}*π*^{2}/*S* for small *n*. Meanwhile, the remaining terms play a decreasing role in the summation of the series solution as *n* increases, especially for small *z*, owing to the cosine function. Therefore, the horizontal scale 1/*α* can be approximated as *z* increases from 0 toward 1, the remaining terms are beginning to play a more important role even for large *n* in the summation of the cosine series, resulting in the variability on a scale *b*/*U* and *n*^{2}*π*^{2}/*S* are comparable. Since in the cosine function of (13a) *z* is inversely proportional to *nπ*, the vertical scale of this strong baroclinic current can be inferred from (13b) to be *Sb* ≫ 1 the flow is baroclinic while for *Sb* ≪ 1 the flow is barotropic. Below

The stretching vorticity starts to play an increasing role near the surface in the vorticity balance. Given that the stretching does not contribute to the barotropic vorticity and the baroclinic solution is surface intensified (Fig. 2b) for the source/sink solution in a flat bottom ocean, the streamfunction anomaly due to the baroclinic stretching is strong near the surface and decays with depth. The balance between the planetary vorticity and stretching vorticity in (10a) shows that the key parameter of the baroclinic current forced by the source/sink solution is *U*/*Sb*, which is the ratio of planetary vorticity to stretching vorticity as well as the ratio of the inertial boundary layer width and the deformation radius, squared. If *U*/*Sb* ≪ 1, the vertical length scale has to be small in order for the stretching term to balance the relative vorticity term. In the other limit, *U*/*Sb* ≫ 1, the stratification is weak and the vertical length scale approaches the bottom depth. As the flow moves into the boundary layer, the relative vorticity starts playing an increasingly role in the potential vorticity balance. In the boundary layer *q*.

The vertical scale was diagnosed as the depth of the *e*-folding of the surface streamfunction anomaly at *S* and *b* (Table 1). The vertical scale of the series solutions is plotted as a function of *b* can be understood from recognizing that a stronger planetary vorticity gradient requires stronger relative vorticity and stretching vorticity, which means a narrower boundary layer thickness.

### d. The topographic contribution

Topography enters the problem in two ways. First, it alters the flat bottom solution, that is, the stretching vorticity is involved in the barotropic vorticity balance over the topographic length scale 1/*λ*. As the interior flow moves across the sloping topography it introduces stretching of planetary vorticity, *fw _{z}*, that tends to increase the potential vorticity, this is balanced by southward advection of planetary vorticity (Fig. 2c). Therefore, the horizontal scale of the stretching vorticity induced by topography depends on the topographic scale, which is distinct from the boundary layer thickness. As the flow impinges on the western boundary, the vorticity balance in the western boundary layer over topography is not only between relative vorticity and planetary vorticity, but the stretching vorticity is also active. Second, it provides a forcing at

*z*= 0 through the no-normal flow condition at the bottom. This supports a bottom-intensified baroclinic current that decays upward with an

*e*-folding scale of 1/

*m*(Fig. 3c).

The vertical structure of the particular solution depends on the topographic slope (11a) and (11b). For wide topographic slopes (*λ*^{2} < *b*/*U*), *m* is real, and the particular solution is a bottom-intensified flow over the slope, as in Fig. 2c. In this regime the topography is wider than the inertial boundary layer width, relative vorticity of the particular solution is small, and the potential vorticity balance is primarily between vertical stretching and advection of planetary vorticity. This is the most relevant regime for the midlatitude ocean. The strength of the particular solution is far smaller than the source/sink solution and the vertical scale of the particular solution is always larger than the source/sink solution since *β* is the same as the vertical scale of source/sink solution but trapped in the bottom layer.

If *λ*^{2} = *b*/*U*, the topography is exactly the width of the inertial boundary layer and *m* = 0 so the balance is between relative vorticity of the particular solution and *β* and the particular response is barotropic.

For topography narrower than this (*λ*^{2} > *b*/*U*) *m* becomes imaginary, which results in wave-like solutions in the vertical (Fig. 4). In this limit the relative vorticity produced by the narrow topographically induced flow is larger than can be balanced by advection of planetary vorticity and so the stretching term is required to balance. The stretching contribution is of opposite sign in this limit compared to the wide topography case. Therefore, compared with wide topographic slopes, the particular solution of narrow topographic slopes is not bottom-intensified but produces a vertical wave-like flow within a narrower boundary layer. The wavenumber increases as the topographic slope decreases.

The homogeneous topographic forced solution is a maximum at the western boundary and decays eastward with horizontal scale 1/*α* (17a). Since the particular solution satisfies the vertical boundary condition and the topographic forcing solution is a supplemental solution that matches the lateral boundary condition, the topographic forced solution shares the same vertical scale with the particular solution.

The source/sink forcing solution has no barotropic component. However, for nonzero topography, the particular and homogeneous topographic solution do contain barotropic components (Figs. 5a,b). Both the particular and homogeneous topographic solutions are boundary intensified but with different scales. The particular solution decays eastward with a scale depending on the topographic extension from the western boundary, while the homogenous topographic forcing solution decays over the inertial boundary layer width (the same decay scale as the source/sink solution), which is independent of the topography (Fig. 5b). The barotropic velocity over the topography increases as the width (1/*λ*) decreases or the maximum height at the boundary *h*_{0} increases. Although the streamfunction anomaly of the particular solution at the boundary depends only on *h*_{0} (11), the decay of the streamfunction anomaly depends on the topographic scale (1/*λ*), resulting in distinctive boundary currents with different topographic scales (Figs. 5a,b). The boundary perturbation streamfunction of the homogenous topographic solution is sensitive to both *h*_{0} and *λ*. The velocity of the homogeneous topographic solution is reversed but with the same magnitude as the particular solution at the boundary. Therefore, the solutions forced by the topography have no meridional velocity at the western boundary, which is the no-slip boundary condition (16).

### e. The mass budgets

These solutions provide a framework for understanding the mass budget and the origin of water that is drawn into the Ekman layer. The zonal flow approaching the western boundary is exactly that required to balance the offshore Ekman transport. However, the deep flow turns parallel to the boundary, it does not upwell into the Ekman layer. This is a major difference between these three-dimensional solutions and two-dimensional solutions (e.g., Lentz and Chapman 2004; Choboter et al. 2005, 2011). So, the logical question is, if this deep water is not entering the Ekman layer, where does that transport into the Ekman layer come from?

The upper-ocean streamfunction in Fig. 1a shows that the upwelling is provided by the meridional flow in the baroclinic boundary current, which feeds into a vanishingly thin boundary layer that ultimately feeds the upwelling into the Ekman layer. Additional physics that include mixing and viscosity, not considered here, would be required to explicitly represent the balances in this narrow boundary region. The depth that marks the transition between the deep recirculating flow and the source waters for the Ekman layer is the vertical length scale for the baroclinic flow, *ψ*_{0}. This means that the depth of the source waters that feed Ekman upwelling is not an inherent length scale that depends only on the local environmental parameters but instead deepens as the wind forcing strengthens, as the stratification weakens, or as the Coriolis parameter increases.

This also provides a scaling for the magnitude of the meridional velocity in the boundary current since it has to provide the transport into the Ekman layer that is not provided from the interior onshore flow. If one takes the deep southward transport, which scales as *L _{y}* is the nondimensional distance from where

*ψ*=

*ψ*

_{0}. For typical values of

*b*≫ 1,

*L*≫ 1,

_{y}*S*=

*O*(1), and

*U*=

*O*(1),

*V*≫ 1 and the baroclinic boundary current is very strong compared to the interior flow. Note that the boundary current is stronger for stronger stratification, larger

*β*, and stronger onshore flow but it is not a simple linear dependence because both the width and depth of the boundary current depend nonlinearly on these parameters.

### f. The eastward interior flow

*U*. This may also be understood from consideration of the barotropic potential vorticity, defined as

Far from the boundary, the relative vorticity *ζ*_{bt} is zero. At the boundary, again since the meridional scale is much larger than the zonal scale, the relative vorticity is ∂*υ*_{bt}/∂*x*. For northward wind stress the westward zonal interior flow impinges on the western boundary and deflects either northward or southward. For northward flow, the relative vorticity in the boundary layer is negative, which can balance the increase in the planetary vorticity and vice versa for southward flow.

However, if there were southward wind stress the interior flow would be toward the east, away from the western boundary. The potential vorticity still holds as a constant along streamlines (10a) but the sign of the last term on the left-hand side is now positive. This does not support an exponentially decaying boundary current, as was found for the westward flow. Moreover, for southward wind and eastward zonal interior flow, the relative vorticity in the northward flowing boundary layer will increase, as does the planetary vorticity, violating potential vorticity conservation. Therefore, the eastward flow lacks the physical mechanism to support an inertial boundary layer on the western boundary. However, as we demonstrate in the next section, a numerical model with eastward interior flow produces a boundary current very similar to that for a westward interior flow. We assert that the dissipation in the model is large enough to trap short Rossby waves near the western boundary and allow for set up of a baroclinic boundary current structure analogous to the westward interior flow cases even though the boundary current in the model is viscous, not inertial.

## 4. Numerical model

The advantage of the inviscid, adiabatic quasigeostrophic framework is that it allows for closed form solutions and a clear interpretation of the physics that controls the structure of the boundary current. However, many strong assumptions are required which may be questionable in the near coastal region. In particular, quasigeostrophy linearizes the stratification and assumes isopycnal displacements are small. It also neglects advection of potential vorticity by the ageostrophic flow. We have neglected mixing of momentum and density, which may not be good approximations in strong, narrow surface intensified boundary currents. In this section we apply an idealized configuration of a nonlinear primitive equation model to compare with the basic predictions from the theory.

### a. Model configuration

The numerical model used is the MITgcm primitive equation model. The model is configured using a *z*-level vertical coordinate and with a partial cell treatment of the bottom topography. The domain is 960 km × 960 km and 2000 m deep with a flat bottom and closed boundaries. The model has a uniform horizontal grid spacing of 2 km and 45 levels in the vertical with spacing ranging of 10 m over the upper 200 m, gradually increasing to 200 m at the bottom. The initial stratification is uniform and a spatially uniform, steady, northward wind stress is applied. The model is run for a period of 120 days with the analysis taken over the final 90 days of integration. Subgridscale mixing is represented by a horizontal Smagorinsky viscosity (Smagorinsky 1963) with nondimensional coefficient 2.5 and vertical viscosity and diffusion with coefficients 10^{−4} and 10^{−6}, respectively. Calculations with a uniform horizontal Laplacian viscosity with coefficient 20 m^{2} s^{−1} are essentially the same as those presented here, and additional calculations have shown that the basic results are not sensitive to these parameters. The Coriolis parameter at the southern limit of the domain is 3 × 10^{−5} s^{−1} with meridional variation *β* = 2 × 10^{−11} m^{−1} s^{−1}. The wind stress for the example case is *τ* = 0.005 N m^{−2}. This weak wind stress was chosen to provide a central case that would produce moderate strength currents so as to be consistent with the quasigeostrophic approximation in the theory. Stronger wind stresses, up to 0.05 N m^{−2}, are applied in the following section. The initial stratification *N*^{2} = 2.25 × 10^{−6} s^{−2}. After this central case is discussed, a series of model runs are carried out in which *β*, *N*^{2}, and *τ* are all varied, and the results are compared with predictions from the theory in the previous section.

The inertial boundary layer width varies between 2 and 10 km for these model runs. The Smagorinsky viscosity parameterization produces viscosities of *O*(10–50) m^{2} s^{−1}, which gives a viscous boundary layer width of *O*(10) km. This is as wide or wider than the inertial boundary layer, so that friction is important in all cases and the model western boundary layer is not purely inertial.

### b. Central case

A vertical section of the mean meridional velocity and density, averaged in time and between latitudes *y* = 200 and 400 km, is shown in Fig. 6. Note that this is only the upper 1000 m and westernmost 100 km of the basin. The flow is dominated by a northward surface intensified current and a weaker southward current below. The northward flow is a maximum just off the western boundary while the southward flow is a maximum on the boundary. The interior flow toward the boundary is *O*(10^{−4}) m s^{−1}, so the boundary current is approximately two orders of magnitude stronger, consistent with the theory. The horizontal scale of the boundary current is *O*(10) km, an order of magnitude less than the baroclinic deformation radius. The isopycnals are flat in the interior but they are deflected within a few kilometers of the western boundary. In the upper 50 m the isopycnals rise, providing anomalously dense water near the boundary and a horizontal density gradient to support the surface intensified jet. Over the deeper half of the countercurrent the isopycnals are deflected downward, as required to balance the local maximum in southward flow. It is clear that near the surface the quasigeostrophic assumption of spatially uniform stratification is not well satisfied, yet the basic baroclinic current structure predicted by the theory is found in the model.

There are differences between the model and the theory. Notably, the theory predicts that the countercurrent projects all the way to the surface in an ever-narrowing region along the western boundary. Its absence in the numerical model is not surprising, however, because the Ekman upwelling is not confined to a delta function in the corner and the model has a finite grid spacing and lateral viscosity that will erode such a narrow flow. The weak deep southward flow expected from the theory is also not apparent, but we find that the deep flow is time dependent as a result of basin modes that are excited by the forcing. They are sufficiently strong to alias the deep flow depending on what time period is chosen for averaging (but the stronger baroclinic flow in the upper ocean is not strongly affected). Friction is sufficiently small that they decay over a longer time scale than the model integration time. Longer time integrations result in instabilities of the western boundary current and further mask the basic current structure. Moreover, it is worth noting that there is a limitation on the applicability of our theory due to the offshore advection of density caused by Ekman transport in the surface layer. Absent a balancing surface heat flux, this will spread dense water offshore and result in convective mixing near the surface (Spall and Schneider 2016). Therefore, we focus on the early time mean vertical structure of the upper-ocean baroclinic flow in the following diagnostics. We note, however, that the basic current structure sets up quickly, on the order of 10 days, so our 120-day integration period is sufficient to capture the baroclinic current development.

### c. Vertical scale

*U*/

*Sb*)

^{1/2}, where

*U*is the velocity scale for the Ekman transport distributed over the full depth of the ocean. However, the analytic solutions above demonstrate that the baroclinic boundary current extends over a shorter vertical length scale of

*D*

^{*}. The entire Ekman transport is supplied over this depth scale through a combination of the interior and along boundary flows. Thus, the appropriate velocity scale is the Ekman transport distributed over the vertical length scale

*D*

^{*}instead of the full ocean depth. This gives a dimensional length scale for the baroclinic flow of

For the central parameters used for the model run depicted in Fig. 6, *D* = 127 m. The exponential decay scale used to diagnose the vertical scale in the previous section was found to be very sensitive and inconsistent when applied to the model output, especially for cases with very weak stratification. Instead, we use two different methods to diagnose the vertical scale from the model fields, one based on transport and one based on perturbation density near the boundary. The transport-based diagnostic is the depth at which the meridional transport in the boundary current is a maximum. This effectively distinguishes the northward flowing upper boundary current from the deeper counter current. The density anomaly metric is the depth at which the density anomaly adjacent to the boundary has dropped to 50% of its maximum value at the surface. Reassuringly, these two measures give very similar results, 135 and 115 m for this case, that are also close to the theoretical prediction. They are indicated on Fig. 6 by the solid and dashed red lines and compare well with the vertical scale of the baroclinic flow.

This is a scaling for the parameter dependence of the vertical decay scale of the baroclinic flow, so the best way to test this prediction is through a series of model calculations in which the governing parameters are varied. The same model configuration was used as for the central case but the values of *N*^{2}, *β*, and *τ*_{0} were varied in various combinations. The wind stress was varied between 0.001 25 and 0.05 N m^{−2}, the stratification was varied such that the baroclinic deformation radius ranged between 10 and 200 km, and *β* was varied between 0.5 × 10^{−11} m^{−1} s^{−1} and 2 × 10^{−11} m^{−1} s^{−1}. These values were chosen to provide a wide range of the primary scaling parameter *L _{I}*/

*L*, which varied between 0.016 and 2 over 15 different model runs. The vertical length scale diagnosed in the model is compared to the scaling prediction in Fig. 7. The blue squares are for the transport-based diagnostic and the blue diamonds are for the density anomaly diagnostic. In general, the parameter dependence predicted by the theory is supported by the model calculations. The vertical length scale varies between about 60 and 1000 m in the model with an approximately linear dependence on (

_{d}*L*/

_{I}*L*)

_{d}^{2/3}. At very weak stratification (

*L*/

_{I}*L*≫ 1, large vertical length scales) the scaling theory overpredicts the vertical scale, but the model diagnostics become more sensitive to the detailed method in this limit. The model supports the prediction that the vertical length scale of the flow depends on the strength of the wind stress, not just the local environmental parameters.

_{d}The theory provides solutions only for cases in which the interior flow is toward the western boundary. To test the applicability of the scaling theory to downwelling favorable winds, for which the interior flow is eastward, we carried out 9 additional calculations in which the wind stress was varied between −0.001 25 and −0.05 N m^{−2} and the baroclinic deformation radius was varied between 10 and 200 km. This produced values of *L _{I}*/

*L*between 0.016 and 1.0. These model runs produce a similar vertical length scale as the upwelling winds and are also in general agreement with the theory (Fig. 7, red symbols). We attribute the ability of the numerical model to represent boundary layer solutions even with eastward interior flow to the weak but finite viscous dissipation in the model, which is able to damp short Rossby waves before they can propagate energy into the interior (Pedlosky 1965). It is also possible that the short Rossby waves propagate sufficiently slowly that the baroclinic structure remains over the 120-day integration time.

_{d}## 5. Conclusions

The three-dimensional coastal upwelling along a western boundary forced by a uniform northward wind stress in a stratified ocean has been studied using analytical and numerical models. We adopt an oceanic interior westward geostrophic flow toward the western boundary, which balances the offshore Ekman transport and produces an inertial boundary layer as the onshore geostrophic flow impinges on the boundary. Owing to the numerous regimes in which upwelling winds are found along western boundaries, we approach the problem from a very idealized, nondimensional perspective in order to identify the controlling nondimensional parameters. The advantage of this geophysical fluid dynamics (GFD)-like approach is it exposes the underlying physics over a range of potential applications.

The source/sink forcing supports a purely baroclinic boundary current in a narrow boundary layer with a horizontal scale *L _{d}* for deep or strongly stratified oceans. This scale is determined by the vorticity balance between the relative vorticity and planetary vorticity, which is wider for stronger wind stress or weaker planetary vorticity gradient. This baroclinic flow is surface intensified and decays downward with a depth that scales with

Although we start from the flat bottom ocean in our theory, the vertical scale (20) is not a function of *H*^{*}. Moreover, Since the upper ocean and the lower ocean are decoupled, our flat-bottom theory is applicable in the real ocean as long as the depth of the western boundary region is larger than the vertical scale. Typical parameters for the coastal upwelling region give a vertical scale of

Topography provides a forcing at *z* = 0 and alters the flat bottom solution through involving the stretching vorticity in the barotropic vorticity balance over the topographic length scale but with a far smaller strength compared to the source/sink solution. The vertical structure of the particular solution depends on the topographic slope. For wide topographic slopes (*λ*^{2} < *b*/*U*), the particular solution is a bottom intensified flow over a wider scale than the inertial boundary layer, which results in a small relative vorticity. If *λ*^{2} < *b*/*U*, the topography shares the same scale as the inertial boundary layer and the balance is between the relative vorticity and *β*. For narrow topographic slopes (*λ*^{2} < *b*/*U*), the relative vorticity produced by the topographically induced flow is larger than the advection of planetary vorticity, which results in wave-like solutions in the vertical.

The westward interior transport was chosen to match the transport upwelled into the Ekman layer in anticipation that this westward flow provided the source waters for the upwelling, as for previous two-dimensional solutions. However, it was shown that, for typical parameters, most of the upwelling transport is supplied from a remote location by a narrow, shallow western boundary current, not from the interior flow. Yet this interior flow is required to maintain the western boundary current that feeds the Ekman layer, so they appear to be connected. We speculate that the interior flow represents an inertial recirculation akin to a Fofonoff free mode that might be driven by eddy fluxes as the end result of enstrophy minimization (Bretherton and Haidvogel 1976).

## Acknowledgments.

This research is supported in part by the China Scholarship Council (201906330102). H. G. is financially supported by the China Scholarship Council to study at WHOI for 2 years as a guest student. M.S. is supported by the National Science Foundation Grant OCE-1922538. Z. C. is supported by the ‘Taishan/Aoshan’ Talents program (2017ASTCPES05) the Fundamental Research Funds for the Central Universities (202072001). It is a pleasure to acknowledge helpful comments on this research from Steven J. Lentz and Kenneth H. Brink and two anonymous reviewers.

## Data availability statement.

Model data are generated by idealized MITgcm models. The model configurations are clearly stated in the body text.

## REFERENCES

Allen, J. S., 1976: Some aspects of the forced wave response of stratified coastal regions.

,*J. Phys. Oceanogr.***6**, 113–119, https://doi.org/10.1175/1520-0485(1976)006<0113:SAOTFW>2.0.CO;2.Allen, J. S., 1980: Models of wind-driven currents on the continental shelf.

,*Annu. Rev. Fluid Mech.***12**, 389–433, https://doi.org/10.1146/annurev.fl.12.010180.002133.Bretherton, F. P., and D. B. Haidvogel, 1976: Two-dimensional turbulence above topography.

,*J. Fluid Mech.***78**, 129–154, https://doi.org/10.1017/S002211207600236X.Charney, J. G., 1955: The generation of ocean currents by wind.

,*J. Mar. Res.***14**, 477–498.Choboter, P. F., R. M. Samelson, and J. S. Allen, 2005: A new solution of a nonlinear model of upwelling.

,*J. Phys. Oceanogr.***35**, 532–544, https://doi.org/10.1175/JPO2697.1.Choboter, P. F., D. Duke, J. P. Horton, and P. Sinz, 2011: Exact solutions of wind-driven coastal upwelling and downwelling over sloping topography.

,*J. Phys. Oceanogr.***41**, 1277–1296, https://doi.org/10.1175/2011JPO4527.1.Elliott, A. J., and G. Savidge, 1990: Some features of the upwelling off Oman.

,*J. Mar. Res.***48**, 319–333, https://doi.org/10.1357/002224090784988764.Greenspan, H. P., 1962: A criterion for the existence on an inertial boundary layer in oceanic circulation.

,*Proc. Natl. Acad. Sci. USA***48**, 2034–2039, https://doi.org/10.1073/pnas.48.12.2034.Halpern, D., 1974: Variations in the density field during coastal upwelling.

,*Tethys***6**, 363–374.Hickey, B. M., 1998: Coastal oceanography of western North America from the tip of Baja California to Vancouver Island.

, A. R. Robinson and K. H. Brink, Eds.,*The Global Coastal Ocean: Regional Studies and Syntheses**The Sea—Ideas and Observations on Progress in the Study of the Seas*, Vol. 11, John Wiley and Sons, 345–393.Lentz, S. J., and D. C. Chapman, 2004: The importance of nonlinear cross-shelf momentum flux during wind-driven coastal upwelling.

,*J. Phys. Oceanogr.***34**, 2444–2457, https://doi.org/10.1175/JPO2644.1.McCreary, J. P., and S.-Y. Chao, 1985: Three-dimensional shelf circulation along an eastern ocean boundary.

,*J. Mar. Res.***43**, 13–36, https://doi.org/10.1357/002224085788437316.McCreary, J. P., and P. K. Kundu, 1985: Western boundary circulation driven by an alongshore wind: With application to the Somali Current system.

,*J. Mar. Res.***43**, 493–516, https://doi.org/10.1357/002224085788440385.McCreary, J. P., P. K. Kundu, and S.-Y. Chao, 1987: On the dynamics of the California Current system.

,*J. Mar. Res.***45**, 1–32, https://doi.org/10.1357/002224087788400945.McCreary, J. P., Y. Fukamachi, and P. Lu, 1992: A nonlinear mechanism for maintaining coastally trapped eastern boundary currents.

,*J. Geophys. Res.***97**, 5677, https://doi.org/10.1029/92JC00035.Pedlosky, J., 1965: A note on the western intensification of the oceanic circulation.

,*J. Mar. Res.***23**, 207–209.Pedlosky, J., 1978: A nonlinear model of the onset of upwelling.

,*J. Phys. Oceanogr.***8**, 178–187, https://doi.org/10.1175/1520-0485(1978)008<0178:ANMOTO>2.0.CO;2.Pedlosky, J., 2013: An inertial model of the interaction of Ekman layers and planetary islands.

,*J. Phys. Oceanogr.***43**, 1398–1406, https://doi.org/10.1175/JPO-D-13-028.1.Philander, S. G. H., and J.-H. Yoon, 1982: Eastern boundary currents and coastal upwelling.

,*J. Phys. Oceanogr.***12**, 862–879, https://doi.org/10.1175/1520-0485(1982)012<0862:EBCACU>2.0.CO;2.Schott, F., 1983: Monsoon response of the Somali Current and associated upwelling.

,*Prog. Oceanogr.***12**, 357–381, https://doi.org/10.1016/0079-6611(83)90014-9.Smagorinsky, J., 1963: General circulation experiments with the primitive equations: I. The basic experiment.

,*Mon. Wea. Rev.***91**, 99–164, https://doi.org/10.1175/1520-0493(1963)091<0099:GCEWTP>2.3.CO;2.Spall, M. A., and N. Schneider, 2016: Coupled ocean–atmosphere offshore decay scale of cold SST signals along upwelling eastern boundaries.

,*J. Climate***29**, 8317–8331, https://doi.org/10.1175/JCLI-D-16-0109.1.Suginohara, N., 1982: Coastal upwelling: Onshore–offshore circulation, equatorward coastal jet and poleward undercurrent over a continental shelf-slope.

,*J. Phys. Oceanogr.***12**, 272–284, https://doi.org/10.1175/1520-0485(1982)012<0272:CUOCEC>2.0.CO;2.Suginohara, N., and Y. Kitamura, 1984: Long-term coastal upwelling over a continental shelf–slope.

,*J. Phys. Oceanogr.***14**, 1095–1104, https://doi.org/10.1175/1520-0485(1984)014<1095:LTCUOA>2.0.CO;2.Vic, C., X. Capet, G. Roullet, and X. Carton, 2017: Western boundary upwelling dynamics off Oman.

,*Ocean Dyn.***67**, 585–595, https://doi.org/10.1007/s10236-017-1044-5.Yoon, J. H., and S. G. H. Philander, 1982: The generation of coastal undercurrents.

,*J. Oceanogr. Soc. Japan***38**, 215–224, https://doi.org/10.1007/BF02111104.Yoshida, K., 1980: The coastal undercurrent—A role of longshore scales in coastal upwelling dynamics.

,*Prog. Oceanogr.***9**, 83–131, https://doi.org/10.1016/0079-6611(80)90001-4.