\hypertarget{interfacemom__eos_1_1calculate__tfreeze}{}\doxysection{mom\+\_\+eos\+::calculate\+\_\+tfreeze Interface Reference}
\label{interfacemom__eos_1_1calculate__tfreeze}\index{mom\_eos::calculate\_tfreeze@{mom\_eos::calculate\_tfreeze}}


\doxysubsection{Detailed Description}
Calculates the freezing point of sea water from T, S and P. 

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

\doxysubsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{interfacemom__eos_1_1calculate__tfreeze_a22160f1c3ed306f7cf2d1fd097f5041b}{calculate\+\_\+tfreeze\+\_\+scalar}} (S, pressure, T\+\_\+fr, E\+OS, pres\+\_\+scale)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate the freezing point for scalar inputs. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__eos_1_1calculate__tfreeze_afed01373d8771af8e079d7dca9d8c4ba}{calculate\+\_\+tfreeze\+\_\+array}} (S, pressure, T\+\_\+fr, start, npts, E\+OS, pres\+\_\+scale)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate the freezing point for a 1-\/D array. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Calculates the freezing point of sea water from T, S and P. 

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



\doxysubsection{Functions and subroutines}
\mbox{\Hypertarget{interfacemom__eos_1_1calculate__tfreeze_afed01373d8771af8e079d7dca9d8c4ba}\label{interfacemom__eos_1_1calculate__tfreeze_afed01373d8771af8e079d7dca9d8c4ba}} 
\index{mom\_eos::calculate\_tfreeze@{mom\_eos::calculate\_tfreeze}!calculate\_tfreeze\_array@{calculate\_tfreeze\_array}}
\index{calculate\_tfreeze\_array@{calculate\_tfreeze\_array}!mom\_eos::calculate\_tfreeze@{mom\_eos::calculate\_tfreeze}}
\doxysubsubsection{\texorpdfstring{calculate\_tfreeze\_array()}{calculate\_tfreeze\_array()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calculate\+\_\+tfreeze\+::calculate\+\_\+tfreeze\+\_\+array (\begin{DoxyParamCaption}\item[{real, dimension(\+:), intent(in)}]{S,  }\item[{real, dimension(\+:), intent(in)}]{pressure,  }\item[{real, dimension(\+:), intent(inout)}]{T\+\_\+fr,  }\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}]{pres\+\_\+scale }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calls the appropriate subroutine to calculate the freezing point for a 1-\/D array. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em s} & Salinity \mbox{[}ppt\mbox{]} \\
\hline
\mbox{\texttt{ in}}  & {\em pressure} & Pressure \mbox{[}Pa\mbox{]} or \mbox{[}other\mbox{]} \\
\hline
\mbox{\texttt{ in,out}}  & {\em t\+\_\+fr} & Freezing point potential temperature referenced to the surface \mbox{[}degC\mbox{]} \\
\hline
\mbox{\texttt{ in}}  & {\em start} & Starting index within the array \\
\hline
\mbox{\texttt{ in}}  & {\em npts} & The number of values to calculate \\
\hline
 & {\em eos} & Equation of state structure \\
