\hypertarget{namespacemom__tfreeze}{}\section{mom\+\_\+tfreeze Module Reference}
\label{namespacemom__tfreeze}\index{mom\+\_\+tfreeze@{mom\+\_\+tfreeze}}


\subsection{Detailed Description}
Freezing point expressions. \subsection*{Data Types}
\begin{DoxyCompactItemize}
\item 
interface \mbox{\hyperlink{interfacemom__tfreeze_1_1calculate__tfreeze__linear}{calculate\+\_\+tfreeze\+\_\+linear}}
\begin{DoxyCompactList}\small\item\em Compute the freezing point potential temperature \mbox{[}degC\mbox{]} from salinity \mbox{[}ppt\mbox{]} and pressure \mbox{[}Pa\mbox{]} using a simple linear expression, with coefficients passed in as arguments. \end{DoxyCompactList}\item 
interface \mbox{\hyperlink{interfacemom__tfreeze_1_1calculate__tfreeze__millero}{calculate\+\_\+tfreeze\+\_\+millero}}
\begin{DoxyCompactList}\small\item\em Compute the freezing point potential temperature \mbox{[}degC\mbox{]} from salinity \mbox{[}P\+SU\mbox{]} and pressure \mbox{[}Pa\mbox{]} using the expression from Millero (1978) (and in appendix A of Gill 1982), but with the of the pressure dependence changed from 7.\+53e-\/8 to 7.\+75e-\/8 to make this an expression for potential temperature (not in situ temperature), using a value that is correct at the freezing point at 35 P\+SU and 5e6 Pa (500 dbar). \end{DoxyCompactList}\item 
interface \mbox{\hyperlink{interfacemom__tfreeze_1_1calculate__tfreeze__teos10}{calculate\+\_\+tfreeze\+\_\+teos10}}
\begin{DoxyCompactList}\small\item\em Compute the freezing point conservative temperature \mbox{[}degC\mbox{]} from absolute salinity \mbox{[}g/kg\mbox{]} and pressure \mbox{[}Pa\mbox{]} using the T\+E\+O\+S10 package. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{namespacemom__tfreeze_a2ddd15b4504c24cf5b260d47c8c494f4}{calculate\+\_\+tfreeze\+\_\+linear\+\_\+scalar}} (S, pres, T\+\_\+\+Fr, T\+Fr\+\_\+\+S0\+\_\+\+P0, d\+T\+Fr\+\_\+dS, d\+T\+Fr\+\_\+dp)
\begin{DoxyCompactList}\small\item\em This subroutine computes the freezing point potential temperature \mbox{[}degC\mbox{]} from salinity \mbox{[}ppt\mbox{]}, and pressure \mbox{[}Pa\mbox{]} using a simple linear expression, with coefficients passed in as arguments. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{namespacemom__tfreeze_af12519254654bedd8fd95bb1464895e2}{calculate\+\_\+tfreeze\+\_\+linear\+\_\+array}} (S, pres, T\+\_\+\+Fr, start, npts, T\+Fr\+\_\+\+S0\+\_\+\+P0, d\+T\+Fr\+\_\+dS, d\+T\+Fr\+\_\+dp)
\begin{DoxyCompactList}\small\item\em This subroutine computes an array of freezing point potential temperatures \mbox{[}degC\mbox{]} from salinity \mbox{[}ppt\mbox{]}, and pressure \mbox{[}Pa\mbox{]} using a simple linear expression, with coefficients passed in as arguments. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{namespacemom__tfreeze_a4fcadee3bbc5298ec6d41772d6936f36}{calculate\+\_\+tfreeze\+\_\+millero\+\_\+scalar}} (S, pres, T\+\_\+\+Fr)
\begin{DoxyCompactList}\small\item\em This subroutine computes the freezing point potential temperature \mbox{[}degC\mbox{]} from salinity \mbox{[}ppt\mbox{]}, and pressure \mbox{[}Pa\mbox{]} using the expression from Millero (1978) (and in appendix A of Gill 1982), but with the of the pressure dependence changed from 7.\+53e-\/8 to 7.\+75e-\/8 to make this an expression for potential temperature (not in situ temperature), using a value that is correct at the freezing point at 35 P\+SU and 5e6 Pa (500 dbar). \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{namespacemom__tfreeze_a61e16a96b67dcb325cd779b838f87208}{calculate\+\_\+tfreeze\+\_\+millero\+\_\+array}} (S, pres, T\+\_\+\+Fr, start, npts)
\begin{DoxyCompactList}\small\item\em This subroutine computes the freezing point potential temperature \mbox{[}degC\mbox{]} from salinity \mbox{[}ppt\mbox{]}, and pressure \mbox{[}Pa\mbox{]} using the expression from Millero (1978) (and in appendix A of Gill 1982), but with the of the pressure dependence changed from 7.\+53e-\/8 to 7.\+75e-\/8 to make this an expression for potential temperature (not in situ temperature), using a value that is correct at the freezing point at 35 P\+SU and 5e6 Pa (500 dbar). \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{namespacemom__tfreeze_a9664517581c88633f8f7f7202d9f6cb1}{calculate\+\_\+tfreeze\+\_\+teos10\+\_\+scalar}} (S, pres, T\+\_\+\+Fr)
\begin{DoxyCompactList}\small\item\em This subroutine computes the freezing point conservative temperature \mbox{[}degC\mbox{]} from absolute salinity \mbox{[}g/kg\mbox{]}, and pressure \mbox{[}Pa\mbox{]} using the T\+E\+O\+S10 package. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{namespacemom__tfreeze_ad5c8c3d7fb0b9459a38099be1f13a20e}{calculate\+\_\+tfreeze\+\_\+teos10\+\_\+array}} (S, pres, T\+\_\+\+Fr, start, npts)
\begin{DoxyCompactList}\small\item\em This subroutine computes the freezing point conservative temperature \mbox{[}degC\mbox{]} from absolute salinity \mbox{[}g/kg\mbox{]}, and pressure \mbox{[}Pa\mbox{]} using the T\+E\+O\+S10 package. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{namespacemom__tfreeze_af12519254654bedd8fd95bb1464895e2}\label{namespacemom__tfreeze_af12519254654bedd8fd95bb1464895e2}} 
\index{mom\+\_\+tfreeze@{mom\+\_\+tfreeze}!calculate\+\_\+tfreeze\+\_\+linear\+\_\+array@{calculate\+\_\+tfreeze\+\_\+linear\+\_\+array}}
\index{calculate\+\_\+tfreeze\+\_\+linear\+\_\+array@{calculate\+\_\+tfreeze\+\_\+linear\+\_\+array}!mom\+\_\+tfreeze@{mom\+\_\+tfreeze}}
\subsubsection{\texorpdfstring{calculate\+\_\+tfreeze\+\_\+linear\+\_\+array()}{calculate\_tfreeze\_linear\_array()}}
{\footnotesize\ttfamily subroutine mom\+\_\+tfreeze\+::calculate\+\_\+tfreeze\+\_\+linear\+\_\+array (\begin{DoxyParamCaption}\item[{real, dimension(\+:), intent(in)}]{S,  }\item[{real, dimension(\+:), intent(in)}]{pres,  }\item[{real, dimension(\+:), intent(out)}]{T\+\_\+\+Fr,  }\item[{integer, intent(in)}]{start,  }\item[{integer, intent(in)}]{npts,  }\item[{real, intent(in)}]{T\+Fr\+\_\+\+S0\+\_\+\+P0,  }\item[{real, intent(in)}]{d\+T\+Fr\+\_\+dS,  }\item[{real, intent(in)}]{d\+T\+Fr\+\_\+dp }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine computes an array of freezing point potential temperatures \mbox{[}degC\mbox{]} from salinity \mbox{[}ppt\mbox{]}, and pressure \mbox{[}Pa\mbox{]} using a simple linear expression, with coefficients passed in as arguments. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em s} & salinity \mbox{[}ppt\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em pres} & pressure \mbox{[}Pa\mbox{]}.\\
\hline
\mbox{\tt out}  & {\em t\+\_\+fr} & Freezing point potential temperature \mbox{[}degC\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 tfr\+\_\+s0\+\_\+p0} & The freezing point at S=0, p=0, \mbox{[}degC\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em dtfr\+\_\+ds} & The derivative of freezing point with salinity, \mbox{[}degC P\+S\+U-\/1\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em dtfr\+\_\+dp} & The derivative of freezing point with pressure, \mbox{[}degC Pa-\/1\mbox{]}. \\
\hline
\end{DoxyParams}


Definition at line 62 of file M\+O\+M\+\_\+\+T\+Freeze.\+F90.


\begin{DoxyCode}
62   \textcolor{keywordtype}{real},  \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{         !< salinity [ppt].}
63   \textcolor{keywordtype}{real},  \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: pres\textcolor{comment}{      !< pressure [Pa].}
64   \textcolor{keywordtype}{real},  \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(out)} :: T\_Fr\textcolor{comment}{      !< Freezing point potential temperature [degC].}
65   \textcolor{keywordtype}{integer},             \textcolor{keywordtype}{intent(in)}  :: start\textcolor{comment}{     !< the starting point in the arrays.}
66   \textcolor{keywordtype}{integer},             \textcolor{keywordtype}{intent(in)}  :: npts\textcolor{comment}{      !< the number of values to calculate.}
67   \textcolor{keywordtype}{real},                \textcolor{keywordtype}{intent(in)}  :: TFr\_S0\_P0\textcolor{comment}{ !< The freezing point at S=0, p=0, [degC].}
68   \textcolor{keywordtype}{real},                \textcolor{keywordtype}{intent(in)}  :: dTFr\_dS\textcolor{comment}{   !< The derivative of freezing point with salinity,}
69 \textcolor{comment}{                                                !! [degC PSU-1].}
70   \textcolor{keywordtype}{real},                \textcolor{keywordtype}{intent(in)}  :: dTFr\_dp\textcolor{comment}{   !< The derivative of freezing point with pressure,}
71 \textcolor{comment}{                                                !! [degC Pa-1].}
72   \textcolor{keywordtype}{integer} :: j
73 
74   \textcolor{keywordflow}{do} j=start,start+npts-1
75     t\_fr(j) = (tfr\_s0\_p0 + dtfr\_ds*s(j)) + dtfr\_dp*pres(j)
76 \textcolor{keywordflow}{  enddo}
77 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__tfreeze_a2ddd15b4504c24cf5b260d47c8c494f4}\label{namespacemom__tfreeze_a2ddd15b4504c24cf5b260d47c8c494f4}} 
\index{mom\+\_\+tfreeze@{mom\+\_\+tfreeze}!calculate\+\_\+tfreeze\+\_\+linear\+\_\+scalar@{calculate\+\_\+tfreeze\+\_\+linear\+\_\+scalar}}
\index{calculate\+\_\+tfreeze\+\_\+linear\+\_\+scalar@{calculate\+\_\+tfreeze\+\_\+linear\+\_\+scalar}!mom\+\_\+tfreeze@{mom\+\_\+tfreeze}}
\subsubsection{\texorpdfstring{calculate\+\_\+tfreeze\+\_\+linear\+\_\+scalar()}{calculate\_tfreeze\_linear\_scalar()}}
{\footnotesize\ttfamily subroutine mom\+\_\+tfreeze\+::calculate\+\_\+tfreeze\+\_\+linear\+\_\+scalar (\begin{DoxyParamCaption}\item[{real, intent(in)}]{S,  }\item[{real, intent(in)}]{pres,  }\item[{real, intent(out)}]{T\+\_\+\+Fr,  }\item[{real, intent(in)}]{T\+Fr\+\_\+\+S0\+\_\+\+P0,  }\item[{real, intent(in)}]{d\+T\+Fr\+\_\+dS,  }\item[{real, intent(in)}]{d\+T\+Fr\+\_\+dp }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine computes the freezing point potential temperature \mbox{[}degC\mbox{]} from salinity \mbox{[}ppt\mbox{]}, and pressure \mbox{[}Pa\mbox{]} using a simple linear expression, with coefficients passed in as arguments. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em s} & salinity \mbox{[}ppt\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em pres} & pressure \mbox{[}Pa\mbox{]}.\\
\hline
\mbox{\tt out}  & {\em t\+\_\+fr} & Freezing point potential temperature \mbox{[}degC\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em tfr\+\_\+s0\+\_\+p0} & The freezing point at S=0, p=0 \mbox{[}degC\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em dtfr\+\_\+ds} & The derivative of freezing point with salinity, \mbox{[}degC ppt-\/1\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em dtfr\+\_\+dp} & The derivative of freezing point with pressure, \mbox{[}degC Pa-\/1\mbox{]}. \\
\hline
\end{DoxyParams}


Definition at line 44 of file M\+O\+M\+\_\+\+T\+Freeze.\+F90.


\begin{DoxyCode}
44   \textcolor{keywordtype}{real},  \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{         !< salinity [ppt].}
45   \textcolor{keywordtype}{real},  \textcolor{keywordtype}{intent(in)}  :: pres\textcolor{comment}{      !< pressure [Pa].}
46   \textcolor{keywordtype}{real},  \textcolor{keywordtype}{intent(out)} :: T\_Fr\textcolor{comment}{      !< Freezing point potential temperature [degC].}
47   \textcolor{keywordtype}{real},  \textcolor{keywordtype}{intent(in)}  :: TFr\_S0\_P0\textcolor{comment}{ !< The freezing point at S=0, p=0 [degC].}
48   \textcolor{keywordtype}{real},  \textcolor{keywordtype}{intent(in)}  :: dTFr\_dS\textcolor{comment}{   !< The derivative of freezing point with salinity,}
49 \textcolor{comment}{                                  !! [degC ppt-1].}
50   \textcolor{keywordtype}{real},  \textcolor{keywordtype}{intent(in)}  :: dTFr\_dp\textcolor{comment}{   !< The derivative of freezing point with pressure,}
51 \textcolor{comment}{                                  !! [degC Pa-1].}
52 
53   t\_fr = (tfr\_s0\_p0 + dtfr\_ds*s) + dtfr\_dp*pres
54 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__tfreeze_a61e16a96b67dcb325cd779b838f87208}\label{namespacemom__tfreeze_a61e16a96b67dcb325cd779b838f87208}} 
\index{mom\+\_\+tfreeze@{mom\+\_\+tfreeze}!calculate\+\_\+tfreeze\+\_\+millero\+\_\+array@{calculate\+\_\+tfreeze\+\_\+millero\+\_\+array}}
\index{calculate\+\_\+tfreeze\+\_\+millero\+\_\+array@{calculate\+\_\+tfreeze\+\_\+millero\+\_\+array}!mom\+\_\+tfreeze@{mom\+\_\+tfreeze}}
\subsubsection{\texorpdfstring{calculate\+\_\+tfreeze\+\_\+millero\+\_\+array()}{calculate\_tfreeze\_millero\_array()}}
{\footnotesize\ttfamily subroutine mom\+\_\+tfreeze\+::calculate\+\_\+tfreeze\+\_\+millero\+\_\+array (\begin{DoxyParamCaption}\item[{real, dimension(\+:), intent(in)}]{S,  }\item[{real, dimension(\+:), intent(in)}]{pres,  }\item[{real, dimension(\+:), intent(out)}]{T\+\_\+\+Fr,  }\item[{integer, intent(in)}]{start,  }\item[{integer, intent(in)}]{npts }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine computes the freezing point potential temperature \mbox{[}degC\mbox{]} from salinity \mbox{[}ppt\mbox{]}, and pressure \mbox{[}Pa\mbox{]} using the expression from Millero (1978) (and in appendix A of Gill 1982), but with the of the pressure dependence changed from 7.\+53e-\/8 to 7.\+75e-\/8 to make this an expression for potential temperature (not in situ temperature), using a value that is correct at the freezing point at 35 P\+SU and 5e6 Pa (500 dbar). 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em s} & Salinity \mbox{[}P\+SU\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em pres} & Pressure \mbox{[}Pa\mbox{]}.\\
\hline
\mbox{\tt out}  & {\em t\+\_\+fr} & Freezing point potential temperature \mbox{[}degC\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
\end{DoxyParams}


Definition at line 106 of file M\+O\+M\+\_\+\+T\+Freeze.\+F90.


\begin{DoxyCode}
106   \textcolor{keywordtype}{real},  \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{     !< Salinity [PSU].}
107   \textcolor{keywordtype}{real},  \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: pres\textcolor{comment}{  !< Pressure [Pa].}
108   \textcolor{keywordtype}{real},  \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(out)} :: T\_Fr\textcolor{comment}{  !< Freezing point potential temperature [degC].}
109   \textcolor{keywordtype}{integer},             \textcolor{keywordtype}{intent(in)}  :: start\textcolor{comment}{ !< The starting point in the arrays.}
110   \textcolor{keywordtype}{integer},             \textcolor{keywordtype}{intent(in)}  :: npts\textcolor{comment}{  !< The number of values to calculate.}
111 
112   \textcolor{comment}{! Local variables}
113   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{parameter} :: cS1 = -0.0575, cs3\_2 = 1.710523e-3, cs2 = -2.154996e-4
114   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{parameter} :: dTFr\_dp = -7.75e-8
115   \textcolor{keywordtype}{integer} :: j
116 
117   \textcolor{keywordflow}{do} j=start,start+npts-1
118     t\_fr(j) = s(j)*(cs1 + (cs3\_2 * sqrt(max(s(j),0.0)) + cs2 * s(j))) + &
119               dtfr\_dp*pres(j)
120 \textcolor{keywordflow}{  enddo}
121 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__tfreeze_a4fcadee3bbc5298ec6d41772d6936f36}\label{namespacemom__tfreeze_a4fcadee3bbc5298ec6d41772d6936f36}} 
\index{mom\+\_\+tfreeze@{mom\+\_\+tfreeze}!calculate\+\_\+tfreeze\+\_\+millero\+\_\+scalar@{calculate\+\_\+tfreeze\+\_\+millero\+\_\+scalar}}
\index{calculate\+\_\+tfreeze\+\_\+millero\+\_\+scalar@{calculate\+\_\+tfreeze\+\_\+millero\+\_\+scalar}!mom\+\_\+tfreeze@{mom\+\_\+tfreeze}}
\subsubsection{\texorpdfstring{calculate\+\_\+tfreeze\+\_\+millero\+\_\+scalar()}{calculate\_tfreeze\_millero\_scalar()}}
{\footnotesize\ttfamily subroutine mom\+\_\+tfreeze\+::calculate\+\_\+tfreeze\+\_\+millero\+\_\+scalar (\begin{DoxyParamCaption}\item[{real, intent(in)}]{S,  }\item[{real, intent(in)}]{pres,  }\item[{real, intent(out)}]{T\+\_\+\+Fr }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine computes the freezing point potential temperature \mbox{[}degC\mbox{]} from salinity \mbox{[}ppt\mbox{]}, and pressure \mbox{[}Pa\mbox{]} using the expression from Millero (1978) (and in appendix A of Gill 1982), but with the of the pressure dependence changed from 7.\+53e-\/8 to 7.\+75e-\/8 to make this an expression for potential temperature (not in situ temperature), using a value that is correct at the freezing point at 35 P\+SU and 5e6 Pa (500 dbar). 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em s} & Salinity in P\+SU.\\
\hline
\mbox{\tt in}  & {\em pres} & Pressure \mbox{[}Pa\mbox{]}.\\
\hline
\mbox{\tt out}  & {\em t\+\_\+fr} & Freezing point potential temperature \mbox{[}degC\mbox{]}. \\
\hline
\end{DoxyParams}


Definition at line 87 of file M\+O\+M\+\_\+\+T\+Freeze.\+F90.


\begin{DoxyCode}
87   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{    !< Salinity in PSU.}
88   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)}  :: pres\textcolor{comment}{ !< Pressure [Pa].}
89   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(out)} :: T\_Fr\textcolor{comment}{ !< Freezing point potential temperature [degC].}
90 
91   \textcolor{comment}{! Local variables}
92   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{parameter} :: cS1 = -0.0575, cs3\_2 = 1.710523e-3, cs2 = -2.154996e-4
93   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{parameter} :: dTFr\_dp = -7.75e-8
94 
95   t\_fr = s*(cs1 + (cs3\_2 * sqrt(max(s,0.0)) + cs2 * s)) + dtfr\_dp*pres
96 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__tfreeze_ad5c8c3d7fb0b9459a38099be1f13a20e}\label{namespacemom__tfreeze_ad5c8c3d7fb0b9459a38099be1f13a20e}} 
\index{mom\+\_\+tfreeze@{mom\+\_\+tfreeze}!calculate\+\_\+tfreeze\+\_\+teos10\+\_\+array@{calculate\+\_\+tfreeze\+\_\+teos10\+\_\+array}}
\index{calculate\+\_\+tfreeze\+\_\+teos10\+\_\+array@{calculate\+\_\+tfreeze\+\_\+teos10\+\_\+array}!mom\+\_\+tfreeze@{mom\+\_\+tfreeze}}
\subsubsection{\texorpdfstring{calculate\+\_\+tfreeze\+\_\+teos10\+\_\+array()}{calculate\_tfreeze\_teos10\_array()}}
{\footnotesize\ttfamily subroutine mom\+\_\+tfreeze\+::calculate\+\_\+tfreeze\+\_\+teos10\+\_\+array (\begin{DoxyParamCaption}\item[{real, dimension(\+:), intent(in)}]{S,  }\item[{real, dimension(\+:), intent(in)}]{pres,  }\item[{real, dimension(\+:), intent(out)}]{T\+\_\+\+Fr,  }\item[{integer, intent(in)}]{start,  }\item[{integer, intent(in)}]{npts }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine computes the freezing point conservative temperature \mbox{[}degC\mbox{]} from absolute salinity \mbox{[}g/kg\mbox{]}, and pressure \mbox{[}Pa\mbox{]} using the T\+E\+O\+S10 package. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em s} & absolute salinity \mbox{[}g/kg\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em pres} & pressure \mbox{[}Pa\mbox{]}.\\
\hline
\mbox{\tt out}  & {\em t\+\_\+fr} & Freezing point conservative temperature \mbox{[}degC\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
\end{DoxyParams}


Definition at line 148 of file M\+O\+M\+\_\+\+T\+Freeze.\+F90.


\begin{DoxyCode}
148   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{     !< absolute salinity [g/kg].}
149   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: pres\textcolor{comment}{  !< pressure [Pa].}
150   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(out)} :: T\_Fr\textcolor{comment}{  !< Freezing point conservative temperature [degC].}
151   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: start\textcolor{comment}{ !< the starting point in the arrays.}
152   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: npts\textcolor{comment}{  !< the number of values to calculate.}
153 
154   \textcolor{comment}{! Local variables}
155   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{parameter} :: Pa2db  = 1.e-4  \textcolor{comment}{! The conversion factor from Pa to dbar.}
156   \textcolor{keywordtype}{real} :: zs,zp
157   \textcolor{keywordtype}{integer} :: j
158   \textcolor{comment}{! Assume sea-water contains no dissolved air.}
159   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{parameter} :: saturation\_fraction = 0.0
160 
161   \textcolor{keywordflow}{do} j=start,start+npts-1
162     \textcolor{comment}{!Conversions}
163     zs = s(j)
164     zp = pres(j)* pa2db         \textcolor{comment}{!Convert pressure from Pascal to decibar}
165 
166     \textcolor{keywordflow}{if} (s(j) < -1.0e-10) cycle \textcolor{comment}{!Can we assume safely that this is a missing value?}
167     t\_fr(j) = gsw\_ct\_freezing\_exact(zs,zp,saturation\_fraction)
168 \textcolor{keywordflow}{ enddo}
169 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__tfreeze_a9664517581c88633f8f7f7202d9f6cb1}\label{namespacemom__tfreeze_a9664517581c88633f8f7f7202d9f6cb1}} 
\index{mom\+\_\+tfreeze@{mom\+\_\+tfreeze}!calculate\+\_\+tfreeze\+\_\+teos10\+\_\+scalar@{calculate\+\_\+tfreeze\+\_\+teos10\+\_\+scalar}}
\index{calculate\+\_\+tfreeze\+\_\+teos10\+\_\+scalar@{calculate\+\_\+tfreeze\+\_\+teos10\+\_\+scalar}!mom\+\_\+tfreeze@{mom\+\_\+tfreeze}}
\subsubsection{\texorpdfstring{calculate\+\_\+tfreeze\+\_\+teos10\+\_\+scalar()}{calculate\_tfreeze\_teos10\_scalar()}}
{\footnotesize\ttfamily subroutine mom\+\_\+tfreeze\+::calculate\+\_\+tfreeze\+\_\+teos10\+\_\+scalar (\begin{DoxyParamCaption}\item[{real, intent(in)}]{S,  }\item[{real, intent(in)}]{pres,  }\item[{real, intent(out)}]{T\+\_\+\+Fr }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine computes the freezing point conservative temperature \mbox{[}degC\mbox{]} from absolute salinity \mbox{[}g/kg\mbox{]}, and pressure \mbox{[}Pa\mbox{]} using the T\+E\+O\+S10 package. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em s} & Absolute salinity \mbox{[}g/kg\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em pres} & Pressure \mbox{[}Pa\mbox{]}.\\
\hline
\mbox{\tt out}  & {\em t\+\_\+fr} & Freezing point conservative temperature \mbox{[}degC\mbox{]}. \\
\hline
\end{DoxyParams}


Definition at line 128 of file M\+O\+M\+\_\+\+T\+Freeze.\+F90.


\begin{DoxyCode}
128   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{    !< Absolute salinity [g/kg].}
129   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(in)}  :: pres\textcolor{comment}{ !< Pressure [Pa].}
130   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{intent(out)} :: T\_Fr\textcolor{comment}{ !< Freezing point conservative temperature [degC].}
131 
132   \textcolor{comment}{! Local variables}
133   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(1)} :: S0, pres0
134   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(1)} :: tfr0
135 
136   s0(1) = s
137   pres0(1) = pres
138 
139   \textcolor{keyword}{call }calculate\_tfreeze\_teos10\_array(s0, pres0, tfr0, 1, 1)
140   t\_fr = tfr0(1)
141 
\end{DoxyCode}
