Step-flux residual circulation in a stratified channel (source code)

= Step-flux residual circulation in a stratified channel
{title2=$\chi^*(z)=-\tfrac12A_0\operatorname{sgn}(z)e^{-\kappa|z|}$}

Take $v=-\mathcal X_z$, $w=\mathcal X_y$, constant <density> gradient $S<0$, and meridional eddy <density> flux $F=\sin(ly)[-\mathbf1_{z<0}]$. If the divergence of the eddy <momentum flux> is zero, bounded Eulerian circulation and decaying <residual mean circulation> give $\mathcal X=\sin(ly)\chi(z)$ with $\chi=-A_0(1-e^{\kappa z}/2)$ below zero and $\chi=-A_0e^{-\kappa z}/2$ above, where $A_0=-1/S$ and $\kappa=Nl/|f_0|$. The transformed <streamfunction> is $\mathcal X^*=\mathcal X+F/S$, yielding the displayed $\chi^*$ and two oppositely rotating cells. Its jump represents a horizontal delta-function transport at the discontinuous flux termination. A smooth flux cutoff replaces that sheet by a thin regular return flow. Density flux alone does not determine either circulation if the momentum-flux divergence is left unspecified.