\hypertarget{namespacemom__eos__teos10}{}\section{mom\+\_\+eos\+\_\+teos10 Module Reference}
\label{namespacemom__eos__teos10}\index{mom\+\_\+eos\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10}}


\subsection{Detailed Description}
The equation of state using the T\+E\+O\+S10 expressions. \subsection*{Data Types}
\begin{DoxyCompactItemize}
\item 
interface \hyperlink{interfacemom__eos__teos10_1_1calculate__density__derivs__teos10}{calculate\+\_\+density\+\_\+derivs\+\_\+teos10}
\begin{DoxyCompactList}\small\item\em For a given thermodynamic state, return the derivatives of density with conservative temperature and absolute salinity, using the T\+E\+O\+S10 expressions. \end{DoxyCompactList}\item 
interface \hyperlink{interfacemom__eos__teos10_1_1calculate__density__second__derivs__teos10}{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+teos10}
\begin{DoxyCompactList}\small\item\em For a given thermodynamic state, return the second derivatives of density with various combinations of conservative temperature, absolute salinity, and pressure, using the T\+E\+O\+S10 expressions. \end{DoxyCompactList}\item 
interface \hyperlink{interfacemom__eos__teos10_1_1calculate__density__teos10}{calculate\+\_\+density\+\_\+teos10}
\begin{DoxyCompactList}\small\item\em Compute the in situ density of sea water (\mbox{[}kg m-\/3\mbox{]}), or its anomaly with respect to a reference density, from absolute salinity (g/kg), conservative temperature (in deg C), and pressure \mbox{[}Pa\mbox{]}, using the T\+E\+O\+S10 expressions. \end{DoxyCompactList}\item 
interface \hyperlink{interfacemom__eos__teos10_1_1calculate__spec__vol__teos10}{calculate\+\_\+spec\+\_\+vol\+\_\+teos10}
\begin{DoxyCompactList}\small\item\em Compute the in situ specific volume of sea water (in \mbox{[}m3 kg-\/1\mbox{]}), or an anomaly with respect to a reference specific volume, from absolute salinity (in g/kg), conservative temperature (in deg C), and pressure \mbox{[}Pa\mbox{]}, using the T\+E\+O\+S10 expressions. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{namespacemom__eos__teos10_afcb9d9cc0897ff8a81735827fc5fd35d}{calculate\+\_\+density\+\_\+scalar\+\_\+teos10} (T, S, pressure, rho, rho\+\_\+ref)
\begin{DoxyCompactList}\small\item\em This subroutine computes the in situ density of sea water (rho in \mbox{[}kg m-\/3\mbox{]}) from absolute salinity (S \mbox{[}g kg-\/1\mbox{]}), conservative temperature (T \mbox{[}degC\mbox{]}), and pressure \mbox{[}Pa\mbox{]}. It uses the expression from the T\+E\+O\+S10 website. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom__eos__teos10_a76f1946b8688d7da3f7f39a48de5f53a}{calculate\+\_\+density\+\_\+array\+\_\+teos10} (T, S, pressure, rho, start, npts, rho\+\_\+ref)
\begin{DoxyCompactList}\small\item\em This subroutine computes the in situ density of sea water (rho in \mbox{[}kg m-\/3\mbox{]}) from absolute salinity (S \mbox{[}g kg-\/1\mbox{]}), conservative temperature (T \mbox{[}degC\mbox{]}), and pressure \mbox{[}Pa\mbox{]}. It uses the expression from the T\+E\+O\+S10 website. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom__eos__teos10_aa3a64aeb82f2380a61a6976f01d5df65}{calculate\+\_\+spec\+\_\+vol\+\_\+scalar\+\_\+teos10} (T, S, pressure, specvol, spv\+\_\+ref)
\begin{DoxyCompactList}\small\item\em This subroutine computes the in situ specific volume of sea water (specvol in \mbox{[}m3 kg-\/1\mbox{]}) from absolute salinity (S \mbox{[}g kg-\/1\mbox{]}), conservative temperature (T \mbox{[}degC\mbox{]}) and pressure \mbox{[}Pa\mbox{]}, using the T\+E\+O\+S10 equation of state. If spv\+\_\+ref is present, specvol is an anomaly from spv\+\_\+ref. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom__eos__teos10_a075ce98f43e4ad62336849874ddec3e9}{calculate\+\_\+spec\+\_\+vol\+\_\+array\+\_\+teos10} (T, S, pressure, specvol, start, npts, spv\+\_\+ref)
\begin{DoxyCompactList}\small\item\em This subroutine computes the in situ specific volume of sea water (specvol in \mbox{[}m3 kg-\/1\mbox{]}) from absolute salinity (S \mbox{[}g kg-\/1\mbox{]}), conservative temperature (T \mbox{[}degC\mbox{]}) and pressure \mbox{[}Pa\mbox{]}, using the T\+E\+O\+S10 equation of state. If spv\+\_\+ref is present, specvol is an anomaly from spv\+\_\+ref. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom__eos__teos10_a140240742a89048454e117675bf9e272}{calculate\+\_\+density\+\_\+derivs\+\_\+array\+\_\+teos10} (T, S, pressure, drho\+\_\+dT, drho\+\_\+dS, start, npts)
\begin{DoxyCompactList}\small\item\em For a given thermodynamic state, calculate the derivatives of density with conservative temperature and absolute salinity, using the T\+E\+O\+S10 expressions. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom__eos__teos10_a07e7a5b0b9ed5bd5a528a9b68523c557}{calculate\+\_\+density\+\_\+derivs\+\_\+scalar\+\_\+teos10} (T, S, pressure, drho\+\_\+dT, drho\+\_\+dS)
\begin{DoxyCompactList}\small\item\em For a given thermodynamic state, calculate the derivatives of density with conservative temperature and absolute salinity, using the T\+E\+O\+S10 expressions. \end{DoxyCompactList}\item 
subroutine, public \hyperlink{namespacemom__eos__teos10_aede3b2ab040292e26a399f5ca90d0d74}{calculate\+\_\+specvol\+\_\+derivs\+\_\+teos10} (T, S, pressure, d\+S\+V\+\_\+dT, d\+S\+V\+\_\+dS, start, npts)
\begin{DoxyCompactList}\small\item\em For a given thermodynamic state, calculate the derivatives of specific volume with conservative temperature and absolute salinity, using the T\+E\+O\+S10 expressions. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom__eos__teos10_a7dba5c1fb0fb438b0be866b7fe74e917}{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+scalar\+\_\+teos10} (T, S, pressure, drho\+\_\+d\+S\+\_\+dS, drho\+\_\+d\+S\+\_\+dT, drho\+\_\+d\+T\+\_\+dT, drho\+\_\+d\+S\+\_\+dP, drho\+\_\+d\+T\+\_\+dP)
\begin{DoxyCompactList}\small\item\em Calculate the 5 second derivatives of the equation of state for scalar inputs. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom__eos__teos10_a1d87e332be29e732278487c40200c182}{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+array\+\_\+teos10} (T, S, pressure, drho\+\_\+d\+S\+\_\+dS, drho\+\_\+d\+S\+\_\+dT, drho\+\_\+d\+T\+\_\+dT, drho\+\_\+d\+S\+\_\+dP, drho\+\_\+d\+T\+\_\+dP, start, npts)
\begin{DoxyCompactList}\small\item\em Calculate the 5 second derivatives of the equation of state for scalar inputs. \end{DoxyCompactList}\item 
subroutine, public \hyperlink{namespacemom__eos__teos10_a4f1ed903f96b5b55f7f09289b4e7f491}{calculate\+\_\+compress\+\_\+teos10} (T, S, pressure, rho, drho\+\_\+dp, start, npts)
\begin{DoxyCompactList}\small\item\em This subroutine computes the in situ density of sea water (rho in \mbox{[}kg m-\/3\mbox{]}) and the compressibility (drho/dp = C\+\_\+sound$^\wedge$-\/2) (drho\+\_\+dp \mbox{[}s2 m-\/2\mbox{]}) from absolute salinity (sal in g/kg), conservative temperature (T \mbox{[}degC\mbox{]}), and pressure \mbox{[}Pa\mbox{]}. It uses the subroutines from T\+E\+O\+S10 website. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{namespacemom__eos__teos10_a57fb9d007224d73141d939df491ca96e}\label{namespacemom__eos__teos10_a57fb9d007224d73141d939df491ca96e}} 
real, parameter \hyperlink{namespacemom__eos__teos10_a57fb9d007224d73141d939df491ca96e}{pa2db} = 1.e-\/4
\begin{DoxyCompactList}\small\item\em The conversion factor from Pa to dbar. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{namespacemom__eos__teos10_a4f1ed903f96b5b55f7f09289b4e7f491}\label{namespacemom__eos__teos10_a4f1ed903f96b5b55f7f09289b4e7f491}} 
\index{mom\+\_\+eos\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10}!calculate\+\_\+compress\+\_\+teos10@{calculate\+\_\+compress\+\_\+teos10}}
\index{calculate\+\_\+compress\+\_\+teos10@{calculate\+\_\+compress\+\_\+teos10}!mom\+\_\+eos\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10}}
\subsubsection{\texorpdfstring{calculate\+\_\+compress\+\_\+teos10()}{calculate\_compress\_teos10()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+compress\+\_\+teos10 (\begin{DoxyParamCaption}\item[{real, dimension(\+:), intent(in)}]{T,  }\item[{real, dimension(\+:), intent(in)}]{S,  }\item[{real, dimension(\+:), intent(in)}]{pressure,  }\item[{real, dimension(\+:), intent(out)}]{rho,  }\item[{real, dimension(\+:), intent(out)}]{drho\+\_\+dp,  }\item[{integer, intent(in)}]{start,  }\item[{integer, intent(in)}]{npts }\end{DoxyParamCaption})}



This subroutine computes the in situ density of sea water (rho in \mbox{[}kg m-\/3\mbox{]}) and the compressibility (drho/dp = C\+\_\+sound$^\wedge$-\/2) (drho\+\_\+dp \mbox{[}s2 m-\/2\mbox{]}) from absolute salinity (sal in g/kg), conservative temperature (T \mbox{[}degC\mbox{]}), and pressure \mbox{[}Pa\mbox{]}. It uses the subroutines from T\+E\+O\+S10 website. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em t} & Conservative temperature \mbox{[}degC\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em s} & Absolute salinity \mbox{[}g kg-\/1\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em pressure} & Pressure \mbox{[}Pa\mbox{]}.\\
\hline
\mbox{\tt out}  & {\em rho} & In situ density \mbox{[}kg m-\/3\mbox{]}.\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+dp} & The partial derivative of density with pressure (also the inverse of the square of sound speed) \mbox{[}s2 m-\/2\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em start} & The starting point in the arrays.\\
\hline
\mbox{\tt in}  & {\em npts} & The number of values to calculate. \\
\hline
\end{DoxyParams}


