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


Calculates the freezing point of sea water from T, S and P.  


\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
subroutine \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 \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}


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

Definition at line \hyperlink{MOM__EOS_8F90_source_l00098}{98} of file \hyperlink{MOM__EOS_8F90_source}{M\+O\+M\+\_\+\+E\+O\+S.\+F90}.



\subsection{Member Function/\+Subroutine Documentation}
\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}}
\subsubsection{\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(\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{\tt in}  & {\em s} & Salinity \mbox{[}ppt\mbox{]}\\
\hline
\mbox{\tt in}  & {\em pressure} & Pressure \mbox{[}Pa\mbox{]} or \mbox{[}other\mbox{]}\\
\hline
\mbox{\tt in,out}  & {\em t\+\_\+fr} & Freezing point potential temperature referenced to the surface \mbox{[}degC\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 pres\+\_\+scale} & A multiplicative factor to convert pressure into Pa. \\
\hline
\end{DoxyParams}


Definition at line \hyperlink{MOM__EOS_8F90_source_l00656}{656} of file \hyperlink{MOM__EOS_8F90_source}{M\+O\+M\+\_\+\+E\+O\+S.\+F90}.


\begin{DoxyCode}
00656   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: s\textcolor{comment}{        !< Salinity [ppt]}
00657   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: pressure\textcolor{comment}{ !< Pressure [Pa] or [other]}
00658   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: t\_fr\textcolor{comment}{     !< Freezing point potential temperature referenced}
00659 \textcolor{comment}{                                                !! to the surface [degC]}
00660   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}    :: start\textcolor{comment}{    !< Starting index within the array}
00661   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}    :: npts\textcolor{comment}{     !< The number of values to calculate}
00662   \textcolor{keywordtype}{type}(eos\_type),     \textcolor{keywordtype}{pointer}       :: eos\textcolor{comment}{      !< Equation of state structure}
00663   \textcolor{keywordtype}{real},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: pres\_scale\textcolor{comment}{ !< A multiplicative factor to convert pressure into Pa.}
00664 
00665   \textcolor{comment}{! Local variables}
00666   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(size(pressure))} :: pres  \textcolor{comment}{! Pressure converted to [Pa]}
00667   \textcolor{keywordtype}{real} :: p\_scale \textcolor{comment}{! A factor to convert pressure to units of Pa.}
00668   \textcolor{keywordtype}{integer} :: j
00669 
00670   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
00671     \textcolor{stringliteral}{"calculate\_TFreeze\_scalar called with an unassociated EOS\_type EOS."})
00672 
00673   p\_scale = 1.0 ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(pres\_scale)) p\_scale = pres\_scale
00674 
00675   \textcolor{keywordflow}{if} (p\_scale == 1.0) \textcolor{keywordflow}{then}
00676     \textcolor{keywordflow}{select case} (eos%form\_of\_TFreeze)
00677       \textcolor{keywordflow}{case} (tfreeze\_linear)
00678         \textcolor{keyword}{call }calculate\_tfreeze\_linear(s, pressure, t\_fr, start, npts, &
00679                                       eos%TFr\_S0\_P0, eos%dTFr\_dS, eos%dTFr\_dp)
00680       \textcolor{keywordflow}{case} (tfreeze\_millero)
00681         \textcolor{keyword}{call }calculate\_tfreeze\_millero(s, pressure, t\_fr, start, npts)
00682       \textcolor{keywordflow}{case} (tfreeze\_teos10)
00683         \textcolor{keyword}{call }calculate\_tfreeze\_teos10(s, pressure, t\_fr, start, npts)
00684 \textcolor{keywordflow}{      case default}
00685         \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"calculate\_TFreeze\_scalar: form\_of\_TFreeze is not valid."})
00686 \textcolor{keywordflow}{    end select}
00687   \textcolor{keywordflow}{else}
00688     \textcolor{keywordflow}{do} j=start,start+npts-1 ; pres(j) = p\_scale * pressure(j) ;\textcolor{keywordflow}{ enddo}
00689     \textcolor{keywordflow}{select case} (eos%form\_of\_TFreeze)
00690       \textcolor{keywordflow}{case} (tfreeze\_linear)
00691         \textcolor{keyword}{call }calculate\_tfreeze\_linear(s, pres, t\_fr, start, npts, &
00692                                       eos%TFr\_S0\_P0, eos%dTFr\_dS, eos%dTFr\_dp)
00693       \textcolor{keywordflow}{case} (tfreeze\_millero)
00694         \textcolor{keyword}{call }calculate\_tfreeze\_millero(s, pres, t\_fr, start, npts)
00695       \textcolor{keywordflow}{case} (tfreeze\_teos10)
00696         \textcolor{keyword}{call }calculate\_tfreeze\_teos10(s, pres, t\_fr, start, npts)
00697 \textcolor{keywordflow}{      case default}
00698         \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"calculate\_TFreeze\_scalar: form\_of\_TFreeze is not valid."})
00699 \textcolor{keywordflow}{    end select}
00700 \textcolor{keywordflow}{  endif}
00701 
\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}}
\subsubsection{\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(\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{\tt in}  & {\em s} & Salinity \mbox{[}ppt\mbox{]}\\
\hline
\mbox{\tt in}  & {\em pressure} & Pressure \mbox{[}Pa\mbox{]} or \mbox{[}other\mbox{]}\\
\hline
\mbox{\tt out}  & {\em t\+\_\+fr} & Freezing point potential temperature referenced to the surface \mbox{[}degC\mbox{]}\\
\hline
 & {\em eos} & Equation of state structure\\
\hline
\mbox{\tt in}  & {\em pres\+\_\+scale} & A multiplicative factor to convert pressure into Pa \\
\hline
\end{DoxyParams}


Definition at line \hyperlink{MOM__EOS_8F90_source_l00625}{625} of file \hyperlink{MOM__EOS_8F90_source}{M\+O\+M\+\_\+\+E\+O\+S.\+F90}.


\begin{DoxyCode}
00625   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: s\textcolor{comment}{ !< Salinity [ppt]}
00626   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< Pressure [Pa] or [other]}
00627   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(out)} :: t\_fr\textcolor{comment}{ !< Freezing point potential temperature referenced}
00628 \textcolor{comment}{                                      !! to the surface [degC]}
00629   \textcolor{keywordtype}{type}(eos\_type), \textcolor{keywordtype}{pointer}     :: eos\textcolor{comment}{ !< Equation of state structure}
00630   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: pres\_scale\textcolor{comment}{ !< A multiplicative factor to convert pressure into Pa}
00631 
00632   \textcolor{comment}{! Local variables}
00633   \textcolor{keywordtype}{real} :: p\_scale \textcolor{comment}{! A factor to convert pressure to units of Pa.}
00634 
00635   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
00636     \textcolor{stringliteral}{"calculate\_TFreeze\_scalar called with an unassociated EOS\_type EOS."})
00637 
00638   p\_scale = 1.0 ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(pres\_scale)) p\_scale = pres\_scale
00639 
00640   \textcolor{keywordflow}{select case} (eos%form\_of\_TFreeze)
00641     \textcolor{keywordflow}{case} (tfreeze\_linear)
00642       \textcolor{keyword}{call }calculate\_tfreeze\_linear(s, p\_scale*pressure, t\_fr, eos%TFr\_S0\_P0, &
00643                                     eos%dTFr\_dS, eos%dTFr\_dp)
00644     \textcolor{keywordflow}{case} (tfreeze\_millero)
00645       \textcolor{keyword}{call }calculate\_tfreeze\_millero(s, p\_scale*pressure, t\_fr)
00646     \textcolor{keywordflow}{case} (tfreeze\_teos10)
00647       \textcolor{keyword}{call }calculate\_tfreeze\_teos10(s, p\_scale*pressure, t\_fr)
00648 \textcolor{keywordflow}{    case default}
00649       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"calculate\_TFreeze\_scalar: form\_of\_TFreeze is not valid."})
00650 \textcolor{keywordflow}{  end select}
00651 
\end{DoxyCode}


The documentation for this interface was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
/home/cermak/src/\+M\+O\+M6/src/equation\+\_\+of\+\_\+state/\hyperlink{MOM__EOS_8F90}{M\+O\+M\+\_\+\+E\+O\+S.\+F90}\end{DoxyCompactItemize}
