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


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

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


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



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


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


\begin{DoxyCode}{0}
\DoxyCodeLine{138 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: T\textcolor{comment}{        !< potential temperature relative to the surface}}
\DoxyCodeLine{139 \textcolor{comment}{                                              !! [degC].}}
\DoxyCodeLine{140 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{        !< Salinity [PSU].}}
\DoxyCodeLine{141 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< Pressure [Pa].}}
\DoxyCodeLine{142 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(out)} :: specvol\textcolor{comment}{  !< in situ specific volume [m3 kg-\/1].}}
\DoxyCodeLine{143   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: start\textcolor{comment}{    !< the starting point in the arrays.}}
\DoxyCodeLine{144   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: npts\textcolor{comment}{     !< the number of values to calculate.}}
\DoxyCodeLine{145 \textcolor{keywordtype}{  real},               \textcolor{keywordtype}{intent(in)}  :: Rho\_T0\_S0\textcolor{comment}{ !< The density at T=0, S=0 [kg m-\/3].}}
\DoxyCodeLine{146 \textcolor{keywordtype}{  real},               \textcolor{keywordtype}{intent(in)}  :: dRho\_dT\textcolor{comment}{  !< The derivatives of density with temperature [kg m-\/3 degC-\/1].}}
\DoxyCodeLine{147 \textcolor{keywordtype}{  real},               \textcolor{keywordtype}{intent(in)}  :: dRho\_dS\textcolor{comment}{  !< The derivatives of density with salinity [kg m-\/3 ppt-\/1].}}
\DoxyCodeLine{148 \textcolor{keywordtype}{  real},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: spv\_ref\textcolor{comment}{  !< A reference specific volume [m3 kg-\/1].}}
\DoxyCodeLine{149   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{150   \textcolor{keywordtype}{integer} :: j}
\DoxyCodeLine{151 }
\DoxyCodeLine{152   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(spv\_ref)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{do} j=start,start+npts-\/1}
\DoxyCodeLine{153     specvol(j) = ((1.0 -\/ rho\_t0\_s0*spv\_ref) + spv\_ref*(drho\_dt*t(j) + drho\_ds*s(j))) / \&}
\DoxyCodeLine{154                  ( rho\_t0\_s0 + (drho\_dt*t(j) + drho\_ds*s(j)))}
\DoxyCodeLine{155 \textcolor{keywordflow}{  enddo} ; \textcolor{keywordflow}{else} ; \textcolor{keywordflow}{do} j=start,start+npts-\/1}
\DoxyCodeLine{156     specvol(j) = 1.0 / ( rho\_t0\_s0 + (drho\_dt*t(j) + drho\_ds*s(j)))}
\DoxyCodeLine{157 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{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}}
\doxysubsubsection{\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{\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 specvol} & In situ specific volume \mbox{[}m3 kg-\/1\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 \mbox{[}kg m-\/3 ppt-\/1\mbox{]}. \\
\hline
\mbox{\texttt{ in}}  & {\em spv\+\_\+ref} & A reference specific volume \mbox{[}m3 kg-\/1\mbox{]}. \\
\hline
\end{DoxyParams}


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


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