\hypertarget{interfacemom__eos__teos10_1_1calculate__spec__vol__teos10}{}\section{mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+spec\+\_\+vol\+\_\+teos10 Interface Reference}
\label{interfacemom__eos__teos10_1_1calculate__spec__vol__teos10}\index{mom\_eos\_teos10::calculate\_spec\_vol\_teos10@{mom\_eos\_teos10::calculate\_spec\_vol\_teos10}}


\subsection{Detailed Description}
Compute the in situ specific volume of sea water (in \mbox{[}m3 kg-\/1\mbox{]}), or an anomaly with respect to a reference specific volume, from absolute salinity (in g/kg), conservative temperature (in deg C), and pressure \mbox{[}Pa\mbox{]}, using the T\+E\+O\+S10 expressions. 

Definition at line 35 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+\+T\+E\+O\+S10.\+F90.

\subsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{interfacemom__eos__teos10_1_1calculate__spec__vol__teos10_adbabe235871642248e1a406ca9d9c739}{calculate\+\_\+spec\+\_\+vol\+\_\+scalar\+\_\+teos10}} (T, S, pressure, specvol, 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 absolute salinity (S \mbox{[}g kg-\/1\mbox{]}), conservative temperature (T \mbox{[}degC\mbox{]}) and pressure \mbox{[}Pa\mbox{]}, using the T\+E\+O\+S10 equation of state. If spv\+\_\+ref is present, specvol is an anomaly from spv\+\_\+ref. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__eos__teos10_1_1calculate__spec__vol__teos10_ad6ad84d3a6b0e82e6608247627fe3a2e}{calculate\+\_\+spec\+\_\+vol\+\_\+array\+\_\+teos10}} (T, S, pressure, specvol, start, npts, 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 absolute salinity (S \mbox{[}g kg-\/1\mbox{]}), conservative temperature (T \mbox{[}degC\mbox{]}) and pressure \mbox{[}Pa\mbox{]}, using the T\+E\+O\+S10 equation of state. If spv\+\_\+ref is present, specvol is an anomaly from spv\+\_\+ref. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Compute the in situ specific volume of sea water (in \mbox{[}m3 kg-\/1\mbox{]}), or an anomaly with respect to a reference specific volume, from absolute salinity (in g/kg), conservative temperature (in deg C), and pressure \mbox{[}Pa\mbox{]}, using the T\+E\+O\+S10 expressions. 

Definition at line 35 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+\+T\+E\+O\+S10.\+F90.



\subsection{Functions and subroutines}
\mbox{\Hypertarget{interfacemom__eos__teos10_1_1calculate__spec__vol__teos10_ad6ad84d3a6b0e82e6608247627fe3a2e}\label{interfacemom__eos__teos10_1_1calculate__spec__vol__teos10_ad6ad84d3a6b0e82e6608247627fe3a2e}} 
\index{mom\_eos\_teos10::calculate\_spec\_vol\_teos10@{mom\_eos\_teos10::calculate\_spec\_vol\_teos10}!calculate\_spec\_vol\_array\_teos10@{calculate\_spec\_vol\_array\_teos10}}
\index{calculate\_spec\_vol\_array\_teos10@{calculate\_spec\_vol\_array\_teos10}!mom\_eos\_teos10::calculate\_spec\_vol\_teos10@{mom\_eos\_teos10::calculate\_spec\_vol\_teos10}}
\subsubsection{\texorpdfstring{calculate\_spec\_vol\_array\_teos10()}{calculate\_spec\_vol\_array\_teos10()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+spec\+\_\+vol\+\_\+teos10\+::calculate\+\_\+spec\+\_\+vol\+\_\+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)}]{specvol,  }\item[{integer, intent(in)}]{start,  }\item[{integer, intent(in)}]{npts,  }\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 absolute salinity (S \mbox{[}g kg-\/1\mbox{]}), conservative temperature (T \mbox{[}degC\mbox{]}) and pressure \mbox{[}Pa\mbox{]}, using the T\+E\+O\+S10 equation of state. If spv\+\_\+ref is present, specvol is an anomaly from spv\+\_\+ref. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em t} & Conservative temperature relative to the surface \mbox{[}degC\mbox{]}. \\
\hline
\mbox{\texttt{ in}}  & {\em s} & salinity \mbox{[}g kg-\/1\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 spv\+\_\+ref} & A reference specific volume \mbox{[}m3 kg-\/1\mbox{]}. \\
\hline
\end{DoxyParams}


