1 Introduction

The Ekman layer covers 90% of the atmospheric boundary layer which contains three parts [1, 2]: the lamina sublayer, surface (Prandtl) layer and the Ekman layer. It is controlled by frictional effects, pressure gradient and the coriolis force [1, 3, 4]. The pursued analysis pertains to non-equatorial regions. Whether for ocean flow or for atmospheric flows, Ekman-type solutions require a balance between the wind stress, frictional forces and the Coriolis acceleration and this breaks down in equatorial regions, where the Coriolis effect vanishes so that the wind drift current moves azimuthally, in the same direction as the wind, and where nonlinear effects have to be accounted for [5,6,7]. Classic Ekman theory contains the derivation of the explicit solution for a constant eddy viscosity k [8, 9], but field data show that this is an extreme simplification, in reality k usually varies with the height [1, 2], but explicit solutions are scare and almost all focused on the numerical simulations [10,11,12,13,14,15,16].

Constantin and Johnson [17] studied the Ekman flows with variable eddy viscosity k(z), and derived the explicit solution and verified the existence of the solution by the transformation and the iterative technique. Bressan and Constantin [18] studied the wind-drift currents for depth-dependent eddy viscosities which were perturbations of the asymptotic reference value and obtained the solution by the perturbation approach. For the atmospheric Ekman flows, Fečkan et al. [19] obtained existence and uniqueness result and derived the smooth result by computing the first approximation of solutions. In addition, [20,21,22] studied wind-stress induced ocean currents and obtained the representation of solutions.

Motivated by [20,21,22], we consider atmospheric Ekman flows with classic boundary conditions. The eddy viscosity k(z) denotes the perturbation of the asymptotic reference value like [19]. Fečkan et al. [19] used the variable change and get a linear, non-homogeneous second order differential equation and obtained the existence and uniqueness and smooth results to justify computing first order approximation of solutions via a Green’s function.

In the present paper, we transform the original equation to a first-order linear non-homogeneous differential equation to give a new direction method to compute the explicit solution. For a two-layer with uniform eddy viscosity in the upper layer and continuous eddy viscosity in the lower layer, we transform the system to a Riccati equation with a initial value problem on a finite interval. Further, we construct the solution for piecewise-constant eddy viscosity.

2 Model description

Recall the model for Ekman layer is formulated by the following equations, see [1, 2]

