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.
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:
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, 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.
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):
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.