\hypertarget{interfacemom__eos__linear_1_1calculate__spec__vol__linear}{}\section{mom\+\_\+eos\+\_\+linear\+:\+:calculate\+\_\+spec\+\_\+vol\+\_\+linear Interface Reference}
\label{interfacemom__eos__linear_1_1calculate__spec__vol__linear}\index{mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+spec\+\_\+vol\+\_\+linear@{mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+spec\+\_\+vol\+\_\+linear}}


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

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

\subsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{interfacemom__eos__linear_1_1calculate__spec__vol__linear_a7031d62be3d3b462961cae94596a530c}{calculate\+\_\+spec\+\_\+vol\+\_\+scalar\+\_\+linear}} (T, S, pressure, specvol, Rho\+\_\+\+T0\+\_\+\+S0, d\+Rho\+\_\+dT, d\+Rho\+\_\+dS, 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 salinity (S \mbox{[}P\+SU\mbox{]}), potential temperature (T \mbox{[}degC\mbox{]}) and pressure \mbox{[}Pa\mbox{]}, using a trivial linear equation of state for density. If spv\+\_\+ref is present, specvol is an anomaly from spv\+\_\+ref. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__eos__linear_1_1calculate__spec__vol__linear_ad9eaa60629afddaf3cea7d433e93a04c}{calculate\+\_\+spec\+\_\+vol\+\_\+array\+\_\+linear}} (T, S, pressure, specvol, start, npts, Rho\+\_\+\+T0\+\_\+\+S0, d\+Rho\+\_\+dT, d\+Rho\+\_\+dS, 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 salinity (S \mbox{[}P\+SU\mbox{]}), potential temperature (T \mbox{[}degC\mbox{]}) and pressure \mbox{[}Pa\mbox{]}, using a trivial linear equation of state for density. If spv\+\_\+ref is present, specvol is an anomaly from spv\+\_\+ref. \end{DoxyCompactList}\end{DoxyCompactItemize}


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

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



\subsection{Functions and subroutines}
\mbox{\Hypertarget{interfacemom__eos__linear_1_1calculate__spec__vol__linear_ad9eaa60629afddaf3cea7d433e93a04c}\label{interfacemom__eos__linear_1_1calculate__spec__vol__linear_ad9eaa60629afddaf3cea7d433e93a04c}} 
\index{mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+spec\+\_\+vol\+\_\+linear@{mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+spec\+\_\+vol\+\_\+linear}!calculate\+\_\+spec\+\_\+vol\+\_\+array\+\_\+linear@{calculate\+\_\+spec\+\_\+vol\+\_\+array\+\_\+linear}}
\index{calculate\+\_\+spec\+\_\+vol\+\_\+array\+\_\+linear@{calculate\+\_\+spec\+\_\+vol\+\_\+array\+\_\+linear}!mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+spec\+\_\+vol\+\_\+linear@{mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+spec\+\_\+vol\+\_\+linear}}
\subsubsection{\texorpdfstring{calculate\+\_\+spec\+\_\+vol\+\_\+array\+\_\+linear()}{calculate\_spec\_vol\_array\_linear()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+spec\+\_\+vol\+\_\+linear\+::calculate\+\_\+spec\+\_\+vol\+\_\+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)}]{specvol,  }\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}]{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 salinity (S \mbox{[}P\+SU\mbox{]}), potential temperature (T \mbox{[}degC\mbox{]}) and pressure \mbox{[}Pa\mbox{]}, using a trivial linear equation of state for density. If spv\+\_\+ref is present, specvol is an anomaly from spv\+\_\+ref. 


\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 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 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 \mbox{[}kg m-\/3 ppt-\/1\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em spv\+\_\+ref} & A reference specific volume \mbox{[}m3 kg-\/1\mbox{]}. \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}
138   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: T\textcolor{comment}{        !< potential temperature relative to the surface}
139 \textcolor{comment}{                                              !! [degC].}
140   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{        !< Salinity [PSU].}
141   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< Pressure [Pa].}
142   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(out)} :: specvol\textcolor{comment}{  !< in situ specific volume [m3 kg-1].}
143   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: start\textcolor{comment}{    !< the starting point in the arrays.}
144   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: npts\textcolor{comment}{     !< the number of values to calculate.}
145   \textcolor{keywordtype}{real},               \textcolor{keywordtype}{intent(in)}  :: Rho\_T0\_S0\textcolor{comment}{ !< The density at T=0, S=0 [kg m-3].}
146   \textcolor{keywordtype}{real},               \textcolor{keywordtype}{intent(in)}  :: dRho\_dT\textcolor{comment}{  !< The derivatives of density with temperature [kg m-3
       degC-1].}
