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


\doxysubsection{Detailed Description}
Freezing point expressions. \doxysubsection*{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}
\doxysubsection*{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}


\doxysubsection{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}}
\doxysubsubsection{\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{\texttt{ in}}  & {\em s} & salinity \mbox{[}ppt\mbox{]}. \\
\hline
\mbox{\texttt{ in}}  & {\em pres} & pressure \mbox{[}Pa\mbox{]}. \\
\hline
\mbox{\texttt{ out}}  & {\em t\+\_\+fr} & Freezing point potential temperature \mbox{[}degC\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
\mbox{\texttt{ in}}  & {\em tfr\+\_\+s0\+\_\+p0} & The freezing point at S=0, p=0, \mbox{[}degC\mbox{]}. \\
\hline
\mbox{\texttt{ in}}  & {\em dtfr\+\_\+ds} & The derivative of freezing point with salinity, \mbox{[}degC P\+S\+U-\/1\mbox{]}. \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{62 \textcolor{keywordtype}{  real},  \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{         !< salinity [ppt].}}
\DoxyCodeLine{63 \textcolor{keywordtype}{  real},  \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: pres\textcolor{comment}{      !< pressure [Pa].}}
\DoxyCodeLine{64 \textcolor{keywordtype}{  real},  \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(out)} :: T\_Fr\textcolor{comment}{      !< Freezing point potential temperature [degC].}}
\DoxyCodeLine{65   \textcolor{keywordtype}{integer},             \textcolor{keywordtype}{intent(in)}  :: start\textcolor{comment}{     !< the starting point in the arrays.}}
\DoxyCodeLine{66   \textcolor{keywordtype}{integer},             \textcolor{keywordtype}{intent(in)}  :: npts\textcolor{comment}{      !< the number of values to calculate.}}
\DoxyCodeLine{67 \textcolor{keywordtype}{  real},                \textcolor{keywordtype}{intent(in)}  :: TFr\_S0\_P0\textcolor{comment}{ !< The freezing point at S=0, p=0, [degC].}}
\DoxyCodeLine{68 \textcolor{keywordtype}{  real},                \textcolor{keywordtype}{intent(in)}  :: dTFr\_dS\textcolor{comment}{   !< The derivative of freezing point with salinity,}}
\DoxyCodeLine{69 \textcolor{comment}{                                                !! [degC PSU-\/1].}}
\DoxyCodeLine{70 \textcolor{keywordtype}{  real},                \textcolor{keywordtype}{intent(in)}  :: dTFr\_dp\textcolor{comment}{   !< The derivative of freezing point with pressure,}}
\DoxyCodeLine{71 \textcolor{comment}{                                                !! [degC Pa-\/1].}}
\DoxyCodeLine{72   \textcolor{keywordtype}{integer} :: j}
\DoxyCodeLine{73 }
\DoxyCodeLine{74   \textcolor{keywordflow}{do} j=start,start+npts-\/1}
\DoxyCodeLine{75     t\_fr(j) = (tfr\_s0\_p0 + dtfr\_ds*s(j)) + dtfr\_dp*pres(j)}
\DoxyCodeLine{76 \textcolor{keywordflow}{  enddo}}
\DoxyCodeLine{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}}
\doxysubsubsection{\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{\texttt{ in}}  & {\em s} & salinity \mbox{[}ppt\mbox{]}. \\
\hline
\mbox{\texttt{ in}}  & {\em pres} & pressure \mbox{[}Pa\mbox{]}. \\
\hline
\mbox{\texttt{ out}}  & {\em t\+\_\+fr} & Freezing point potential temperature \mbox{[}degC\mbox{]}. \\
\hline
\mbox{\texttt{ in}}  & {\em tfr\+\_\+s0\+\_\+p0} & The freezing point at S=0, p=0 \mbox{[}degC\mbox{]}. \\
\hline
\mbox{\texttt{ in}}  & {\em dtfr\+\_\+ds} & The derivative of freezing point with salinity, \mbox{[}degC ppt-\/1\mbox{]}. \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{44 \textcolor{keywordtype}{  real},  \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{         !< salinity [ppt].}}
\DoxyCodeLine{45 \textcolor{keywordtype}{  real},  \textcolor{keywordtype}{intent(in)}  :: pres\textcolor{comment}{      !< pressure [Pa].}}
\DoxyCodeLine{46 \textcolor{keywordtype}{  real},  \textcolor{keywordtype}{intent(out)} :: T\_Fr\textcolor{comment}{      !< Freezing point potential temperature [degC].}}
\DoxyCodeLine{47 \textcolor{keywordtype}{  real},  \textcolor{keywordtype}{intent(in)}  :: TFr\_S0\_P0\textcolor{comment}{ !< The freezing point at S=0, p=0 [degC].}}
\DoxyCodeLine{48 \textcolor{keywordtype}{  real},  \textcolor{keywordtype}{intent(in)}  :: dTFr\_dS\textcolor{comment}{   !< The derivative of freezing point with salinity,}}
\DoxyCodeLine{49 \textcolor{comment}{                                  !! [degC ppt-\/1].}}
\DoxyCodeLine{50 \textcolor{keywordtype}{  real},  \textcolor{keywordtype}{intent(in)}  :: dTFr\_dp\textcolor{comment}{   !< The derivative of freezing point with pressure,}}
\DoxyCodeLine{51 \textcolor{comment}{                                  !! [degC Pa-\/1].}}
\DoxyCodeLine{52 }
\DoxyCodeLine{53   t\_fr = (tfr\_s0\_p0 + dtfr\_ds*s) + dtfr\_dp*pres}
\DoxyCodeLine{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}}
\doxysubsubsection{\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{\texttt{ in}}  & {\em s} & Salinity \mbox{[}P\+SU\mbox{]}. \\
\hline
\mbox{\texttt{ in}}  & {\em pres} & Pressure \mbox{[}Pa\mbox{]}. \\
\hline
\mbox{\texttt{ out}}  & {\em t\+\_\+fr} & Freezing point potential temperature \mbox{[}degC\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
\end{DoxyParams}


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


\begin{DoxyCode}{0}
\DoxyCodeLine{106 \textcolor{keywordtype}{  real},  \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{     !< Salinity [PSU].}}
\DoxyCodeLine{107 \textcolor{keywordtype}{  real},  \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: pres\textcolor{comment}{  !< Pressure [Pa].}}
\DoxyCodeLine{108 \textcolor{keywordtype}{  real},  \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(out)} :: T\_Fr\textcolor{comment}{  !< Freezing point potential temperature [degC].}}
\DoxyCodeLine{109   \textcolor{keywordtype}{integer},             \textcolor{keywordtype}{intent(in)}  :: start\textcolor{comment}{ !< The starting point in the arrays.}}
\DoxyCodeLine{110   \textcolor{keywordtype}{integer},             \textcolor{keywordtype}{intent(in)}  :: npts\textcolor{comment}{  !< The number of values to calculate.}}
\DoxyCodeLine{111 }
\DoxyCodeLine{112   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{113 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{parameter} :: cS1 = -\/0.0575, cs3\_2 = 1.710523e-\/3, cs2 = -\/2.154996e-\/4}
\DoxyCodeLine{114 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{parameter} :: dTFr\_dp = -\/7.75e-\/8}
\DoxyCodeLine{115   \textcolor{keywordtype}{integer} :: j}
\DoxyCodeLine{116 }
\DoxyCodeLine{117   \textcolor{keywordflow}{do} j=start,start+npts-\/1}
\DoxyCodeLine{118     t\_fr(j) = s(j)*(cs1 + (cs3\_2 * sqrt(max(s(j),0.0)) + cs2 * s(j))) + \&}
\DoxyCodeLine{119               dtfr\_dp*pres(j)}
\DoxyCodeLine{120 \textcolor{keywordflow}{  enddo}}
\DoxyCodeLine{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}}
\doxysubsubsection{\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{\texttt{ in}}  & {\em s} & Salinity in P\+SU. \\
\hline
\mbox{\texttt{ in}}  & {\em pres} & Pressure \mbox{[}Pa\mbox{]}. \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{87 \textcolor{keywordtype}{  real},    \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{    !< Salinity in PSU.}}
\DoxyCodeLine{88 \textcolor{keywordtype}{  real},    \textcolor{keywordtype}{intent(in)}  :: pres\textcolor{comment}{ !< Pressure [Pa].}}
\DoxyCodeLine{89 \textcolor{keywordtype}{  real},    \textcolor{keywordtype}{intent(out)} :: T\_Fr\textcolor{comment}{ !< Freezing point potential temperature [degC].}}
\DoxyCodeLine{90 }
\DoxyCodeLine{91   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{92 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{parameter} :: cS1 = -\/0.0575, cs3\_2 = 1.710523e-\/3, cs2 = -\/2.154996e-\/4}
\DoxyCodeLine{93 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{parameter} :: dTFr\_dp = -\/7.75e-\/8}
\DoxyCodeLine{94 }
\DoxyCodeLine{95   t\_fr = s*(cs1 + (cs3\_2 * sqrt(max(s,0.0)) + cs2 * s)) + dtfr\_dp*pres}
\DoxyCodeLine{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}}
\doxysubsubsection{\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{\texttt{ in}}  & {\em s} & absolute salinity \mbox{[}g/kg\mbox{]}. \\
\hline
\mbox{\texttt{ in}}  & {\em pres} & pressure \mbox{[}Pa\mbox{]}. \\
\hline
\mbox{\texttt{ out}}  & {\em t\+\_\+fr} & Freezing point conservative temperature \mbox{[}degC\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
\end{DoxyParams}


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


\begin{DoxyCode}{0}
\DoxyCodeLine{148 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{     !< absolute salinity [g/kg].}}
\DoxyCodeLine{149 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: pres\textcolor{comment}{  !< pressure [Pa].}}
\DoxyCodeLine{150 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(out)} :: T\_Fr\textcolor{comment}{  !< Freezing point conservative temperature [degC].}}
\DoxyCodeLine{151   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: start\textcolor{comment}{ !< the starting point in the arrays.}}
\DoxyCodeLine{152   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: npts\textcolor{comment}{  !< the number of values to calculate.}}
\DoxyCodeLine{153 }
\DoxyCodeLine{154   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{155 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{parameter} :: Pa2db  = 1.e-\/4  \textcolor{comment}{! The conversion factor from Pa to dbar.}}
\DoxyCodeLine{156 \textcolor{keywordtype}{  real} :: zs,zp}
\DoxyCodeLine{157   \textcolor{keywordtype}{integer} :: j}
\DoxyCodeLine{158   \textcolor{comment}{! Assume sea-\/water contains no dissolved air.}}
\DoxyCodeLine{159 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{parameter} :: saturation\_fraction = 0.0}
\DoxyCodeLine{160 }
\DoxyCodeLine{161   \textcolor{keywordflow}{do} j=start,start+npts-\/1}
\DoxyCodeLine{162     \textcolor{comment}{!Conversions}}
\DoxyCodeLine{163     zs = s(j)}
\DoxyCodeLine{164     zp = pres(j)* pa2db         \textcolor{comment}{!Convert pressure from Pascal to decibar}}
\DoxyCodeLine{165 }
\DoxyCodeLine{166     \textcolor{keywordflow}{if} (s(j) < -\/1.0e-\/10) cycle \textcolor{comment}{!Can we assume safely that this is a missing value?}}
\DoxyCodeLine{167     t\_fr(j) = gsw\_ct\_freezing\_exact(zs,zp,saturation\_fraction)}
\DoxyCodeLine{168 \textcolor{keywordflow}{ enddo}}
\DoxyCodeLine{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}}
\doxysubsubsection{\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{\texttt{ in}}  & {\em s} & Absolute salinity \mbox{[}g/kg\mbox{]}. \\
\hline
\mbox{\texttt{ in}}  & {\em pres} & Pressure \mbox{[}Pa\mbox{]}. \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{128 \textcolor{keywordtype}{  real},    \textcolor{keywordtype}{intent(in)}  :: S\textcolor{comment}{    !< Absolute salinity [g/kg].}}
\DoxyCodeLine{129 \textcolor{keywordtype}{  real},    \textcolor{keywordtype}{intent(in)}  :: pres\textcolor{comment}{ !< Pressure [Pa].}}
\DoxyCodeLine{130 \textcolor{keywordtype}{  real},    \textcolor{keywordtype}{intent(out)} :: T\_Fr\textcolor{comment}{ !< Freezing point conservative temperature [degC].}}
\DoxyCodeLine{131 }
\DoxyCodeLine{132   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{133 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(1)} :: S0, pres0}
\DoxyCodeLine{134 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(1)} :: tfr0}
\DoxyCodeLine{135 }
\DoxyCodeLine{136   s0(1) = s}
\DoxyCodeLine{137   pres0(1) = pres}
\DoxyCodeLine{138 }
\DoxyCodeLine{139   \textcolor{keyword}{call }calculate\_tfreeze\_teos10\_array(s0, pres0, tfr0, 1, 1)}
\DoxyCodeLine{140   t\_fr = tfr0(1)}
\DoxyCodeLine{141 }

\end{DoxyCode}
