\hypertarget{interfacemom__eos_1_1calculate__density__derivs}{}\section{mom\+\_\+eos\+:\+:calculate\+\_\+density\+\_\+derivs Interface Reference}
\label{interfacemom__eos_1_1calculate__density__derivs}\index{mom\+\_\+eos\+::calculate\+\_\+density\+\_\+derivs@{mom\+\_\+eos\+::calculate\+\_\+density\+\_\+derivs}}


\subsection{Detailed Description}
Calculate the derivatives of density with temperature and salinity from T, S, and P. 

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

\subsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{interfacemom__eos_1_1calculate__density__derivs_a522aaffc96993533bb621593c754d1bc}{calculate\+\_\+density\+\_\+derivs\+\_\+scalar} (T, S, pressure, drho\+\_\+dT, drho\+\_\+dS, E\+OS, scale)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutines to calculate density derivatives by promoting a scalar to a one-\/element array. \end{DoxyCompactList}\item 
subroutine \hyperlink{interfacemom__eos_1_1calculate__density__derivs_abc880874e27f628ac5c493cf632c210e}{calculate\+\_\+density\+\_\+derivs\+\_\+array} (T, S, pressure, drho\+\_\+dT, drho\+\_\+dS, start, npts, E\+OS, scale)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate density derivatives for 1-\/D array inputs. \end{DoxyCompactList}\item 
subroutine \hyperlink{interfacemom__eos_1_1calculate__density__derivs_a1572bc0600965c23b719de756b2cc566}{calculate\+\_\+density\+\_\+derivs\+\_\+1d} (T, S, pressure, drho\+\_\+dT, drho\+\_\+dS, E\+OS, dom, scale)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate density derivatives for 1-\/D array inputs. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Calculate the derivatives of density with temperature and salinity from T, S, and P. 

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



\subsection{Functions and subroutines}
\mbox{\Hypertarget{interfacemom__eos_1_1calculate__density__derivs_a1572bc0600965c23b719de756b2cc566}\label{interfacemom__eos_1_1calculate__density__derivs_a1572bc0600965c23b719de756b2cc566}} 
\index{mom\+\_\+eos\+::calculate\+\_\+density\+\_\+derivs@{mom\+\_\+eos\+::calculate\+\_\+density\+\_\+derivs}!calculate\+\_\+density\+\_\+derivs\+\_\+1d@{calculate\+\_\+density\+\_\+derivs\+\_\+1d}}
\index{calculate\+\_\+density\+\_\+derivs\+\_\+1d@{calculate\+\_\+density\+\_\+derivs\+\_\+1d}!mom\+\_\+eos\+::calculate\+\_\+density\+\_\+derivs@{mom\+\_\+eos\+::calculate\+\_\+density\+\_\+derivs}}
\subsubsection{\texorpdfstring{calculate\+\_\+density\+\_\+derivs\+\_\+1d()}{calculate\_density\_derivs\_1d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calculate\+\_\+density\+\_\+derivs\+::calculate\+\_\+density\+\_\+derivs\+\_\+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)}]{drho\+\_\+dT,  }\item[{real, dimension(\+:), intent(inout)}]{drho\+\_\+dS,  }\item[{type(\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}), pointer}]{E\+OS,  }\item[{integer, dimension(2), intent(in), optional}]{dom,  }\item[{real, intent(in), optional}]{scale }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calls the appropriate subroutine to calculate density derivatives for 1-\/D array inputs. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em t} & Potential temperature referenced to the surface \mbox{[}degC\mbox{]}\\
\hline
\mbox{\tt in}  & {\em s} & Salinity \mbox{[}ppt\mbox{]}\\
\hline
\mbox{\tt in}  & {\em pressure} & Pressure \mbox{[}R L2 T-\/2 $\sim$$>$ Pa\mbox{]}\\
\hline
\mbox{\tt in,out}  & {\em drho\+\_\+dt} & The partial derivative of density with potential temperature \mbox{[}R deg\+C-\/1 $\sim$$>$ kg m-\/3 deg\+C-\/1\mbox{]}\\
\hline
\mbox{\tt in,out}  & {\em drho\+\_\+ds} & The partial derivative of density with salinity \mbox{[}R deg\+C-\/1 $\sim$$>$ kg m-\/3 ppt-\/1\mbox{]}\\
\hline
 & {\em eos} & Equation of state structure\\
