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


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

\doxysubsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\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 \mbox{\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}


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



\doxysubsection{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}}
\doxysubsubsection{\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{\texttt{ in}}  & {\em t} & potential temperature relative to the surface \mbox{[}degC\mbox{]}. \\
\hline
\mbox{\texttt{ in}}  & {\em s} & salinity \mbox{[}P\+SU\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\+\_\+t0\+\_\+s0} & The density at T=0, S=0 \mbox{[}kg m-\/3\mbox{]}. \\
\hline
\mbox{\texttt{ in}}  & {\em drho\+\_\+dt} & The derivatives of density with temperature \mbox{[}kg m-\/3 deg\+C-\/1\mbox{]}. \\
\hline
\mbox{\texttt{ in}}  & {\em drho\+\_\+ds} & The derivatives of density with salinity in \mbox{[}kg m-\/3 ppt-\/1\mbox{]}. \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{82 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: T\textcolor{comment}{        !< potential temperature relative to the surface [degC].}}
\DoxyCodeLine{83 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{        !< salinity [PSU].}}
\DoxyCodeLine{84 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< pressure [Pa].}}
\DoxyCodeLine{85 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(out)} :: rho\textcolor{comment}{      !< in situ density [kg m-\/3].}}
\DoxyCodeLine{86   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: start\textcolor{comment}{    !< the starting point in the arrays.}}
\DoxyCodeLine{87   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: npts\textcolor{comment}{     !< the number of values to calculate.}}
\DoxyCodeLine{88 \textcolor{keywordtype}{  real},               \textcolor{keywordtype}{intent(in)}  :: Rho\_T0\_S0\textcolor{comment}{ !< The density at T=0, S=0 [kg m-\/3].}}
\DoxyCodeLine{89 \textcolor{keywordtype}{  real},               \textcolor{keywordtype}{intent(in)}  :: dRho\_dT\textcolor{comment}{  !< The derivatives of density with temperature}}
\DoxyCodeLine{90 \textcolor{comment}{                                              !! [kg m-\/3 degC-\/1].}}
\DoxyCodeLine{91 \textcolor{keywordtype}{  real},               \textcolor{keywordtype}{intent(in)}  :: dRho\_dS\textcolor{comment}{  !< The derivatives of density with salinity}}
\DoxyCodeLine{92 \textcolor{comment}{                                              !! in [kg m-\/3 ppt-\/1].}}
\DoxyCodeLine{93 \textcolor{keywordtype}{  real},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: rho\_ref\textcolor{comment}{  !< A reference density [kg m-\/3].}}
\DoxyCodeLine{94   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{95   \textcolor{keywordtype}{integer} :: j}
\DoxyCodeLine{96 }
\DoxyCodeLine{97   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(rho\_ref)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{do} j=start,start+npts-\/1}
\DoxyCodeLine{98     rho(j) = (rho\_t0\_s0 -\/ rho\_ref) + (drho\_dt*t(j) + drho\_ds*s(j))}
\DoxyCodeLine{99 \textcolor{keywordflow}{  enddo} ; \textcolor{keywordflow}{else} ; \textcolor{keywordflow}{do} j=start,start+npts-\/1}
\DoxyCodeLine{100     rho(j) = rho\_t0\_s0 + drho\_dt*t(j) + drho\_ds*s(j)}
\DoxyCodeLine{101 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{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}}
\doxysubsubsection{\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{\texttt{ in}}  & {\em t} & Potential temperature relative to the surface \mbox{[}degC\mbox{]}. \\
\hline
\mbox{\texttt{ in}}  & {\em s} & Salinity \mbox{[}P\+SU\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\+\_\+t0\+\_\+s0} & The density at T=0, S=0 \mbox{[}kg m-\/3\mbox{]}. \\
\hline
\mbox{\texttt{ in}}  & {\em drho\+\_\+dt} & The derivatives of density with temperature \mbox{[}kg m-\/3 deg\+C-\/1\mbox{]}. \\
\hline
\mbox{\texttt{ in}}  & {\em drho\+\_\+ds} & The derivatives of density with salinity in \mbox{[}kg m-\/3 ppt-\/1\mbox{]}. \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{58 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(in)}  :: T\textcolor{comment}{        !< Potential temperature relative to the surface [degC].}}
\DoxyCodeLine{59 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{        !< Salinity [PSU].}}
\DoxyCodeLine{60 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< pressure [Pa].}}
\DoxyCodeLine{61 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(out)} :: rho\textcolor{comment}{      !< In situ density [kg m-\/3].}}
\DoxyCodeLine{62 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(in)}  :: Rho\_T0\_S0\textcolor{comment}{ !< The density at T=0, S=0 [kg m-\/3].}}
\DoxyCodeLine{63 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(in)}  :: dRho\_dT\textcolor{comment}{  !< The derivatives of density with temperature}}
\DoxyCodeLine{64 \textcolor{comment}{                                          !! [kg m-\/3 degC-\/1].}}
\DoxyCodeLine{65 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(in)}  :: dRho\_dS\textcolor{comment}{  !< The derivatives of density with salinity}}
\DoxyCodeLine{66 \textcolor{comment}{                                          !! in [kg m-\/3 ppt-\/1].}}
\DoxyCodeLine{67 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: rho\_ref\textcolor{comment}{  !< A reference density [kg m-\/3].}}
\DoxyCodeLine{68 }
\DoxyCodeLine{69   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(rho\_ref)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{70     rho = (rho\_t0\_s0 -\/ rho\_ref) + (drho\_dt*t + drho\_ds*s)}
\DoxyCodeLine{71   \textcolor{keywordflow}{else}}
\DoxyCodeLine{72     rho = rho\_t0\_s0 + drho\_dt*t + drho\_ds*s}
\DoxyCodeLine{73 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{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}
