\hypertarget{interfacemom__eos__teos10_1_1calculate__density__teos10}{}\doxysection{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}}


\doxysubsection{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.

\doxysubsection*{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}


\doxysubsection{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.



\doxysubsection{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}}
\doxysubsubsection{\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{\texttt{ in}}  & {\em t} & Conservative temperature \mbox{[}degC\mbox{]}. \\
\hline
\mbox{\texttt{ in}}  & {\em s} & Absolute salinity \mbox{[}g kg-\/1\mbox{]} \\
\hline
\mbox{\texttt{ in}}  & {\em pressure} & pressure \mbox{[}Pa\mbox{]}. \\
\hline
\mbox{\texttt{ out}}  & {\em rho} & in situ density \mbox{[}kg m-\/3\mbox{]}. \\
\hline
\mbox{\texttt{ in}}  & {\em start} & the starting point in the arrays. \\
\hline
\mbox{\texttt{ in}}  & {\em npts} & the number of values to calculate. \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{84 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: T\textcolor{comment}{        !< Conservative temperature [degC].}}
\DoxyCodeLine{85 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{        !< Absolute salinity [g kg-\/1]}}
\DoxyCodeLine{86 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< pressure [Pa].}}
\DoxyCodeLine{87 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(out)} :: rho\textcolor{comment}{      !< in situ density [kg m-\/3].}}
\DoxyCodeLine{88   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: start\textcolor{comment}{    !< the starting point in the arrays.}}
\DoxyCodeLine{89   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: npts\textcolor{comment}{     !< the number of values to calculate.}}
\DoxyCodeLine{90 \textcolor{keywordtype}{  real},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: rho\_ref\textcolor{comment}{  !< A reference density [kg m-\/3].}}
\DoxyCodeLine{91 }
\DoxyCodeLine{92   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{93 \textcolor{keywordtype}{  real} :: zs, zt, zp}
\DoxyCodeLine{94   \textcolor{keywordtype}{integer} :: j}
\DoxyCodeLine{95 }
\DoxyCodeLine{96   \textcolor{keywordflow}{do} j=start,start+npts-\/1}
\DoxyCodeLine{97     \textcolor{comment}{!Conversions}}
\DoxyCodeLine{98     zs = s(j) \textcolor{comment}{!gsw\_sr\_from\_sp(S(j))       !Convert practical salinity to absolute salinity}}
\DoxyCodeLine{99     zt = t(j) \textcolor{comment}{!gsw\_ct\_from\_pt(S(j),T(j))  !Convert potantial temp to conservative temp}}
\DoxyCodeLine{100     zp = pressure(j)* pa2db         \textcolor{comment}{!Convert pressure from Pascal to decibar}}
\DoxyCodeLine{101 }
\DoxyCodeLine{102     \textcolor{keywordflow}{if} (s(j) < -\/1.0e-\/10) \textcolor{keywordflow}{then} \textcolor{comment}{!Can we assume safely that this is a missing value?}}
\DoxyCodeLine{103       rho(j) = 1000.0}
\DoxyCodeLine{104     \textcolor{keywordflow}{else}}
\DoxyCodeLine{105       rho(j) = gsw\_rho(zs,zt,zp)}
\DoxyCodeLine{106 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{107     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(rho\_ref)) rho(j) = rho(j) -\/ rho\_ref}
\DoxyCodeLine{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}}
\doxysubsubsection{\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{\texttt{ in}}  & {\em t} & Conservative temperature \mbox{[}degC\mbox{]}. \\
\hline
\mbox{\texttt{ in}}  & {\em s} & Absolute salinity \mbox{[}g kg-\/1\mbox{]}. \\
\hline
\mbox{\texttt{ in}}  & {\em pressure} & pressure \mbox{[}Pa\mbox{]}. \\
\hline
\mbox{\texttt{ out}}  & {\em rho} & In situ density \mbox{[}kg m-\/3\mbox{]}. \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{60 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(in)}  :: T\textcolor{comment}{        !< Conservative temperature [degC].}}
\DoxyCodeLine{61 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{        !< Absolute salinity [g kg-\/1].}}
\DoxyCodeLine{62 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< pressure [Pa].}}
\DoxyCodeLine{63 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(out)} :: rho\textcolor{comment}{      !< In situ density [kg m-\/3].}}
\DoxyCodeLine{64 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: rho\_ref\textcolor{comment}{  !< A reference density [kg m-\/3].}}
\DoxyCodeLine{65 }
\DoxyCodeLine{66   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{67 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(1)} :: T0, S0, pressure0}
\DoxyCodeLine{68 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(1)} :: rho0}
\DoxyCodeLine{69 }
\DoxyCodeLine{70   t0(1) = t}
\DoxyCodeLine{71   s0(1) = s}
\DoxyCodeLine{72   pressure0(1) = pressure}
\DoxyCodeLine{73 }
\DoxyCodeLine{74   \textcolor{keyword}{call }calculate\_density\_array\_teos10(t0, s0, pressure0, rho0, 1, 1, rho\_ref)}
\DoxyCodeLine{75   rho = rho0(1)}
\DoxyCodeLine{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}