Definition at line 314 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+\+T\+E\+O\+S10.\+F90.


\begin{DoxyCode}
314   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)},  \textcolor{keywordtype}{dimension(:)} :: t\textcolor{comment}{        !< Conservative temperature [degC].}
315   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)},  \textcolor{keywordtype}{dimension(:)} :: s\textcolor{comment}{        !< Absolute salinity [g kg-1].}
316   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)},  \textcolor{keywordtype}{dimension(:)} :: pressure\textcolor{comment}{ !< Pressure [Pa].}
317   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{dimension(:)} :: rho\textcolor{comment}{      !< In situ density [kg m-3].}
318   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{dimension(:)} :: drho\_dp\textcolor{comment}{  !< The partial derivative of density with pressure}
319 \textcolor{comment}{                                                 !! (also the inverse of the square of sound speed)}
320 \textcolor{comment}{                                                 !! [s2 m-2].}
321   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}                :: start\textcolor{comment}{    !< The starting point in the arrays.}
322   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}                :: npts\textcolor{comment}{     !< The number of values to calculate.}
323 
324   \textcolor{comment}{! Local variables}
325   \textcolor{keywordtype}{real} :: zs,zt,zp
326   \textcolor{keywordtype}{integer} :: j
327 
328   \textcolor{keywordflow}{do} j=start,start+npts-1
329     \textcolor{comment}{!Conversions}
330     zs = s(j) \textcolor{comment}{!gsw\_sr\_from\_sp(S(j))       !Convert practical salinity to absolute salinity}
331     zt = t(j) \textcolor{comment}{!gsw\_ct\_from\_pt(S(j),T(j))  !Convert potantial temp to conservative temp}
332     zp = pressure(j)* pa2db         \textcolor{comment}{!Convert pressure from Pascal to decibar}
333     \textcolor{keywordflow}{if} (s(j) < -1.0e-10) \textcolor{keywordflow}{then} ; \textcolor{comment}{!Can we assume safely that this is a missing value?}
334       rho(j) = 1000.0 ; drho\_dp(j) = 0.0
335     \textcolor{keywordflow}{else}
336       rho(j) = gsw\_rho(zs,zt,zp)
337       \textcolor{keyword}{call }gsw\_rho\_first\_derivatives(zs,zt,zp, drho\_dp=drho\_dp(j))
338 \textcolor{keywordflow}{    endif}
339 \textcolor{keywordflow}{  enddo}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos__teos10_a76f1946b8688d7da3f7f39a48de5f53a}\label{namespacemom__eos__teos10_a76f1946b8688d7da3f7f39a48de5f53a}} 
\index{mom\+\_\+eos\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10}!calculate\+\_\+density\+\_\+array\+\_\+teos10@{calculate\+\_\+density\+\_\+array\+\_\+teos10}}
\index{calculate\+\_\+density\+\_\+array\+\_\+teos10@{calculate\+\_\+density\+\_\+array\+\_\+teos10}!mom\+\_\+eos\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10}}
\subsubsection{\texorpdfstring{calculate\+\_\+density\+\_\+array\+\_\+teos10()}{calculate\_density\_array\_teos10()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+density\+\_\+array\+\_\+teos10 (\begin{DoxyParamCaption}\item[{real, dimension(\+:), intent(in)}]{T,  }\item[{real, dimension(\+:), intent(in)}]{S,  }\item[{real, dimension(\+:), intent(in)}]{pressure,  }\item[{real, dimension(\+:), intent(out)}]{rho,  }\item[{integer, intent(in)}]{start,  }\item[{integer, intent(in)}]{npts,  }\item[{real, intent(in), optional}]{rho\+\_\+ref }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine computes the in situ density of sea water (rho in \mbox{[}kg m-\/3\mbox{]}) from absolute salinity (S \mbox{[}g kg-\/1\mbox{]}), conservative temperature (T \mbox{[}degC\mbox{]}), and pressure \mbox{[}Pa\mbox{]}. It uses the expression from the T\+E\+O\+S10 website. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em t} & Conservative temperature \mbox{[}degC\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em s} & Absolute salinity \mbox{[}g kg-\/1\mbox{]}\\
\hline
\mbox{\tt in}  & {\em pressure} & pressure \mbox{[}Pa\mbox{]}.\\
\hline
\mbox{\tt out}  & {\em rho} & in situ density \mbox{[}kg m-\/3\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em start} & the starting point in the arrays.\\
\hline
\mbox{\tt in}  & {\em npts} & the number of values to calculate.\\
\hline
\mbox{\tt in}  & {\em rho\+\_\+ref} & A reference density \mbox{[}kg m-\/3\mbox{]}. \\
\hline
\end{DoxyParams}


Definition at line 84 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+\+T\+E\+O\+S10.\+F90.


\begin{DoxyCode}
84   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: t\textcolor{comment}{        !< Conservative temperature [degC].}
85   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: s\textcolor{comment}{        !< Absolute salinity [g kg-1]}
86   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< pressure [Pa].}
87   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(out)} :: rho\textcolor{comment}{      !< in situ density [kg m-3].}
88   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: start\textcolor{comment}{    !< the starting point in the arrays.}
89   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: npts\textcolor{comment}{     !< the number of values to calculate.}
90   \textcolor{keywordtype}{real},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: rho\_ref\textcolor{comment}{  !< A reference density [kg m-3].}
91 
92   \textcolor{comment}{! Local variables}
93   \textcolor{keywordtype}{real} :: zs, zt, zp
94   \textcolor{keywordtype}{integer} :: j
95 
96   \textcolor{keywordflow}{do} j=start,start+npts-1
97     \textcolor{comment}{!Conversions}
98     zs = s(j) \textcolor{comment}{!gsw\_sr\_from\_sp(S(j))       !Convert practical salinity to absolute salinity}
99     zt = t(j) \textcolor{comment}{!gsw\_ct\_from\_pt(S(j),T(j))  !Convert potantial temp to conservative temp}
100     zp = pressure(j)* pa2db         \textcolor{comment}{!Convert pressure from Pascal to decibar}
101 
102     \textcolor{keywordflow}{if} (s(j) < -1.0e-10) \textcolor{keywordflow}{then} \textcolor{comment}{!Can we assume safely that this is a missing value?}
103       rho(j) = 1000.0
104     \textcolor{keywordflow}{else}
105       rho(j) = gsw\_rho(zs,zt,zp)
106 \textcolor{keywordflow}{    endif}
107     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(rho\_ref)) rho(j) = rho(j) - rho\_ref
108 \textcolor{keywordflow}{  enddo}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos__teos10_a140240742a89048454e117675bf9e272}\label{namespacemom__eos__teos10_a140240742a89048454e117675bf9e272}} 
\index{mom\+\_\+eos\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10}!calculate\+\_\+density\+\_\+derivs\+\_\+array\+\_\+teos10@{calculate\+\_\+density\+\_\+derivs\+\_\+array\+\_\+teos10}}
\index{calculate\+\_\+density\+\_\+derivs\+\_\+array\+\_\+teos10@{calculate\+\_\+density\+\_\+derivs\+\_\+array\+\_\+teos10}!mom\+\_\+eos\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10}}
\subsubsection{\texorpdfstring{calculate\+\_\+density\+\_\+derivs\+\_\+array\+\_\+teos10()}{calculate\_density\_derivs\_array\_teos10()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+density\+\_\+derivs\+\_\+array\+\_\+teos10 (\begin{DoxyParamCaption}\item[{real, dimension(\+:), intent(in)}]{T,  }\item[{real, dimension(\+:), intent(in)}]{S,  }\item[{real, dimension(\+:), intent(in)}]{pressure,  }\item[{real, dimension(\+:), intent(out)}]{drho\+\_\+dT,  }\item[{real, dimension(\+:), intent(out)}]{drho\+\_\+dS,  }\item[{integer, intent(in)}]{start,  }\item[{integer, intent(in)}]{npts }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



For a given thermodynamic state, calculate the derivatives of density with conservative temperature and absolute salinity, using the T\+E\+O\+S10 expressions. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em t} & Conservative temperature \mbox{[}degC\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em s} & Absolute salinity \mbox{[}g kg-\/1\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em pressure} & pressure \mbox{[}Pa\mbox{]}.\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+dt} & The partial derivative of density with conservative temperature \mbox{[}kg m-\/3 deg\+C-\/1\mbox{]}.\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+ds} & The partial derivative of density with absolute salinity, \mbox{[}kg m-\/3 (g/kg)-\/1\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em start} & The starting point in the arrays.\\
\hline
\mbox{\tt in}  & {\em npts} & The number of values to calculate. \\
\hline
\end{DoxyParams}


