\hypertarget{interfacemom__eos__teos10_1_1calculate__density__teos10}{}\section{mom\+\_\+eos\+\_\+teos10\+:\+:calculate\+\_\+density\+\_\+teos10 Interface Reference}
\label{interfacemom__eos__teos10_1_1calculate__density__teos10}\index{mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+density\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+density\+\_\+teos10}}


\subsection{Detailed Description}
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. 

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

\subsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{interfacemom__eos__teos10_1_1calculate__density__teos10_a83d2f50d5a2bc0a2d4f95fcb02d0cbf5}{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 \mbox{\hyperlink{interfacemom__eos__teos10_1_1calculate__density__teos10_a2ab737753cfcb32c4181a656c30c07fd}{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}\end{DoxyCompactItemize}


\subsection{Detailed Description}
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. 

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



\subsection{Functions and subroutines}
\mbox{\Hypertarget{interfacemom__eos__teos10_1_1calculate__density__teos10_a2ab737753cfcb32c4181a656c30c07fd}\label{interfacemom__eos__teos10_1_1calculate__density__teos10_a2ab737753cfcb32c4181a656c30c07fd}} 
\index{mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+density\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+density\+\_\+teos10}!calculate\+\_\+density\+\_\+array\+\_\+teos10@{calculate\+\_\+density\+\_\+array\+\_\+teos10}}
\index{calculate\+\_\+density\+\_\+array\+\_\+teos10@{calculate\+\_\+density\+\_\+array\+\_\+teos10}!mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+density\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+density\+\_\+teos10}}
\subsubsection{\texorpdfstring{calculate\+\_\+density\+\_\+array\+\_\+teos10()}{calculate\_density\_array\_teos10()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+density\+\_\+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{interfacemom__eos__teos10_1_1calculate__density__teos10_a83d2f50d5a2bc0a2d4f95fcb02d0cbf5}\label{interfacemom__eos__teos10_1_1calculate__density__teos10_a83d2f50d5a2bc0a2d4f95fcb02d0cbf5}} 
\index{mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+density\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+density\+\_\+teos10}!calculate\+\_\+density\+\_\+scalar\+\_\+teos10@{calculate\+\_\+density\+\_\+scalar\+\_\+teos10}}
\index{calculate\+\_\+density\+\_\+scalar\+\_\+teos10@{calculate\+\_\+density\+\_\+scalar\+\_\+teos10}!mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+density\+\_\+teos10@{mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+density\+\_\+teos10}}
\subsubsection{\texorpdfstring{calculate\+\_\+density\+\_\+scalar\+\_\+teos10()}{calculate\_density\_scalar\_teos10()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+density\+\_\+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}


The documentation for this interface was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
/home/cermak/src/\+M\+O\+M6.\+devrob/src/equation\+\_\+of\+\_\+state/M\+O\+M\+\_\+\+E\+O\+S\+\_\+\+T\+E\+O\+S10.\+F90\end{DoxyCompactItemize}