\hline
\mbox{\texttt{ in}}  & {\em pres\+\_\+scale} & A multiplicative factor to convert pressure into Pa. \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}{0}
\DoxyCodeLine{656 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: S\textcolor{comment}{        !< Salinity [ppt]}}
\DoxyCodeLine{657 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: pressure\textcolor{comment}{ !< Pressure [Pa] or [other]}}
\DoxyCodeLine{658 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: T\_fr\textcolor{comment}{     !< Freezing point potential temperature referenced}}
\DoxyCodeLine{659 \textcolor{comment}{                                                !! to the surface [degC]}}
\DoxyCodeLine{660   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}    :: start\textcolor{comment}{    !< Starting index within the array}}
\DoxyCodeLine{661   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}    :: npts\textcolor{comment}{     !< The number of values to calculate}}
\DoxyCodeLine{662   \textcolor{keywordtype}{type}(EOS\_type),     \textcolor{keywordtype}{pointer}       :: EOS\textcolor{comment}{      !< Equation of state structure}}
\DoxyCodeLine{663 \textcolor{keywordtype}{  real},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: pres\_scale\textcolor{comment}{ !< A multiplicative factor to convert pressure into Pa.}}
\DoxyCodeLine{664 }
\DoxyCodeLine{665   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{666 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(size(pressure))} :: pres  \textcolor{comment}{! Pressure converted to [Pa]}}
\DoxyCodeLine{667 \textcolor{keywordtype}{  real} :: p\_scale \textcolor{comment}{! A factor to convert pressure to units of Pa.}}
\DoxyCodeLine{668   \textcolor{keywordtype}{integer} :: j}
\DoxyCodeLine{669 }
\DoxyCodeLine{670   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, \&}
\DoxyCodeLine{671     \textcolor{stringliteral}{"calculate\_TFreeze\_scalar called with an unassociated EOS\_type EOS."})}
\DoxyCodeLine{672 }
\DoxyCodeLine{673   p\_scale = 1.0 ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(pres\_scale)) p\_scale = pres\_scale}
\DoxyCodeLine{674 }
\DoxyCodeLine{675   \textcolor{keywordflow}{if} (p\_scale == 1.0) \textcolor{keywordflow}{then}}
\DoxyCodeLine{676     \textcolor{keywordflow}{select case} (eos\%form\_of\_TFreeze)}
\DoxyCodeLine{677       \textcolor{keywordflow}{case} (tfreeze\_linear)}
\DoxyCodeLine{678         \textcolor{keyword}{call }calculate\_tfreeze\_linear(s, pressure, t\_fr, start, npts, \&}
\DoxyCodeLine{679                                       eos\%TFr\_S0\_P0, eos\%dTFr\_dS, eos\%dTFr\_dp)}
\DoxyCodeLine{680       \textcolor{keywordflow}{case} (tfreeze\_millero)}
\DoxyCodeLine{681         \textcolor{keyword}{call }calculate\_tfreeze\_millero(s, pressure, t\_fr, start, npts)}
\DoxyCodeLine{682       \textcolor{keywordflow}{case} (tfreeze\_teos10)}
\DoxyCodeLine{683         \textcolor{keyword}{call }calculate\_tfreeze\_teos10(s, pressure, t\_fr, start, npts)}
\DoxyCodeLine{684 \textcolor{keywordflow}{      case default}}
\DoxyCodeLine{685         \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"calculate\_TFreeze\_scalar: form\_of\_TFreeze is not valid."})}
\DoxyCodeLine{686 \textcolor{keywordflow}{    end select}}
\DoxyCodeLine{687   \textcolor{keywordflow}{else}}
\DoxyCodeLine{688     \textcolor{keywordflow}{do} j=start,start+npts-\/1 ; pres(j) = p\_scale * pressure(j) ;\textcolor{keywordflow}{ enddo}}
\DoxyCodeLine{689     \textcolor{keywordflow}{select case} (eos\%form\_of\_TFreeze)}
\DoxyCodeLine{690       \textcolor{keywordflow}{case} (tfreeze\_linear)}
\DoxyCodeLine{691         \textcolor{keyword}{call }calculate\_tfreeze\_linear(s, pres, t\_fr, start, npts, \&}
\DoxyCodeLine{692                                       eos\%TFr\_S0\_P0, eos\%dTFr\_dS, eos\%dTFr\_dp)}
\DoxyCodeLine{693       \textcolor{keywordflow}{case} (tfreeze\_millero)}
\DoxyCodeLine{694         \textcolor{keyword}{call }calculate\_tfreeze\_millero(s, pres, t\_fr, start, npts)}
\DoxyCodeLine{695       \textcolor{keywordflow}{case} (tfreeze\_teos10)}
\DoxyCodeLine{696         \textcolor{keyword}{call }calculate\_tfreeze\_teos10(s, pres, t\_fr, start, npts)}
\DoxyCodeLine{697 \textcolor{keywordflow}{      case default}}
\DoxyCodeLine{698         \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"calculate\_TFreeze\_scalar: form\_of\_TFreeze is not valid."})}
\DoxyCodeLine{699 \textcolor{keywordflow}{    end select}}
\DoxyCodeLine{700 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{701 }

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__eos_1_1calculate__tfreeze_a22160f1c3ed306f7cf2d1fd097f5041b}\label{interfacemom__eos_1_1calculate__tfreeze_a22160f1c3ed306f7cf2d1fd097f5041b}} 
\index{mom\_eos::calculate\_tfreeze@{mom\_eos::calculate\_tfreeze}!calculate\_tfreeze\_scalar@{calculate\_tfreeze\_scalar}}
\index{calculate\_tfreeze\_scalar@{calculate\_tfreeze\_scalar}!mom\_eos::calculate\_tfreeze@{mom\_eos::calculate\_tfreeze}}
\doxysubsubsection{\texorpdfstring{calculate\_tfreeze\_scalar()}{calculate\_tfreeze\_scalar()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calculate\+\_\+tfreeze\+::calculate\+\_\+tfreeze\+\_\+scalar (\begin{DoxyParamCaption}\item[{real, intent(in)}]{S,  }\item[{real, intent(in)}]{pressure,  }\item[{real, intent(out)}]{T\+\_\+fr,  }\item[{type(\mbox{\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}}), pointer}]{E\+OS,  }\item[{real, intent(in), optional}]{pres\+\_\+scale }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calls the appropriate subroutine to calculate the freezing point for scalar inputs. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em s} & Salinity \mbox{[}ppt\mbox{]} \\
\hline
\mbox{\texttt{ in}}  & {\em pressure} & Pressure \mbox{[}Pa\mbox{]} or \mbox{[}other\mbox{]} \\
\hline
\mbox{\texttt{ out}}  & {\em t\+\_\+fr} & Freezing point potential temperature referenced to the surface \mbox{[}degC\mbox{]} \\
\hline
 & {\em eos} & Equation of state structure \\
\hline
\mbox{\texttt{ in}}  & {\em pres\+\_\+scale} & A multiplicative factor to convert pressure into Pa \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}{0}
\DoxyCodeLine{625 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{ !< Salinity [ppt]}}
\DoxyCodeLine{626 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< Pressure [Pa] or [other]}}
\DoxyCodeLine{627 \textcolor{keywordtype}{  real},           \textcolor{keywordtype}{intent(out)} :: T\_fr\textcolor{comment}{ !< Freezing point potential temperature referenced}}
\DoxyCodeLine{628 \textcolor{comment}{                                      !! to the surface [degC]}}
\DoxyCodeLine{629   \textcolor{keywordtype}{type}(EOS\_type), \textcolor{keywordtype}{pointer}     :: EOS\textcolor{comment}{ !< Equation of state structure}}
\DoxyCodeLine{630 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: pres\_scale\textcolor{comment}{ !< A multiplicative factor to convert pressure into Pa}}
\DoxyCodeLine{631 }
\DoxyCodeLine{632   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{633 \textcolor{keywordtype}{  real} :: p\_scale \textcolor{comment}{! A factor to convert pressure to units of Pa.}}
\DoxyCodeLine{634 }
\DoxyCodeLine{635   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, \&}
\DoxyCodeLine{636     \textcolor{stringliteral}{"calculate\_TFreeze\_scalar called with an unassociated EOS\_type EOS."})}
\DoxyCodeLine{637 }
\DoxyCodeLine{638   p\_scale = 1.0 ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(pres\_scale)) p\_scale = pres\_scale}
\DoxyCodeLine{639 }
\DoxyCodeLine{640   \textcolor{keywordflow}{select case} (eos\%form\_of\_TFreeze)}
\DoxyCodeLine{641     \textcolor{keywordflow}{case} (tfreeze\_linear)}
\DoxyCodeLine{642       \textcolor{keyword}{call }calculate\_tfreeze\_linear(s, p\_scale*pressure, t\_fr, eos\%TFr\_S0\_P0, \&}
\DoxyCodeLine{643                                     eos\%dTFr\_dS, eos\%dTFr\_dp)}
\DoxyCodeLine{644     \textcolor{keywordflow}{case} (tfreeze\_millero)}
\DoxyCodeLine{645       \textcolor{keyword}{call }calculate\_tfreeze\_millero(s, p\_scale*pressure, t\_fr)}
\DoxyCodeLine{646     \textcolor{keywordflow}{case} (tfreeze\_teos10)}
\DoxyCodeLine{647       \textcolor{keyword}{call }calculate\_tfreeze\_teos10(s, p\_scale*pressure, t\_fr)}
\DoxyCodeLine{648 \textcolor{keywordflow}{    case default}}
\DoxyCodeLine{649       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"calculate\_TFreeze\_scalar: form\_of\_TFreeze is not valid."})}
\DoxyCodeLine{650 \textcolor{keywordflow}{  end select}}
\DoxyCodeLine{651 }

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