\hypertarget{interfacemom__eos__wright_1_1calculate__spec__vol__wright}{}\section{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}}


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

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


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



\subsection{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}}
\subsubsection{\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{\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 in,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 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}
172   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: T\textcolor{comment}{        !< potential temperature relative to the}
173 \textcolor{comment}{                                              !! surface [degC].}
174   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: S\textcolor{comment}{        !< salinity [PSU].}
175   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: pressure\textcolor{comment}{ !< pressure [Pa].}
176   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: specvol\textcolor{comment}{  !< in situ specific volume [m3 kg-1].}
177   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}    :: start\textcolor{comment}{    !< the starting point in the arrays.}
178   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}    :: npts\textcolor{comment}{     !< the number of values to calculate.}
179   \textcolor{keywordtype}{real},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: spv\_ref\textcolor{comment}{  !< A reference specific volume [m3 kg-1].}
180 
181   \textcolor{comment}{! Local variables}
182   \textcolor{keywordtype}{real} :: al0, p0, lambda
183   \textcolor{keywordtype}{integer} :: j
184 
185   \textcolor{keywordflow}{do} j=start,start+npts-1
186     al0 = (a0 + a1*t(j)) +a2*s(j)
187     p0 = (b0 + b4*s(j)) + t(j) * (b1 + t(j)*((b2 + b3*t(j))) + b5*s(j))
188     lambda = (c0 +c4*s(j)) + t(j) * (c1 + t(j)*((c2 + c3*t(j))) + c5*s(j))
189 
190     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(spv\_ref)) \textcolor{keywordflow}{then}
191       specvol(j) = (lambda + (al0 - spv\_ref)*(pressure(j) + p0)) / (pressure(j) + p0)
192     \textcolor{keywordflow}{else}
193       specvol(j) = (lambda + al0*(pressure(j) + p0)) / (pressure(j) + p0)
194 \textcolor{keywordflow}{    endif}
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}}
\subsubsection{\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{\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 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}
151   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: T\textcolor{comment}{        !< potential temperature relative to the surface [degC].}
152   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{        !< salinity [PSU].}
153   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< pressure [Pa].}
154   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(out)} :: specvol\textcolor{comment}{  !< in situ specific volume [m3 kg-1].}
155   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: spv\_ref\textcolor{comment}{  !< A reference specific volume [m3 kg-1].}
156 
157   \textcolor{comment}{! Local variables}
158   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(1)} :: T0, S0, pressure0, spv0
159 
160   t0(1) = t ; s0(1) = s ; pressure0(1) = pressure
161 
162   \textcolor{keyword}{call }calculate\_spec\_vol\_array\_wright(t0, s0, pressure0, spv0, 1, 1, spv\_ref)
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}
