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


\subsection{Detailed Description}
Compute the density of sea water (in kg/m$^\wedge$3), or its anomaly from a reference density, using a simple linear equation of state from salinity (in psu), potential temperature (in deg C) and pressure \mbox{[}Pa\mbox{]}. 

Definition at line 27 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+linear.\+F90.

\subsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{interfacemom__eos__linear_1_1calculate__density__linear_ac8c3700bad9503cbfbc65eb9134e0550}{calculate\+\_\+density\+\_\+scalar\+\_\+linear} (T, S, pressure, rho, Rho\+\_\+\+T0\+\_\+\+S0, d\+Rho\+\_\+dT, d\+Rho\+\_\+dS, rho\+\_\+ref)
\begin{DoxyCompactList}\small\item\em This subroutine computes the density of sea water with a trivial linear equation of state (in \mbox{[}kg m-\/3\mbox{]}) from salinity (sal \mbox{[}P\+SU\mbox{]}), potential temperature (T \mbox{[}degC\mbox{]}), and pressure \mbox{[}Pa\mbox{]}. \end{DoxyCompactList}\item 
subroutine \hyperlink{interfacemom__eos__linear_1_1calculate__density__linear_a2ddbc80400759c5bb13eaf8305ea8ef7}{calculate\+\_\+density\+\_\+array\+\_\+linear} (T, S, pressure, rho, start, npts, Rho\+\_\+\+T0\+\_\+\+S0, d\+Rho\+\_\+dT, d\+Rho\+\_\+dS, rho\+\_\+ref)
\begin{DoxyCompactList}\small\item\em This subroutine computes the density of sea water with a trivial linear equation of state (in kg/m$^\wedge$3) from salinity (sal in psu), potential temperature (T \mbox{[}degC\mbox{]}), and pressure \mbox{[}Pa\mbox{]}. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Compute the density of sea water (in kg/m$^\wedge$3), or its anomaly from a reference density, using a simple linear equation of state from salinity (in psu), potential temperature (in deg C) and pressure \mbox{[}Pa\mbox{]}. 

Definition at line 27 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+linear.\+F90.



\subsection{Functions and subroutines}
\mbox{\Hypertarget{interfacemom__eos__linear_1_1calculate__density__linear_a2ddbc80400759c5bb13eaf8305ea8ef7}\label{interfacemom__eos__linear_1_1calculate__density__linear_a2ddbc80400759c5bb13eaf8305ea8ef7}} 
\index{mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+density\+\_\+linear@{mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+density\+\_\+linear}!calculate\+\_\+density\+\_\+array\+\_\+linear@{calculate\+\_\+density\+\_\+array\+\_\+linear}}
\index{calculate\+\_\+density\+\_\+array\+\_\+linear@{calculate\+\_\+density\+\_\+array\+\_\+linear}!mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+density\+\_\+linear@{mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+density\+\_\+linear}}
\subsubsection{\texorpdfstring{calculate\+\_\+density\+\_\+array\+\_\+linear()}{calculate\_density\_array\_linear()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+density\+\_\+linear\+::calculate\+\_\+density\+\_\+array\+\_\+linear (\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)}]{Rho\+\_\+\+T0\+\_\+\+S0,  }\item[{real, intent(in)}]{d\+Rho\+\_\+dT,  }\item[{real, intent(in)}]{d\+Rho\+\_\+dS,  }\item[{real, intent(in), optional}]{rho\+\_\+ref }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine computes the density of sea water with a trivial linear equation of state (in kg/m$^\wedge$3) from salinity (sal in psu), potential temperature (T \mbox{[}degC\mbox{]}), and pressure \mbox{[}Pa\mbox{]}. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em t} & potential temperature relative to the surface \mbox{[}degC\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em s} & salinity \mbox{[}P\+SU\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\+\_\+t0\+\_\+s0} & The density at T=0, S=0 \mbox{[}kg m-\/3\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em drho\+\_\+dt} & The derivatives of density with temperature \mbox{[}kg m-\/3 deg\+C-\/1\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em drho\+\_\+ds} & The derivatives of density with salinity in \mbox{[}kg m-\/3 ppt-\/1\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em rho\+\_\+ref} & A reference density \mbox{[}kg m-\/3\mbox{]}. \\
\hline
\end{DoxyParams}


Definition at line 82 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+linear.\+F90.