Definition at line 169 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+\+T\+E\+O\+S10.\+F90.


\begin{DoxyCode}
169   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)},  \textcolor{keywordtype}{dimension(:)} :: t\textcolor{comment}{        !< Conservative temperature [degC].}
170   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)},  \textcolor{keywordtype}{dimension(:)} :: s\textcolor{comment}{        !< Absolute salinity [g kg-1].}
171   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)},  \textcolor{keywordtype}{dimension(:)} :: pressure\textcolor{comment}{ !< pressure [Pa].}
172   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{dimension(:)} :: drho\_dt\textcolor{comment}{  !< The partial derivative of density with conservative}
173 \textcolor{comment}{                                                 !! temperature [kg m-3 degC-1].}
174   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{dimension(:)} :: drho\_ds\textcolor{comment}{  !< The partial derivative of density with absolute
       salinity,}
175 \textcolor{comment}{                                                 !! [kg m-3 (g/kg)-1].}
176   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}                :: start\textcolor{comment}{    !< The starting point in the arrays.}
177   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}                :: npts\textcolor{comment}{     !< The number of values to calculate.}
178 
179   \textcolor{comment}{! Local variables}
180   \textcolor{keywordtype}{real} :: zs, zt, zp
181   \textcolor{keywordtype}{integer} :: j
182 
183   \textcolor{keywordflow}{do} j=start,start+npts-1
184     \textcolor{comment}{!Conversions}
185     zs = s(j) \textcolor{comment}{!gsw\_sr\_from\_sp(S(j))       !Convert practical salinity to absolute salinity}
186     zt = t(j) \textcolor{comment}{!gsw\_ct\_from\_pt(S(j),T(j))  !Convert potantial temp to conservative temp}
187     zp = pressure(j)* pa2db         \textcolor{comment}{!Convert pressure from Pascal to decibar}
188     \textcolor{keywordflow}{if} (s(j) < -1.0e-10) \textcolor{keywordflow}{then} ; \textcolor{comment}{!Can we assume safely that this is a missing value?}
189       drho\_dt(j) = 0.0 ; drho\_ds(j) = 0.0
190     \textcolor{keywordflow}{else}
191       \textcolor{keyword}{call }gsw\_rho\_first\_derivatives(zs, zt, zp, drho\_dsa=drho\_ds(j), drho\_dct=drho\_dt(j))
192 \textcolor{keywordflow}{    endif}
193 \textcolor{keywordflow}{  enddo}
194 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos__teos10_a07e7a5b0b9ed5bd5a528a9b68523c557}\label{namespacemom__eos__teos10_a07e7a5b0b9ed5bd5a528a9b68523c557}} 
\index{mom\+\_\+eos\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10}!calculate\+\_\+density\+\_\+derivs\+\_\+scalar\+\_\+teos10@{calculate\+\_\+density\+\_\+derivs\+\_\+scalar\+\_\+teos10}}
\index{calculate\+\_\+density\+\_\+derivs\+\_\+scalar\+\_\+teos10@{calculate\+\_\+density\+\_\+derivs\+\_\+scalar\+\_\+teos10}!mom\+\_\+eos\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10}}
\subsubsection{\texorpdfstring{calculate\+\_\+density\+\_\+derivs\+\_\+scalar\+\_\+teos10()}{calculate\_density\_derivs\_scalar\_teos10()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+density\+\_\+derivs\+\_\+scalar\+\_\+teos10 (\begin{DoxyParamCaption}\item[{real, intent(in)}]{T,  }\item[{real, intent(in)}]{S,  }\item[{real, intent(in)}]{pressure,  }\item[{real, intent(out)}]{drho\+\_\+dT,  }\item[{real, intent(out)}]{drho\+\_\+dS }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



For a given thermodynamic state, calculate the derivatives of density with conservative temperature and absolute salinity, using the T\+E\+O\+S10 expressions. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em t} & Conservative temperature \mbox{[}degC\mbox{]}\\
\hline
\mbox{\tt in}  & {\em s} & Absolute Salinity \mbox{[}g kg-\/1\mbox{]}\\
\hline
\mbox{\tt in}  & {\em pressure} & pressure \mbox{[}Pa\mbox{]}.\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+dt} & The partial derivative of density with conservative temperature \mbox{[}kg m-\/3 deg\+C-\/1\mbox{]}.\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+ds} & The partial derivative of density with absolute salinity, \mbox{[}kg m-\/3 (g/kg)-\/1\mbox{]}. \\
\hline
\end{DoxyParams}