\hline
\mbox{\tt in}  & {\em dom} & The domain of indices to work on, taking into account that arrays start at 1.\\
\hline
\mbox{\tt in}  & {\em scale} & A multiplicative factor by which to scale density in combination with scaling given by US \mbox{[}various\mbox{]} \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}
751   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(in)}    :: t\textcolor{comment}{        !< Potential temperature referenced to the surface
       [degC]}
752   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(in)}    :: s\textcolor{comment}{        !< Salinity [ppt]}
753   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(in)}    :: pressure\textcolor{comment}{ !< Pressure [R L2 T-2 ~> Pa]}
754   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(inout)} :: drho\_dt\textcolor{comment}{  !< The partial derivative of density with potential}
755 \textcolor{comment}{                                                   !! temperature [R degC-1 ~> kg m-3 degC-1]}
756   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(inout)} :: drho\_ds\textcolor{comment}{  !< The partial derivative of density with salinity}
757 \textcolor{comment}{                                                   !! [R degC-1 ~> kg m-3 ppt-1]}
758   \textcolor{keywordtype}{type}(eos\_type),        \textcolor{keywordtype}{pointer}       :: eos\textcolor{comment}{      !< Equation of state structure}
759   \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}
760 \textcolor{comment}{                                                       !! into account that arrays start at 1.}
761   \textcolor{keywordtype}{real},                  \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scale\textcolor{comment}{ !< A multiplicative factor by which to scale density}
762 \textcolor{comment}{                                                       !! in combination with scaling given by US [various]}
763   \textcolor{comment}{! Local variables}
764   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(size(drho\_dT))} :: pres  \textcolor{comment}{! Pressure converted to [Pa]}
765   \textcolor{keywordtype}{real} :: rho\_scale \textcolor{comment}{! A factor to convert density from kg m-3 to the desired units [R m3 kg-1 ~> 1]}
766   \textcolor{keywordtype}{real} :: p\_scale   \textcolor{comment}{! A factor to convert pressure to units of Pa [Pa T2 R-1 L-2 ~> 1]}
767   \textcolor{keywordtype}{integer} :: i, is, ie, npts
768 
769   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
770     \textcolor{stringliteral}{"calculate\_density\_derivs called with an unassociated EOS\_type EOS."})
771 
772   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(dom)) \textcolor{keywordflow}{then}
773     is = dom(1) ; ie = dom(2) ; npts = 1 + ie - is
774   \textcolor{keywordflow}{else}
775     is = 1 ; ie = \textcolor{keyword}{size}(drho\_dt) ; npts = 1 + ie - is
776 \textcolor{keywordflow}{  endif}
777 
778   p\_scale = eos%RL2\_T2\_to\_Pa
779 
780   \textcolor{keywordflow}{if} (p\_scale == 1.0) \textcolor{keywordflow}{then}
781     \textcolor{keyword}{call }calculate\_density\_derivs\_array(t, s, pressure, drho\_dt, drho\_ds, is, npts, eos)
782   \textcolor{keywordflow}{else}
783     \textcolor{keywordflow}{do} i=is,ie ; pres(i) = p\_scale * pressure(i) ;\textcolor{keywordflow}{ enddo}
784     \textcolor{keyword}{call }calculate\_density\_derivs\_array(t, s, pres, drho\_dt, drho\_ds, is, npts, eos)
785 \textcolor{keywordflow}{  endif}
786 
787   rho\_scale = eos%kg\_m3\_to\_R
788   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scale)) rho\_scale = rho\_scale * scale
789   \textcolor{keywordflow}{if} (rho\_scale /= 1.0) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{do} i=is,ie
790     drho\_dt(i) = rho\_scale * drho\_dt(i)
791     drho\_ds(i) = rho\_scale * drho\_ds(i)
792 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ endif}
793 
\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__eos_1_1calculate__density__derivs_abc880874e27f628ac5c493cf632c210e}\label{interfacemom__eos_1_1calculate__density__derivs_abc880874e27f628ac5c493cf632c210e}} 
\index{mom\+\_\+eos\+::calculate\+\_\+density\+\_\+derivs@{mom\+\_\+eos\+::calculate\+\_\+density\+\_\+derivs}!calculate\+\_\+density\+\_\+derivs\+\_\+array@{calculate\+\_\+density\+\_\+derivs\+\_\+array}}
\index{calculate\+\_\+density\+\_\+derivs\+\_\+array@{calculate\+\_\+density\+\_\+derivs\+\_\+array}!mom\+\_\+eos\+::calculate\+\_\+density\+\_\+derivs@{mom\+\_\+eos\+::calculate\+\_\+density\+\_\+derivs}}
\subsubsection{\texorpdfstring{calculate\+\_\+density\+\_\+derivs\+\_\+array()}{calculate\_density\_derivs\_array()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calculate\+\_\+density\+\_\+derivs\+::calculate\+\_\+density\+\_\+derivs\+\_\+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)}]{drho\+\_\+dT,  }\item[{real, dimension(\+:), intent(inout)}]{drho\+\_\+dS,  }\item[{integer, intent(in)}]{start,  }\item[{integer, intent(in)}]{npts,  }\item[{type(\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}), pointer}]{E\+OS,  }\item[{real, intent(in), optional}]{scale }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calls the appropriate subroutine to calculate density derivatives for 1-\/D array inputs. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em t} & Potential temperature referenced to the surface \mbox{[}degC\mbox{]}\\
\hline
\mbox{\tt in}  & {\em s} & Salinity \mbox{[}ppt\mbox{]}\\
\hline
\mbox{\tt in}  & {\em pressure} & Pressure \mbox{[}Pa\mbox{]} or \mbox{[}R L2 T-\/2 $\sim$$>$ Pa\mbox{]}\\
\hline
\mbox{\tt in,out}  & {\em drho\+\_\+dt} & The partial derivative of density with potential temperature \mbox{[}kg m-\/3 deg\+C-\/1\mbox{]} or \mbox{[}R deg\+C-\/1 $\sim$$>$ kg m-\/3 deg\+C-\/1\mbox{]}\\
\hline
\mbox{\tt in,out}  & {\em drho\+\_\+ds} & The partial derivative of density with salinity, in \mbox{[}kg m-\/3 ppt-\/1\mbox{]} or \mbox{[}R deg\+C-\/1 $\sim$$>$ kg m-\/3 ppt-\/1\mbox{]}\\
\hline
\mbox{\tt in}  & {\em start} & Starting index within the array\\
\hline
\mbox{\tt in}  & {\em npts} & The number of values to calculate\\
\hline
 & {\em eos} & Equation of state structure\\
