\input{NotesPreamble.tex}
\renewcommand{\baselinestretch}{1.0}
\begin{document}
\appendix
\setcounter{section}{0}
\renewcommand{\thesection}{Appendix \Alph{section}:}

{\Large\centerline{\bf Mathematical Concepts \& Notation}}

% ------------- CHAPTER-------------
\renewcommand{\thesection}{Appendix \Alph{section}:}
\section{Notation}
\renewcommand{\thesection}{\Alph{section}}
\begin{itemize}
\item $\Delta{x}, \delta{x}$: a small change in $x$
\item $\pderiv{}{t}$: the partial derivative with respect to $t$ holding the other variables fixed
\item $\deriv{}{t}$: the total time derivative
\item $\dot{x}$, $\pderiv{x}{t}$: time derivative of $x$
\item $\ddot{x}$, $\ppderiv{x}{t}$: second-order time derivative of $x$
\item $f_x$ or $\partial_x f$: derivative of $f$ with respect to x
\item $\mderiv{}$: the Material (Lagrangian) Derivative, the time rate of change following a \textit{fluid element}
\end{itemize}

Below, \textbf{bold} denotes vector fields, $\alpha$ is a constant, and all other variables are scalar fields. The components of a vector field $\ve{f}$ are denoted as $(f^x,f^y,f^z)$. In addition, we have used the convention in atmospheric science where the 3-dimensional wind vector $\ve{v} = (u,v,w)$ and the horizontal wind vector $\ve{u} = (u,v)$, where $u=\deriv{x}{t}$ is the wind in the local east-west direction, $v=\deriv{y}{t}$ is the wind in the local north-south direction and $w=\deriv{z}{t}$ is the wind in the local vertical. Finally, let $\unit{i},\unit{j},\unit{k}$ be local unit vectors in the direction of the 
coordinates $x,y,z$.

% ------------- CHAPTER-------------
\renewcommand{\thesection}{Appendix \Alph{section}:}
\section{Vector Calculus}
\renewcommand{\thesection}{\Alph{section}}

\subsubsection*{Vector Operators} \vspace{-.2in}
\begin{table}[!h]
%\begin{center}
\begin{tabular}{l | c | l l}
Name & Vector/Scalar& Vector Notation & Cartesian Expansion \\
\hline \hline
Gradient & vector & $\nabla$ & $\pderiv{}{x}\unit{i} + \pderiv{}{y}\unit{j} + \pderiv{}{z}\unit{k}$\\
2-D scalar Laplacian & scalar & $\nabla^2 = \nabla \cdot \nabla$ & $\ppderiv{}{x} +\ppderiv{}{y}+ \ppderiv{}{z} $\\
Divergence of a vector field&  scalar &$\nabla \cdot \ve{v}$ & $\pderiv{u}{x} + \pderiv{v}{y} + \pderiv{w}{z}$  \\
Curl of a 2-D vector field& vector & $\nabla \times \ve{u}$ & $ \left( \pderiv{v}{x} - \pderiv{u}{y} \right ) \unit{k}$ \\
Curl of a 3-D vector field&  vector &$\nabla \times \ve{v}$ & $ \left( \pderiv{w}{y} - \pderiv{v}{z} \right ) \unit{i} + \left( \pderiv{u}{z} - \pderiv{w}{x} \right ) \unit{j} + \left( \pderiv{v}{x} - \pderiv{u}{y} \right ) \unit{k}$ \\
2-D Jacobian determinant & scalar & $J(\psi,\zeta)$ & $\pderiv{\psi}{x}\pderiv{\zeta}{y} - \pderiv{\psi}{y}\pderiv{\zeta}{x}$
\end{tabular}
%\end{center}
\label{default}
\end{table}%

\subsubsection*{Useful quantities} \vspace{-.2in}
\begin{table}[h]
%\begin{center}
\begin{tabular}{l | l l}

Name & Relationships  & Cartesian Coordinates\\
\hline \hline
vorticity & $\veb{\omega} = \nabla \times \ve{v}$ & $\veb{\omega}= \left( \pderiv{w}{y} - \pderiv{v}{z} \right ) \unit{i} + \left( \pderiv{u}{z} - \pderiv{w}{x} \right ) \unit{j} + \left( \pderiv{v}{x} - \pderiv{x}{y} \unit{k} \right )$  \\
vorticity in $\unit{k}$ direction & $\veb{\omega}^z = {\zeta} = \nabla \times \ve{u}$ & $\zeta= \pderiv{v}{x} - \pderiv{u}{y}$\\
streamfunction & $\psi, \nabla^2\psi = \zeta, \ve{v}=\unit{k}\times \nabla \psi$ & $u = -\pderiv{\psi}{y}$, $v = \pderiv{\psi}{x}$
\end{tabular}