Definition at line 200 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+\+T\+E\+O\+S10.\+F90.


\begin{DoxyCode}
200   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)}  :: t\textcolor{comment}{        !< Conservative temperature [degC]}
201   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)}  :: s\textcolor{comment}{        !< Absolute Salinity [g kg-1]}
202   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< pressure [Pa].}
203   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(out)} :: drho\_dt\textcolor{comment}{  !< The partial derivative of density with conservative}
204 \textcolor{comment}{                                   !! temperature [kg m-3 degC-1].}
205   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(out)} :: drho\_ds\textcolor{comment}{  !< The partial derivative of density with absolute salinity,}
206 \textcolor{comment}{                                   !! [kg m-3 (g/kg)-1].}
207 
208   \textcolor{comment}{! Local variables}
209   \textcolor{keywordtype}{real} :: zs, zt, zp
210   \textcolor{comment}{!Conversions}
211   zs = s \textcolor{comment}{!gsw\_sr\_from\_sp(S)       !Convert practical salinity to absolute salinity}
212   zt = t \textcolor{comment}{!gsw\_ct\_from\_pt(S,T)  !Convert potantial temp to conservative temp}
213   zp = pressure* pa2db         \textcolor{comment}{!Convert pressure from Pascal to decibar}
214   \textcolor{keywordflow}{if} (s < -1.0e-10) \textcolor{keywordflow}{return} \textcolor{comment}{!Can we assume safely that this is a missing value?}
215   \textcolor{keyword}{call }gsw\_rho\_first\_derivatives(zs, zt, zp, drho\_dsa=drho\_ds, drho\_dct=drho\_dt)
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos__teos10_afcb9d9cc0897ff8a81735827fc5fd35d}\label{namespacemom__eos__teos10_afcb9d9cc0897ff8a81735827fc5fd35d}} 
\index{mom\+\_\+eos\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10}!calculate\+\_\+density\+\_\+scalar\+\_\+teos10@{calculate\+\_\+density\+\_\+scalar\+\_\+teos10}}
\index{calculate\+\_\+density\+\_\+scalar\+\_\+teos10@{calculate\+\_\+density\+\_\+scalar\+\_\+teos10}!mom\+\_\+eos\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10}}
\subsubsection{\texorpdfstring{calculate\+\_\+density\+\_\+scalar\+\_\+teos10()}{calculate\_density\_scalar\_teos10()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+density\+\_\+scalar\+\_\+teos10 (\begin{DoxyParamCaption}\item[{real, intent(in)}]{T,  }\item[{real, intent(in)}]{S,  }\item[{real, intent(in)}]{pressure,  }\item[{real, intent(out)}]{rho,  }\item[{real, intent(in), optional}]{rho\+\_\+ref }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine computes the in situ density of sea water (rho in \mbox{[}kg m-\/3\mbox{]}) from absolute salinity (S \mbox{[}g kg-\/1\mbox{]}), conservative temperature (T \mbox{[}degC\mbox{]}), and pressure \mbox{[}Pa\mbox{]}. It uses the expression from the T\+E\+O\+S10 website. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em t} & Conservative temperature \mbox{[}degC\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em s} & Absolute salinity \mbox{[}g kg-\/1\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em pressure} & pressure \mbox{[}Pa\mbox{]}.\\
\hline
\mbox{\tt out}  & {\em rho} & In situ density \mbox{[}kg m-\/3\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em rho\+\_\+ref} & A reference density \mbox{[}kg m-\/3\mbox{]}. \\
\hline
\end{DoxyParams}


Definition at line 60 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+\+T\+E\+O\+S10.\+F90.


\begin{DoxyCode}
60   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: t\textcolor{comment}{        !< Conservative temperature [degC].}
61   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: s\textcolor{comment}{        !< Absolute salinity [g kg-1].}
62   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< pressure [Pa].}
63   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(out)} :: rho\textcolor{comment}{      !< In situ density [kg m-3].}
64   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: rho\_ref\textcolor{comment}{  !< A reference density [kg m-3].}
65 
66   \textcolor{comment}{! Local variables}
67   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(1)} :: t0, s0, pressure0
68   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(1)} :: rho0
69 
70   t0(1) = t
71   s0(1) = s
72   pressure0(1) = pressure
73 
74   \textcolor{keyword}{call }calculate\_density\_array\_teos10(t0, s0, pressure0, rho0, 1, 1, rho\_ref)
75   rho = rho0(1)
76 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos__teos10_a1d87e332be29e732278487c40200c182}\label{namespacemom__eos__teos10_a1d87e332be29e732278487c40200c182}} 
\index{mom\+\_\+eos\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10}!calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+array\+\_\+teos10@{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+array\+\_\+teos10}}
\index{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+array\+\_\+teos10@{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+array\+\_\+teos10}!mom\+\_\+eos\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10}}
\subsubsection{\texorpdfstring{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+array\+\_\+teos10()}{calculate\_density\_second\_derivs\_array\_teos10()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+array\+\_\+teos10 (\begin{DoxyParamCaption}\item[{real, dimension(\+:), intent(in)}]{T,  }\item[{real, dimension(\+:), intent(in)}]{S,  }\item[{real, dimension(\+:), intent(in)}]{pressure,  }\item[{real, dimension(\+:), intent(out)}]{drho\+\_\+d\+S\+\_\+dS,  }\item[{real, dimension(\+:), intent(out)}]{drho\+\_\+d\+S\+\_\+dT,  }\item[{real, dimension(\+:), intent(out)}]{drho\+\_\+d\+T\+\_\+dT,  }\item[{real, dimension(\+:), intent(out)}]{drho\+\_\+d\+S\+\_\+dP,  }\item[{real, dimension(\+:), intent(out)}]{drho\+\_\+d\+T\+\_\+dP,  }\item[{integer, intent(in)}]{start,  }\item[{integer, intent(in)}]{npts }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calculate the 5 second derivatives of the equation of state for scalar inputs. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em t} & Conservative temperature \mbox{[}degC\mbox{]}\\
\hline
\mbox{\tt in}  & {\em s} & Absolute Salinity \mbox{[}g kg-\/1\mbox{]}\\
\hline
\mbox{\tt in}  & {\em pressure} & pressure \mbox{[}Pa\mbox{]}.\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+ds\+\_\+ds} & Partial derivative of beta with respect to S\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+ds\+\_\+dt} & Partial derivative of beta with resepct to T\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+dt\+\_\+dt} & Partial derivative of alpha with respect to T\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+ds\+\_\+dp} & Partial derivative of beta with respect to pressure\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+dt\+\_\+dp} & Partial derivative of alpha with respect to pressure\\
\hline
\mbox{\tt in}  & {\em start} & The starting point in the arrays.\\
\hline
\mbox{\tt in}  & {\em npts} & The number of values to calculate. \\
\hline
\end{DoxyParams}


