\hypertarget{interfacemom__eos__wright_1_1calculate__spec__vol__wright}{}\doxysection{mom\+\_\+eos\+\_\+wright\+::calculate\+\_\+spec\+\_\+vol\+\_\+wright Interface Reference}
\label{interfacemom__eos__wright_1_1calculate__spec__vol__wright}\index{mom\_eos\_wright::calculate\_spec\_vol\_wright@{mom\_eos\_wright::calculate\_spec\_vol\_wright}}


\doxysubsection{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 salinity (in psu), potential temperature (in deg C), and pressure \mbox{[}Pa\mbox{]}, using the expressions from Wright, 1997, J. Atmos. Ocean. Tech., 14, 735-\/740. 

Definition at line 39 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+\+Wright.\+F90.

\doxysubsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{interfacemom__eos__wright_1_1calculate__spec__vol__wright_a4538d6bda300d11770f061935b32ba4c}{calculate\+\_\+spec\+\_\+vol\+\_\+scalar\+\_\+wright}} (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 salinity (S \mbox{[}P\+SU\mbox{]}), potential temperature (T \mbox{[}degC\mbox{]}) and pressure \mbox{[}Pa\mbox{]}. It uses the expression from Wright, 1997, J. Atmos. Ocean. Tech., 14, 735-\/740. If spv\+\_\+ref is present, specvol is an anomaly from spv\+\_\+ref. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__eos__wright_1_1calculate__spec__vol__wright_a421e4b3876da1390365077e9380a6640}{calculate\+\_\+spec\+\_\+vol\+\_\+array\+\_\+wright}} (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 salinity (S \mbox{[}P\+SU\mbox{]}), potential temperature (T \mbox{[}degC\mbox{]}) and pressure \mbox{[}Pa\mbox{]}. It uses the expression from Wright, 1997, J. Atmos. Ocean. Tech., 14, 735-\/740. If spv\+\_\+ref is present, specvol is an anomaly from spv\+\_\+ref. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{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 salinity (in psu), potential temperature (in deg C), and pressure \mbox{[}Pa\mbox{]}, using the expressions from Wright, 1997, J. Atmos. Ocean. Tech., 14, 735-\/740. 

Definition at line 39 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+\+Wright.\+F90.



\doxysubsection{Functions and subroutines}
\mbox{\Hypertarget{interfacemom__eos__wright_1_1calculate__spec__vol__wright_a421e4b3876da1390365077e9380a6640}\label{interfacemom__eos__wright_1_1calculate__spec__vol__wright_a421e4b3876da1390365077e9380a6640}} 
\index{mom\_eos\_wright::calculate\_spec\_vol\_wright@{mom\_eos\_wright::calculate\_spec\_vol\_wright}!calculate\_spec\_vol\_array\_wright@{calculate\_spec\_vol\_array\_wright}}
\index{calculate\_spec\_vol\_array\_wright@{calculate\_spec\_vol\_array\_wright}!mom\_eos\_wright::calculate\_spec\_vol\_wright@{mom\_eos\_wright::calculate\_spec\_vol\_wright}}
\doxysubsubsection{\texorpdfstring{calculate\_spec\_vol\_array\_wright()}{calculate\_spec\_vol\_array\_wright()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+\_\+wright\+::calculate\+\_\+spec\+\_\+vol\+\_\+wright\+::calculate\+\_\+spec\+\_\+vol\+\_\+array\+\_\+wright (\begin{DoxyParamCaption}\item[{real, dimension(\+:), intent(in)}]{T,  }\item[{real, dimension(\+:), intent(in)}]{S,  }\item[{real, dimension(\+:), intent(in)}]{pressure,  }\item[{real, dimension(\+:), intent(inout)}]{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 salinity (S \mbox{[}P\+SU\mbox{]}), potential temperature (T \mbox{[}degC\mbox{]}) and pressure \mbox{[}Pa\mbox{]}. It uses the expression from Wright, 1997, J. Atmos. Ocean. Tech., 14, 735-\/740. 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{ in,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 172 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+\+Wright.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{172 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: T\textcolor{comment}{        !< potential temperature relative to the}}
\DoxyCodeLine{173 \textcolor{comment}{                                              !! surface [degC].}}
\DoxyCodeLine{174 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: S\textcolor{comment}{        !< salinity [PSU].}}
\DoxyCodeLine{175 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: pressure\textcolor{comment}{ !< pressure [Pa].}}
\DoxyCodeLine{176 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: specvol\textcolor{comment}{  !< in situ specific volume [m3 kg-\/1].}}
\DoxyCodeLine{177   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}    :: start\textcolor{comment}{    !< the starting point in the arrays.}}
\DoxyCodeLine{178   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}    :: npts\textcolor{comment}{     !< the number of values to calculate.}}
\DoxyCodeLine{179 \textcolor{keywordtype}{  real},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: spv\_ref\textcolor{comment}{  !< A reference specific volume [m3 kg-\/1].}}
\DoxyCodeLine{180 }
\DoxyCodeLine{181   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{182 \textcolor{keywordtype}{  real} :: al0, p0, lambda}
\DoxyCodeLine{183   \textcolor{keywordtype}{integer} :: j}
\DoxyCodeLine{184 }
\DoxyCodeLine{185   \textcolor{keywordflow}{do} j=start,start+npts-\/1}
\DoxyCodeLine{186     al0 = (a0 + a1*t(j)) +a2*s(j)}
\DoxyCodeLine{187     p0 = (b0 + b4*s(j)) + t(j) * (b1 + t(j)*((b2 + b3*t(j))) + b5*s(j))}
\DoxyCodeLine{188     lambda = (c0 +c4*s(j)) + t(j) * (c1 + t(j)*((c2 + c3*t(j))) + c5*s(j))}
\DoxyCodeLine{189 }
\DoxyCodeLine{190     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(spv\_ref)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{191       specvol(j) = (lambda + (al0 -\/ spv\_ref)*(pressure(j) + p0)) / (pressure(j) + p0)}
\DoxyCodeLine{192     \textcolor{keywordflow}{else}}
\DoxyCodeLine{193       specvol(j) = (lambda + al0*(pressure(j) + p0)) / (pressure(j) + p0)}
\DoxyCodeLine{194 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{195 \textcolor{keywordflow}{  enddo}}

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__eos__wright_1_1calculate__spec__vol__wright_a4538d6bda300d11770f061935b32ba4c}\label{interfacemom__eos__wright_1_1calculate__spec__vol__wright_a4538d6bda300d11770f061935b32ba4c}} 
\index{mom\_eos\_wright::calculate\_spec\_vol\_wright@{mom\_eos\_wright::calculate\_spec\_vol\_wright}!calculate\_spec\_vol\_scalar\_wright@{calculate\_spec\_vol\_scalar\_wright}}
\index{calculate\_spec\_vol\_scalar\_wright@{calculate\_spec\_vol\_scalar\_wright}!mom\_eos\_wright::calculate\_spec\_vol\_wright@{mom\_eos\_wright::calculate\_spec\_vol\_wright}}
\doxysubsubsection{\texorpdfstring{calculate\_spec\_vol\_scalar\_wright()}{calculate\_spec\_vol\_scalar\_wright()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+\_\+wright\+::calculate\+\_\+spec\+\_\+vol\+\_\+wright\+::calculate\+\_\+spec\+\_\+vol\+\_\+scalar\+\_\+wright (\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 salinity (S \mbox{[}P\+SU\mbox{]}), potential temperature (T \mbox{[}degC\mbox{]}) and pressure \mbox{[}Pa\mbox{]}. It uses the expression from Wright, 1997, J. Atmos. Ocean. Tech., 14, 735-\/740. 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 spv\+\_\+ref} & A reference specific volume \mbox{[}m3 kg-\/1\mbox{]}. \\
\hline
\end{DoxyParams}


Definition at line 151 of file M\+O\+M\+\_\+\+E\+O\+S\+\_\+\+Wright.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{151 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(in)}  :: T\textcolor{comment}{        !< potential temperature relative to the surface [degC].}}
\DoxyCodeLine{152 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{        !< salinity [PSU].}}
\DoxyCodeLine{153 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< pressure [Pa].}}
\DoxyCodeLine{154 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(out)} :: specvol\textcolor{comment}{  !< in situ specific volume [m3 kg-\/1].}}
\DoxyCodeLine{155 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: spv\_ref\textcolor{comment}{  !< A reference specific volume [m3 kg-\/1].}}
\DoxyCodeLine{156 }
\DoxyCodeLine{157   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{158 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(1)} :: T0, S0, pressure0, spv0}
\DoxyCodeLine{159 }
\DoxyCodeLine{160   t0(1) = t ; s0(1) = s ; pressure0(1) = pressure}
\DoxyCodeLine{161 }
\DoxyCodeLine{162   \textcolor{keyword}{call }calculate\_spec\_vol\_array\_wright(t0, s0, pressure0, spv0, 1, 1, spv\_ref)}
\DoxyCodeLine{163   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\+\_\+\+Wright.\+F90\end{DoxyCompactItemize}
