The Ekman layer is the layer in a fluid where there is a force balance between pressure gradient force, Coriolis force and turbulent drag. It was first described by Vagn Walfrid Ekman. Ekman layers occur both in the atmosphere and in the ocean.
There are two types of Ekman layers. The first type occurs at the surface of the ocean and is forced by surface winds, which act as a drag on the surface of the ocean. The second type occurs at the bottom of the atmosphere and ocean, where frictional forces are associated with flow over rough surfaces.
Ekman developed the theory of the Ekman layer after Fridtjof Nansen observed that ice drifts at an angle of 20°–40° to the right of the prevailing wind direction while on an Arctic expedition aboard the Fram. Nansen asked his colleague, Vilhelm Bjerknes to set one of his students upon study of the problem. Bjerknes tapped Ekman, who presented his results in 1902 as his doctoral thesis.
The mathematical formulation of the Ekman layer begins by assuming a neutrally stratified fluid, a balance between the forces of pressure gradient, Coriolis and turbulent drag.
where and are the velocities in the and directions, respectively, is the local Coriolis parameter, and is the diffusive eddy viscosity, which can be derived using mixing length theory. Note that is a modified pressure: we have incorporated the hydrostatic of the pressure, to take account of gravity.
There are many regions where an Ekman layer is theoretically plausible; they include the bottom of the atmosphere, near the surface of the earth and ocean, the bottom of the ocean, near the sea floor and at the top of the ocean, near the air-water interface. Different boundary conditions are appropriate for each of these different situations. Each of these situations can be accounted for through the boundary conditions applied to the resulting system of ordinary differential equations. The separate cases of top and bottom boundary layers are shown below.
Ekman layer at the ocean (or free) surface
We will consider boundary conditions of the Ekman layer in the upper ocean:
where and are the components of the surface stress, , of the wind field or ice layer at the top of the ocean, and is the dynamic viscosity.
For the boundary condition on the other side, as , where and are the geostrophic flows in the and directions.
These differential equations can be solved to find:
The value is called the Ekman layer depth, and gives an indication of the penetration depth of wind-induced turbulent mixing in the ocean. Note that it varies on two parameters: the turbulent diffusivity , and the latitude, as encapsulated by . For a typical m/s, and at 45° latitude ( s), then is approximately 45 meters. This Ekman depth prediction does not always agree precisely with observations.
This variation of horizontal velocity with depth () is referred to as the Ekman spiral, diagrammed above and at right.
By applying the continuity equation we can have the vertical velocity as following
Note that when vertically-integrated, the volume transport associated with the Ekman spiral is to the right of the wind direction in the Northern Hemisphere.
The traditional development of Ekman layers bounded below by a surface utilizes two boundary conditions:
- A no-slip condition at the surface;
- The Ekman velocities approaching the geostrophic velocities as goes to infinity.
Experimental observations of the Ekman layer
There is much difficulty associated with observing the Ekman layer for two main reasons: the theory is too simplistic as it assumes a constant eddy viscosity, which Ekman himself anticipated, saying
It is obvious that cannot generally be regarded as a constant when the density of water is not uniform within the region considered
and because it is difficult to design instruments with great enough sensitivity to observe the velocity profile in the ocean.
The bottom Ekman layer can readily be observed in a rotating cylindrical tank of water by dropping in dye and changing the rotation rate slightly. Surface Ekman layers can also be observed in rotating tanks.
In the atmosphere
In the atmosphere, the Ekman solution generally overstates the magnitude of the horizontal wind field because it does not account for the velocity shear in the surface layer. Splitting the planetary boundary layer into the surface layer and the Ekman layer generally yields more accurate results.
In the ocean
The Ekman layer, with its distinguishing feature the Ekman spiral, is rarely observed in the ocean. The Ekman layer near the surface of the ocean extends only about 10 – 20 meters deep, and instrumentation sensitive enough to observe a velocity profile in such a shallow depth has only been available since around 1980. Also, wind waves modify the flow near the surface, and make observations close to the surface rather difficult.
Observations of the Ekman layer have only been possible since the development of robust surface moorings and sensitive current meters. Ekman himself developed a current meter to observe the spiral that bears his name, but was not successful. The Vector Measuring Current Meter  and the Acoustic Doppler Current Profiler are both used to measure current.
The first documented observations of an Ekman-like spiral in the ocean were made in the Arctic Ocean from a drifting ice floe in 1958. More recent observations include (not an exhaustive list):
- The 1980 mixed layer experiment
- Within the Sargasso Sea during the 1982 Long Term Upper Ocean Study 
- Within the California Current during the 1993 Eastern Boundary Current experiment 
- Within the Drake Passage region of the Southern Ocean 
- In the eastern tropical Pacific, at 2°N, 140°W, using 5 current meters between 5 and 25 meters depth. This study noted that the geostrophic shear associated with tropical stability waves modified the Ekman spiral relative to what is expected with horizontally uniform density.
- North of the Kerguelan Plateau during the 2008 SOFINE experiment 
Common to several of these observations spirals were found to be "compressed", displaying larger estimates of eddy viscosity when considering the rate of rotation with depth than the eddy viscosity derived from considering the rate of decay of speed.
- Ekman spiral – A structure of currents or winds near a horizontal boundary in which the flow direction rotates as one moves away from the boundary
- Ekman transport – Net transport of surface water perpendicular to wind direction
- Tea leaf paradox
- Cushman-Roisin, Benoit (1994). "Chapter 5 – The Ekman Layer". Introduction to Geophysical Fluid Dynamics (1st ed.). Prentice Hall. pp. 76–77. ISBN 978-0-13-353301-9.
- Vallis, Geoffrey K. (2006). "Chapter 2 – Effects of Rotation and Stratification". Atmospheric and Oceanic Fluid Dynamics (1st ed.). Cambridge, UK: Cambridge University Press. pp. 112–113. ISBN 978-0-521-84969-2.
- Ekman, V.W. (1905). "On the influence of the earth's rotation on ocean currents". Ark. Mat. Astron. Fys. 2 (11): 1–52.
- Holton, James R. (2004). "Chapter 5 – The Planetary Boundary Layer". Dynamic Meteorology. International Geophysics Series. 88 (4th ed.). Burlington, MA: Elsevier Academic Press. pp. 129–130. ISBN 978-0-12-354015-7.
- Santala, M. J.; Terray, E. A. (1992). "A technique for making unbiased estimates of current shear from a wave-follower". Deep-Sea Research. 39 (3–4): 607–622. Bibcode:1992DSRI...39..607S. doi:10.1016/0198-0149(92)90091-7.
- Rudnick, Daniel (2003). "Observations of Momentum Transfer in the Upper Ocean: Did Ekman Get It Right?". Near-Boundary Processes and Their Parameterization. Manoa, Hawaii: School of Ocean and Earth Science and Technology.
- Weller, R.A.; Davis, R.E. (1980). "A vector-measuring current meter". Deep-Sea Research. 27 (7): 565–582. Bibcode:1980DSRI...27..565W. doi:10.1016/0198-0149(80)90041-2.
- Hunkins, K. (1966). "Ekman drift currents in the Arctic Ocean". Deep-Sea Research. 13 (4): 607–620. Bibcode:1966DSROA..13..607H. doi:10.1016/0011-7471(66)90592-4.
- Davis, R.E.; de Szoeke, R.; Niiler., P. (1981). "Part II: Modelling the mixed layer response". Deep-Sea Research. 28 (12): 1453–1475. Bibcode:1981DSRI...28.1453D. doi:10.1016/0198-0149(81)90092-3.
- Price, J.F.; Weller, R.A.; Schudlich, R.R. (1987). "Wind-Driven Ocean Currents and Ekman Transport". Science. 238 (4833): 1534–1538. Bibcode:1987Sci...238.1534P. doi:10.1126/science.238.4833.1534. PMID 17784291. S2CID 45511024.
- Chereskin, T.K. (1995). "Direct evidence for an Ekman balance in the California Current". Journal of Geophysical Research. 100 (C9): 18261–18269. Bibcode:1995JGR...10018261C. doi:10.1029/95JC02182.
- Lenn, Y; Chereskin, T.K. (2009). "Observation of Ekman Currents in the Southern Ocean". Journal of Physical Oceanography. 39 (3): 768–779. Bibcode:2009JPO....39..768L. doi:10.1175/2008jpo3943.1.
- Cronin, M.F.; Kessler, W.S. (2009). "Near-Surface Shear Flow in the Tropical Pacific Cold Tongue Front". Journal of Physical Oceanography. 39 (5): 1200–1215. Bibcode:2009JPO....39.1200C. CiteSeerX 10.1.1.517.8028. doi:10.1175/2008JPO4064.1.
- Roach, C.J.; Phillips, H.E.; Bindoff, N.L.; Rintoul, S.R. (2015). "Detecting and Characterizing Ekman Currents in the Southern Ocean". Journal of Physical Oceanography. 45 (5): 1205–1223. Bibcode:2015JPO....45.1205R. doi:10.1175/JPO-D-14-0115.1.