Definition at line 277 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+\+T\+E\+O\+S10.\+F90.


\begin{DoxyCode}
277   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}     :: t\textcolor{comment}{          !< Conservative temperature [degC]}
278   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}     :: s\textcolor{comment}{          !< Absolute Salinity [g kg-1]}
279   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}     :: pressure\textcolor{comment}{   !< pressure [Pa].}
280   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(out)}    :: drho\_ds\_ds\textcolor{comment}{ !< Partial derivative of beta with respect to S}
281   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(out)}    :: drho\_ds\_dt\textcolor{comment}{ !< Partial derivative of beta with resepct to T}
282   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(out)}    :: drho\_dt\_dt\textcolor{comment}{ !< Partial derivative of alpha with respect to T}
283   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(out)}    :: drho\_ds\_dp\textcolor{comment}{ !< Partial derivative of beta with respect to pressure}
284   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(out)}    :: drho\_dt\_dp\textcolor{comment}{ !< Partial derivative of alpha with respect to pressure}
285   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}  :: start\textcolor{comment}{    !< The starting point in the arrays.}
286   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}  :: npts\textcolor{comment}{     !< The number of values to calculate.}
287 
288   \textcolor{comment}{! Local variables}
289   \textcolor{keywordtype}{real} :: zs, zt, zp
290   \textcolor{keywordtype}{integer} :: j
291 
292   \textcolor{keywordflow}{do} j=start,start+npts-1
293     \textcolor{comment}{!Conversions}
294     zs = s(j) \textcolor{comment}{!gsw\_sr\_from\_sp(S)       !Convert practical salinity to absolute salinity}
295     zt = t(j) \textcolor{comment}{!gsw\_ct\_from\_pt(S,T)  !Convert potantial temp to conservative temp}
296     zp = pressure(j)* pa2db         \textcolor{comment}{!Convert pressure from Pascal to decibar}
297     \textcolor{keywordflow}{if} (s(j) < -1.0e-10) \textcolor{keywordflow}{then} ; \textcolor{comment}{!Can we assume safely that this is a missing value?}
298       drho\_ds\_ds(j) = 0.0 ; drho\_ds\_dt(j) = 0.0 ; drho\_dt\_dt(j) = 0.0
299       drho\_ds\_dp(j) = 0.0 ; drho\_dt\_dp(j) = 0.0
300     \textcolor{keywordflow}{else}
301       \textcolor{keyword}{call }gsw\_rho\_second\_derivatives(zs, zt, zp, rho\_sa\_sa=drho\_ds\_ds(j), rho\_sa\_ct=drho\_ds\_dt(j), &
302                                       rho\_ct\_ct=drho\_dt\_dt(j), rho\_sa\_p=drho\_ds\_dp(j), rho\_ct\_p=drho\_dt\_dp(
      j))