147   \textcolor{keywordtype}{real},               \textcolor{keywordtype}{intent(in)}  :: dRho\_dS\textcolor{comment}{  !< The derivatives of density with salinity [kg m-3 ppt-1].}
148   \textcolor{keywordtype}{real},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: spv\_ref\textcolor{comment}{  !< A reference specific volume [m3 kg-1].}
149   \textcolor{comment}{! Local variables}
150   \textcolor{keywordtype}{integer} :: j
151 
152   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(spv\_ref)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{do} j=start,start+npts-1
153     specvol(j) = ((1.0 - rho\_t0\_s0*spv\_ref) + spv\_ref*(drho\_dt*t(j) + drho\_ds*s(j))) / &
154                  ( rho\_t0\_s0 + (drho\_dt*t(j) + drho\_ds*s(j)))
155 \textcolor{keywordflow}{  enddo} ; \textcolor{keywordflow}{else} ; \textcolor{keywordflow}{do} j=start,start+npts-1
156     specvol(j) = 1.0 / ( rho\_t0\_s0 + (drho\_dt*t(j) + drho\_ds*s(j)))
157 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ endif}
158 
\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__eos__linear_1_1calculate__spec__vol__linear_a7031d62be3d3b462961cae94596a530c}\label{interfacemom__eos__linear_1_1calculate__spec__vol__linear_a7031d62be3d3b462961cae94596a530c}} 
\index{mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+spec\+\_\+vol\+\_\+linear@{mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+spec\+\_\+vol\+\_\+linear}!calculate\+\_\+spec\+\_\+vol\+\_\+scalar\+\_\+linear@{calculate\+\_\+spec\+\_\+vol\+\_\+scalar\+\_\+linear}}
\index{calculate\+\_\+spec\+\_\+vol\+\_\+scalar\+\_\+linear@{calculate\+\_\+spec\+\_\+vol\+\_\+scalar\+\_\+linear}!mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+spec\+\_\+vol\+\_\+linear@{mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+spec\+\_\+vol\+\_\+linear}}
\subsubsection{\texorpdfstring{calculate\+\_\+spec\+\_\+vol\+\_\+scalar\+\_\+linear()}{calculate\_spec\_vol\_scalar\_linear()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+\_\+linear\+::calculate\+\_\+spec\+\_\+vol\+\_\+linear\+::calculate\+\_\+spec\+\_\+vol\+\_\+scalar\+\_\+linear (\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)}]{Rho\+\_\+\+T0\+\_\+\+S0,  }\item[{real, intent(in)}]{d\+Rho\+\_\+dT,  }\item[{real, intent(in)}]{d\+Rho\+\_\+dS,  }\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 salinity (S \mbox{[}P\+SU\mbox{]}), potential temperature (T \mbox{[}degC\mbox{]}) and pressure \mbox{[}Pa\mbox{]}, using a trivial linear equation of state for density. If spv\+\_\+ref is present, specvol is an anomaly from spv\+\_\+ref. 


\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 specvol} & In situ specific volume \mbox{[}m3 kg-\/1\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 \mbox{[}kg m-\/3 ppt-\/1\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em spv\+\_\+ref} & A reference specific volume \mbox{[}m3 kg-\/1\mbox{]}. \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}
111   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)}  :: T\textcolor{comment}{        !< potential temperature relative to the surface}
112 \textcolor{comment}{                                   !! [degC].}
113   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{        !< Salinity [PSU].}
114   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< Pressure [Pa].}
115   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(out)} :: specvol\textcolor{comment}{  !< In situ specific volume [m3 kg-1].}
116   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)}  :: Rho\_T0\_S0\textcolor{comment}{ !< The density at T=0, S=0 [kg m-3].}
117   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)}  :: dRho\_dT\textcolor{comment}{  !< The derivatives of density with temperature [kg m-3 degC-1].}
118   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)}  :: dRho\_dS\textcolor{comment}{  !< The derivatives of density with salinity [kg m-3 ppt-1].}
119   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: spv\_ref\textcolor{comment}{  !< A reference specific volume [m3 kg-1].}
120   \textcolor{comment}{! Local variables}
121   \textcolor{keywordtype}{integer} :: j
122 
123   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(spv\_ref)) \textcolor{keywordflow}{then}
124     specvol = ((1.0 - rho\_t0\_s0*spv\_ref) + spv\_ref*(drho\_dt*t + drho\_ds*s)) / &
125              ( rho\_t0\_s0 + (drho\_dt*t + drho\_ds*s))
126   \textcolor{keywordflow}{else}
127     specvol = 1.0 / ( rho\_t0\_s0 + (drho\_dt*t + drho\_ds*s))
128 \textcolor{keywordflow}{  endif}
129 
\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}