\hline
\mbox{\tt in}  & {\em scale} & A multiplicative factor by which to scale density in combination with scaling given by US \mbox{[}various\mbox{]} \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}
706   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: t\textcolor{comment}{        !< Potential temperature referenced to the surface [degC]}
707   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: s\textcolor{comment}{        !< Salinity [ppt]}
708   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: pressure\textcolor{comment}{ !< Pressure [Pa] or [R L2 T-2 ~> Pa]}
709   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: drho\_dt\textcolor{comment}{  !< The partial derivative of density with potential}
710 \textcolor{comment}{                                                !! temperature [kg m-3 degC-1] or [R degC-1 ~> kg m-3
       degC-1]}
711   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: drho\_ds\textcolor{comment}{  !< The partial derivative of density with salinity,}
712 \textcolor{comment}{                                                !! in [kg m-3 ppt-1] or [R degC-1 ~> kg m-3 ppt-1]}
713   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}    :: start\textcolor{comment}{    !< Starting index within the array}
714   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}    :: npts\textcolor{comment}{     !< The number of values to calculate}
715   \textcolor{keywordtype}{type}(eos\_type),     \textcolor{keywordtype}{pointer}       :: eos\textcolor{comment}{      !< Equation of state structure}
716   \textcolor{keywordtype}{real},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: scale\textcolor{comment}{ !< A multiplicative factor by which to scale density}
717 \textcolor{comment}{                                                !! in combination with scaling given by US [various]}
718 
719   \textcolor{comment}{! Local variables}
720   \textcolor{keywordtype}{integer} :: j
721 
722   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
723     \textcolor{stringliteral}{"calculate\_density\_derivs called with an unassociated EOS\_type EOS."})
724 
725   \textcolor{keywordflow}{select case} (eos%form\_of\_EOS)
726     \textcolor{keywordflow}{case} (eos\_linear)
727       \textcolor{keyword}{call }calculate\_density\_derivs\_linear(t, s, pressure, drho\_dt, drho\_ds, eos%Rho\_T0\_S0, &
728                                            eos%dRho\_dT, eos%dRho\_dS, start, npts)
729     \textcolor{keywordflow}{case} (eos\_unesco)
730       \textcolor{keyword}{call }calculate\_density\_derivs\_unesco(t, s, pressure, drho\_dt, drho\_ds, start, npts)
731     \textcolor{keywordflow}{case} (eos\_wright)
732       \textcolor{keyword}{call }calculate\_density\_derivs\_wright(t, s, pressure, drho\_dt, drho\_ds, start, npts)
733     \textcolor{keywordflow}{case} (eos\_teos10)
734       \textcolor{keyword}{call }calculate\_density\_derivs\_teos10(t, s, pressure, drho\_dt, drho\_ds, start, npts)
735     \textcolor{keywordflow}{case} (eos\_nemo)
736       \textcolor{keyword}{call }calculate\_density\_derivs\_nemo(t, s, pressure, drho\_dt, drho\_ds, start, npts)
737 \textcolor{keywordflow}{    case default}
738       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"calculate\_density\_derivs\_array: EOS%form\_of\_EOS is not valid."})
739 \textcolor{keywordflow}{  end select}
740 
741   \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
742     drho\_dt(j) = scale * drho\_dt(j)
743     drho\_ds(j) = scale * drho\_ds(j)
744 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ endif} ;\textcolor{keywordflow}{ endif}
745 
\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__eos_1_1calculate__density__derivs_a522aaffc96993533bb621593c754d1bc}\label{interfacemom__eos_1_1calculate__density__derivs_a522aaffc96993533bb621593c754d1bc}} 
\index{mom\+\_\+eos\+::calculate\+\_\+density\+\_\+derivs@{mom\+\_\+eos\+::calculate\+\_\+density\+\_\+derivs}!calculate\+\_\+density\+\_\+derivs\+\_\+scalar@{calculate\+\_\+density\+\_\+derivs\+\_\+scalar}}
\index{calculate\+\_\+density\+\_\+derivs\+\_\+scalar@{calculate\+\_\+density\+\_\+derivs\+\_\+scalar}!mom\+\_\+eos\+::calculate\+\_\+density\+\_\+derivs@{mom\+\_\+eos\+::calculate\+\_\+density\+\_\+derivs}}
\subsubsection{\texorpdfstring{calculate\+\_\+density\+\_\+derivs\+\_\+scalar()}{calculate\_density\_derivs\_scalar()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calculate\+\_\+density\+\_\+derivs\+::calculate\+\_\+density\+\_\+derivs\+\_\+scalar (\begin{DoxyParamCaption}\item[{real, intent(in)}]{T,  }\item[{real, intent(in)}]{S,  }\item[{real, intent(in)}]{pressure,  }\item[{real, intent(out)}]{drho\+\_\+dT,  }\item[{real, intent(out)}]{drho\+\_\+dS,  }\item[{type(\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}), pointer}]{E\+OS,  }\item[{real, intent(in), optional}]{scale }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calls the appropriate subroutines to calculate density derivatives by promoting a scalar to a one-\/element array. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em t} & Potential temperature referenced to the surface \mbox{[}degC\mbox{]}\\
\hline
\mbox{\tt in}  & {\em s} & Salinity \mbox{[}ppt\mbox{]}\\
\hline
\mbox{\tt in}  & {\em pressure} & Pressure \mbox{[}Pa\mbox{]} or \mbox{[}R L2 T-\/2 $\sim$$>$ Pa\mbox{]}\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+dt} & The partial derivative of density with potential temperature \mbox{[}kg m-\/3 deg\+C-\/1\mbox{]} or \mbox{[}R deg\+C-\/1 $\sim$$>$ kg m-\/3 deg\+C-\/1\mbox{]}\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+ds} & The partial derivative of density with salinity, in \mbox{[}kg m-\/3 ppt-\/1\mbox{]} or \mbox{[}R ppt-\/1 $\sim$$>$ kg m-\/3 ppt-\/1\mbox{]}\\
\hline
 & {\em eos} & Equation of state structure\\