303 \textcolor{keywordflow}{    endif}
304 \textcolor{keywordflow}{  enddo}
305 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos__teos10_a7dba5c1fb0fb438b0be866b7fe74e917}\label{namespacemom__eos__teos10_a7dba5c1fb0fb438b0be866b7fe74e917}} 
\index{mom\+\_\+eos\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10}!calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+scalar\+\_\+teos10@{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+scalar\+\_\+teos10}}
\index{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+scalar\+\_\+teos10@{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+scalar\+\_\+teos10}!mom\+\_\+eos\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10}}
\subsubsection{\texorpdfstring{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+scalar\+\_\+teos10()}{calculate\_density\_second\_derivs\_scalar\_teos10()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+scalar\+\_\+teos10 (\begin{DoxyParamCaption}\item[{real, intent(in)}]{T,  }\item[{real, intent(in)}]{S,  }\item[{real, intent(in)}]{pressure,  }\item[{real, intent(out)}]{drho\+\_\+d\+S\+\_\+dS,  }\item[{real, intent(out)}]{drho\+\_\+d\+S\+\_\+dT,  }\item[{real, intent(out)}]{drho\+\_\+d\+T\+\_\+dT,  }\item[{real, intent(out)}]{drho\+\_\+d\+S\+\_\+dP,  }\item[{real, intent(out)}]{drho\+\_\+d\+T\+\_\+dP }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calculate the 5 second derivatives of the equation of state for scalar inputs. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em t} & Conservative temperature \mbox{[}degC\mbox{]}\\
\hline
\mbox{\tt in}  & {\em s} & Absolute Salinity \mbox{[}g kg-\/1\mbox{]}\\
\hline
\mbox{\tt in}  & {\em pressure} & pressure \mbox{[}Pa\mbox{]}.\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+ds\+\_\+ds} & Partial derivative of beta with respect to S\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+ds\+\_\+dt} & Partial derivative of beta with resepct to T\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+dt\+\_\+dt} & Partial derivative of alpha with respect to T\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+ds\+\_\+dp} & Partial derivative of beta with respect to pressure\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+dt\+\_\+dp} & Partial derivative of alpha with respect to pressure \\
\hline
\end{DoxyParams}


Definition at line 252 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+\+T\+E\+O\+S10.\+F90.


