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


\doxysubsection{Detailed Description}
Calculates specific volume of sea water from T, S and P. 

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

\doxysubsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{interfacemom__eos_1_1calculate__spec__vol_a738945d7ca218ddbf43bb32ead72be9a}{calc\+\_\+spec\+\_\+vol\+\_\+scalar}} (T, S, pressure, specvol, E\+OS, spv\+\_\+ref, scale)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate specific volume of sea water for scalar inputs. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__eos_1_1calculate__spec__vol_a6a894de8c565f003dac2624118844c3c}{calculate\+\_\+spec\+\_\+vol\+\_\+array}} (T, S, pressure, specvol, start, npts, E\+OS, spv\+\_\+ref, scale)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate the specific volume of sea water for 1-\/D array inputs. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__eos_1_1calculate__spec__vol_a09bc44c37a1d952f42d9b01db8bc5267}{calc\+\_\+spec\+\_\+vol\+\_\+1d}} (T, S, pressure, specvol, E\+OS, dom, spv\+\_\+ref, scale)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate the specific volume of sea water for 1-\/D array inputs, potentially limiting the domain of indices that are worked on. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Calculates specific volume of sea water from T, S and P. 

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



\doxysubsection{Functions and subroutines}
\mbox{\Hypertarget{interfacemom__eos_1_1calculate__spec__vol_a09bc44c37a1d952f42d9b01db8bc5267}\label{interfacemom__eos_1_1calculate__spec__vol_a09bc44c37a1d952f42d9b01db8bc5267}} 
\index{mom\_eos::calculate\_spec\_vol@{mom\_eos::calculate\_spec\_vol}!calc\_spec\_vol\_1d@{calc\_spec\_vol\_1d}}
\index{calc\_spec\_vol\_1d@{calc\_spec\_vol\_1d}!mom\_eos::calculate\_spec\_vol@{mom\_eos::calculate\_spec\_vol}}
\doxysubsubsection{\texorpdfstring{calc\_spec\_vol\_1d()}{calc\_spec\_vol\_1d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calculate\+\_\+spec\+\_\+vol\+::calc\+\_\+spec\+\_\+vol\+\_\+1d (\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[{type(\mbox{\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}}), pointer}]{E\+OS,  }\item[{integer, dimension(2), intent(in), optional}]{dom,  }\item[{real, intent(in), optional}]{spv\+\_\+ref,  }\item[{real, intent(in), optional}]{scale }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calls the appropriate subroutine to calculate the specific volume of sea water for 1-\/D array inputs, potentially limiting the domain of indices that are worked on. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em t} & Potential temperature referenced to the surface \mbox{[}degC\mbox{]} \\
\hline
\mbox{\texttt{ in}}  & {\em s} & Salinity \mbox{[}ppt\mbox{]} \\
\hline
\mbox{\texttt{ in}}  & {\em pressure} & Pressure \mbox{[}R L2 T-\/2 $\sim$$>$ Pa\mbox{]} \\
\hline
\mbox{\texttt{ in,out}}  & {\em specvol} & In situ specific volume \mbox{[}R-\/1 $\sim$$>$ m3 kg-\/1\mbox{]} \\
\hline
 & {\em eos} & Equation of state structure \\
\hline
\mbox{\texttt{ in}}  & {\em dom} & The domain of indices to work on, taking into account that arrays start at 1. \\
\hline
\mbox{\texttt{ in}}  & {\em spv\+\_\+ref} & A reference specific volume \mbox{[}R-\/1 $\sim$$>$ m3 kg-\/1\mbox{]} \\
\hline
\mbox{\texttt{ in}}  & {\em scale} & A multiplicative factor by which to scale output specific volume in combination with scaling given by US \mbox{[}various\mbox{]} \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}{0}
\DoxyCodeLine{571 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(in)}    :: T\textcolor{comment}{        !< Potential temperature referenced to the surface [degC]}}
\DoxyCodeLine{572 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(in)}    :: S\textcolor{comment}{        !< Salinity [ppt]}}
\DoxyCodeLine{573 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(in)}    :: pressure\textcolor{comment}{ !< Pressure [R L2 T-\/2 \string~> Pa]}}
\DoxyCodeLine{574 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(inout)} :: specvol\textcolor{comment}{  !< In situ specific volume [R-\/1 \string~> m3 kg-\/1]}}
\DoxyCodeLine{575   \textcolor{keywordtype}{type}(EOS\_type),        \textcolor{keywordtype}{pointer}       :: EOS\textcolor{comment}{      !< Equation of state structure}}
\DoxyCodeLine{576   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{dimension(2)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: dom\textcolor{comment}{   !< The domain of indices to work on, taking}}
\DoxyCodeLine{577 \textcolor{comment}{                                                       !! into account that arrays start at 1.}}
\DoxyCodeLine{578 \textcolor{keywordtype}{  real},                  \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: spv\_ref\textcolor{comment}{ !< A reference specific volume [R-\/1 \string~> m3 kg-\/1]}}
\DoxyCodeLine{579 \textcolor{keywordtype}{  real},                  \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scale\textcolor{comment}{ !< A multiplicative factor by which to scale}}
\DoxyCodeLine{580 \textcolor{comment}{                                                       !! output specific volume in combination with}}
\DoxyCodeLine{581 \textcolor{comment}{                                                       !! scaling given by US [various]}}
\DoxyCodeLine{582   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{583 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(size(specvol))} :: pres  \textcolor{comment}{! Pressure converted to [Pa]}}
\DoxyCodeLine{584 \textcolor{keywordtype}{  real} :: p\_scale   \textcolor{comment}{! A factor to convert pressure to units of Pa [Pa T2 R-\/1 L-\/2 \string~> 1]}}
\DoxyCodeLine{585 \textcolor{keywordtype}{  real} :: spv\_unscale \textcolor{comment}{! A factor to convert specific volume from R-\/1 to m3 kg-\/1 [m3 kg-\/1 R \string~> 1]}}
\DoxyCodeLine{586 \textcolor{keywordtype}{  real} :: spv\_scale \textcolor{comment}{! A factor to convert specific volume from m3 kg-\/1 to the desired units [kg m-\/3 R-\/1 \string~> 1]}}
\DoxyCodeLine{587 \textcolor{keywordtype}{  real} :: spv\_reference \textcolor{comment}{! spv\_ref converted to [m3 kg-\/1]}}
\DoxyCodeLine{588   \textcolor{keywordtype}{integer} :: i, is, ie, npts}
\DoxyCodeLine{589 }
\DoxyCodeLine{590   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, \&}
\DoxyCodeLine{591     \textcolor{stringliteral}{"{}calc\_spec\_vol\_1d called with an unassociated EOS\_type EOS."{}})}
\DoxyCodeLine{592 }
\DoxyCodeLine{593   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(dom)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{594     is = dom(1) ; ie = dom(2) ; npts = 1 + ie -\/ is}
\DoxyCodeLine{595   \textcolor{keywordflow}{else}}
\DoxyCodeLine{596     is = 1 ; ie = \textcolor{keyword}{size}(specvol) ; npts = 1 + ie -\/ is}
\DoxyCodeLine{597 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{598 }
\DoxyCodeLine{599   p\_scale = eos\%RL2\_T2\_to\_Pa}
\DoxyCodeLine{600   spv\_unscale = eos\%kg\_m3\_to\_R}
\DoxyCodeLine{601 }
\DoxyCodeLine{602   \textcolor{keywordflow}{if} ((p\_scale == 1.0) .and. (spv\_unscale == 1.0)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{603     \textcolor{keyword}{call }calculate\_spec\_vol\_array(t, s, pressure, specvol, is, npts, eos, spv\_ref)}
\DoxyCodeLine{604   \textcolor{keywordflow}{elseif} (\textcolor{keyword}{present}(spv\_ref)) \textcolor{keywordflow}{then} \textcolor{comment}{! This is the same as above, but with some extra work to rescale variables.}}
\DoxyCodeLine{605     \textcolor{keywordflow}{do} i=is,ie ; pres(i) = p\_scale * pressure(i) ;\textcolor{keywordflow}{ enddo}}
\DoxyCodeLine{606     spv\_reference = spv\_unscale*spv\_ref}
\DoxyCodeLine{607     \textcolor{keyword}{call }calculate\_spec\_vol\_array(t, s, pres, specvol, is, npts, eos, spv\_reference)}
\DoxyCodeLine{608   \textcolor{keywordflow}{else}  \textcolor{comment}{! There is rescaling of variables, but spv\_ref is not present. Passing a 0 value of spv\_ref}}
\DoxyCodeLine{609         \textcolor{comment}{! changes answers at roundoff for some equations of state, like Wright and UNESCO.}}
\DoxyCodeLine{610     \textcolor{keywordflow}{do} i=is,ie ; pres(i) = p\_scale * pressure(i) ;\textcolor{keywordflow}{ enddo}}
\DoxyCodeLine{611     \textcolor{keyword}{call }calculate\_spec\_vol\_array(t, s, pres, specvol, is, npts, eos)}
\DoxyCodeLine{612 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{613 }
\DoxyCodeLine{614   spv\_scale = eos\%R\_to\_kg\_m3}
\DoxyCodeLine{615   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scale)) spv\_scale = spv\_scale * scale}
\DoxyCodeLine{616   \textcolor{keywordflow}{if} (spv\_scale /= 1.0) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{do} i=is,ie}
\DoxyCodeLine{617     specvol(i) = spv\_scale * specvol(i)}
\DoxyCodeLine{618 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{619 }

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__eos_1_1calculate__spec__vol_a738945d7ca218ddbf43bb32ead72be9a}\label{interfacemom__eos_1_1calculate__spec__vol_a738945d7ca218ddbf43bb32ead72be9a}} 
\index{mom\_eos::calculate\_spec\_vol@{mom\_eos::calculate\_spec\_vol}!calc\_spec\_vol\_scalar@{calc\_spec\_vol\_scalar}}
\index{calc\_spec\_vol\_scalar@{calc\_spec\_vol\_scalar}!mom\_eos::calculate\_spec\_vol@{mom\_eos::calculate\_spec\_vol}}
\doxysubsubsection{\texorpdfstring{calc\_spec\_vol\_scalar()}{calc\_spec\_vol\_scalar()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calculate\+\_\+spec\+\_\+vol\+::calc\+\_\+spec\+\_\+vol\+\_\+scalar (\begin{DoxyParamCaption}\item[{real, intent(in)}]{T,  }\item[{real, intent(in)}]{S,  }\item[{real, intent(in)}]{pressure,  }\item[{real, intent(out)}]{specvol,  }\item[{type(\mbox{\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}}), pointer}]{E\+OS,  }\item[{real, intent(in), optional}]{spv\+\_\+ref,  }\item[{real, intent(in), optional}]{scale }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calls the appropriate subroutine to calculate specific volume of sea water for scalar inputs. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em t} & Potential temperature referenced to the surface \mbox{[}degC\mbox{]} \\
\hline
\mbox{\texttt{ in}}  & {\em s} & Salinity \mbox{[}ppt\mbox{]} \\
\hline
\mbox{\texttt{ in}}  & {\em pressure} & Pressure \mbox{[}Pa\mbox{]} or \mbox{[}R L2 T-\/2 $\sim$$>$ Pa\mbox{]} \\
\hline
\mbox{\texttt{ out}}  & {\em specvol} & In situ? specific volume \mbox{[}m3 kg-\/1\mbox{]} or \mbox{[}R-\/1 $\sim$$>$ m3 kg-\/1\mbox{]} \\
\hline
 & {\em eos} & Equation of state structure \\
\hline
\mbox{\texttt{ in}}  & {\em spv\+\_\+ref} & A reference specific volume \mbox{[}m3 kg-\/1\mbox{]} or \mbox{[}R-\/1 m3 kg-\/1\mbox{]} \\
\hline
\mbox{\texttt{ in}}  & {\em scale} & A multiplicative factor by which to scale specific volume in combination with scaling given by US \mbox{[}various\mbox{]} \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}{0}
\DoxyCodeLine{533 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(in)}  :: T\textcolor{comment}{        !< Potential temperature referenced to the surface [degC]}}
\DoxyCodeLine{534 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{        !< Salinity [ppt]}}
\DoxyCodeLine{535 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< Pressure [Pa] or [R L2 T-\/2 \string~> Pa]}}
\DoxyCodeLine{536 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(out)} :: specvol\textcolor{comment}{  !< In situ? specific volume [m3 kg-\/1] or [R-\/1 \string~> m3 kg-\/1]}}
\DoxyCodeLine{537   \textcolor{keywordtype}{type}(EOS\_type), \textcolor{keywordtype}{pointer}     :: EOS\textcolor{comment}{      !< Equation of state structure}}
\DoxyCodeLine{538 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: spv\_ref\textcolor{comment}{  !< A reference specific volume [m3 kg-\/1] or [R-\/1 m3 kg-\/1]}}
\DoxyCodeLine{539 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: scale\textcolor{comment}{    !< A multiplicative factor by which to scale specific}}
\DoxyCodeLine{540 \textcolor{comment}{                                          !! volume in combination with scaling given by US [various]}}
\DoxyCodeLine{541 }
\DoxyCodeLine{542 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(1)} :: Ta, Sa, pres, spv  \textcolor{comment}{! Rescaled single element array versions of the arguments.}}
\DoxyCodeLine{543 \textcolor{keywordtype}{  real} :: spv\_reference \textcolor{comment}{! spv\_ref converted to [m3 kg-\/1]}}
\DoxyCodeLine{544 \textcolor{keywordtype}{  real} :: spv\_scale \textcolor{comment}{! A factor to convert specific volume from m3 kg-\/1 to the desired units [kg R-\/1 m-\/3 \string~> 1]}}
\DoxyCodeLine{545 }
\DoxyCodeLine{546   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, \&}
\DoxyCodeLine{547     \textcolor{stringliteral}{"{}calc\_spec\_vol\_scalar called with an unassociated EOS\_type EOS."{}})}
\DoxyCodeLine{548 }
\DoxyCodeLine{549   pres(1) = eos\%RL2\_T2\_to\_Pa*pressure}
\DoxyCodeLine{550   ta(1) = t ; sa(1) = s}
\DoxyCodeLine{551 }
\DoxyCodeLine{552   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(spv\_ref)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{553     spv\_reference = eos\%kg\_m3\_to\_R*spv\_ref}
\DoxyCodeLine{554     \textcolor{keyword}{call }calculate\_spec\_vol\_array(ta, sa, pres, spv, 1, 1, eos, spv\_reference)}
\DoxyCodeLine{555   \textcolor{keywordflow}{else}}
\DoxyCodeLine{556     \textcolor{keyword}{call }calculate\_spec\_vol\_array(ta, sa, pres, spv, 1, 1, eos)}
\DoxyCodeLine{557 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{558   specvol = spv(1)}
\DoxyCodeLine{559 }
\DoxyCodeLine{560   spv\_scale = eos\%R\_to\_kg\_m3}
\DoxyCodeLine{561   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scale)) spv\_scale = spv\_scale * scale}
\DoxyCodeLine{562   \textcolor{keywordflow}{if} (spv\_scale /= 1.0) \textcolor{keywordflow}{then}}
\DoxyCodeLine{563     specvol = spv\_scale * specvol}
\DoxyCodeLine{564 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{565 }

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__eos_1_1calculate__spec__vol_a6a894de8c565f003dac2624118844c3c}\label{interfacemom__eos_1_1calculate__spec__vol_a6a894de8c565f003dac2624118844c3c}} 
\index{mom\_eos::calculate\_spec\_vol@{mom\_eos::calculate\_spec\_vol}!calculate\_spec\_vol\_array@{calculate\_spec\_vol\_array}}
\index{calculate\_spec\_vol\_array@{calculate\_spec\_vol\_array}!mom\_eos::calculate\_spec\_vol@{mom\_eos::calculate\_spec\_vol}}
\doxysubsubsection{\texorpdfstring{calculate\_spec\_vol\_array()}{calculate\_spec\_vol\_array()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calculate\+\_\+spec\+\_\+vol\+::calculate\+\_\+spec\+\_\+vol\+\_\+array (\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[{type(\mbox{\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}}), pointer}]{E\+OS,  }\item[{real, intent(in), optional}]{spv\+\_\+ref,  }\item[{real, intent(in), optional}]{scale }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calls the appropriate subroutine to calculate the specific volume of sea water for 1-\/D array inputs. 


\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{[}ppt\mbox{]} \\
\hline
\mbox{\texttt{ in}}  & {\em pressure} & pressure \mbox{[}Pa\mbox{]} \\
\hline
\mbox{\texttt{ in,out}}  & {\em specvol} & in situ specific volume \mbox{[}kg m-\/3\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
 & {\em eos} & Equation of state structure \\
\hline
\mbox{\texttt{ in}}  & {\em spv\+\_\+ref} & A reference specific volume \mbox{[}m3 kg-\/1\mbox{]} \\
\hline
\mbox{\texttt{ in}}  & {\em scale} & A multiplicative factor by which to scale specific volume in combination with scaling given by US \mbox{[}various\mbox{]} \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}{0}
\DoxyCodeLine{486 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: T\textcolor{comment}{        !< potential temperature relative to the surface [degC]}}
\DoxyCodeLine{487 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: S\textcolor{comment}{        !< salinity [ppt]}}
\DoxyCodeLine{488 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: pressure\textcolor{comment}{ !< pressure [Pa]}}
\DoxyCodeLine{489 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: specvol\textcolor{comment}{  !< in situ specific volume [kg m-\/3]}}
\DoxyCodeLine{490   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}    :: start\textcolor{comment}{    !< the starting point in the arrays.}}
\DoxyCodeLine{491   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}    :: npts\textcolor{comment}{     !< the number of values to calculate.}}
\DoxyCodeLine{492   \textcolor{keywordtype}{type}(EOS\_type),     \textcolor{keywordtype}{pointer}       :: EOS\textcolor{comment}{      !< Equation of state structure}}
\DoxyCodeLine{493 \textcolor{keywordtype}{  real},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: spv\_ref\textcolor{comment}{  !< A reference specific volume [m3 kg-\/1]}}
\DoxyCodeLine{494 \textcolor{keywordtype}{  real},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: scale\textcolor{comment}{    !< A multiplicative factor by which to scale specific}}
\DoxyCodeLine{495 \textcolor{comment}{                                                !! volume in combination with scaling given by US [various]}}
\DoxyCodeLine{496 }
\DoxyCodeLine{497 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(size(specvol))}  :: rho   \textcolor{comment}{! Density [kg m-\/3]}}
\DoxyCodeLine{498   \textcolor{keywordtype}{integer} :: j}
\DoxyCodeLine{499 }
\DoxyCodeLine{500   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, \&}
\DoxyCodeLine{501     \textcolor{stringliteral}{"{}calculate\_spec\_vol\_array called with an unassociated EOS\_type EOS."{}})}
\DoxyCodeLine{502 }
\DoxyCodeLine{503   \textcolor{keywordflow}{select case} (eos\%form\_of\_EOS)}
\DoxyCodeLine{504     \textcolor{keywordflow}{case} (eos\_linear)}
\DoxyCodeLine{505       \textcolor{keyword}{call }calculate\_spec\_vol\_linear(t, s, pressure, specvol, start, npts, \&}
\DoxyCodeLine{506                eos\%rho\_T0\_S0, eos\%drho\_dT, eos\%drho\_dS, spv\_ref)}
\DoxyCodeLine{507     \textcolor{keywordflow}{case} (eos\_unesco)}
\DoxyCodeLine{508       \textcolor{keyword}{call }calculate\_spec\_vol\_unesco(t, s, pressure, specvol, start, npts, spv\_ref)}
\DoxyCodeLine{509     \textcolor{keywordflow}{case} (eos\_wright)}
\DoxyCodeLine{510       \textcolor{keyword}{call }calculate\_spec\_vol\_wright(t, s, pressure, specvol, start, npts, spv\_ref)}
\DoxyCodeLine{511     \textcolor{keywordflow}{case} (eos\_teos10)}
\DoxyCodeLine{512       \textcolor{keyword}{call }calculate\_spec\_vol\_teos10(t, s, pressure, specvol, start, npts, spv\_ref)}
\DoxyCodeLine{513     \textcolor{keywordflow}{case} (eos\_nemo)}
\DoxyCodeLine{514       \textcolor{keyword}{call }calculate\_density\_nemo(t, s, pressure, rho, start, npts)}
\DoxyCodeLine{515       \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(spv\_ref)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{516         specvol(:) = 1.0 / rho(:) -\/ spv\_ref}
\DoxyCodeLine{517       \textcolor{keywordflow}{else}}
\DoxyCodeLine{518         specvol(:) = 1.0 / rho(:)}
\DoxyCodeLine{519 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{520 \textcolor{keywordflow}{    case default}}
\DoxyCodeLine{521       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"{}calculate\_spec\_vol\_array: EOS\%form\_of\_EOS is not valid."{}})}
\DoxyCodeLine{522 \textcolor{keywordflow}{  end select}}
\DoxyCodeLine{523 }
\DoxyCodeLine{524   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scale)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (scale /= 1.0) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{do} j=start,start+npts-\/1}
\DoxyCodeLine{525     specvol(j) = scale * specvol(j)}
\DoxyCodeLine{526 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ endif} ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{527 }

\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.\+F90\end{DoxyCompactItemize}