%\end{center}
\label{default}
\end{table}%

\clearpage
\subsubsection*{Vector Formulas}
Below, $\ve{a},\ve{b},\ve{c}$ are vector fields, $\psi$ is a scalar field and $\alpha$ is a constant.

\begin{equation}                                               % eq. (1)
        {\bf a}\cdot({\bf b}\times{\bf c}) 
      = {\bf b}\cdot({\bf c}\times{\bf a}) 
      = {\bf c}\cdot({\bf a}\times{\bf b})
\end{equation}
\begin{equation}                                               % eq. (2)
        {\bf a}\times({\bf b}\times{\bf c}) 
      = {\bf b}({\bf a}\cdot{\bf c}) 
      - {\bf c}({\bf a}\cdot{\bf b})
\end{equation}
\begin{equation}                                               % eq. (3)
        ({\bf a}\times{\bf b})\cdot({\bf c}\times{\bf d}) 
      = ({\bf a}\cdot{\bf c})({\bf b}\cdot{\bf d}) 
      - ({\bf a}\cdot{\bf d})({\bf b}\cdot{\bf c})
\end{equation}
\eq{\nabla \left(\alpha \psi\right) = \alpha \nabla \psi}
\eq{\nabla \cdot \left(\ve{a} + \ve{b}\right) = \nabla \cdot \ve{a} + \nabla \cdot \ve{b}}
\eq{\nabla \cdot \left(\psi \ve{a}\right) = \psi\nabla \cdot \ve{a} + \ve{a}\cdot\nabla \psi}
\begin{equation}                                               % eq. (8)
        \nabla\times(\psi{\bf a}) = \nabla\psi\times{\bf a}
                                  + \psi\nabla\times{\bf a}
\end{equation}                                  
\eq{\nabla \cdot \left ( \nabla \times \ve{a}  \right ) = 0}
\eq{\nabla \times \left ( \nabla \psi   \right ) = 0 }
\eq{\nabla \times \left( \ve{a} \times \ve{b}  \right) = \left(\ve{a} \cdot \nabla\right) \ve{b} + \ve{b}\nabla\cdot\ve{a}}
\eq{\left(\ve{a}\cdot \nabla \right)\ve{a} = \left(\nabla \times \ve{a} \right) \times \ve{a} + \frac{1}{2}\nabla\left(\ve{a}\cdot \ve{a}\right)}


% ------------- CHAPTER-------------
\renewcommand{\thesection}{Appendix \Alph{section}:}
\section{Material Derivative}
\renewcommand{\thesection}{\Alph{section}}
\subsubsection*{2-D material derivative of a scalar field}\vspace{-.2in}
\eqa{\mderiv{\rho} &=& \pderiv{\rho}{t} + \deriv{x}{t}\pderiv{\rho}{x} + \deriv{y}{t}\pderiv{\rho}{y} = \pderiv{\rho}{t} + u\pderiv{\rho}{x} + v\pderiv{\rho}{y} \\
&=& \pderiv{\rho}{t} + \ve{u} \cdot \nabla \rho}

The operators $\ve{v} \cdot \nabla ()$ and $\ve{u} \cdot \nabla()$ are important to know - these are \textit{advection operators} in 3-D and 2-D respectively. 

\subsubsection*{3-D material derivative of a scalar field}\vspace{-.2in}
\eqa{\mderiv{\Phi} &=& \pderiv{\Phi}{t} + \deriv{x}{t}\pderiv{\Phi}{x} + \deriv{y}{t}\pderiv{\Phi}{y} +  \deriv{z}{t}\pderiv{\Phi}{z} = \pderiv{\Phi}{t} + u\pderiv{\Phi}{x} + v\pderiv{\Phi}{y} + w\pderiv{\Phi}{z} \\
&=& \pderiv{\Phi}{t} + \ve{v} \cdot \nabla \Phi}