$$\begin{aligned} {\left\{ \begin{array}{ll} \frac{Du}{Dt}=-\frac{1}{\rho }\frac{dP}{dx}+fv-\frac{\partial {(u'w')}}{\partial z},\\ \frac{Dv}{Dt}=-\frac{1}{\rho }\frac{dP}{dy}-fu-\frac{\partial {(v'w')}}{\partial z}, \end{array}\right. } \end{aligned}$$

where u, v and w are the components of the wind in the xy and z directions respectively, P is the atmospheric pressure, \(\rho \) is the reference density, \(f=2\Omega \sin \theta \) is the Coriolis parameter at the fixed latitude \(\theta \), \(\Omega \approx 7.29\times 10^{-5}\) is the angular speed of the roattion of the earth in the northern Hemisphere, and \(\theta \in (0, \pi /2]\) is the angle of latitude in right-handed rotating spherical cooridates, t is time and k is the eddy diffusivity for momentum.

Assuming a steady state we get \(\frac{Du}{Dt}=0, \frac{Dv}{Dt}=0.\) From the geostrophic balance, we have

$$\begin{aligned} {\left\{ \begin{array}{ll} \frac{1}{\rho }\frac{dP}{dx}=fv_{g},\\ \frac{1}{\rho }=-fu_{g}. \end{array}\right. } \end{aligned}$$

From the Flux–Gradient theory, we get

$$\begin{aligned} {\left\{ \begin{array}{ll} u'w'=-k\frac{\partial u}{\partial z},\\ v'w'=-k\frac{\partial v}{\partial z}, \end{array}\right. } \end{aligned}$$

where k is the eddy viscosity coefficient. Then we obtain

$$\begin{aligned} {\left\{ \begin{array}{ll} f(v-v_{g})=-\frac{\partial }{\partial z}(k\frac{\partial u}{\partial z}),\\ f(u-u_{g})=\frac{\partial }{\partial z}(k\frac{\partial v}{\partial z}), \end{array}\right. } \end{aligned}$$
(1)

where \(u_{g}\) and \(v_{g}\) are the corresponding constant geostrophic wind components. We use the traditional boundary conditions for (1) as

$$\begin{aligned} u=0,~~~v=0~~~\text{ at } ~~z=0, \end{aligned}$$
(2)
$$\begin{aligned} u\rightarrow u_{g},~~~v\rightarrow v_{g}~~~\text{ for } ~~z\rightarrow \infty . \end{aligned}$$
(3)

Let \(\Phi =(u-u_{g})+i(v-v_{g})\), and from (1), we will get

$$\begin{aligned} (k(z)\Phi '(z))'=i\cdot f\Phi (z). \end{aligned}$$
(4)

The boundary conditions (2) and (3) are transformed into the equivalent form

$$\begin{aligned} \Phi =-u_{g}-iv_{g}~~~\text{ at } ~~z=0, \end{aligned}$$
(5)
$$\begin{aligned} \Phi =0~~~\text{ for } ~~z\rightarrow \infty . \end{aligned}$$
(6)

If k=constant, then

$$\begin{aligned} \Phi (z)=-(u_{g}+iv_{g})e^{(1+i)\gamma z}, \end{aligned}$$
(7)

where \(\gamma =\sqrt{\frac{f}{2k}}.\) However, if \(k\ne \)constant, then solving (4) will be more interesting and complex.

3 Main results

3.1 Systems with two layers

The eddy viscosity k always varies with height [13], here we consider the following situation

$$\begin{aligned} k(z)= {\left\{ \begin{array}{ll} k_{0},&{}z>z_{0},\\ k_{1}(z),&{}0\le z\le z_{0}, \end{array}\right. } \end{aligned}$$
(8)

where \(k_{0}=k_{1}(z_{0})>0\) and \(k_{1}(z)>0\) is continuous with z.

Equation (4) simplifies on \((z_{0}, +\infty )\) to

$$\begin{aligned} \Phi ''(z)=\frac{if}{k_{0}}\Phi (z),~~~ ~z>z_{0}, \end{aligned}$$

the general solution is a linear combination of the linearly independent functions \(e^{\pm \sqrt{\frac{f}{2k_{0}}}(1+i)z}\).

If we denote by \(\Phi _{\pm }\) the solutions of (4) with

$$\begin{aligned} \Phi _{\pm }(z)=e^{\pm \sqrt{\frac{f}{2k_{0}}}(1+i)z},~~~ ~z>z_{0}, \end{aligned}$$

the condition (6) ensures that the solution \(\Phi (z)\) to (4) satisfies

$$\begin{aligned} \Phi (z)=c~\Phi _{-}(z),~~~ ~z\ge z_0, \end{aligned}$$

for some complex constant c.

It is well-known [23, p. 331] that

$$\begin{aligned} q(z)=\frac{k(z)\Phi '(z)}{\Phi (z)},~~~ ~z>0, \end{aligned}$$
(9)

solves a Riccati equation

$$\begin{aligned} q'(z)+\frac{q^{2}(z)}{k(z)}=if,~~~ ~z>0, \end{aligned}$$
(10)

with

$$\begin{aligned} q(z_0)=\frac{k(z_0)\Phi '_{-}(z_0)}{\Phi _{-}(z_0)}=-\sqrt{\frac{fk_0}{2}}(1+i),~~~ ~z=z_{0}. \end{aligned}$$
(11)

(10) is not, in general, solvable by quadratures, one has to rely on numerical methods to obtain accurate approximations solution to (10) and (11). On the other hand, following [23, p. 332], we have the following result.

Theorem 3.1

The function defined by

$$\begin{aligned} \Phi (z)= {\left\{ \begin{array}{ll} -(u_{g}+iv_{g})e^{\int _0^z\frac{q(s)}{k(s)}ds},&{}z\in [0,~z_{0}],\\ -(u_{g}+v_{g})e^{-\sqrt{\frac{f}{2k_{0}}}(1+i)(z-z_{0})}e^{\int _0^{z_{0}}\frac{q(s)}{k(s)}}ds,&{}z> z_{0}, \end{array}\right. } \end{aligned}$$

is the solution of (4) with (5) and (6), where q(z) is the solution to (10) and (11).

Proof

By the definition of q(z), we obtain

$$\begin{aligned} \frac{\Phi '(z)}{\Phi (z)}=\frac{q(z)}{k(z)},~~~ ~z\ge 0. \end{aligned}$$
(12)

Integrating (12), we get

$$\begin{aligned} \Phi (z)=\Phi (0)e^{\int _0^z\frac{q(s)}{k(s)}ds}=-(u_{g}+iv_{g})e^{\int _0^z\frac{q(s)}{k(s)}ds},~~~ ~z\ge 0. \end{aligned}$$
(13)

For \(z\ge z_{0}\), we get

$$\begin{aligned} \Phi (z)=-(u_{g}+iv_{g})e^{\int _0^{z_0}\frac{q(s)}{k(s)}ds}e^{\int _{z_0}^{z}\frac{q(s)}{k(s)}ds}=-(u_{g}+iv_{g})e^{-\sqrt{\frac{f}{2k_{0}}}(1+i)(z-z_{0})}e^{\int _0^{z_{0}}\frac{q(s)}{k(s)}ds},\nonumber \\ \end{aligned}$$
(14)

since \(q(s)=q(z_0)\) and \(k(s)=k_0\) for \(s\ge z_0\), so

$$\begin{aligned} \int _{z_0}^{z}\frac{q(s)}{k(s)}ds=\int _{z_0}^{z}\frac{q(z_0)}{k_0}ds=\int _{z_0}^{z}-\sqrt{\frac{f}{2k_{0}}}(1+i)ds=-\sqrt{\frac{f}{2k_{0}}}(1+i)(z-z_{0}). \end{aligned}$$

The proof is complete. \(\square \)

Example 3.2

Consider the case of an eddy viscosity which is constant, that is k=constant. Then (10) and (11) change to

$$\begin{aligned} {\left\{ \begin{array}{ll} q'(z)+\frac{q^{2}(z)}{k}=if,&{}z\ge 0,\\ q(z)=-\sqrt{\frac{kf}{2}}(1+i),&{}z=z_{0}. \end{array}\right. } \end{aligned}$$
(15)

The unique solution to (15) is \(q(z)=-\sqrt{\frac{kf}{2}}(1+i)\). From (13), we have

$$\begin{aligned} \Phi (z)=-(u_{g}+iv_{g})e^{-\int _0^z\frac{\sqrt{\frac{kf}{2}}(1+i)}{k}ds}=-(u_{g}+iv_{g})e^{-\sqrt{\frac{f}{2k}}(1+i)z},~~~ ~z\in [0,~z_{0}]. \end{aligned}$$

For \(z>z_{0}\), from (14), we get

$$\begin{aligned} \Phi (z)=-(u_{g}+iv_{g})e^{-\sqrt{\frac{f}{2k}}(1+i)(z-z_{0})}e^{-\sqrt{\frac{f}{2k}}(1+i)z_{0}}=-(u_{g}+iv_{g})e^{-\sqrt{\frac{f}{2k}}(1+i)z}, \end{aligned}$$

so

$$\begin{aligned} \Phi (z)=-(u_{g}+iv_{g})e^{-\sqrt{\frac{f}{2k}}(1+i)z},~~~ ~z\in [0,~+\infty ). \end{aligned}$$

this coincides with (7).

Example 3.3

For

$$\begin{aligned} k(z)= {\left\{ \begin{array}{ll} [b(z-z_{0})+a]^{2},&{}z\in [0,~z_{0}],\\ a^{2},&{}z> z_{0}. \end{array}\right. } \end{aligned}$$

Let

$$\begin{aligned} Q(z)=\frac{q(z)}{[b(z-z_{0})+a]},~~~ z\in [0,~z_{0}], \end{aligned}$$
(16)

then \(Q(z_{0})=-\sqrt{\frac{a^{2}f}{2}}(1+i)\), as \(q'(z)=if-\frac{q^{2}(z)}{k(z)}=if-Q^{2}(z)\), we get

$$\begin{aligned} Q'(z)=\frac{q'(z)[b(z-z_{0})+a]-bq(z)}{[b(z-z_{0})+a]^{2}}=\frac{if-Q^{2}(z)-bQ(z)}{b(z-z_{0})+a},~~~ ~z\in [0,~z_{0}), \end{aligned}$$

then

$$\begin{aligned} \frac{dQ(z)}{(Q(z)-\frac{-b-\sqrt{b^{2}+4if}}{2})(Q(z)-\frac{-b+\sqrt{b^{2}+4if}}{2})}=-\frac{dz}{b(z-z_{0})+a},~~~ ~z\in [0,~z_{0}),\nonumber \\ \end{aligned}$$
(17)

integrating both side of (17), we obtain

$$\begin{aligned} \frac{1}{\sqrt{b^{2}+4if}}\ln \frac{Q(z)-\frac{-b+\sqrt{b^{2}+4if}}{2}}{Q(z)-\frac{-b-\sqrt{b^{2}+4if}}{2}}=-\frac{1}{b}\ln [b(z-z_{0})+a]+c,~~~ ~z\in [0,~z_{0}], \end{aligned}$$

where

$$\begin{aligned} c=\frac{1}{\sqrt{b^{2}+4if}}\ln \frac{-\sqrt{\frac{a^{2}f}{2}}(1+i)-\frac{-b+\sqrt{b^{2}+4if}}{2}}{-\sqrt{\frac{a^{2}f}{2}}(1+i)-\frac{-b-\sqrt{b^{2}+4if}}{2}}+\frac{\ln a}{b}. \end{aligned}$$

Using (16), we have \(q(z)=Q(z)[b(z-z_{0})+a]\), consequently, an explicit formula for the solution of \(\Phi (z)\) emerges by (13) and (14).

3.2 Systems with piecewise-constant

Different form (8), we assume eddy viscosity is piecewise-constant, so it is not continuous, for the sake of simplicity, we consider two regions, that is

$$\begin{aligned} k(z)= {\left\{ \begin{array}{ll} a,&{}z\in [0,~z_{0}],\\ b,&{}z> z_{0}, \end{array}\right. } \end{aligned}$$

where \(a, b>0\) and \(a\ne b\).

The equation (4) will be transformed to

$$\begin{aligned} \Phi ''(z)=\frac{if}{b}\Phi (z),~~~ ~z\in (z_{0},~+\infty ), \end{aligned}$$
(18)

and

$$\begin{aligned} \Phi ''(z)=\frac{if}{a}\Phi (z),~~~ ~z\in [0,~z_{0}]. \end{aligned}$$
(19)

By using the boundary condition (6), we have the general solution

$$\begin{aligned} \Phi (z)=Ce^{-\sqrt{\frac{f}{2b}}(1+i)z},~~~ ~z\in (z_{0},~+\infty ), \end{aligned}$$

and

$$\begin{aligned} \Phi (z)=Ae^{\sqrt{\frac{f}{2a}}(1+i)z}+Be^{-\sqrt{\frac{f}{2a}}(1+i)z},~~~ ~z\in [0,~z_{0}]. \end{aligned}$$

The boundary condition \(\Phi (0)=-u_{g}-iv_{g}\) implies

$$\begin{aligned} A+B=-(u_{g}+iv_{g}). \end{aligned}$$
(20)

We consider a solution of (18) and (19) which is continuous with \(\Phi (t)\) and \(\Phi '(t)\), so we get

$$\begin{aligned} Ae^{\sqrt{\frac{f}{2a}}(1+i)z_{0}}+Be^{-\sqrt{\frac{f}{2a}}(1+i)z_{0}}=Ce^{-\sqrt{\frac{f}{2b}}(1+i)z_{0}}. \end{aligned}$$
(21)

and

$$\begin{aligned} A\sqrt{\frac{f}{2a}}(1+i)e^{\sqrt{\frac{f}{2a}}(1+i)z_{0}}-B\sqrt{\frac{f}{2a}}(1+i)e^{-\sqrt{\frac{f}{2a}}(1+i)z_{0}}=-C\sqrt{\frac{f}{2b}}(1+i)e^{-\sqrt{\frac{f}{2b}}(1+i)z_{0}}.\nonumber \\ \end{aligned}$$
(22)

Using (20), (21), and (22), it follows that

$$\begin{aligned} A=\kappa C,~~~~B=-(u_{g}+iv_{g})-\kappa C, \end{aligned}$$

and

$$\begin{aligned} C=\frac{\sqrt{\frac{f}{2a}}(u_{g}+iv_{g})e^{-\sqrt{\frac{f}{2a}}(1+i)z_{0}}}{\frac{f}{2a}\kappa (e^{\sqrt{\frac{f}{2a}}(1+i)z_{0}}-e^{-\sqrt{\frac{f}{2a}}(1+i)z_{0}})-\sqrt{\frac{f}{2b}}e^{-\sqrt{\frac{f}{2b}}(1+i)z_{0}}}, \end{aligned}$$

where

$$\begin{aligned} \kappa =\frac{\sqrt{\frac{f}{2a}}-\sqrt{\frac{f}{2b}}}{2\sqrt{\frac{f}{2a}}e^{\sqrt{\frac{f}{2a}}(1+i)z_{0}}}e^{-\sqrt{\frac{f}{2b}}(1+i)z_{0}}. \end{aligned}$$

3.3 Systems with perturbation of a constant

Now we regard the physically relevant eddy viscosity k(z) as perturbations

$$\begin{aligned} k(z)=k_{0}+\varepsilon k_{1}(z),~~~\text{ at } ~~z\ge 0, \end{aligned}$$
(23)

where \(\varepsilon \ll 1\), and \(k_1(z)\) is absolutely continuous on \([0,+\infty )\) and \(\int _0^{+\infty }|k_1'(z)|dz<+\infty \). Different from the approach in [19], we transform the initial boundary problem to a first-order differential system. Writing

$$\begin{aligned} \Phi (z)=\Phi _{0}(z)+\epsilon \Phi _{1}(z),~~~ ~z\ge 0 \end{aligned}$$
(24)

is the solution of (4) with condition (5) and (6), here \(\Phi _{0}(z)\) is the classic Ekman solution for the constant eddy viscosity \(k_{0}\), that is \(\Phi _{0}(z)=-e^{-(1+i)\gamma z}[u_{g}+iv_{g}]\), where \(\gamma =\sqrt{\frac{f}{2k_{0}}}\).

Inserting (24) into (4), we get

$$\begin{aligned} \epsilon k'_{1}(z)(\Phi '_{0}(z)+\epsilon \Phi '_{1}(z))+(k_{0}+\epsilon k_{1}(z))[\Phi ''_{0}(z)+\epsilon \Phi ''_{1}(z)]=if[\Phi _{0}(z)+\epsilon \Phi _{1}(z)], \end{aligned}$$

using \(k_{0}\Phi ''_{0}(z)=if\Phi _{0}(z)\), one obtains

$$\begin{aligned} k_{0}\Phi ''_{1}(z)-if\Phi _{1}(z)=-k'_{1}(z)\Phi '_{0}(z)-k_{1}(z)\Phi ''_{0}(z). \end{aligned}$$

Note that

$$\begin{aligned} \Phi '_{0}(z)=(1+i)\sqrt{\frac{f}{2k_{0}}}\Phi _{0}(z),~~~~~~~\Phi ''_{0}(z)=-\frac{if}{k_{0}}\Phi _{0}(z), \end{aligned}$$

so we have

$$\begin{aligned} \Phi ''_{1}(z)-\frac{if}{k_{0}}\Phi _{1}(z)=b(z), \end{aligned}$$
(25)

where \(b(z)=-[k'_{1}(z)(1+i)\sqrt{\frac{f}{2k^{3}_{0}}}-\frac{if}{k^{2}_{0}}]\Phi _{0}(z).\)

Note that

$$\begin{aligned} \Phi _{0}(0)=-(u_{g}+iv_{g}),~~~~~~~\Phi _{0}(z)\rightarrow 0 ~~as ~~z\rightarrow +\infty , \end{aligned}$$

so we get the boundary conditions

$$\begin{aligned} \Phi _{1}(0)=0,~~~~~~~\Phi _{1}(z)\rightarrow 0 ~~as ~~z\rightarrow +\infty . \end{aligned}$$
(26)

Writing (25) in the following first-order differential system

$$\begin{aligned} \Psi '(z)=A\Psi (z)+B(z), \end{aligned}$$

where

$$\begin{aligned} \begin{aligned} \Psi (z)= \begin{bmatrix} \Phi _{1}(z) \\ \Phi '_{1}(z) \end{bmatrix} \end{aligned} ,~~~ \begin{aligned} A= \begin{bmatrix} 0 &{} 1 \\ \frac{if}{k_{0}} &{} 0 \end{bmatrix} \end{aligned} ,~~ \begin{aligned} B(z)= \begin{bmatrix} 0 \\ b(z) \end{bmatrix} \end{aligned}. \end{aligned}$$

Theorem 3.4

The function defined by (see also (32))

$$\begin{aligned} \Phi _{1}(z)= & {} \frac{-1}{2(1+i)\gamma }[e^{(1+i)\gamma z}-e^{-(1+i)\gamma z}]\int _0^\infty {e^{-(1+i)\gamma s}b(s)}ds\nonumber \\&+\int _0^z{\frac{1}{2(1+i)\gamma }[e^{(1+i)\gamma (z-s)}-e^{-(1+i)\gamma (z-s)}]b(s)}ds, ~~~ ~z\ge 0 \end{aligned}$$
(27)

is the solution of (25) with boundary condition (26).

Proof

Using the variation of constants formula, we get the general solution in the form

$$\begin{aligned} \Psi (z)=e^{Az}\Psi (0)+\int _0^z{e^{A(z-s)B(s)}}ds,~~~ ~z\ge 0, \end{aligned}$$

where

$$\begin{aligned} \begin{aligned} e^{Az}= \begin{bmatrix} \frac{1}{2}[e^{(1+i)\gamma z}+e^{-(1+i)\gamma z}] &{} \frac{1}{2(1+i)\gamma }[e^{(1+i)\gamma z}-e^{-(1+i)\gamma z}] \\ \frac{(1+i)\gamma }{2}[e^{(1+i)\gamma z}-e^{-(1+i)\gamma z} &{} \frac{1}{2}[e^{(1+i)\gamma z}+e^{-(1+i)\gamma z}] \end{bmatrix} \end{aligned} \end{aligned}$$

is the fundamental matrix of the homogeneous constant coefficient differential system \(\Psi '(z)=A\Psi (z)\). Since \(\Phi _{1}(0)=0\), we have

$$\begin{aligned} \Phi _{1}(z)= & {} \frac{1}{2(1+i)\gamma }[e^{(1+i)\gamma z}-e^{-(1+i)\gamma z}]\Phi '_{1}(0)\nonumber \\&+\int _0^z{\frac{1}{2(1+i)\gamma }[e^{(1+i)\gamma (z-s)}-e^{-(1+i)\gamma (z-s)}]b(s)}ds, ~~~ ~z\ge 0, \end{aligned}$$
(28)

with \(\Phi '_{1}(0)\) to be chosen so that

$$\begin{aligned} \lim \limits _{z\rightarrow +\infty }\Phi _{1}(z)=0. \end{aligned}$$
(29)

We claim that this is equivalent to

$$\begin{aligned} \Phi '_{1}(0)=-\int _0^\infty {e^{-(1+i)\gamma s}b(s)}ds. \end{aligned}$$
(30)

In fact, writing (28) as

$$\begin{aligned} \Phi _{1}(z)= & {} \frac{1}{2(1+i)\gamma }e^{(1+i)\gamma z}\left[ \Phi '_{1}(0)+\int _0^z{e^{-(1+i)\gamma s}b(s)}ds\right] \nonumber \\&-\frac{1}{2(1+i)\gamma }e^{-(1+i)\gamma z}\Phi '_{1}(0)-\int _0^z{\frac{1}{2(1+i)\gamma }e^{-(1+i)\gamma (z-s)}b(s)}ds, ~~~ ~z\ge 0.\nonumber \\ \end{aligned}$$
(31)

It is obvious that \(\lim \limits _{z\rightarrow +\infty }\frac{1}{2(1+i)\gamma }e^{-(1+i)\gamma z}\Phi '_{1}(0)=0\). Since \(b(\cdot )\) is integrable on \([0, +\infty )\) and \(|e^{-(1+i)\gamma (z-s)}|\le 1\), we get

$$\begin{aligned} \lim \limits _{z\rightarrow +\infty }\int _0^z{\frac{1}{2(1+i)\gamma }e^{-(1+i)\gamma (z-s)}b(s)}ds=0 \end{aligned}$$

by the dominated convergence theorem. So (29) implies (30).

Conversely, if (30) holds, then (31) becomes to

$$\begin{aligned} \Phi _{1}(z)= & {} -\frac{1}{2(1+i)\gamma }\left[ \int _z^{+\infty }{e^{(1+i)\gamma (z-s)}b(s)}ds\right] \nonumber \\&+\frac{1}{2(1+i)\gamma }\int _0^{+\infty }{e^{-(1+i)\gamma )(z+s)}b(s)}-\int _0^z{\frac{1}{2(1+i)\gamma }e^{-(1+i)\gamma (z-s)}b(s)}ds, ~~~ ~z\ge 0.\nonumber \\ \end{aligned}$$
(32)

It is again obvious from the dominated convergence theorem that (29) holds. This implies that (29) is equivalent to (30), so (27) is the solution of (25) with boundary condition (26). \(\square \)

Remark 3.5

Recall [19, Sect. 3.2], let \(k_{*}>0\) and

$$\begin{aligned} s=s(z)=k_{*}\int _{0}^{z}\frac{1}{k(t)}dt,~~~~~~k_{2}(s)=\frac{f}{k_{*}^{2}}k_{1}(z), ~~~\Psi (s)=U(s)+iV(s), \end{aligned}$$

where \(U(s)=u(z)-u_{g}, ~~V(s)=v(z)-v_{g},\) and \(k_{1}(z)\) is the same as (23). Like (24), set

$$\begin{aligned} \Psi (s)=\Psi _{0}(s)+\epsilon \varphi (s), \end{aligned}$$
(33)

where \(\Psi _{0}(s)\) is the classical Ekman solution

$$\begin{aligned} \Psi _{0}(s)=-e^{-(1+i)\lambda s}(u_{g}+iv_{g}),\quad \lambda =\sqrt{\frac{f}{2k_*}}. \end{aligned}$$

Using the Green function in [19, Lemma 3.3], (33) is the solution of (1) with the condition (2) and (3) if

$$\begin{aligned} \begin{aligned} \varphi (s)&=\frac{v_{g}-iu_{g}}{2(1+i)\lambda }\int _{0}^{s}k_{2}(t)e^{-(1+i)\lambda (s+t)}(e^{(1+i)\lambda t}-e^{-(1+i)\lambda t})dt\\&\quad +\frac{v_{g}-iu_{g}}{2(1+i)\lambda }\int _{s}^{\infty }k_{2}(t)(e^{(1+i)\lambda (s-t)}-e^{-(1+i)\lambda (s+t)})e^{-(1+i)\lambda t}dt. \end{aligned} \end{aligned}$$

From above, one can see the idea in this article is more straightforward.

Example 3.6

Consider the piecewise linear eddy viscosity

$$\begin{aligned} k(z)= {\left\{ \begin{array}{ll} k_{0}+\epsilon \mu (z-z_{0}),&{}z\in [0,~z_{0}],\\ k_{0},&{}z> z_{0}, \end{array}\right. } \end{aligned}$$

where \(k_{0}>\mu >0\), so we have

$$\begin{aligned} k_1(z)= {\left\{ \begin{array}{ll} \mu (z-z_{0}),&{}z\in [0,~z_{0}],\\ 0,&{}z> z_{0}, \end{array}\right. } , ~~~~ k'_{1}(z)= {\left\{ \begin{array}{ll} \mu ,&{}z\in [0,~z_{0}],\\ 0,&{}z> z_{0}, \end{array}\right. } \end{aligned}$$

and

$$\begin{aligned} b(z)= {\left\{ \begin{array}{ll} -[(1+i)\mu \sqrt{\frac{f}{2k^{3}_{0}}}-\frac{if}{k^{2}_{0}}]\Phi _{0}(z),&{}z\in [0,~z_{0}],\\ \frac{if}{k^{2}_{0}}\Phi _{0}(z),&{}z> z_{0}, \end{array}\right. } \end{aligned}$$
(34)

using (34), we have

$$\begin{aligned}&\int _0^\infty {e^{-(1+i)\gamma s}b(s)}ds\nonumber \\&\quad =(u_{g}+iv_{g})(1-e^{-2(1+i)\gamma z_{0}})\bigg [(1+i)\mu \sqrt{\frac{f}{2k^{3}_{0}}}-\frac{if}{k^{2}_{0}}\bigg ]\nonumber \\&\qquad +2(1+i)\gamma (u_{g}+iv_{g})e^{-2(1+i)\gamma z_{0}}. \end{aligned}$$
(35)

If \(z\le z_{0}\), we have

$$\begin{aligned}&\int _0^z{\frac{1}{2(1+i)\gamma }[e^{(1+i)\gamma (z-s)}-e^{-(1+i)\gamma (z-s)}]b(s)}ds\nonumber \\&\quad =\frac{(u_{g}+iv_{g})[(1+i)\mu \sqrt{\frac{f}{2k^{3}_{0}}}-\frac{if}{k^{2}_{0}}]}{8i\gamma ^{2}}[e^{(1+i)\gamma z}-2e^{-(1+i)\gamma z}+e^{-3(1+i)\gamma z}].\qquad \end{aligned}$$
(36)

If \(z>z_{0}\), we have

$$\begin{aligned}&\int _0^z{\frac{1}{2(1+i)\gamma }[e^{(1+i)\gamma (z-s)}-e^{-(1+i)\gamma (z-s)}]b(s)}ds\nonumber \\&\quad =\frac{(u_{g}+iv_{g})}{8i\gamma ^{2}}\left[ (1+i)\mu \sqrt{\frac{f}{2k^{3}_{0}}}-\frac{if}{k^{2}_{0}}\right] [e^{(1+i)\gamma z_{0}}-2e^{-(1+i)\gamma z_{0}}+e^{-3(1+i)\gamma z_{0}}]\nonumber \\&\qquad +\frac{if}{2k^{2}_{0}(1+i)\gamma }(u_{g}+iv_{g})e^{-(1+i)\gamma z}+\frac{if}{k^{2}_{0}}(u_{g}+iv_{g})e^{(1+i)\gamma z}\nonumber \\&\qquad +\frac{if}{k^{2}_{0}}(u_{g}+iv_{g})e^{-(1+i)\gamma z}(z-z_{0}). \end{aligned}$$
(37)

From (27), (35), (36) and (37), we obtain the following results.

For \(z\le z_{0}\),

$$\begin{aligned} \Phi _{1}(z)=A[e^{(1+i)\gamma z}-e^{-(1+i)\gamma z}]+B\left[ e^{(1+i)\gamma z}-2e^{-(1+i)\gamma z}+e^{-3(1+i)\gamma z}\right] , \end{aligned}$$

where

$$\begin{aligned} A=(u_{g}+iv_{g})\left[ (1+i)\mu \sqrt{\frac{f}{2k}}-\frac{if}{k^{2}_{0}}\right] [1-e^{-2(1+i)\gamma z_{0}}]+2(1+i)\gamma e^{-2(1+i)\gamma z_{0}} \end{aligned}$$

and

$$\begin{aligned} B=(u_{g}+iv_{g})\frac{\left[ (1+i)\mu \sqrt{\frac{f}{2k^{3}_{0}}}\frac{if}{k^{2}_{0}}-\frac{if}{k^{2}_{0}}\right] }{8i\gamma ^{2}}. \end{aligned}$$

For \(z>z_{0}\),

$$\begin{aligned} \Phi _{1}(z)= & {} A[e^{(1+i)\gamma z}-e^{-(1+i)\gamma z}]\\&+\frac{(u_{g}+iv_{g})}{8i\gamma ^{2}}\bigg [(1+i)\mu \sqrt{\frac{f}{2k^{3}_{0}}}-\frac{if}{k^{2}_{0}}\bigg ]\bigg [e^{(1+i)\gamma z_{0}}-2e^{-(1+i)\gamma z_{0}}+e^{-3(1+i)\gamma z_{0}}\bigg ]\\&+\frac{if}{2k^{2}_{0}(1+i)\gamma }(u_{g}+iv_{g})e^{-(1+i)\gamma z}+\frac{if}{k^{2}_{0}}(u_{g}+iv_{g})e^{(1+i)\gamma z}\\&+\frac{if}{k^{2}_{0}}(u_{g}+iv_{g})e^{-(1+i)\gamma z}(z-z_{0}). \end{aligned}$$