\hline
\mbox{\tt in}  & {\em scale} & A multiplicative factor by which to scale density in combination with scaling given by US \mbox{[}various\mbox{]} \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}
800   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: t\textcolor{comment}{ !< Potential temperature referenced to the surface [degC]}
801   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: s\textcolor{comment}{ !< Salinity [ppt]}
802   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< Pressure [Pa] or [R L2 T-2 ~> Pa]}
803   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(out)} :: drho\_dt\textcolor{comment}{ !< The partial derivative of density with potential}
804 \textcolor{comment}{                                         !! temperature [kg m-3 degC-1] or [R degC-1 ~> kg m-3 degC-1]}
805   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(out)} :: drho\_ds\textcolor{comment}{ !< The partial derivative of density with salinity,}
806 \textcolor{comment}{                                         !! in [kg m-3 ppt-1] or [R ppt-1 ~> kg m-3 ppt-1]}
807   \textcolor{keywordtype}{type}(eos\_type), \textcolor{keywordtype}{pointer}     :: eos\textcolor{comment}{     !< Equation of state structure}
808   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: scale\textcolor{comment}{   !< A multiplicative factor by which to scale density}
809 \textcolor{comment}{                                         !! in combination with scaling given by US [various]}
810   \textcolor{comment}{! Local variables}
811   \textcolor{keywordtype}{real} :: rho\_scale \textcolor{comment}{! A factor to convert density from kg m-3 to the desired units [R m3 kg-1 ~> 1]}
812   \textcolor{keywordtype}{real} :: p\_scale   \textcolor{comment}{! A factor to convert pressure to units of Pa [Pa T2 R-1 L-2 ~> 1]}
813   \textcolor{keywordtype}{integer} :: j
814 
815   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
816     \textcolor{stringliteral}{"calculate\_density\_derivs called with an unassociated EOS\_type EOS."})
817 
818   p\_scale = eos%RL2\_T2\_to\_Pa
819 
820   \textcolor{keywordflow}{select case} (eos%form\_of\_EOS)
821     \textcolor{keywordflow}{case} (eos\_linear)
822       \textcolor{keyword}{call }calculate\_density\_derivs\_linear(t, s, p\_scale*pressure, drho\_dt, drho\_ds, &
823                                            eos%Rho\_T0\_S0, eos%dRho\_dT, eos%dRho\_dS)
824     \textcolor{keywordflow}{case} (eos\_wright)
825       \textcolor{keyword}{call }calculate\_density\_derivs\_wright(t, s, p\_scale*pressure, drho\_dt, drho\_ds)
826     \textcolor{keywordflow}{case} (eos\_teos10)
827       \textcolor{keyword}{call }calculate\_density\_derivs\_teos10(t, s, p\_scale*pressure, drho\_dt, drho\_ds)
828 \textcolor{keywordflow}{    case default}
829       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"calculate\_density\_derivs\_scalar: EOS%form\_of\_EOS is not valid."})
830 \textcolor{keywordflow}{  end select}
831 
832   rho\_scale = eos%kg\_m3\_to\_R
833   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scale)) rho\_scale = rho\_scale * scale
834   \textcolor{keywordflow}{if} (rho\_scale /= 1.0) \textcolor{keywordflow}{then}
835     drho\_dt = rho\_scale * drho\_dt
836     drho\_ds = rho\_scale * drho\_ds
837 \textcolor{keywordflow}{  endif}
838 
\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}