\subsubsection*{3-D material derivative of a vector field}\vspace{-.2in}
\eqa{\mderiv{\ve{f}} &=& \pderiv{\ve{f}}{t} + \deriv{x}{t}\pderiv{\ve{f}}{x} + \deriv{y}{t}\pderiv{\ve{f}}{y} +  \deriv{z}{t}\pderiv{\ve{f}}{z} = \pderiv{\ve{f}}{t} + u\pderiv{\ve{f}}{x} + v\pderiv{\ve{f}}{y} + w\pderiv{\ve{f}}{z} \\
&=& \pderiv{\ve{f}}{t} + \ve{v} \cdot \nabla \ve{f}}

and for a particular component of $\ve{f}$
\eqa{\mderiv{f^x} =   \pderiv{f^x}{t} + u\pderiv{f^x}{x} + v\pderiv{f^x}{y} + w\pderiv{f^x}{z}}

% ------------- CHAPTER-------------
\renewcommand{\thesection}{Appendix \Alph{section}:}
\section{Theorems}
\renewcommand{\thesection}{\Alph{section}}

\subsubsection*{Divergence theorem (Gauss' theorem)}
     The divergence theorem relates the integral of the divergence of a vector field
${\bf a}$ over a volume $V$ to the total flux of the vector field out of the
closed surface $A$ which surrounds the volume $V$:    
\begin{equation}                                                 % eq. (12)
   \int  \int\int  \nabla\cdot{\bf a} \, dV  
           = \int\int {\bf a}\cdot{\bf n} \, dA,
\end{equation}
where ${\bf a}$ is an arbitrary vector field and ${\bf n}$ is the unit outward
normal to the surface $A$. 

\subsubsection*{Stokes' theorem}
     Stokes' theorem is the ``curl analogue" of Gauss' theorem. It relates the 
integral of the normal component of $\nabla\times{\bf a}$ over the open surface
$A$ to the line integral of ${\bf a}$ around the perimeter bounding the surface
$A$:  
\begin{equation}                                                 % eq. (13)
     \int\int (\nabla\times{\bf a})\cdot{\bf n} dA
     = \oint {\bf a}\cdot d{\bf r}.
\end{equation}


% ------------- CHAPTER-------------
\renewcommand{\thesection}{Appendix \Alph{section}:}
\section{Differential Operators in Curvilinear Coordinate Systems} %\scriptsize{(Schubert App. B)}
\renewcommand{\thesection}{\Alph{section}}

\subsubsection*{Generalized vertical coordinates}
Consider a general vertical coordinate $r$, which is assumed to be a monotonic function of height $z$. If you wish to transform the equations of motion into a coordinate system $(x,y,r,t)$ from $(x,y,z,t)$, then $z = z(x,y,r,t)$ becomes a dependent variable. Any function $A = A(x,y,z,t) = A(x,y,z(x,y,r,t),t)$ can be transformed into the new coordinate system, where the horizontal and time derivatives transform as
\eq{
\left.\pderiv{A}{s}\right\vert_r  = \left.\pderiv{A}{s}\right\vert_z + \left.\pderiv{A}{z}\right\vert_{s}\left.\pderiv{z}{s}\right\vert_r
}
where $s$ denotes $x,y$ or $t$ and $\vert_a$ explicitly denotes a differential with $a$ held constant. The vertical partial derivative of $A$ follows simply from the chain rule. That is,
\eq{
\pderiv{A}{r} = \pderiv{A}{r}\pderiv{z}{r}.
}
The gradient of $A$ along a surface of constant $r$ is thus,
\eq{
\nabla_r A = \nabla_z A + \pderiv{A}{r}\pderiv{r}{z}\nabla_r z.
}
It is important to remember that the directions of the unit vectors ($\unit{i}$, $\unit{j}$ and $\unit{k}$) are the same in both the $r$ and $z$ coordinate systems. That is, the $x$ and $y$ axes are always horizontal and are \textit{not} oriented along surfaces of constant $r$ and the vertical axis is still perpendicular to $x$ and $y$.

\break
\subsubsection*{General curvilinear coordinates}

     The metric expression in general curvilinear coordinates 
$x_1,x_2,x_3$ is 
\begin{equation}                                               % eq. (1)
   (dl)^2 = (h_1 dx_1)^2 + (h_2 dx_2)^2 + (h_3 dx_3)^2,
\end{equation}
where $dl$ is an element of length and $h_1,h_2,h_3$ are the metric
coefficients.  
Let ${\bf i},{\bf j},{\bf k}$ be local unit vectors in the direction of the 
coordinates $x_1,x_2,x_3$. The gradient of a scalar $p$, the divergence and 
curl of a vector ${\bf v}$ (with components $u,v,w$) are then given by 
\begin{equation}                                               % eq. (2)
   \nabla p = {\bf i}\frac{\partial p}{h_1\partial x_1}
            + {\bf j}\frac{\partial p}{h_2\partial x_2}
            + {\bf k}\frac{\partial p}{h_3\partial x_3},
\end{equation}
\begin{equation}                                               % eq. (3)
   \nabla\cdot {\bf v} = \frac{1}{h_1 h_2 h_3}\left[
            \frac{\partial(h_2 h_3 u)}{\partial x_1}
          + \frac{\partial(h_1 h_3 v)}{\partial x_2}
          + \frac{\partial(h_1 h_2 w)}{\partial x_3}\right],
\end{equation}
\begin{equation}                                               % eq. (4)
   \nabla\times{\bf v} = \frac{\bf i}{h_2 h_3}\left[
      \frac{\partial(h_3 w)}{\partial x_2}
    - \frac{\partial(h_2 v)}{\partial x_3}\right]
                         + \frac{\bf j}{h_3 h_1} \left[
      \frac{\partial(h_1 u)}{\partial x_3}
    - \frac{\partial(h_3 w)}{\partial x_1}\right] 
                         + \frac{\bf k}{h_1 h_2}\left[
      \frac{\partial(h_2 v)}{\partial x_1}
    - \frac{\partial(h_1 u)}{\partial x_2}\right].
\end{equation}
Formula \enum{4} can also be written in the determinant form 
\begin{equation}                                               % eq. (5)
   \nabla\times{\bf v} = \frac{1}{h_1 h_2 h_3}\left|\begin{matrix}
      h_1 {\bf i} & h_2 {\bf j} & h_3 {\bf k} \\[1.5ex]
      \dfrac{\partial}{\partial x_1} & \dfrac{\partial}{\partial x_2}
                                     & \dfrac{\partial}{\partial x_3}  \\[3ex]
      h_1 u       & h_2 v       & h_3 w         \\
    \end{matrix}\right|.
\end{equation}


\subsubsection*{Cartesian coordinates}

     Now let's apply these general formulas to cartesian coordinates.
The metric expression in cartesian coordinates is
\begin{equation}                                               % eq. (6)
   (dl)^2 = (dx)^2 + (dy)^2 + (dz)^2,
\end{equation}
which is obtained from \enum{1} by using $h_1=1,h_2=1,h_3=1$ and using the 
notation $x,y,z$ in place of $x_1,x_2,x_3$.  
If ${\bf i}, {\bf j}, {\bf k}$ denote unit vectors in the eastward, 
northward and vertical directions, we have for the gradient, divergence and 
curl
\begin{equation}                                               % eq. (7)
   \nabla p = {\bf i}\frac{\partial p}{\partial x}
            + {\bf j}\frac{\partial p}{\partial y}
            + {\bf k}\frac{\partial p}{\partial z},
\end{equation}
\begin{equation}                                               % eq. (8)
   \nabla\cdot {\bf v} = \frac{\partial u}{\partial x}
                       + \frac{\partial v}{\partial y}
                       + \frac{\partial w}{\partial z},
\end{equation}
\begin{equation}                                               % eq. (9)
   \nabla\times{\bf v}
         = {\bf i} \left(\frac{\partial w}{\partial y}
                       - \frac{\partial v}{\partial z}\right)
         + {\bf j} \left(\frac{\partial u}{\partial z}
                       - \frac{\partial w}{\partial x}\right) 
         + {\bf k} \left(\frac{\partial v}{\partial x}
                       - \frac{\partial u}{\partial y}\right).
\end{equation}
Formula \enum{9} can also be written in the determinant form 
\begin{equation}                                               % eq. (10)
   \nabla\times{\bf v} = \left|\begin{matrix}
   {\bf i}                      & {\bf j}                  & {\bf k}  \\[1.5ex]
   \dfrac{\partial}{\partial x} & \dfrac{\partial}{\partial y} 
                                & \dfrac{\partial}{\partial z}        \\[3ex]
    u                           & v                        & w        \\
    \end{matrix}\right|.
\end{equation}

\subsubsection*{Cylindrical coordinates}

     Now let's apply the general formulas to the cylindrical  
coordinates $r,\phi,z$, where $r$ is the radius, $\phi$ is 
the tangential angle, and $z$ is the vertical distance.  
The metric expression in cylindrical coordinates is 
\begin{equation}                                               % eq. (11)
   (dl)^2 =  (dr)^2 + (r d\phi)^2 + (dz)^2,
\end{equation}
which is obtained from \enum{1} by using $h_1=1,h_2=r,h_3=1$.  
If ${\bf i}, {\bf j}, {\bf k}$ denote unit vectors in the radial, 
tangential and vertical directions, we have for the gradient, divergence and 
curl
\begin{equation}                                               % eq. (12)
   \nabla p = {\bf i}\frac{\partial p}{\partial r}
            + {\bf j}\frac{\partial p}{r\partial\phi}
            + {\bf k}\frac{\partial p}{\partial z},
\end{equation}
\begin{equation}                                               % eq. (13)
   \nabla\cdot {\bf v} = 
            \frac{\partial(ru)}{r\partial r}
          + \frac{\partial v}{r\partial\phi}
          + \frac{\partial w}{\partial z},
\end{equation}
\begin{equation}                                               % eq. (14)
   \nabla\times{\bf v} 
     = {\bf i} \left(\frac{\partial w}{r\partial\phi}
                   - \frac{\partial v}{\partial z}\right)
     + {\bf j} \left(\frac{\partial u}{\partial z}
                   - \frac{\partial w}{\partial r}\right) 
     + {\bf k} \left(\frac{\partial(rv)}{r\partial r}
                   - \frac{\partial u}{r\partial\phi}\right).        
\end{equation}
Formula \enum{14} can also be written in the determinant form 
\begin{equation}                                               % eq. (15)
   \nabla\times{\bf v} = \frac{1}{r}\left|\begin{matrix}
          {\bf i} & r{\bf j}  &  {\bf k}  \\[1.5ex]
 \dfrac{\partial}{\partial r} & \dfrac{\partial}{\partial\phi}
                              & \dfrac{\partial}{\partial z}    \\[3ex]
            u     & rv        &  w        \\
    \end{matrix}\right|.
\end{equation}

\subsubsection*{Spherical coordinates}

     Now let's apply the general formulas to the spherical 
coordinates $\lambda,\phi,r$, where $\lambda$ is the longitude, $\phi$ is 
the latitude, and $r$ is the distance from the center of the earth to the 
point in question. The metric expression in spherical coordinates is 
\begin{equation}                                               % eq. (16)
   (dl)^2 =  (r\cos\phi d\lambda)^2 + (r d\phi)^2 + (dr)^2,
\end{equation}
which is obtained from \enum{1} by using $h_1=r\cos\phi,h_2=r,h_3=1$.  
If ${\bf i}, {\bf j}, {\bf k}$ denote unit vectors in the eastward, 
northward and vertical directions, we have for the gradient, divergence and 
curl
\begin{equation}                                               % eq. (17)
   \nabla p = {\bf i}\frac{\partial p}{r\cos\phi\partial\lambda}
            + {\bf j}\frac{\partial p}{r\partial\phi}
            + {\bf k}\frac{\partial p}{\partial r},
\end{equation}
\begin{equation}                                               % eq. (18)
   \nabla\cdot {\bf v} = 
            \frac{\partial u}{r\cos\phi\partial\lambda}
          + \frac{\partial(v\cos\phi)}{r\cos\phi\partial\phi}
          + \frac{\partial(r^2 w)}{r^2\partial r},
\end{equation}
\begin{equation}                                               % eq. (19)
   \nabla\times{\bf v} 
     = {\bf i} \left(\frac{\partial w}{r\partial\phi}
                   - \frac{\partial(rv)}{r\partial r}\right)
     + {\bf j} \left(\frac{\partial(ru)}{r\partial r}
                   - \frac{\partial w}{r\cos\phi\partial\lambda}\right) 
     + {\bf k} \left(\frac{\partial v}{r\cos\phi\partial\lambda}
                   - \frac{\partial(u\cos\phi)}{r\cos\phi\partial\phi}\right).
\end{equation}
Formula \enum{19} can also be written in the determinant form 
\begin{equation}                                               % eq. (20)
   \nabla\times{\bf v} = \frac{1}{r^2\cos\phi}\left|\begin{matrix}
     r\cos\phi {\bf i}  & r {\bf j}    & {\bf k} \\[1.5ex]
     \dfrac{\partial}{\partial\lambda} & \dfrac{\partial}{\partial\phi} 
                                       & \dfrac{\partial}{\partial r}   \\[3ex]
     ur\cos\phi         & vr           & w       \\
    \end{matrix}\right|.
\end{equation}




\end{document}