\begin{DoxyCode}
82   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: t\textcolor{comment}{        !< potential temperature relative to the surface [degC].}
83   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: s\textcolor{comment}{        !< salinity [PSU].}
84   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< pressure [Pa].}
85   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(out)} :: rho\textcolor{comment}{      !< in situ density [kg m-3].}
86   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: start\textcolor{comment}{    !< the starting point in the arrays.}
87   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: npts\textcolor{comment}{     !< the number of values to calculate.}
88   \textcolor{keywordtype}{real},               \textcolor{keywordtype}{intent(in)}  :: rho\_t0\_s0\textcolor{comment}{ !< The density at T=0, S=0 [kg m-3].}
89   \textcolor{keywordtype}{real},               \textcolor{keywordtype}{intent(in)}  :: drho\_dt\textcolor{comment}{  !< The derivatives of density with temperature}
90 \textcolor{comment}{                                              !! [kg m-3 degC-1].}
91   \textcolor{keywordtype}{real},               \textcolor{keywordtype}{intent(in)}  :: drho\_ds\textcolor{comment}{  !< The derivatives of density with salinity}
92 \textcolor{comment}{                                              !! in [kg m-3 ppt-1].}
93   \textcolor{keywordtype}{real},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: rho\_ref\textcolor{comment}{  !< A reference density [kg m-3].}
94   \textcolor{comment}{! Local variables}
95   \textcolor{keywordtype}{integer} :: j
96 
97   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(rho\_ref)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{do} j=start,start+npts-1
98     rho(j) = (rho\_t0\_s0 - rho\_ref) + (drho\_dt*t(j) + drho\_ds*s(j))
99 \textcolor{keywordflow}{  enddo} ; \textcolor{keywordflow}{else} ; \textcolor{keywordflow}{do} j=start,start+npts-1
100     rho(j) = rho\_t0\_s0 + drho\_dt*t(j) + drho\_ds*s(j)
101 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ endif}
102 
\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__eos__linear_1_1calculate__density__linear_ac8c3700bad9503cbfbc65eb9134e0550}\label{interfacemom__eos__linear_1_1calculate__density__linear_ac8c3700bad9503cbfbc65eb9134e0550}} 
\index{mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+density\+\_\+linear@{mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+density\+\_\+linear}!calculate\+\_\+density\+\_\+scalar\+\_\+linear@{calculate\+\_\+density\+\_\+scalar\+\_\+linear}}
\index{calculate\+\_\+density\+\_\+scalar\+\_\+linear@{calculate\+\_\+density\+\_\+scalar\+\_\+linear}!mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+density\+\_\+linear@{mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+density\+\_\+linear}}
\subsubsection{\texorpdfstring{calculate\+\_\+density\+\_\+scalar\+\_\+linear()}{calculate\_density\_scalar\_linear()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+density\+\_\+linear\+::calculate\+\_\+density\+\_\+scalar\+\_\+linear (\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)}]{Rho\+\_\+\+T0\+\_\+\+S0,  }\item[{real, intent(in)}]{d\+Rho\+\_\+dT,  }\item[{real, intent(in)}]{d\+Rho\+\_\+dS,  }\item[{real, intent(in), optional}]{rho\+\_\+ref }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine computes the density of sea water with a trivial linear equation of state (in \mbox{[}kg m-\/3\mbox{]}) from salinity (sal \mbox{[}P\+SU\mbox{]}), potential temperature (T \mbox{[}degC\mbox{]}), and pressure \mbox{[}Pa\mbox{]}. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em t} & Potential temperature relative to the surface \mbox{[}degC\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em s} & Salinity \mbox{[}P\+SU\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\+\_\+t0\+\_\+s0} & The density at T=0, S=0 \mbox{[}kg m-\/3\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em drho\+\_\+dt} & The derivatives of density with temperature \mbox{[}kg m-\/3 deg\+C-\/1\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em drho\+\_\+ds} & The derivatives of density with salinity in \mbox{[}kg m-\/3 ppt-\/1\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em rho\+\_\+ref} & A reference density \mbox{[}kg m-\/3\mbox{]}. \\
\hline
\end{DoxyParams}


Definition at line 58 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+linear.\+F90.


\begin{DoxyCode}
58   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: t\textcolor{comment}{        !< Potential temperature relative to the surface [degC].}
59   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: s\textcolor{comment}{        !< Salinity [PSU].}
60   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< pressure [Pa].}
61   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(out)} :: rho\textcolor{comment}{      !< In situ density [kg m-3].}
62   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: rho\_t0\_s0\textcolor{comment}{ !< The density at T=0, S=0 [kg m-3].}
63   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: drho\_dt\textcolor{comment}{  !< The derivatives of density with temperature}
64 \textcolor{comment}{                                          !! [kg m-3 degC-1].}
65   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: drho\_ds\textcolor{comment}{  !< The derivatives of density with salinity}
66 \textcolor{comment}{                                          !! in [kg m-3 ppt-1].}
67   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: rho\_ref\textcolor{comment}{  !< A reference density [kg m-3].}
68 
69   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(rho\_ref)) \textcolor{keywordflow}{then}
70     rho = (rho\_t0\_s0 - rho\_ref) + (drho\_dt*t + drho\_ds*s)
71   \textcolor{keywordflow}{else}
72     rho = rho\_t0\_s0 + drho\_dt*t + drho\_ds*s
73 \textcolor{keywordflow}{  endif}
74 
\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\+\_\+linear.\+F90\end{DoxyCompactItemize}