\begin{DoxyCode}
252   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}     :: t\textcolor{comment}{          !< Conservative temperature [degC]}
253   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}     :: s\textcolor{comment}{          !< Absolute Salinity [g kg-1]}
254   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}     :: pressure\textcolor{comment}{   !< pressure [Pa].}
255   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(out)}    :: drho\_ds\_ds\textcolor{comment}{ !< Partial derivative of beta with respect to S}
256   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(out)}    :: drho\_ds\_dt\textcolor{comment}{ !< Partial derivative of beta with resepct to T}
257   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(out)}    :: drho\_dt\_dt\textcolor{comment}{ !< Partial derivative of alpha with respect to T}
258   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(out)}    :: drho\_ds\_dp\textcolor{comment}{ !< Partial derivative of beta with respect to pressure}
259   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(out)}    :: drho\_dt\_dp\textcolor{comment}{ !< Partial derivative of alpha with respect to pressure}
260 
261   \textcolor{comment}{! Local variables}
262   \textcolor{keywordtype}{real} :: zs, zt, zp
263 
264   \textcolor{comment}{!Conversions}
265   zs = s \textcolor{comment}{!gsw\_sr\_from\_sp(S)       !Convert practical salinity to absolute salinity}
266   zt = t \textcolor{comment}{!gsw\_ct\_from\_pt(S,T)  !Convert potantial temp to conservative temp}
267   zp = pressure* pa2db         \textcolor{comment}{!Convert pressure from Pascal to decibar}
268   \textcolor{keywordflow}{if} (s < -1.0e-10) \textcolor{keywordflow}{return} \textcolor{comment}{!Can we assume safely that this is a missing value?}
269   \textcolor{keyword}{call }gsw\_rho\_second\_derivatives(zs, zt, zp, rho\_sa\_sa=drho\_ds\_ds, rho\_sa\_ct=drho\_ds\_dt, &
270                                      rho\_ct\_ct=drho\_dt\_dt, rho\_sa\_p=drho\_ds\_dp, rho\_ct\_p=drho\_dt\_dp)
271 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos__teos10_a075ce98f43e4ad62336849874ddec3e9}\label{namespacemom__eos__teos10_a075ce98f43e4ad62336849874ddec3e9}} 
\index{mom\+\_\+eos\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10}!calculate\+\_\+spec\+\_\+vol\+\_\+array\+\_\+teos10@{calculate\+\_\+spec\+\_\+vol\+\_\+array\+\_\+teos10}}
\index{calculate\+\_\+spec\+\_\+vol\+\_\+array\+\_\+teos10@{calculate\+\_\+spec\+\_\+vol\+\_\+array\+\_\+teos10}!mom\+\_\+eos\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10}}
\subsubsection{\texorpdfstring{calculate\+\_\+spec\+\_\+vol\+\_\+array\+\_\+teos10()}{calculate\_spec\_vol\_array\_teos10()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+spec\+\_\+vol\+\_\+array\+\_\+teos10 (\begin{DoxyParamCaption}\item[{real, dimension(\+:), intent(in)}]{T,  }\item[{real, dimension(\+:), intent(in)}]{S,  }\item[{real, dimension(\+:), intent(in)}]{pressure,  }\item[{real, dimension(\+:), intent(out)}]{specvol,  }\item[{integer, intent(in)}]{start,  }\item[{integer, intent(in)}]{npts,  }\item[{real, intent(in), optional}]{spv\+\_\+ref }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine computes the in situ specific volume of sea water (specvol in \mbox{[}m3 kg-\/1\mbox{]}) from absolute salinity (S \mbox{[}g kg-\/1\mbox{]}), conservative temperature (T \mbox{[}degC\mbox{]}) and pressure \mbox{[}Pa\mbox{]}, using the T\+E\+O\+S10 equation of state. If spv\+\_\+ref is present, specvol is an anomaly from spv\+\_\+ref. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em t} & Conservative temperature relative to the surface \mbox{[}degC\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em s} & salinity \mbox{[}g kg-\/1\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em pressure} & pressure \mbox{[}Pa\mbox{]}.\\
\hline
\mbox{\tt out}  & {\em specvol} & in situ specific volume \mbox{[}m3 kg-\/1\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em start} & the starting point in the arrays.\\
\hline
\mbox{\tt in}  & {\em npts} & the number of values to calculate.\\
\hline
\mbox{\tt in}  & {\em spv\+\_\+ref} & A reference specific volume \mbox{[}m3 kg-\/1\mbox{]}. \\
\hline
\end{DoxyParams}


Definition at line 137 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+\+T\+E\+O\+S10.\+F90.


\begin{DoxyCode}
137   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: t\textcolor{comment}{        !< Conservative temperature relative to the surface}
138 \textcolor{comment}{                                              !! [degC].}
139   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: s\textcolor{comment}{        !< salinity [g kg-1].}
140   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< pressure [Pa].}
141   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(out)} :: specvol\textcolor{comment}{  !< in situ specific volume [m3 kg-1].}
142   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: start\textcolor{comment}{    !< the starting point in the arrays.}
143   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: npts\textcolor{comment}{     !< the number of values to calculate.}
144   \textcolor{keywordtype}{real},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: spv\_ref\textcolor{comment}{  !< A reference specific volume [m3 kg-1].}
145 
146   \textcolor{comment}{! Local variables}
147   \textcolor{keywordtype}{real} :: zs, zt, zp
148   \textcolor{keywordtype}{integer} :: j
149 
150   \textcolor{keywordflow}{do} j=start,start+npts-1
151     \textcolor{comment}{!Conversions}
152     zs = s(j) \textcolor{comment}{!gsw\_sr\_from\_sp(S(j))       !Convert practical salinity to absolute salinity}
153     zt = t(j) \textcolor{comment}{!gsw\_ct\_from\_pt(S(j),T(j))  !Convert potantial temp to conservative temp}
154     zp = pressure(j)* pa2db         \textcolor{comment}{!Convert pressure from Pascal to decibar}
155 
156     \textcolor{keywordflow}{if} (s(j) < -1.0e-10) \textcolor{keywordflow}{then}
157       specvol(j) = 0.001 \textcolor{comment}{!Can we assume safely that this is a missing value?}
158     \textcolor{keywordflow}{else}
159       specvol(j) = gsw\_specvol(zs,zt,zp)
160 \textcolor{keywordflow}{    endif}
161     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(spv\_ref)) specvol(j) = specvol(j) - spv\_ref
162 \textcolor{keywordflow}{  enddo}
163 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos__teos10_aa3a64aeb82f2380a61a6976f01d5df65}\label{namespacemom__eos__teos10_aa3a64aeb82f2380a61a6976f01d5df65}} 
\index{mom\+\_\+eos\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10}!calculate\+\_\+spec\+\_\+vol\+\_\+scalar\+\_\+teos10@{calculate\+\_\+spec\+\_\+vol\+\_\+scalar\+\_\+teos10}}
\index{calculate\+\_\+spec\+\_\+vol\+\_\+scalar\+\_\+teos10@{calculate\+\_\+spec\+\_\+vol\+\_\+scalar\+\_\+teos10}!mom\+\_\+eos\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10}}
\subsubsection{\texorpdfstring{calculate\+\_\+spec\+\_\+vol\+\_\+scalar\+\_\+teos10()}{calculate\_spec\_vol\_scalar\_teos10()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+spec\+\_\+vol\+\_\+scalar\+\_\+teos10 (\begin{DoxyParamCaption}\item[{real, intent(in)}]{T,  }\item[{real, intent(in)}]{S,  }\item[{real, intent(in)}]{pressure,  }\item[{real, intent(out)}]{specvol,  }\item[{real, intent(in), optional}]{spv\+\_\+ref }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine computes the in situ specific volume of sea water (specvol in \mbox{[}m3 kg-\/1\mbox{]}) from absolute salinity (S \mbox{[}g kg-\/1\mbox{]}), conservative temperature (T \mbox{[}degC\mbox{]}) and pressure \mbox{[}Pa\mbox{]}, using the T\+E\+O\+S10 equation of state. If spv\+\_\+ref is present, specvol is an anomaly from spv\+\_\+ref. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em t} & Conservative temperature \mbox{[}degC\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em s} & Absolute salinity \mbox{[}g kg-\/1\mbox{]}\\
\hline
\mbox{\tt in}  & {\em pressure} & pressure \mbox{[}Pa\mbox{]}.\\
\hline
\mbox{\tt out}  & {\em specvol} & in situ specific volume \mbox{[}m3 kg-\/1\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em spv\+\_\+ref} & A reference specific volume \mbox{[}m3 kg-\/1\mbox{]}. \\
\hline
\end{DoxyParams}


Definition at line 116 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+\+T\+E\+O\+S10.\+F90.


\begin{DoxyCode}
116   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: t\textcolor{comment}{        !< Conservative temperature [degC].}
117   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: s\textcolor{comment}{        !< Absolute salinity [g kg-1]}
118   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< pressure [Pa].}
119   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(out)} :: specvol\textcolor{comment}{  !< in situ specific volume [m3 kg-1].}
120   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: spv\_ref\textcolor{comment}{  !< A reference specific volume [m3 kg-1].}
121 
122   \textcolor{comment}{! Local variables}
123   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(1)} :: t0, s0, pressure0, spv0
124 
125   t0(1) = t ; s0(1) = s ; pressure0(1) = pressure
126 
127   \textcolor{keyword}{call }calculate\_spec\_vol\_array\_teos10(t0, s0, pressure0, spv0, 1, 1, spv\_ref)
128   specvol = spv0(1)
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos__teos10_aede3b2ab040292e26a399f5ca90d0d74}\label{namespacemom__eos__teos10_aede3b2ab040292e26a399f5ca90d0d74}} 
\index{mom\+\_\+eos\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10}!calculate\+\_\+specvol\+\_\+derivs\+\_\+teos10@{calculate\+\_\+specvol\+\_\+derivs\+\_\+teos10}}
\index{calculate\+\_\+specvol\+\_\+derivs\+\_\+teos10@{calculate\+\_\+specvol\+\_\+derivs\+\_\+teos10}!mom\+\_\+eos\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10}}
\subsubsection{\texorpdfstring{calculate\+\_\+specvol\+\_\+derivs\+\_\+teos10()}{calculate\_specvol\_derivs\_teos10()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+specvol\+\_\+derivs\+\_\+teos10 (\begin{DoxyParamCaption}\item[{real, dimension(\+:), intent(in)}]{T,  }\item[{real, dimension(\+:), intent(in)}]{S,  }\item[{real, dimension(\+:), intent(in)}]{pressure,  }\item[{real, dimension(\+:), intent(out)}]{d\+S\+V\+\_\+dT,  }\item[{real, dimension(\+:), intent(out)}]{d\+S\+V\+\_\+dS,  }\item[{integer, intent(in)}]{start,  }\item[{integer, intent(in)}]{npts }\end{DoxyParamCaption})}



For a given thermodynamic state, calculate the derivatives of specific volume with conservative temperature and absolute salinity, using the T\+E\+O\+S10 expressions. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em t} & Conservative temperature \mbox{[}degC\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em s} & Absolute salinity \mbox{[}g kg-\/1\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em pressure} & pressure \mbox{[}Pa\mbox{]}.\\
\hline
\mbox{\tt out}  & {\em dsv\+\_\+dt} & The partial derivative of specific volume with conservative temperature \mbox{[}m3 kg-\/1 deg\+C-\/1\mbox{]}.\\
\hline
\mbox{\tt out}  & {\em dsv\+\_\+ds} & The partial derivative of specific volume with absolute salinity \mbox{[}m3 kg-\/1 (g/kg)-\/1\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em start} & The starting point in the arrays.\\
\hline
\mbox{\tt in}  & {\em npts} & The number of values to calculate. \\
\hline
\end{DoxyParams}