Definition at line 137 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+\+T\+E\+O\+S10.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{137 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: T\textcolor{comment}{        !< Conservative temperature relative to the surface}}
\DoxyCodeLine{138 \textcolor{comment}{                                              !! [degC].}}
\DoxyCodeLine{139 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{        !< salinity [g kg-1].}}
\DoxyCodeLine{140 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< pressure [Pa].}}
\DoxyCodeLine{141 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(out)} :: specvol\textcolor{comment}{  !< in situ specific volume [m3 kg-1].}}
\DoxyCodeLine{142   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: start\textcolor{comment}{    !< the starting point in the arrays.}}
\DoxyCodeLine{143   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: npts\textcolor{comment}{     !< the number of values to calculate.}}
\DoxyCodeLine{144 \textcolor{keywordtype}{  real},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: spv\_ref\textcolor{comment}{  !< A reference specific volume [m3 kg-1].}}
\DoxyCodeLine{145 }
\DoxyCodeLine{146   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{147 \textcolor{keywordtype}{  real} :: zs, zt, zp}
\DoxyCodeLine{148   \textcolor{keywordtype}{integer} :: j}
\DoxyCodeLine{149 }
\DoxyCodeLine{150   \textcolor{keywordflow}{do} j=start,start+npts-1}
\DoxyCodeLine{151     \textcolor{comment}{!Conversions}}
\DoxyCodeLine{152     zs = s(j) \textcolor{comment}{!gsw\_sr\_from\_sp(S(j))       !Convert practical salinity to absolute salinity}}
\DoxyCodeLine{153     zt = t(j) \textcolor{comment}{!gsw\_ct\_from\_pt(S(j),T(j))  !Convert potantial temp to conservative temp}}
\DoxyCodeLine{154     zp = pressure(j)* pa2db         \textcolor{comment}{!Convert pressure from Pascal to decibar}}
\DoxyCodeLine{155 }
\DoxyCodeLine{156     \textcolor{keywordflow}{if} (s(j) < -1.0e-10) \textcolor{keywordflow}{then}}
\DoxyCodeLine{157       specvol(j) = 0.001 \textcolor{comment}{!Can we assume safely that this is a missing value?}}
\DoxyCodeLine{158     \textcolor{keywordflow}{else}}
\DoxyCodeLine{159       specvol(j) = gsw\_specvol(zs,zt,zp)}
\DoxyCodeLine{160 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{161     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(spv\_ref)) specvol(j) = specvol(j) - spv\_ref}
\DoxyCodeLine{162 \textcolor{keywordflow}{  enddo}}
\DoxyCodeLine{163 }

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__eos__teos10_1_1calculate__spec__vol__teos10_adbabe235871642248e1a406ca9d9c739}\label{interfacemom__eos__teos10_1_1calculate__spec__vol__teos10_adbabe235871642248e1a406ca9d9c739}} 
\index{mom\_eos\_teos10::calculate\_spec\_vol\_teos10@{mom\_eos\_teos10::calculate\_spec\_vol\_teos10}!calculate\_spec\_vol\_scalar\_teos10@{calculate\_spec\_vol\_scalar\_teos10}}
\index{calculate\_spec\_vol\_scalar\_teos10@{calculate\_spec\_vol\_scalar\_teos10}!mom\_eos\_teos10::calculate\_spec\_vol\_teos10@{mom\_eos\_teos10::calculate\_spec\_vol\_teos10}}
\subsubsection{\texorpdfstring{calculate\_spec\_vol\_scalar\_teos10()}{calculate\_spec\_vol\_scalar\_teos10()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+\_\+teos10\+::calculate\+\_\+spec\+\_\+vol\+\_\+teos10\+::calculate\+\_\+spec\+\_\+vol\+\_\+scalar\+\_\+teos10 (\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), 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 absolute salinity (S \mbox{[}g kg-\/1\mbox{]}), conservative temperature (T \mbox{[}degC\mbox{]}) and pressure \mbox{[}Pa\mbox{]}, using the T\+E\+O\+S10 equation of state. If spv\+\_\+ref is present, specvol is an anomaly from spv\+\_\+ref. 


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


Definition at line 116 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+\+T\+E\+O\+S10.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{116 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(in)}  :: T\textcolor{comment}{        !< Conservative temperature [degC].}}
\DoxyCodeLine{117 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{        !< Absolute salinity [g kg-1]}}
\DoxyCodeLine{118 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< pressure [Pa].}}
\DoxyCodeLine{119 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(out)} :: specvol\textcolor{comment}{  !< in situ specific volume [m3 kg-1].}}
\DoxyCodeLine{120 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: spv\_ref\textcolor{comment}{  !< A reference specific volume [m3 kg-1].}}
\DoxyCodeLine{121 }
\DoxyCodeLine{122   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{123 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(1)} :: T0, S0, pressure0, spv0}
\DoxyCodeLine{124 }
\DoxyCodeLine{125   t0(1) = t ; s0(1) = s ; pressure0(1) = pressure}
\DoxyCodeLine{126 }
\DoxyCodeLine{127   \textcolor{keyword}{call }calculate\_spec\_vol\_array\_teos10(t0, s0, pressure0, spv0, 1, 1, spv\_ref)}
\DoxyCodeLine{128   specvol = spv0(1)}

\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}