Definition at line 221 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+\+T\+E\+O\+S10.\+F90.


\begin{DoxyCode}
221   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)},  \textcolor{keywordtype}{dimension(:)} :: t\textcolor{comment}{        !< Conservative temperature [degC].}
222   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)},  \textcolor{keywordtype}{dimension(:)} :: s\textcolor{comment}{        !< Absolute salinity [g kg-1].}
223   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)},  \textcolor{keywordtype}{dimension(:)} :: pressure\textcolor{comment}{ !< pressure [Pa].}
224   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{dimension(:)} :: dsv\_dt\textcolor{comment}{   !< The partial derivative of specific volume with}
225 \textcolor{comment}{                                                 !! conservative temperature [m3 kg-1 degC-1].}
226   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{dimension(:)} :: dsv\_ds\textcolor{comment}{   !< The partial derivative of specific volume with}
227 \textcolor{comment}{                                                 !! absolute salinity [m3 kg-1 (g/kg)-1].}
228   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}                :: start\textcolor{comment}{    !< The starting point in the arrays.}
229   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}                :: npts\textcolor{comment}{     !< The number of values to calculate.}
230 
231   \textcolor{comment}{! Local variables}
232   \textcolor{keywordtype}{real} :: zs, zt, zp
233   \textcolor{keywordtype}{integer} :: j
234 
235   \textcolor{keywordflow}{do} j=start,start+npts-1
236     \textcolor{comment}{!Conversions}
237     zs = s(j) \textcolor{comment}{!gsw\_sr\_from\_sp(S(j))       !Convert practical salinity to absolute salinity}
238     zt = t(j) \textcolor{comment}{!gsw\_ct\_from\_pt(S(j),T(j))  !Convert potantial temp to conservative temp}
239     zp = pressure(j)* pa2db         \textcolor{comment}{!Convert pressure from Pascal to decibar}
240     \textcolor{keywordflow}{if} (s(j) < -1.0e-10) \textcolor{keywordflow}{then} ; \textcolor{comment}{!Can we assume safely that this is a missing value?}
241       dsv\_dt(j) = 0.0 ; dsv\_ds(j) = 0.0
242     \textcolor{keywordflow}{else}
243       \textcolor{keyword}{call }gsw\_specvol\_first\_derivatives(zs,zt,zp, v\_sa=dsv\_ds(j), v\_ct=dsv\_dt(j))
244 \textcolor{keywordflow}{    endif}
245 \textcolor{keywordflow}{  enddo}
246 
\end{DoxyCode}
