\hypertarget{namespacemom__eos}{}\section{mom\+\_\+eos Module Reference}
\label{namespacemom__eos}\index{mom\+\_\+eos@{mom\+\_\+eos}}


Provides subroutines for quantities specific to the equation of state.  


\subsection*{Data Types}
\begin{DoxyCompactItemize}
\item 
interface \hyperlink{interfacemom__eos_1_1calculate__compress}{calculate\+\_\+compress}
\begin{DoxyCompactList}\small\item\em Calculates the compressibility of water from T, S, and P. \end{DoxyCompactList}\item 
interface \hyperlink{interfacemom__eos_1_1calculate__density}{calculate\+\_\+density}
\begin{DoxyCompactList}\small\item\em Calculates density of sea water from T, S and P. \end{DoxyCompactList}\item 
interface \hyperlink{interfacemom__eos_1_1calculate__density__derivs}{calculate\+\_\+density\+\_\+derivs}
\begin{DoxyCompactList}\small\item\em Calculate the derivatives of density with temperature and salinity from T, S, and P. \end{DoxyCompactList}\item 
interface \hyperlink{interfacemom__eos_1_1calculate__density__second__derivs}{calculate\+\_\+density\+\_\+second\+\_\+derivs}
\begin{DoxyCompactList}\small\item\em Calculates the second derivatives of density with various combinations of temperature, salinity, and pressure from T, S and P. \end{DoxyCompactList}\item 
interface \hyperlink{interfacemom__eos_1_1calculate__spec__vol}{calculate\+\_\+spec\+\_\+vol}
\begin{DoxyCompactList}\small\item\em Calculates specific volume of sea water from T, S and P. \end{DoxyCompactList}\item 
interface \hyperlink{interfacemom__eos_1_1calculate__specific__vol__derivs}{calculate\+\_\+specific\+\_\+vol\+\_\+derivs}
\begin{DoxyCompactList}\small\item\em Calculate the derivatives of specific volume with temperature and salinity from T, S, and P. \end{DoxyCompactList}\item 
interface \hyperlink{interfacemom__eos_1_1calculate__tfreeze}{calculate\+\_\+tfreeze}
\begin{DoxyCompactList}\small\item\em Calculates the freezing point of sea water from T, S and P. \end{DoxyCompactList}\item 
type \hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}
\begin{DoxyCompactList}\small\item\em A control structure for the equation of state. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{namespacemom__eos_ac3bdab784e3535d661c47d1ec8a624fd}{calculate\+\_\+density\+\_\+scalar} (T, S, pressure, rho, E\+OS, rho\+\_\+ref, scale)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate density of sea water for scalar inputs. If rho\+\_\+ref is present, the anomaly with respect to rho\+\_\+ref is returned. The pressure and density can be rescaled with the US. If both the US and scale arguments are present the density scaling uses the product of the two scaling factors. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom__eos_a66d40148737ef1a3b1ae44917c7fe0c3}{calculate\+\_\+stanley\+\_\+density\+\_\+scalar} (T, S, pressure, Tvar, T\+Scov, Svar, rho, E\+OS, rho\+\_\+ref, scale)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate density of sea water for scalar inputs including the variance of T, S and covariance of T-\/S. The calculation uses only the second order correction in a series as discussed in Stanley et al., 2020. If rho\+\_\+ref is present, the anomaly with respect to rho\+\_\+ref is returned. The density can be rescaled using rho\+\_\+ref. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom__eos_a3be8289c391088bdd3af78d272b92521}{calculate\+\_\+density\+\_\+array} (T, S, pressure, rho, start, npts, E\+OS, rho\+\_\+ref, scale)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate the density of sea water for 1-\/D array inputs. If rho\+\_\+ref is present, the anomaly with respect to rho\+\_\+ref is returned. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom__eos_a102df91898d116a6b4346f00dc818612}{calculate\+\_\+stanley\+\_\+density\+\_\+array} (T, S, pressure, Tvar, T\+Scov, Svar, rho, start, npts, E\+OS, rho\+\_\+ref, scale)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate the density of sea water for 1-\/D array inputs including the variance of T, S and covariance of T-\/S. The calculation uses only the second order correction in a series as discussed in Stanley et al., 2020. If rho\+\_\+ref is present, the anomaly with respect to rho\+\_\+ref is returned. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom__eos_a2e78ade3bcba817406479cbbe3941a5f}{calculate\+\_\+density\+\_\+1d} (T, S, pressure, rho, E\+OS, dom, rho\+\_\+ref, scale)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate the density of sea water for 1-\/D array inputs, potentially limiting the domain of indices that are worked on. If rho\+\_\+ref is present, the anomaly with respect to rho\+\_\+ref is returned. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom__eos_a58b52a452d779c53e6421aaa3eac6e8b}{calculate\+\_\+stanley\+\_\+density\+\_\+1d} (T, S, pressure, Tvar, T\+Scov, Svar, rho, E\+OS, dom, rho\+\_\+ref, scale)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate the density of sea water for 1-\/D array inputs including the variance of T, S and covariance of T-\/S, potentially limiting the domain of indices that are worked on. The calculation uses only the second order correction in a series as discussed in Stanley et al., 2020. If rho\+\_\+ref is present, the anomaly with respect to rho\+\_\+ref is returned. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom__eos_a43d417da1636adb2cd184f76223afded}{calculate\+\_\+spec\+\_\+vol\+\_\+array} (T, S, pressure, specvol, start, npts, E\+OS, spv\+\_\+ref, scale)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate the specific volume of sea water for 1-\/D array inputs. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom__eos_a246056e557a08ce1c697256cd718d99a}{calc\+\_\+spec\+\_\+vol\+\_\+scalar} (T, S, pressure, specvol, E\+OS, spv\+\_\+ref, scale)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate specific volume of sea water for scalar inputs. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom__eos_afbb6a11d3b826308ddb1ffe0c5cf32d1}{calc\+\_\+spec\+\_\+vol\+\_\+1d} (T, S, pressure, specvol, E\+OS, dom, spv\+\_\+ref, scale)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate the specific volume of sea water for 1-\/D array inputs, potentially limiting the domain of indices that are worked on. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom__eos_ad46af8402aba49dbdd73817d33e83270}{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{namespacemom__eos_ab9669ca4a2e4f3507be7efe047c18ab7}{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}\item 
subroutine \hyperlink{namespacemom__eos_a27ec57cbbd2e673d542ba2c8dd44053a}{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{namespacemom__eos_aed3bb20f32c038dbe84bc44442c6e724}{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}\item 
subroutine \hyperlink{namespacemom__eos_a06d9d6680e838b965666986e63c980e7}{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{namespacemom__eos_a8c0fa67a7a4911eb5fa33c5d17b997f9}{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+array} (T, S, pressure, drho\+\_\+d\+S\+\_\+dS, drho\+\_\+d\+S\+\_\+dT, drho\+\_\+d\+T\+\_\+dT, drho\+\_\+d\+S\+\_\+dP, drho\+\_\+d\+T\+\_\+dP, start, npts, E\+OS, scale)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate density second derivatives for 1-\/D array inputs. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom__eos_a2d7a984ed1c48d9e0ea1046de3eac886}{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+scalar} (T, S, pressure, drho\+\_\+d\+S\+\_\+dS, drho\+\_\+d\+S\+\_\+dT, drho\+\_\+d\+T\+\_\+dT, drho\+\_\+d\+S\+\_\+dP, drho\+\_\+d\+T\+\_\+dP, E\+OS, scale)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate density second derivatives for scalar nputs. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom__eos_a35f9c33d1aeffbf9986349463bab3b9c}{calculate\+\_\+spec\+\_\+vol\+\_\+derivs\+\_\+array} (T, S, pressure, d\+S\+V\+\_\+dT, d\+S\+V\+\_\+dS, start, npts, E\+OS)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate specific volume derivatives for an array. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom__eos_a640c3b2292afd3266caa11243549bbf0}{calc\+\_\+spec\+\_\+vol\+\_\+derivs\+\_\+1d} (T, S, pressure, d\+S\+V\+\_\+dT, d\+S\+V\+\_\+dS, E\+OS, dom, scale)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate specific volume derivatives for 1-\/d array inputs, potentially limiting the domain of indices that are worked on. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom__eos_a3296609bd60bfe7ed2c5eac1170d07a3}{calculate\+\_\+compress\+\_\+array} (T, S, press, rho, drho\+\_\+dp, start, npts, E\+OS)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate the density and compressibility for 1-\/D array inputs. If US is present, the units of the inputs and outputs are rescaled. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom__eos_ad0986d800c26414dbd19d2b3a541e613}{calculate\+\_\+compress\+\_\+scalar} (T, S, pressure, rho, drho\+\_\+dp, E\+OS)
\begin{DoxyCompactList}\small\item\em Calculate density and compressibility for a scalar. This just promotes the scalar to an array with a singleton dimension and calls calculate\+\_\+compress\+\_\+array. If US is present, the units of the inputs and outputs are rescaled. \end{DoxyCompactList}\item 
integer function, dimension(2), public \hyperlink{namespacemom__eos_a782d326108e390902e520efc078e8296}{eos\+\_\+domain} (HI, halo)
\begin{DoxyCompactList}\small\item\em This subroutine returns a two point integer array indicating the domain of i-\/indices to work on in E\+OS calls based on information from a hor\+\_\+index type. \end{DoxyCompactList}\item 
subroutine, public \hyperlink{namespacemom__eos_a09b6cb637246b8aa287ef7cdb482aaea}{analytic\+\_\+int\+\_\+specific\+\_\+vol\+\_\+dp} (T, S, p\+\_\+t, p\+\_\+b, alpha\+\_\+ref, HI, E\+OS, dza, intp\+\_\+dza, intx\+\_\+dza, inty\+\_\+dza, halo\+\_\+size, bathyP, d\+P\+\_\+tiny, use\+Mass\+Wght\+Interp)
\begin{DoxyCompactList}\small\item\em Calls the appropriate subroutine to calculate analytical and nearly-\/analytical integrals in pressure across layers of geopotential anomalies, which are required for calculating the finite-\/volume form pressure accelerations in a non-\/\+Boussinesq model. There are essentially no free assumptions, apart from the use of Boole\textquotesingle{}s rule to do the horizontal integrals, and from a truncation in the series for log(1-\/eps/1+eps) that assumes that $\vert$eps$\vert$ $<$ 0.\+34. \end{DoxyCompactList}\item 
subroutine, public \hyperlink{namespacemom__eos_a2787233a5f7a0935206ba2cf4c278aab}{analytic\+\_\+int\+\_\+density\+\_\+dz} (T, S, z\+\_\+t, z\+\_\+b, rho\+\_\+ref, rho\+\_\+0, G\+\_\+e, HI, E\+OS, dpa, intz\+\_\+dpa, intx\+\_\+dpa, inty\+\_\+dpa, bathyT, dz\+\_\+neglect, use\+Mass\+Wght\+Interp)
\begin{DoxyCompactList}\small\item\em This subroutine calculates analytical and nearly-\/analytical integrals of pressure anomalies across layers, which are required for calculating the finite-\/volume form pressure accelerations in a Boussinesq model. \end{DoxyCompactList}\item 
logical function, public \hyperlink{namespacemom__eos_aee169aee0e4cbed420782d772282bb69}{query\+\_\+compressible} (E\+OS)
\begin{DoxyCompactList}\small\item\em Returns true if the equation of state is compressible (i.\+e. has pressure dependence) \end{DoxyCompactList}\item 
subroutine, public \hyperlink{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}{eos\+\_\+init} (param\+\_\+file, E\+OS, US)
\begin{DoxyCompactList}\small\item\em Initializes E\+O\+S\+\_\+type by allocating and reading parameters. \end{DoxyCompactList}\item 
subroutine, public \hyperlink{namespacemom__eos_a949f5bb0744c827bf11cca01316ceed4}{eos\+\_\+manual\+\_\+init} (E\+OS, form\+\_\+of\+\_\+\+E\+OS, form\+\_\+of\+\_\+\+T\+Freeze, E\+O\+S\+\_\+quadrature, Compressible, Rho\+\_\+\+T0\+\_\+\+S0, drho\+\_\+dT, d\+Rho\+\_\+dS, T\+Fr\+\_\+\+S0\+\_\+\+P0, d\+T\+Fr\+\_\+dS, d\+T\+Fr\+\_\+dp)
\begin{DoxyCompactList}\small\item\em Manually initialized an E\+OS type (intended for unit testing of routines which need a specific E\+OS) \end{DoxyCompactList}\item 
subroutine, public \hyperlink{namespacemom__eos_a1108fb5de7a69d01746df3995f7e3f0d}{eos\+\_\+allocate} (E\+OS)
\begin{DoxyCompactList}\small\item\em Allocates E\+O\+S\+\_\+type. \end{DoxyCompactList}\item 
subroutine, public \hyperlink{namespacemom__eos_acab6a23bef0a98f15f0a479bdd1ec63c}{eos\+\_\+end} (E\+OS)
\begin{DoxyCompactList}\small\item\em Deallocates E\+O\+S\+\_\+type. \end{DoxyCompactList}\item 
subroutine, public \hyperlink{namespacemom__eos_ae608600501a98f8f317d8f27a054327e}{eos\+\_\+use\+\_\+linear} (Rho\+\_\+\+T0\+\_\+\+S0, d\+Rho\+\_\+dT, d\+Rho\+\_\+dS, E\+OS, use\+\_\+quadrature)
\begin{DoxyCompactList}\small\item\em Set equation of state structure (E\+OS) to linear with given coefficients. \end{DoxyCompactList}\item 
subroutine, public \hyperlink{namespacemom__eos_a5b1ff89023e9d7da4074c7c1a71c9a85}{convert\+\_\+temp\+\_\+salt\+\_\+for\+\_\+teos10} (T, S, HI, kd, mask\+\_\+z, E\+OS)
\begin{DoxyCompactList}\small\item\em Convert T\&S to Absolute Salinity and Conservative Temperature if using T\+E\+O\+S10. \end{DoxyCompactList}\item 
logical function, public \hyperlink{namespacemom__eos_aad531f2540628368c33198bb31d51201}{eos\+\_\+quadrature} (E\+OS)
\begin{DoxyCompactList}\small\item\em Return value of E\+O\+S\+\_\+quadrature. \end{DoxyCompactList}\item 
subroutine, public \hyperlink{namespacemom__eos_a5e15d4f5b758ab149421c33145b0444c}{extract\+\_\+member\+\_\+eos} (E\+OS, form\+\_\+of\+\_\+\+E\+OS, form\+\_\+of\+\_\+\+T\+Freeze, E\+O\+S\+\_\+quadrature, Compressible, Rho\+\_\+\+T0\+\_\+\+S0, drho\+\_\+dT, d\+Rho\+\_\+dS, T\+Fr\+\_\+\+S0\+\_\+\+P0, d\+T\+Fr\+\_\+dS, d\+T\+Fr\+\_\+dp)
\begin{DoxyCompactList}\small\item\em Extractor routine for the E\+OS type if the members need to be accessed outside this module. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
integer, parameter, public \hyperlink{namespacemom__eos_a230a2f280b1e27ee913e1b3cf4c412b8}{eos\+\_\+linear} = 1
\begin{DoxyCompactList}\small\item\em A named integer specifying an equation of state. \end{DoxyCompactList}\item 
integer, parameter, public \hyperlink{namespacemom__eos_a9eacc16ba79dc66131b54bf31114f35a}{eos\+\_\+unesco} = 2
\begin{DoxyCompactList}\small\item\em A named integer specifying an equation of state. \end{DoxyCompactList}\item 
integer, parameter, public \hyperlink{namespacemom__eos_a4bbd0f276fe3878bd01b3ff180fb41c5}{eos\+\_\+wright} = 3
\begin{DoxyCompactList}\small\item\em A named integer specifying an equation of state. \end{DoxyCompactList}\item 
integer, parameter, public \hyperlink{namespacemom__eos_afcd60f98ea35c6044d38eb4409b0a083}{eos\+\_\+teos10} = 4
\begin{DoxyCompactList}\small\item\em A named integer specifying an equation of state. \end{DoxyCompactList}\item 
integer, parameter, public \hyperlink{namespacemom__eos_ac37477f774acf511e88e96c036fa8292}{eos\+\_\+nemo} = 5
\begin{DoxyCompactList}\small\item\em A named integer specifying an equation of state. \end{DoxyCompactList}\item 
character $\ast$(10), parameter \hyperlink{namespacemom__eos_adba0a32cc2c8f110e58447a29bf885d3}{eos\+\_\+linear\+\_\+string} = \char`\"{}L\+I\+N\+E\+AR\char`\"{}
\begin{DoxyCompactList}\small\item\em A string for specifying the equation of state. \end{DoxyCompactList}\item 
character $\ast$(10), parameter \hyperlink{namespacemom__eos_aa725e4d064e1dd5cb0c6208096ad05fe}{eos\+\_\+unesco\+\_\+string} = \char`\"{}U\+N\+E\+S\+CO\char`\"{}
\begin{DoxyCompactList}\small\item\em A string for specifying the equation of state. \end{DoxyCompactList}\item 
character $\ast$(10), parameter \hyperlink{namespacemom__eos_acacee5907ae295a83b1a9b65175d5a1e}{eos\+\_\+wright\+\_\+string} = \char`\"{}W\+R\+I\+G\+HT\char`\"{}
\begin{DoxyCompactList}\small\item\em A string for specifying the equation of state. \end{DoxyCompactList}\item 
character $\ast$(10), parameter \hyperlink{namespacemom__eos_a9dc2b7c2c67a47b336de4db21b0c9cf5}{eos\+\_\+teos10\+\_\+string} = \char`\"{}T\+E\+O\+S10\char`\"{}
\begin{DoxyCompactList}\small\item\em A string for specifying the equation of state. \end{DoxyCompactList}\item 
character $\ast$(10), parameter \hyperlink{namespacemom__eos_a9348dc6c296a8dad0fe5cf27e47119a5}{eos\+\_\+nemo\+\_\+string} = \char`\"{}N\+E\+MO\char`\"{}
\begin{DoxyCompactList}\small\item\em A string for specifying the equation of state. \end{DoxyCompactList}\item 
character $\ast$(10), parameter \hyperlink{namespacemom__eos_a3d4e14a920e46cac8cec72c79690de7c}{eos\+\_\+default} = E\+O\+S\+\_\+\+W\+R\+I\+G\+H\+T\+\_\+\+S\+T\+R\+I\+NG
\begin{DoxyCompactList}\small\item\em The default equation of state. \end{DoxyCompactList}\item 
integer, parameter \hyperlink{namespacemom__eos_adcc45ec5c82aaef0aa4d330fa8cbc5c5}{tfreeze\+\_\+linear} = 1
\begin{DoxyCompactList}\small\item\em A named integer specifying a freezing point expression. \end{DoxyCompactList}\item 
integer, parameter \hyperlink{namespacemom__eos_a7f361d35806d25ac361fea713b7f0b6f}{tfreeze\+\_\+millero} = 2
\begin{DoxyCompactList}\small\item\em A named integer specifying a freezing point expression. \end{DoxyCompactList}\item 
integer, parameter \hyperlink{namespacemom__eos_abf1f6edc79b67730c9f47e5645069eda}{tfreeze\+\_\+teos10} = 3
\begin{DoxyCompactList}\small\item\em A named integer specifying a freezing point expression. \end{DoxyCompactList}\item 
character $\ast$(10), parameter \hyperlink{namespacemom__eos_ae3ee69a3e4a38b6925b121e3f34d8a15}{tfreeze\+\_\+linear\+\_\+string} = \char`\"{}L\+I\+N\+E\+AR\char`\"{}
\begin{DoxyCompactList}\small\item\em A string for specifying the freezing point expression. \end{DoxyCompactList}\item 
character $\ast$(10), parameter \hyperlink{namespacemom__eos_a3922b6088618d34983c6125e0aa553ad}{tfreeze\+\_\+millero\+\_\+string} = \char`\"{}M\+I\+L\+L\+E\+R\+O\+\_\+78\char`\"{}
\begin{DoxyCompactList}\small\item\em A string for specifying freezing point expression. \end{DoxyCompactList}\item 
character $\ast$(10), parameter \hyperlink{namespacemom__eos_ad96b484fe337e2c37b2b11bcd3cbd7af}{tfreeze\+\_\+teos10\+\_\+string} = \char`\"{}T\+E\+O\+S10\char`\"{}
\begin{DoxyCompactList}\small\item\em A string for specifying the freezing point expression. \end{DoxyCompactList}\item 
character $\ast$(10), parameter \hyperlink{namespacemom__eos_a26afc0610c00badaeedddf818c0dc48c}{tfreeze\+\_\+default} = T\+F\+R\+E\+E\+Z\+E\+\_\+\+L\+I\+N\+E\+A\+R\+\_\+\+S\+T\+R\+I\+NG
\begin{DoxyCompactList}\small\item\em The default freezing point expression. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Provides subroutines for quantities specific to the equation of state. 

The M\+O\+M\+\_\+\+E\+OS module is a wrapper for various equations of state (e.\+g. Linear, Wright, U\+N\+E\+S\+CO) and provides a uniform interface to the rest of the model independent of which equation of state is being used. 

\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{namespacemom__eos_a2787233a5f7a0935206ba2cf4c278aab}\label{namespacemom__eos_a2787233a5f7a0935206ba2cf4c278aab}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!analytic\+\_\+int\+\_\+density\+\_\+dz@{analytic\+\_\+int\+\_\+density\+\_\+dz}}
\index{analytic\+\_\+int\+\_\+density\+\_\+dz@{analytic\+\_\+int\+\_\+density\+\_\+dz}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{analytic\+\_\+int\+\_\+density\+\_\+dz()}{analytic\_int\_density\_dz()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+eos\+::analytic\+\_\+int\+\_\+density\+\_\+dz (\begin{DoxyParamCaption}\item[{real, dimension(hi\%isd\+:hi\%ied,hi\%jsd\+:hi\%jed), intent(in)}]{T,  }\item[{real, dimension(hi\%isd\+:hi\%ied,hi\%jsd\+:hi\%jed), intent(in)}]{S,  }\item[{real, dimension(hi\%isd\+:hi\%ied,hi\%jsd\+:hi\%jed), intent(in)}]{z\+\_\+t,  }\item[{real, dimension(hi\%isd\+:hi\%ied,hi\%jsd\+:hi\%jed), intent(in)}]{z\+\_\+b,  }\item[{real, intent(in)}]{rho\+\_\+ref,  }\item[{real, intent(in)}]{rho\+\_\+0,  }\item[{real, intent(in)}]{G\+\_\+e,  }\item[{type(hor\+\_\+index\+\_\+type), intent(in)}]{HI,  }\item[{type(\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}), pointer}]{E\+OS,  }\item[{real, dimension(hi\%isd\+:hi\%ied,hi\%jsd\+:hi\%jed), intent(inout)}]{dpa,  }\item[{real, dimension(hi\%isd\+:hi\%ied,hi\%jsd\+:hi\%jed), intent(inout), optional}]{intz\+\_\+dpa,  }\item[{real, dimension(hi\%isdb\+:hi\%iedb,hi\%jsd\+:hi\%jed), intent(inout), optional}]{intx\+\_\+dpa,  }\item[{real, dimension(hi\%isd\+:hi\%ied,hi\%jsdb\+:hi\%jedb), intent(inout), optional}]{inty\+\_\+dpa,  }\item[{real, dimension(hi\%isd\+:hi\%ied,hi\%jsd\+:hi\%jed), intent(in), optional}]{bathyT,  }\item[{real, intent(in), optional}]{dz\+\_\+neglect,  }\item[{logical, intent(in), optional}]{use\+Mass\+Wght\+Interp }\end{DoxyParamCaption})}



This subroutine calculates analytical and nearly-\/analytical integrals of pressure anomalies across layers, which are required for calculating the finite-\/volume form pressure accelerations in a Boussinesq model. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em hi} & Ocean horizontal index structure\\
\hline
\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 z\+\_\+t} & Height at the top of the layer in depth units \mbox{[}Z $\sim$$>$ m\mbox{]}\\
\hline
\mbox{\tt in}  & {\em z\+\_\+b} & Height at the bottom of the layer \mbox{[}Z $\sim$$>$ m\mbox{]}\\
\hline
\mbox{\tt in}  & {\em rho\+\_\+ref} & A mean density \mbox{[}R $\sim$$>$ kg m-\/3\mbox{]} or \mbox{[}kg m-\/3\mbox{]}, that is subtracted out to reduce the magnitude of each of the integrals.\\
\hline
\mbox{\tt in}  & {\em rho\+\_\+0} & A density \mbox{[}R $\sim$$>$ kg m-\/3\mbox{]} or \mbox{[}kg m-\/3\mbox{]}, that is used to calculate the pressure (as p$\sim$=-\/z$\ast$rho\+\_\+0$\ast$\+G\+\_\+e) used in the equation of state.\\
\hline
\mbox{\tt in}  & {\em g\+\_\+e} & The Earth\textquotesingle{}s gravitational acceleration \mbox{[}L2 Z-\/1 T-\/2 $\sim$$>$ m s-\/2\mbox{]} or \mbox{[}m2 Z-\/1 s-\/2 $\sim$$>$ m s-\/2\mbox{]}\\
\hline
 & {\em eos} & Equation of state structure\\
\hline
\mbox{\tt in,out}  & {\em dpa} & The change in the pressure anomaly\\
\hline
\mbox{\tt in,out}  & {\em intz\+\_\+dpa} & The integral through the thickness of the\\
\hline
\mbox{\tt in,out}  & {\em intx\+\_\+dpa} & The integral in x of the difference between\\
\hline
\mbox{\tt in,out}  & {\em inty\+\_\+dpa} & The integral in y of the difference between\\
\hline
\mbox{\tt in}  & {\em bathyt} & The depth of the bathymetry \mbox{[}Z $\sim$$>$ m\mbox{]}\\
\hline
\mbox{\tt in}  & {\em dz\+\_\+neglect} & A miniscule thickness change \mbox{[}Z $\sim$$>$ m\mbox{]}\\
\hline
\mbox{\tt in}  & {\em usemasswghtinterp} & If true, uses mass weighting to interpolate T/S for top and bottom integrals. \\
\hline
\end{DoxyParams}


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



References \hyperlink{namespacemom__eos_a230a2f280b1e27ee913e1b3cf4c412b8}{eos\+\_\+linear}, and \hyperlink{namespacemom__eos_a4bbd0f276fe3878bd01b3ff180fb41c5}{eos\+\_\+wright}.


\begin{DoxyCode}
01257   \textcolor{keywordtype}{type}(hor\_index\_type), \textcolor{keywordtype}{intent(in)}  :: hi\textcolor{comment}{ !< Ocean horizontal index structure}
01258   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%isd:HI%ied,HI%jsd:HI%jed)}, &
01259                         \textcolor{keywordtype}{intent(in)}  :: t\textcolor{comment}{   !< Potential temperature referenced to the surface [degC]}
01260   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%isd:HI%ied,HI%jsd:HI%jed)}, &
01261                         \textcolor{keywordtype}{intent(in)}  :: s\textcolor{comment}{   !< Salinity [ppt]}
01262   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%isd:HI%ied,HI%jsd:HI%jed)}, &
01263                         \textcolor{keywordtype}{intent(in)}  :: z\_t\textcolor{comment}{ !< Height at the top of the layer in depth units [Z ~> m]}
01264   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%isd:HI%ied,HI%jsd:HI%jed)}, &
01265                         \textcolor{keywordtype}{intent(in)}  :: z\_b\textcolor{comment}{ !< Height at the bottom of the layer [Z ~> m]}
01266   \textcolor{keywordtype}{real},                 \textcolor{keywordtype}{intent(in)}  :: rho\_ref\textcolor{comment}{ !< A mean density [R ~> kg m-3] or [kg m-3], that is}
01267 \textcolor{comment}{                                           !! subtracted out to reduce the magnitude of each of the}
01268 \textcolor{comment}{                                           !! integrals.}
01269   \textcolor{keywordtype}{real},                 \textcolor{keywordtype}{intent(in)}  :: rho\_0\textcolor{comment}{ !< A density [R ~> kg m-3] or [kg m-3], that is used}
01270 \textcolor{comment}{                                           !! to calculate the pressure (as p~=-z*rho\_0*G\_e)}
01271 \textcolor{comment}{                                           !! used in the equation of state.}
01272   \textcolor{keywordtype}{real},                 \textcolor{keywordtype}{intent(in)}  :: g\_e\textcolor{comment}{ !< The Earth's gravitational acceleration}
01273 \textcolor{comment}{                                           !! [L2 Z-1 T-2 ~> m s-2] or [m2 Z-1 s-2 ~> m s-2]}
01274   \textcolor{keywordtype}{type}(eos\_type),       \textcolor{keywordtype}{pointer}     :: eos\textcolor{comment}{ !< Equation of state structure}
01275   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%isd:HI%ied,HI%jsd:HI%jed)}, &
01276                       \textcolor{keywordtype}{intent(inout)} :: dpa\textcolor{comment}{ !< The change in the pressure anomaly}
01277 \textcolor{comment}{                                           !! across the layer [R L2 T-2 ~> Pa] or [Pa]}
01278   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%isd:HI%ied,HI%jsd:HI%jed)}, &
01279             \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(inout)} :: intz\_dpa\textcolor{comment}{ !< The integral through the thickness of the}
01280 \textcolor{comment}{                                           !! layer of the pressure anomaly relative to the}
01281 \textcolor{comment}{                                           !! anomaly at the top of the layer [R L2 Z T-2 ~> Pa m]}
01282   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%IsdB:HI%IedB,HI%jsd:HI%jed)}, &
01283             \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(inout)} :: intx\_dpa\textcolor{comment}{ !< The integral in x of the difference between}
01284 \textcolor{comment}{                                          !! the pressure anomaly at the top and bottom of the}
01285 \textcolor{comment}{                                          !! layer divided by the x grid spacing [R L2 T-2 ~> Pa]}
01286   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%isd:HI%ied,HI%JsdB:HI%JedB)}, &
01287             \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(inout)} :: inty\_dpa\textcolor{comment}{ !< The integral in y of the difference between}
01288 \textcolor{comment}{                                          !! the pressure anomaly at the top and bottom of the}
01289 \textcolor{comment}{                                          !! layer divided by the y grid spacing [R L2 T-2 ~> Pa]}
01290   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%isd:HI%ied,HI%jsd:HI%jed)}, &
01291               \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: bathyt\textcolor{comment}{ !< The depth of the bathymetry [Z ~> m]}
01292   \textcolor{keywordtype}{real},       \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: dz\_neglect\textcolor{comment}{ !< A miniscule thickness change [Z ~> m]}
01293   \textcolor{keywordtype}{logical},    \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: usemasswghtinterp\textcolor{comment}{ !< If true, uses mass weighting to}
01294 \textcolor{comment}{                                           !! interpolate T/S for top and bottom integrals.}
01295   \textcolor{comment}{! Local variables}
01296   \textcolor{keywordtype}{real} :: rho\_scale  \textcolor{comment}{! A multiplicative factor by which to scale density from kg m-3 to the}
01297                      \textcolor{comment}{! desired units [R m3 kg-1 ~> 1]}
01298   \textcolor{keywordtype}{real} :: pres\_scale \textcolor{comment}{! A multiplicative factor to convert pressure into Pa [Pa T2 R-1 L-2 ~> 1]}
01299 
01300   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
01301     \textcolor{stringliteral}{"int\_density\_dz called with an unassociated EOS\_type EOS."})
01302 
01303   \textcolor{comment}{! We should never reach this point with quadrature. EOS\_quadrature indicates that numerical}
01304   \textcolor{comment}{! integration be used instead of analytic. This is a safety check.}
01305   \textcolor{keywordflow}{if} (eos%EOS\_quadrature) \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"EOS\_quadrature is set!"})
01306 
01307   \textcolor{keywordflow}{select case} (eos%form\_of\_EOS)
01308     \textcolor{keywordflow}{case} (eos\_linear)
01309       rho\_scale = eos%kg\_m3\_to\_R
01310       \textcolor{keywordflow}{if} (rho\_scale /= 1.0) \textcolor{keywordflow}{then}
01311         \textcolor{keyword}{call }int\_density\_dz\_linear(t, s, z\_t, z\_b, rho\_ref, rho\_0, g\_e, hi, &
01312                          rho\_scale*eos%Rho\_T0\_S0, rho\_scale*eos%dRho\_dT, rho\_scale*eos%dRho\_dS, &
01313                          dpa, intz\_dpa, intx\_dpa, inty\_dpa, bathyt, dz\_neglect, usemasswghtinterp)
01314       \textcolor{keywordflow}{else}
01315         \textcolor{keyword}{call }int\_density\_dz\_linear(t, s, z\_t, z\_b, rho\_ref, rho\_0, g\_e, hi, &
01316                          eos%Rho\_T0\_S0, eos%dRho\_dT, eos%dRho\_dS, &
01317                          dpa, intz\_dpa, intx\_dpa, inty\_dpa, bathyt, dz\_neglect, usemasswghtinterp)
01318 \textcolor{keywordflow}{      endif}
01319     \textcolor{keywordflow}{case} (eos\_wright)
01320       rho\_scale = eos%kg\_m3\_to\_R
01321       pres\_scale = eos%RL2\_T2\_to\_Pa
01322       \textcolor{keywordflow}{if} ((rho\_scale /= 1.0) .or. (pres\_scale /= 1.0)) \textcolor{keywordflow}{then}
01323         \textcolor{keyword}{call }int\_density\_dz\_wright(t, s, z\_t, z\_b, rho\_ref, rho\_0, g\_e, hi, &
01324                                    dpa, intz\_dpa, intx\_dpa, inty\_dpa, bathyt, &
01325                                    dz\_neglect, usemasswghtinterp, rho\_scale, pres\_scale)
01326       \textcolor{keywordflow}{else}
01327         \textcolor{keyword}{call }int\_density\_dz\_wright(t, s, z\_t, z\_b, rho\_ref, rho\_0, g\_e, hi, &
01328                                    dpa, intz\_dpa, intx\_dpa, inty\_dpa, bathyt, &
01329                                    dz\_neglect, usemasswghtinterp)
01330 \textcolor{keywordflow}{      endif}
01331 \textcolor{keywordflow}{    case default}
01332       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"No analytic integration option is available with this EOS!"})
01333 \textcolor{keywordflow}{  end select}
01334 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a09b6cb637246b8aa287ef7cdb482aaea}\label{namespacemom__eos_a09b6cb637246b8aa287ef7cdb482aaea}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!analytic\+\_\+int\+\_\+specific\+\_\+vol\+\_\+dp@{analytic\+\_\+int\+\_\+specific\+\_\+vol\+\_\+dp}}
\index{analytic\+\_\+int\+\_\+specific\+\_\+vol\+\_\+dp@{analytic\+\_\+int\+\_\+specific\+\_\+vol\+\_\+dp}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{analytic\+\_\+int\+\_\+specific\+\_\+vol\+\_\+dp()}{analytic\_int\_specific\_vol\_dp()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+eos\+::analytic\+\_\+int\+\_\+specific\+\_\+vol\+\_\+dp (\begin{DoxyParamCaption}\item[{real, dimension(hi\%isd\+:hi\%ied,hi\%jsd\+:hi\%jed), intent(in)}]{T,  }\item[{real, dimension(hi\%isd\+:hi\%ied,hi\%jsd\+:hi\%jed), intent(in)}]{S,  }\item[{real, dimension(hi\%isd\+:hi\%ied,hi\%jsd\+:hi\%jed), intent(in)}]{p\+\_\+t,  }\item[{real, dimension(hi\%isd\+:hi\%ied,hi\%jsd\+:hi\%jed), intent(in)}]{p\+\_\+b,  }\item[{real, intent(in)}]{alpha\+\_\+ref,  }\item[{type(hor\+\_\+index\+\_\+type), intent(in)}]{HI,  }\item[{type(\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}), pointer}]{E\+OS,  }\item[{real, dimension(hi\%isd\+:hi\%ied,hi\%jsd\+:hi\%jed), intent(inout)}]{dza,  }\item[{real, dimension(hi\%isd\+:hi\%ied,hi\%jsd\+:hi\%jed), intent(inout), optional}]{intp\+\_\+dza,  }\item[{real, dimension(hi\%isdb\+:hi\%iedb,hi\%jsd\+:hi\%jed), intent(inout), optional}]{intx\+\_\+dza,  }\item[{real, dimension(hi\%isd\+:hi\%ied,hi\%jsdb\+:hi\%jedb), intent(inout), optional}]{inty\+\_\+dza,  }\item[{integer, intent(in), optional}]{halo\+\_\+size,  }\item[{real, dimension(hi\%isd\+:hi\%ied,hi\%jsd\+:hi\%jed), intent(in), optional}]{bathyP,  }\item[{real, intent(in), optional}]{d\+P\+\_\+tiny,  }\item[{logical, intent(in), optional}]{use\+Mass\+Wght\+Interp }\end{DoxyParamCaption})}



Calls the appropriate subroutine to calculate analytical and nearly-\/analytical integrals in pressure across layers of geopotential anomalies, which are required for calculating the finite-\/volume form pressure accelerations in a non-\/\+Boussinesq model. There are essentially no free assumptions, apart from the use of Boole\textquotesingle{}s rule to do the horizontal integrals, and from a truncation in the series for log(1-\/eps/1+eps) that assumes that $\vert$eps$\vert$ $<$ 0.\+34. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em hi} & The horizontal index structure\\
\hline
\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 p\+\_\+t} & Pressure at the top of the layer \mbox{[}R L2 T-\/2 $\sim$$>$ Pa\mbox{]} or \mbox{[}Pa\mbox{]}\\
\hline
\mbox{\tt in}  & {\em p\+\_\+b} & Pressure at the bottom of the layer \mbox{[}R L2 T-\/2 $\sim$$>$ Pa\mbox{]} or \mbox{[}Pa\mbox{]}\\
\hline
\mbox{\tt in}  & {\em alpha\+\_\+ref} & A mean specific volume that is subtracted out to reduce the magnitude of each of the integrals \mbox{[}R-\/1 $\sim$$>$ m3 kg-\/1\mbox{]} The calculation is mathematically identical with different values of alpha\+\_\+ref, but this reduces the effects of roundoff.\\
\hline
 & {\em eos} & Equation of state structure\\
\hline
\mbox{\tt in,out}  & {\em dza} & The change in the geopotential anomaly across\\
\hline
\mbox{\tt in,out}  & {\em intp\+\_\+dza} & The integral in pressure through the layer of the\\
\hline
\mbox{\tt in,out}  & {\em intx\+\_\+dza} & The integral in x of the difference between the\\
\hline
\mbox{\tt in,out}  & {\em inty\+\_\+dza} & The integral in y of the difference between the\\
\hline
\mbox{\tt in}  & {\em halo\+\_\+size} & The width of halo points on which to calculate dza.\\
\hline
\mbox{\tt in}  & {\em bathyp} & The pressure at the bathymetry \mbox{[}R L2 T-\/2 $\sim$$>$ Pa\mbox{]} or \mbox{[}Pa\mbox{]}\\
\hline
\mbox{\tt in}  & {\em dp\+\_\+tiny} & A miniscule pressure change with the same units as p\+\_\+t \mbox{[}R L2 T-\/2 $\sim$$>$ Pa\mbox{]} or \mbox{[}Pa\mbox{]}\\
\hline
\mbox{\tt in}  & {\em usemasswghtinterp} & If true, uses mass weighting to interpolate T/S for top and bottom integrals. \\
\hline
\end{DoxyParams}


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



References \hyperlink{namespacemom__eos_a230a2f280b1e27ee913e1b3cf4c412b8}{eos\+\_\+linear}, and \hyperlink{namespacemom__eos_a4bbd0f276fe3878bd01b3ff180fb41c5}{eos\+\_\+wright}.


\begin{DoxyCode}
01188   \textcolor{keywordtype}{type}(hor\_index\_type), \textcolor{keywordtype}{intent(in)}  :: hi\textcolor{comment}{  !< The horizontal index structure}
01189   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%isd:HI%ied,HI%jsd:HI%jed)}, &
01190                         \textcolor{keywordtype}{intent(in)}  :: t\textcolor{comment}{   !< Potential temperature referenced to the surface [degC]}
01191   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%isd:HI%ied,HI%jsd:HI%jed)}, &
01192                         \textcolor{keywordtype}{intent(in)}  :: s\textcolor{comment}{   !< Salinity [ppt]}
01193   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%isd:HI%ied,HI%jsd:HI%jed)}, &
01194                         \textcolor{keywordtype}{intent(in)}  :: p\_t\textcolor{comment}{ !< Pressure at the top of the layer [R L2 T-2 ~> Pa] or [Pa]}
01195   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%isd:HI%ied,HI%jsd:HI%jed)}, &
01196                         \textcolor{keywordtype}{intent(in)}  :: p\_b\textcolor{comment}{ !< Pressure at the bottom of the layer [R L2 T-2 ~> Pa] or [Pa]}
01197   \textcolor{keywordtype}{real},                 \textcolor{keywordtype}{intent(in)}  :: alpha\_ref\textcolor{comment}{ !< A mean specific volume that is subtracted out}
01198 \textcolor{comment}{                            !! to reduce the magnitude of each of the integrals [R-1 ~> m3 kg-1]}
01199 \textcolor{comment}{                            !! The calculation is mathematically identical with different values of}
01200 \textcolor{comment}{                            !! alpha\_ref, but this reduces the effects of roundoff.}
01201   \textcolor{keywordtype}{type}(eos\_type),       \textcolor{keywordtype}{pointer}     :: eos\textcolor{comment}{ !< Equation of state structure}
01202   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%isd:HI%ied,HI%jsd:HI%jed)}, &
01203                         \textcolor{keywordtype}{intent(inout)} :: dza\textcolor{comment}{ !< The change in the geopotential anomaly across}
01204 \textcolor{comment}{                            !! the layer [L2 T-2 ~> m2 s-2] or [m2 s-2]}
01205   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%isd:HI%ied,HI%jsd:HI%jed)}, &
01206               \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(inout)} :: intp\_dza\textcolor{comment}{ !< The integral in pressure through the layer of the}
01207 \textcolor{comment}{                            !! geopotential anomaly relative to the anomaly at the bottom of the}
01208 \textcolor{comment}{                            !! layer [R L4 T-4 ~> Pa m2 s-2] or [Pa m2 s-2]}
01209   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%IsdB:HI%IedB,HI%jsd:HI%jed)}, &
01210               \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(inout)} :: intx\_dza\textcolor{comment}{ !< The integral in x of the difference between the}
01211 \textcolor{comment}{                            !! geopotential anomaly at the top and bottom of the layer divided by}
01212 \textcolor{comment}{                            !! the x grid spacing [L2 T-2 ~> m2 s-2] or [m2 s-2]}
01213   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%isd:HI%ied,HI%JsdB:HI%JedB)}, &
01214               \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(inout)} :: inty\_dza\textcolor{comment}{ !< The integral in y of the difference between the}
01215 \textcolor{comment}{                            !! geopotential anomaly at the top and bottom of the layer divided by}
01216 \textcolor{comment}{                            !! the y grid spacing [L2 T-2 ~> m2 s-2] or [m2 s-2]}
01217   \textcolor{keywordtype}{integer},    \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: halo\_size\textcolor{comment}{ !< The width of halo points on which to calculate dza.}
01218   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%isd:HI%ied,HI%jsd:HI%jed)}, &
01219               \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: bathyp\textcolor{comment}{  !< The pressure at the bathymetry [R L2 T-2 ~> Pa] or [Pa]}
01220   \textcolor{keywordtype}{real},       \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: dp\_tiny\textcolor{comment}{ !< A miniscule pressure change with}
01221 \textcolor{comment}{                            !! the same units as p\_t [R L2 T-2 ~> Pa] or [Pa]}
01222   \textcolor{keywordtype}{logical},    \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: usemasswghtinterp\textcolor{comment}{ !< If true, uses mass weighting}
01223 \textcolor{comment}{                            !! to interpolate T/S for top and bottom integrals.}
01224   \textcolor{comment}{! Local variables}
01225   \textcolor{keywordtype}{real} :: pres\_scale    \textcolor{comment}{! A unit conversion factor from the rescaled units of pressure to Pa [Pa T2 R-1 L-2
       ~> 1]}
01226   \textcolor{keywordtype}{real} :: sv\_scale      \textcolor{comment}{! A multiplicative factor by which to scale specific}
01227                         \textcolor{comment}{! volume from m3 kg-1 to the desired units [kg m-3 R-1 ~> 1]}
01228 
01229   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
01230     \textcolor{stringliteral}{"int\_specific\_vol\_dp called with an unassociated EOS\_type EOS."})
01231 
01232   \textcolor{comment}{! We should never reach this point with quadrature. EOS\_quadrature indicates that numerical}
01233   \textcolor{comment}{! integration be used instead of analytic. This is a safety check.}
01234   \textcolor{keywordflow}{if} (eos%EOS\_quadrature) \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"EOS\_quadrature is set!"})
01235 
01236   \textcolor{keywordflow}{select case} (eos%form\_of\_EOS)
01237     \textcolor{keywordflow}{case} (eos\_linear)
01238       \textcolor{keyword}{call }int\_spec\_vol\_dp\_linear(t, s, p\_t, p\_b, alpha\_ref, hi, eos%kg\_m3\_to\_R*eos%Rho\_T0\_S0, &
01239                                 eos%kg\_m3\_to\_R*eos%dRho\_dT, eos%kg\_m3\_to\_R*eos%dRho\_dS, dza, &
01240                                 intp\_dza, intx\_dza, inty\_dza, halo\_size, &
01241                                 bathyp, dp\_tiny, usemasswghtinterp)
01242     \textcolor{keywordflow}{case} (eos\_wright)
01243       \textcolor{keyword}{call }int\_spec\_vol\_dp\_wright(t, s, p\_t, p\_b, alpha\_ref, hi, dza, intp\_dza, intx\_dza, &
01244                                   inty\_dza, halo\_size, bathyp, dp\_tiny, usemasswghtinterp, &
01245                                   sv\_scale=eos%R\_to\_kg\_m3, pres\_scale=eos%RL2\_T2\_to\_Pa)
01246 \textcolor{keywordflow}{    case default}
01247       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"No analytic integration option is available with this EOS!"})
01248 \textcolor{keywordflow}{  end select}
01249 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_afbb6a11d3b826308ddb1ffe0c5cf32d1}\label{namespacemom__eos_afbb6a11d3b826308ddb1ffe0c5cf32d1}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!calc\+\_\+spec\+\_\+vol\+\_\+1d@{calc\+\_\+spec\+\_\+vol\+\_\+1d}}
\index{calc\+\_\+spec\+\_\+vol\+\_\+1d@{calc\+\_\+spec\+\_\+vol\+\_\+1d}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{calc\+\_\+spec\+\_\+vol\+\_\+1d()}{calc\_spec\_vol\_1d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calc\+\_\+spec\+\_\+vol\+\_\+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)}]{specvol,  }\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}]{spv\+\_\+ref,  }\item[{real, intent(in), optional}]{scale }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calls the appropriate subroutine to calculate the specific volume of sea water for 1-\/D array inputs, potentially limiting the domain of indices that are worked on. 


\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 specvol} & In situ specific volume \mbox{[}R-\/1 $\sim$$>$ m3 kg-\/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 spv\+\_\+ref} & A reference specific volume \mbox{[}R-\/1 $\sim$$>$ m3 kg-\/1\mbox{]}\\
\hline
\mbox{\tt in}  & {\em scale} & A multiplicative factor by which to scale output specific volume in combination with scaling given by US \mbox{[}various\mbox{]} \\
\hline
\end{DoxyParams}


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



References \hyperlink{namespacemom__eos_a43d417da1636adb2cd184f76223afded}{calculate\+\_\+spec\+\_\+vol\+\_\+array()}.


\begin{DoxyCode}
00571   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(in)}    :: t\textcolor{comment}{        !< Potential temperature referenced to the surface
       [degC]}
00572   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(in)}    :: s\textcolor{comment}{        !< Salinity [ppt]}
00573   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(in)}    :: pressure\textcolor{comment}{ !< Pressure [R L2 T-2 ~> Pa]}
00574   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(inout)} :: specvol\textcolor{comment}{  !< In situ specific volume [R-1 ~> m3 kg-1]}
00575   \textcolor{keywordtype}{type}(eos\_type),        \textcolor{keywordtype}{pointer}       :: eos\textcolor{comment}{      !< Equation of state structure}
00576   \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}
00577 \textcolor{comment}{                                                       !! into account that arrays start at 1.}
00578   \textcolor{keywordtype}{real},                  \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: spv\_ref\textcolor{comment}{ !< A reference specific volume [R-1 ~> m3 kg-1]}
00579   \textcolor{keywordtype}{real},                  \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scale\textcolor{comment}{ !< A multiplicative factor by which to scale}
00580 \textcolor{comment}{                                                       !! output specific volume in combination with}
00581 \textcolor{comment}{                                                       !! scaling given by US [various]}
00582   \textcolor{comment}{! Local variables}
00583   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(size(specvol))} :: pres  \textcolor{comment}{! Pressure converted to [Pa]}
00584   \textcolor{keywordtype}{real} :: p\_scale   \textcolor{comment}{! A factor to convert pressure to units of Pa [Pa T2 R-1 L-2 ~> 1]}
00585   \textcolor{keywordtype}{real} :: spv\_unscale \textcolor{comment}{! A factor to convert specific volume from R-1 to m3 kg-1 [m3 kg-1 R ~> 1]}
00586   \textcolor{keywordtype}{real} :: spv\_scale \textcolor{comment}{! A factor to convert specific volume from m3 kg-1 to the desired units [kg m-3 R-1 ~>
       1]}
00587   \textcolor{keywordtype}{real} :: spv\_reference \textcolor{comment}{! spv\_ref converted to [m3 kg-1]}
00588   \textcolor{keywordtype}{integer} :: i, is, ie, npts
00589 
00590   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
00591     \textcolor{stringliteral}{"calc\_spec\_vol\_1d called with an unassociated EOS\_type EOS."})
00592 
00593   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(dom)) \textcolor{keywordflow}{then}
00594     is = dom(1) ; ie = dom(2) ; npts = 1 + ie - is
00595   \textcolor{keywordflow}{else}
00596     is = 1 ; ie = \textcolor{keyword}{size}(specvol) ; npts = 1 + ie - is
00597 \textcolor{keywordflow}{  endif}
00598 
00599   p\_scale = eos%RL2\_T2\_to\_Pa
00600   spv\_unscale = eos%kg\_m3\_to\_R
00601 
00602   \textcolor{keywordflow}{if} ((p\_scale == 1.0) .and. (spv\_unscale == 1.0)) \textcolor{keywordflow}{then}
00603     \textcolor{keyword}{call }calculate\_spec\_vol\_array(t, s, pressure, specvol, is, npts, eos, spv\_ref)
00604   \textcolor{keywordflow}{elseif} (\textcolor{keyword}{present}(spv\_ref)) \textcolor{keywordflow}{then} \textcolor{comment}{! This is the same as above, but with some extra work to rescale
       variables.}
00605     \textcolor{keywordflow}{do} i=is,ie ; pres(i) = p\_scale * pressure(i) ;\textcolor{keywordflow}{ enddo}
00606     spv\_reference = spv\_unscale*spv\_ref
00607     \textcolor{keyword}{call }calculate\_spec\_vol\_array(t, s, pres, specvol, is, npts, eos, spv\_reference)
00608   \textcolor{keywordflow}{else}  \textcolor{comment}{! There is rescaling of variables, but spv\_ref is not present. Passing a 0 value of spv\_ref}
00609         \textcolor{comment}{! changes answers at roundoff for some equations of state, like Wright and UNESCO.}
00610     \textcolor{keywordflow}{do} i=is,ie ; pres(i) = p\_scale * pressure(i) ;\textcolor{keywordflow}{ enddo}
00611     \textcolor{keyword}{call }calculate\_spec\_vol\_array(t, s, pres, specvol, is, npts, eos)
00612 \textcolor{keywordflow}{  endif}
00613 
00614   spv\_scale = eos%R\_to\_kg\_m3
00615   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scale)) spv\_scale = spv\_scale * scale
00616   \textcolor{keywordflow}{if} (spv\_scale /= 1.0) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{do} i=is,ie
00617     specvol(i) = spv\_scale * specvol(i)
00618 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ endif}
00619 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a640c3b2292afd3266caa11243549bbf0}\label{namespacemom__eos_a640c3b2292afd3266caa11243549bbf0}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!calc\+\_\+spec\+\_\+vol\+\_\+derivs\+\_\+1d@{calc\+\_\+spec\+\_\+vol\+\_\+derivs\+\_\+1d}}
\index{calc\+\_\+spec\+\_\+vol\+\_\+derivs\+\_\+1d@{calc\+\_\+spec\+\_\+vol\+\_\+derivs\+\_\+1d}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{calc\+\_\+spec\+\_\+vol\+\_\+derivs\+\_\+1d()}{calc\_spec\_vol\_derivs\_1d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calc\+\_\+spec\+\_\+vol\+\_\+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)}]{d\+S\+V\+\_\+dT,  }\item[{real, dimension(\+:), intent(inout)}]{d\+S\+V\+\_\+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 specific volume derivatives for 1-\/d array inputs, potentially limiting the domain of indices that are worked on. 


\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 dsv\+\_\+dt} & The partial derivative of specific volume with potential temperature \mbox{[}R-\/1 deg\+C-\/1 $\sim$$>$ m3 kg-\/1 deg\+C-\/1\mbox{]}\\
\hline
\mbox{\tt in,out}  & {\em dsv\+\_\+ds} & The partial derivative of specific volume with salinity \mbox{[}R-\/1 ppt-\/1 $\sim$$>$ m3 kg-\/1 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 specific volume in combination with scaling given by US \mbox{[}various\mbox{]} \\
\hline
\end{DoxyParams}


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



References \hyperlink{namespacemom__eos_a35f9c33d1aeffbf9986349463bab3b9c}{calculate\+\_\+spec\+\_\+vol\+\_\+derivs\+\_\+array()}.


\begin{DoxyCode}
01040   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: t\textcolor{comment}{        !< Potential temperature referenced to the surface [degC]}
01041   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: s\textcolor{comment}{        !< Salinity [ppt]}
01042   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: pressure\textcolor{comment}{ !< Pressure [R L2 T-2 ~> Pa]}
01043   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: dsv\_dt\textcolor{comment}{   !< The partial derivative of specific volume with potential}
01044 \textcolor{comment}{                                                !! temperature [R-1 degC-1 ~> m3 kg-1 degC-1]}
01045   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: dsv\_ds\textcolor{comment}{   !< The partial derivative of specific volume with salinity}
01046 \textcolor{comment}{                                                !! [R-1 ppt-1 ~> m3 kg-1 ppt-1]}
01047   \textcolor{keywordtype}{type}(eos\_type),     \textcolor{keywordtype}{pointer}       :: eos\textcolor{comment}{      !< Equation of state structure}
01048   \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}
01049 \textcolor{comment}{                                                       !! into account that arrays start at 1.}
01050   \textcolor{keywordtype}{real},                  \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scale\textcolor{comment}{ !< A multiplicative factor by which to scale
       specific}
01051 \textcolor{comment}{                                                !! volume in combination with scaling given by US [various]}
01052 
01053   \textcolor{comment}{! Local variables}
01054   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(size(dSV\_dT))} :: press   \textcolor{comment}{! Pressure converted to [Pa]}
01055   \textcolor{keywordtype}{real} :: spv\_scale \textcolor{comment}{! A factor to convert specific volume from m3 kg-1 to the desired units [kg R-1 m-3 ~>
       1]}
01056   \textcolor{keywordtype}{real} :: p\_scale   \textcolor{comment}{! A factor to convert pressure to units of Pa [Pa T2 R-1 L-2 ~> 1]}
01057   \textcolor{keywordtype}{integer} :: i, is, ie, npts
01058 
01059   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
01060     \textcolor{stringliteral}{"calculate\_spec\_vol\_derivs\_1d called with an unassociated EOS\_type EOS."})
01061 
01062   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(dom)) \textcolor{keywordflow}{then}
01063     is = dom(1) ; ie = dom(2) ; npts = 1 + ie - is
01064   \textcolor{keywordflow}{else}
01065     is = 1 ; ie = \textcolor{keyword}{size}(dsv\_dt) ; npts = 1 + ie - is
01066 \textcolor{keywordflow}{  endif}
01067   p\_scale = eos%RL2\_T2\_to\_Pa
01068 
01069   \textcolor{keywordflow}{if} (p\_scale == 1.0) \textcolor{keywordflow}{then}
01070     \textcolor{keyword}{call }calculate\_spec\_vol\_derivs\_array(t, s, pressure, dsv\_dt, dsv\_ds, is, npts, eos)
01071   \textcolor{keywordflow}{else}
01072     \textcolor{keywordflow}{do} i=is,ie ; press(i) = p\_scale * pressure(i) ;\textcolor{keywordflow}{ enddo}
01073     \textcolor{keyword}{call }calculate\_spec\_vol\_derivs\_array(t, s, press, dsv\_dt, dsv\_ds, is, npts, eos)
01074 \textcolor{keywordflow}{  endif}
01075 
01076   spv\_scale = eos%R\_to\_kg\_m3
01077   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scale)) spv\_scale = spv\_scale * scale
01078   \textcolor{keywordflow}{if} (spv\_scale /= 1.0) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{do} i=is,ie
01079     dsv\_dt(i) = spv\_scale * dsv\_dt(i)
01080     dsv\_ds(i) = spv\_scale * dsv\_ds(i)
01081 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ endif}
01082 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a246056e557a08ce1c697256cd718d99a}\label{namespacemom__eos_a246056e557a08ce1c697256cd718d99a}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!calc\+\_\+spec\+\_\+vol\+\_\+scalar@{calc\+\_\+spec\+\_\+vol\+\_\+scalar}}
\index{calc\+\_\+spec\+\_\+vol\+\_\+scalar@{calc\+\_\+spec\+\_\+vol\+\_\+scalar}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{calc\+\_\+spec\+\_\+vol\+\_\+scalar()}{calc\_spec\_vol\_scalar()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calc\+\_\+spec\+\_\+vol\+\_\+scalar (\begin{DoxyParamCaption}\item[{real, intent(in)}]{T,  }\item[{real, intent(in)}]{S,  }\item[{real, intent(in)}]{pressure,  }\item[{real, intent(out)}]{specvol,  }\item[{type(\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}), pointer}]{E\+OS,  }\item[{real, intent(in), optional}]{spv\+\_\+ref,  }\item[{real, intent(in), optional}]{scale }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calls the appropriate subroutine to calculate specific volume of sea water for scalar 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 out}  & {\em specvol} & In situ? specific volume \mbox{[}m3 kg-\/1\mbox{]} or \mbox{[}R-\/1 $\sim$$>$ m3 kg-\/1\mbox{]}\\
\hline
 & {\em eos} & Equation of state structure\\
\hline
\mbox{\tt in}  & {\em spv\+\_\+ref} & A reference specific volume \mbox{[}m3 kg-\/1\mbox{]} or \mbox{[}R-\/1 m3 kg-\/1\mbox{]}\\
\hline
\mbox{\tt in}  & {\em scale} & A multiplicative factor by which to scale specific volume in combination with scaling given by US \mbox{[}various\mbox{]} \\
\hline
\end{DoxyParams}


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



References \hyperlink{namespacemom__eos_a43d417da1636adb2cd184f76223afded}{calculate\+\_\+spec\+\_\+vol\+\_\+array()}.


\begin{DoxyCode}
00533   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: t\textcolor{comment}{        !< Potential temperature referenced to the surface [degC]}
00534   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: s\textcolor{comment}{        !< Salinity [ppt]}
00535   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< Pressure [Pa] or [R L2 T-2 ~> Pa]}
00536   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(out)} :: specvol\textcolor{comment}{  !< In situ? specific volume [m3 kg-1] or [R-1 ~> m3 kg-1]}
00537   \textcolor{keywordtype}{type}(eos\_type), \textcolor{keywordtype}{pointer}     :: eos\textcolor{comment}{      !< Equation of state structure}
00538   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: spv\_ref\textcolor{comment}{  !< A reference specific volume [m3 kg-1] or [R-1 m3 kg-1]}
00539   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: scale\textcolor{comment}{    !< A multiplicative factor by which to scale specific}
00540 \textcolor{comment}{                                          !! volume in combination with scaling given by US [various]}
00541 
00542   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(1)} :: ta, sa, pres, spv  \textcolor{comment}{! Rescaled single element array versions of the arguments.}
00543   \textcolor{keywordtype}{real} :: spv\_reference \textcolor{comment}{! spv\_ref converted to [m3 kg-1]}
00544   \textcolor{keywordtype}{real} :: spv\_scale \textcolor{comment}{! A factor to convert specific volume from m3 kg-1 to the desired units [kg R-1 m-3 ~>
       1]}
00545 
00546   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
00547     \textcolor{stringliteral}{"calc\_spec\_vol\_scalar called with an unassociated EOS\_type EOS."})
00548 
00549   pres(1) = eos%RL2\_T2\_to\_Pa*pressure
00550   ta(1) = t ; sa(1) = s
00551 
00552   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(spv\_ref)) \textcolor{keywordflow}{then}
00553     spv\_reference = eos%kg\_m3\_to\_R*spv\_ref
00554     \textcolor{keyword}{call }calculate\_spec\_vol\_array(ta, sa, pres, spv, 1, 1, eos, spv\_reference)
00555   \textcolor{keywordflow}{else}
00556     \textcolor{keyword}{call }calculate\_spec\_vol\_array(ta, sa, pres, spv, 1, 1, eos)
00557 \textcolor{keywordflow}{  endif}
00558   specvol = spv(1)
00559 
00560   spv\_scale = eos%R\_to\_kg\_m3
00561   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scale)) spv\_scale = spv\_scale * scale
00562   \textcolor{keywordflow}{if} (spv\_scale /= 1.0) \textcolor{keywordflow}{then}
00563     specvol = spv\_scale * specvol
00564 \textcolor{keywordflow}{  endif}
00565 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a3296609bd60bfe7ed2c5eac1170d07a3}\label{namespacemom__eos_a3296609bd60bfe7ed2c5eac1170d07a3}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!calculate\+\_\+compress\+\_\+array@{calculate\+\_\+compress\+\_\+array}}
\index{calculate\+\_\+compress\+\_\+array@{calculate\+\_\+compress\+\_\+array}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{calculate\+\_\+compress\+\_\+array()}{calculate\_compress\_array()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calculate\+\_\+compress\+\_\+array (\begin{DoxyParamCaption}\item[{real, dimension(\+:), intent(in)}]{T,  }\item[{real, dimension(\+:), intent(in)}]{S,  }\item[{real, dimension(\+:), intent(in)}]{press,  }\item[{real, dimension(\+:), intent(inout)}]{rho,  }\item[{real, dimension(\+:), intent(inout)}]{drho\+\_\+dp,  }\item[{integer, intent(in)}]{start,  }\item[{integer, intent(in)}]{npts,  }\item[{type(\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}), pointer}]{E\+OS }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calls the appropriate subroutine to calculate the density and compressibility for 1-\/D array inputs. If US is present, the units of the inputs and outputs are rescaled. 


\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{[}P\+SU\mbox{]}\\
\hline
\mbox{\tt in}  & {\em press} & Pressure \mbox{[}Pa\mbox{]} or \mbox{[}R L2 T-\/2 $\sim$$>$ Pa\mbox{]}\\
\hline
\mbox{\tt in,out}  & {\em rho} & In situ density \mbox{[}kg m-\/3\mbox{]} or \mbox{[}R $\sim$$>$ kg m-\/3\mbox{]}\\
\hline
\mbox{\tt in,out}  & {\em drho\+\_\+dp} & The partial derivative of density with pressure (also the inverse of the square of sound speed) \mbox{[}s2 m-\/2\mbox{]} or \mbox{[}T2 L-\/2\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
\end{DoxyParams}


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



References \hyperlink{namespacemom__eos_a230a2f280b1e27ee913e1b3cf4c412b8}{eos\+\_\+linear}, \hyperlink{namespacemom__eos_ac37477f774acf511e88e96c036fa8292}{eos\+\_\+nemo}, \hyperlink{namespacemom__eos_afcd60f98ea35c6044d38eb4409b0a083}{eos\+\_\+teos10}, \hyperlink{namespacemom__eos_a9eacc16ba79dc66131b54bf31114f35a}{eos\+\_\+unesco}, and \hyperlink{namespacemom__eos_a4bbd0f276fe3878bd01b3ff180fb41c5}{eos\+\_\+wright}.



Referenced by \hyperlink{namespacemom__eos_ad0986d800c26414dbd19d2b3a541e613}{calculate\+\_\+compress\+\_\+scalar()}.


\begin{DoxyCode}
01089   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: t\textcolor{comment}{        !< Potential temperature referenced to the surface [degC]}
01090   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: s\textcolor{comment}{        !< Salinity [PSU]}
01091   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: press\textcolor{comment}{    !< Pressure [Pa] or [R L2 T-2 ~> Pa]}
01092   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: rho\textcolor{comment}{      !< In situ density [kg m-3] or [R ~> kg m-3]}
01093   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: drho\_dp\textcolor{comment}{  !< The partial derivative of density with pressure}
01094 \textcolor{comment}{                                                !! (also the inverse of the square of sound speed)}
01095 \textcolor{comment}{                                                !! [s2 m-2] or [T2 L-2]}
01096   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: start\textcolor{comment}{    !< Starting index within the array}
01097   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: npts\textcolor{comment}{     !< The number of values to calculate}
01098   \textcolor{keywordtype}{type}(eos\_type),     \textcolor{keywordtype}{pointer}     :: eos\textcolor{comment}{      !< Equation of state structure}
01099 
01100   \textcolor{comment}{! Local variables}
01101   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(size(press))} :: pressure  \textcolor{comment}{! Pressure converted to [Pa]}
01102   \textcolor{keywordtype}{integer} :: i, is, ie
01103 
01104   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
01105     \textcolor{stringliteral}{"calculate\_compress called with an unassociated EOS\_type EOS."})
01106 
01107   is = start ; ie = is + npts - 1
01108   \textcolor{keywordflow}{do} i=is,ie ; pressure(i) = eos%RL2\_T2\_to\_Pa * press(i) ;\textcolor{keywordflow}{ enddo}
01109 
01110   \textcolor{keywordflow}{select case} (eos%form\_of\_EOS)
01111     \textcolor{keywordflow}{case} (eos\_linear)
01112       \textcolor{keyword}{call }calculate\_compress\_linear(t, s, pressure, rho, drho\_dp, start, npts, &
01113                                      eos%Rho\_T0\_S0, eos%dRho\_dT, eos%dRho\_dS)
01114     \textcolor{keywordflow}{case} (eos\_unesco)
01115       \textcolor{keyword}{call }calculate\_compress\_unesco(t, s, pressure, rho, drho\_dp, start, npts)
01116     \textcolor{keywordflow}{case} (eos\_wright)
01117       \textcolor{keyword}{call }calculate\_compress\_wright(t, s, pressure, rho, drho\_dp, start, npts)
01118     \textcolor{keywordflow}{case} (eos\_teos10)
01119       \textcolor{keyword}{call }calculate\_compress\_teos10(t, s, pressure, rho, drho\_dp, start, npts)
01120     \textcolor{keywordflow}{case} (eos\_nemo)
01121       \textcolor{keyword}{call }calculate\_compress\_nemo(t, s, pressure, rho, drho\_dp, start, npts)
01122 \textcolor{keywordflow}{    case default}
01123       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"calculate\_compress: EOS%form\_of\_EOS is not valid."})
01124 \textcolor{keywordflow}{  end select}
01125 
01126   \textcolor{keywordflow}{if} (eos%kg\_m3\_to\_R /= 1.0) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{do} i=is,ie
01127     rho(i) = eos%kg\_m3\_to\_R * rho(i)
01128 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ endif}
01129   \textcolor{keywordflow}{if} (eos%L\_T\_to\_m\_s /= 1.0) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{do} i=is,ie
01130     drho\_dp(i) = eos%L\_T\_to\_m\_s**2 * drho\_dp(i)
01131 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ endif}
01132 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_ad0986d800c26414dbd19d2b3a541e613}\label{namespacemom__eos_ad0986d800c26414dbd19d2b3a541e613}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!calculate\+\_\+compress\+\_\+scalar@{calculate\+\_\+compress\+\_\+scalar}}
\index{calculate\+\_\+compress\+\_\+scalar@{calculate\+\_\+compress\+\_\+scalar}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{calculate\+\_\+compress\+\_\+scalar()}{calculate\_compress\_scalar()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calculate\+\_\+compress\+\_\+scalar (\begin{DoxyParamCaption}\item[{real, intent(in)}]{T,  }\item[{real, intent(in)}]{S,  }\item[{real, intent(in)}]{pressure,  }\item[{real, intent(out)}]{rho,  }\item[{real, intent(out)}]{drho\+\_\+dp,  }\item[{type(\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}), pointer}]{E\+OS }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calculate density and compressibility for a scalar. This just promotes the scalar to an array with a singleton dimension and calls calculate\+\_\+compress\+\_\+array. If US is present, the units of the inputs and outputs are rescaled. 


\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 rho} & In situ density \mbox{[}kg m-\/3\mbox{]} or \mbox{[}R $\sim$$>$ kg m-\/3\mbox{]}\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+dp} & The partial derivative of density with pressure (also the inverse of the square of sound speed) \mbox{[}s2 m-\/2\mbox{]} or \mbox{[}T2 L-\/2\mbox{]}\\
\hline
 & {\em eos} & Equation of state structure \\
\hline
\end{DoxyParams}


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



References \hyperlink{namespacemom__eos_a3296609bd60bfe7ed2c5eac1170d07a3}{calculate\+\_\+compress\+\_\+array()}.


\begin{DoxyCode}
01139   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}        :: t\textcolor{comment}{        !< Potential temperature referenced to the surface [degC]}
01140   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}        :: s\textcolor{comment}{        !< Salinity [ppt]}
01141   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}        :: pressure\textcolor{comment}{ !< Pressure [Pa] or [R L2 T-2 ~> Pa]}
01142   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(out)}       :: rho\textcolor{comment}{      !< In situ density [kg m-3] or [R ~> kg m-3]}
01143   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(out)}       :: drho\_dp\textcolor{comment}{  !< The partial derivative of density with pressure (also the}
01144 \textcolor{comment}{                                      !! inverse of the square of sound speed) [s2 m-2] or [T2 L-2]}
01145   \textcolor{keywordtype}{type}(eos\_type), \textcolor{keywordtype}{pointer} :: eos\textcolor{comment}{      !< Equation of state structure}
01146 
01147   \textcolor{comment}{! Local variables}
01148   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(1)} :: ta, sa, pa, rhoa, drho\_dpa
01149 
01150   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
01151     \textcolor{stringliteral}{"calculate\_compress called with an unassociated EOS\_type EOS."})
01152   ta(1) = t ; sa(1) = s; pa(1) = pressure
01153 
01154   \textcolor{keyword}{call }calculate\_compress\_array(ta, sa, pa, rhoa, drho\_dpa, 1, 1, eos)
01155   rho = rhoa(1) ; drho\_dp = drho\_dpa(1)
01156 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a2e78ade3bcba817406479cbbe3941a5f}\label{namespacemom__eos_a2e78ade3bcba817406479cbbe3941a5f}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!calculate\+\_\+density\+\_\+1d@{calculate\+\_\+density\+\_\+1d}}
\index{calculate\+\_\+density\+\_\+1d@{calculate\+\_\+density\+\_\+1d}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{calculate\+\_\+density\+\_\+1d()}{calculate\_density\_1d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calculate\+\_\+density\+\_\+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)}]{rho,  }\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}]{rho\+\_\+ref,  }\item[{real, intent(in), optional}]{scale }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calls the appropriate subroutine to calculate the density of sea water for 1-\/D array inputs, potentially limiting the domain of indices that are worked on. If rho\+\_\+ref is present, the anomaly with respect to rho\+\_\+ref is returned. 


\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 rho} & Density (in-\/situ if pressure is local) \mbox{[}R $\sim$$>$ kg m-\/3\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 rho\+\_\+ref} & A reference density \mbox{[}kg m-\/3\mbox{]}\\
\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 \hyperlink{MOM__EOS_8F90_source_l00360}{360} of file \hyperlink{MOM__EOS_8F90_source}{M\+O\+M\+\_\+\+E\+O\+S.\+F90}.



References \hyperlink{namespacemom__eos_a3be8289c391088bdd3af78d272b92521}{calculate\+\_\+density\+\_\+array()}.


\begin{DoxyCode}
00360   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(in)}    :: t\textcolor{comment}{        !< Potential temperature referenced to the surface
       [degC]}
00361   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(in)}    :: s\textcolor{comment}{        !< Salinity [ppt]}
00362   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(in)}    :: pressure\textcolor{comment}{ !< Pressure [R L2 T-2 ~> Pa]}
00363   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(inout)} :: rho\textcolor{comment}{      !< Density (in-situ if pressure is local) [R ~> kg m-3]}
00364   \textcolor{keywordtype}{type}(eos\_type),        \textcolor{keywordtype}{pointer}       :: eos\textcolor{comment}{      !< Equation of state structure}
00365   \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}
00366 \textcolor{comment}{                                                       !! into account that arrays start at 1.}
00367   \textcolor{keywordtype}{real},                  \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: rho\_ref\textcolor{comment}{ !< A reference density [kg m-3]}
00368   \textcolor{keywordtype}{real},                  \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scale\textcolor{comment}{ !< A multiplicative factor by which to scale density}
00369 \textcolor{comment}{                                                   !! in combination with scaling given by US [various]}
00370   \textcolor{comment}{! Local variables}
00371   \textcolor{keywordtype}{real} :: p\_scale   \textcolor{comment}{! A factor to convert pressure to units of Pa [Pa T2 R-1 L-2 ~> 1]}
00372   \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]}
00373   \textcolor{keywordtype}{real} :: rho\_unscale \textcolor{comment}{! A factor to convert density from R to kg m-3 [kg m-3 R-1 ~> 1]}
00374   \textcolor{keywordtype}{real} :: rho\_reference \textcolor{comment}{! rho\_ref converted to [kg m-3]}
00375   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(size(rho))} :: pres  \textcolor{comment}{! Pressure converted to [Pa]}
00376   \textcolor{keywordtype}{integer} :: i, is, ie, npts
00377 
00378   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
00379     \textcolor{stringliteral}{"calculate\_density\_1d called with an unassociated EOS\_type EOS."})
00380 
00381   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(dom)) \textcolor{keywordflow}{then}
00382     is = dom(1) ; ie = dom(2) ; npts = 1 + ie - is
00383   \textcolor{keywordflow}{else}
00384     is = 1 ; ie = \textcolor{keyword}{size}(rho) ; npts = 1 + ie - is
00385 \textcolor{keywordflow}{  endif}
00386 
00387   p\_scale = eos%RL2\_T2\_to\_Pa
00388   rho\_unscale = eos%R\_to\_kg\_m3
00389 
00390   \textcolor{keywordflow}{if} ((p\_scale == 1.0) .and. (rho\_unscale == 1.0)) \textcolor{keywordflow}{then}
00391     \textcolor{keyword}{call }calculate\_density\_array(t, s, pressure, rho, is, npts, eos, rho\_ref=rho\_ref)
00392   \textcolor{keywordflow}{elseif} (\textcolor{keyword}{present}(rho\_ref)) \textcolor{keywordflow}{then} \textcolor{comment}{! This is the same as above, but with some extra work to rescale
       variables.}
00393     \textcolor{keywordflow}{do} i=is,ie ; pres(i) = p\_scale * pressure(i) ;\textcolor{keywordflow}{ enddo}
00394     rho\_reference = rho\_unscale*rho\_ref
00395     \textcolor{keyword}{call }calculate\_density\_array(t, s, pres, rho, is, npts, eos, rho\_ref=rho\_reference)
00396   \textcolor{keywordflow}{else}  \textcolor{comment}{! There is rescaling of variables, but rho\_ref is not present. Passing a 0 value of rho\_ref}
00397         \textcolor{comment}{! changes answers at roundoff for some equations of state, like Wright and UNESCO.}
00398     \textcolor{keywordflow}{do} i=is,ie ; pres(i) = p\_scale * pressure(i) ;\textcolor{keywordflow}{ enddo}
00399     \textcolor{keyword}{call }calculate\_density\_array(t, s, pres, rho, is, npts, eos)
00400 \textcolor{keywordflow}{  endif}
00401 
00402   rho\_scale = eos%kg\_m3\_to\_R
00403   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scale)) rho\_scale = rho\_scale * scale
00404   \textcolor{keywordflow}{if} (rho\_scale /= 1.0) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{do} i=is,ie
00405     rho(i) = rho\_scale * rho(i)
00406 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ endif}
00407 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a3be8289c391088bdd3af78d272b92521}\label{namespacemom__eos_a3be8289c391088bdd3af78d272b92521}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!calculate\+\_\+density\+\_\+array@{calculate\+\_\+density\+\_\+array}}
\index{calculate\+\_\+density\+\_\+array@{calculate\+\_\+density\+\_\+array}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{calculate\+\_\+density\+\_\+array()}{calculate\_density\_array()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calculate\+\_\+density\+\_\+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)}]{rho,  }\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}]{rho\+\_\+ref,  }\item[{real, intent(in), optional}]{scale }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calls the appropriate subroutine to calculate the density of sea water for 1-\/D array inputs. If rho\+\_\+ref is present, the anomaly with respect to rho\+\_\+ref is returned. 


\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 rho} & Density (in-\/situ if pressure is local) \mbox{[}kg m-\/3\mbox{]} or \mbox{[}R $\sim$$>$ kg m-\/3\mbox{]}\\
\hline
\mbox{\tt in}  & {\em start} & Start index for computation\\
\hline
\mbox{\tt in}  & {\em npts} & Number of point to compute\\
\hline
 & {\em eos} & Equation of state structure\\
\hline
\mbox{\tt in}  & {\em rho\+\_\+ref} & A reference density \mbox{[}kg m-\/3\mbox{]}\\
\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 \hyperlink{MOM__EOS_8F90_source_l00263}{263} of file \hyperlink{MOM__EOS_8F90_source}{M\+O\+M\+\_\+\+E\+O\+S.\+F90}.



References \hyperlink{namespacemom__eos_a230a2f280b1e27ee913e1b3cf4c412b8}{eos\+\_\+linear}, \hyperlink{namespacemom__eos_ac37477f774acf511e88e96c036fa8292}{eos\+\_\+nemo}, \hyperlink{namespacemom__eos_afcd60f98ea35c6044d38eb4409b0a083}{eos\+\_\+teos10}, \hyperlink{namespacemom__eos_a9eacc16ba79dc66131b54bf31114f35a}{eos\+\_\+unesco}, and \hyperlink{namespacemom__eos_a4bbd0f276fe3878bd01b3ff180fb41c5}{eos\+\_\+wright}.



Referenced by \hyperlink{namespacemom__eos_a2e78ade3bcba817406479cbbe3941a5f}{calculate\+\_\+density\+\_\+1d()}.


\begin{DoxyCode}
00263   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: t\textcolor{comment}{        !< Potential temperature referenced to the surface [degC]}
00264   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: s\textcolor{comment}{        !< Salinity [ppt]}
00265   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: pressure\textcolor{comment}{ !< Pressure [Pa] or [R L2 T-2 ~> Pa]}
00266   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: rho\textcolor{comment}{      !< Density (in-situ if pressure is local) [kg m-3] or [R ~>
       kg m-3]}
00267   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}    :: start\textcolor{comment}{    !< Start index for computation}
00268   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}    :: npts\textcolor{comment}{     !< Number of point to compute}
00269   \textcolor{keywordtype}{type}(eos\_type),     \textcolor{keywordtype}{pointer}       :: eos\textcolor{comment}{      !< Equation of state structure}
00270   \textcolor{keywordtype}{real},                  \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: rho\_ref\textcolor{comment}{  !< A reference density [kg m-3]}
00271   \textcolor{keywordtype}{real},                  \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scale\textcolor{comment}{    !< A multiplicative factor by which to scale
       density}
00272 \textcolor{comment}{                                                !! in combination with scaling given by US [various]}
00273   \textcolor{keywordtype}{integer} :: j
00274 
00275   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
00276     \textcolor{stringliteral}{"calculate\_density\_array called with an unassociated EOS\_type EOS."})
00277 
00278   \textcolor{keywordflow}{select case} (eos%form\_of\_EOS)
00279     \textcolor{keywordflow}{case} (eos\_linear)
00280       \textcolor{keyword}{call }calculate\_density\_linear(t, s, pressure, rho, start, npts, &
00281                                     eos%Rho\_T0\_S0, eos%dRho\_dT, eos%dRho\_dS, rho\_ref)
00282     \textcolor{keywordflow}{case} (eos\_unesco)
00283       \textcolor{keyword}{call }calculate\_density\_unesco(t, s, pressure, rho, start, npts, rho\_ref)
00284     \textcolor{keywordflow}{case} (eos\_wright)
00285       \textcolor{keyword}{call }calculate\_density\_wright(t, s, pressure, rho, start, npts, rho\_ref)
00286     \textcolor{keywordflow}{case} (eos\_teos10)
00287       \textcolor{keyword}{call }calculate\_density\_teos10(t, s, pressure, rho, start, npts, rho\_ref)
00288     \textcolor{keywordflow}{case} (eos\_nemo)
00289     \textcolor{keyword}{call }calculate\_density\_nemo(t, s, pressure, rho, start, npts, rho\_ref)
00290 \textcolor{keywordflow}{    case default}
00291       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"calculate\_density\_array: EOS%form\_of\_EOS is not valid."})
00292 \textcolor{keywordflow}{  end select}
00293 
00294   \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
00295     rho(j) = scale * rho(j)
00296 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ endif} ;\textcolor{keywordflow}{ endif}
00297 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_aed3bb20f32c038dbe84bc44442c6e724}\label{namespacemom__eos_aed3bb20f32c038dbe84bc44442c6e724}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!calculate\+\_\+density\+\_\+derivs\+\_\+1d@{calculate\+\_\+density\+\_\+derivs\+\_\+1d}}
\index{calculate\+\_\+density\+\_\+derivs\+\_\+1d@{calculate\+\_\+density\+\_\+derivs\+\_\+1d}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{calculate\+\_\+density\+\_\+derivs\+\_\+1d()}{calculate\_density\_derivs\_1d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::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 \hyperlink{MOM__EOS_8F90_source_l00751}{751} of file \hyperlink{MOM__EOS_8F90_source}{M\+O\+M\+\_\+\+E\+O\+S.\+F90}.



References \hyperlink{namespacemom__eos_a27ec57cbbd2e673d542ba2c8dd44053a}{calculate\+\_\+density\+\_\+derivs\+\_\+array()}.


\begin{DoxyCode}
00751   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(in)}    :: t\textcolor{comment}{        !< Potential temperature referenced to the surface
       [degC]}
00752   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(in)}    :: s\textcolor{comment}{        !< Salinity [ppt]}
00753   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(in)}    :: pressure\textcolor{comment}{ !< Pressure [R L2 T-2 ~> Pa]}
00754   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(inout)} :: drho\_dt\textcolor{comment}{  !< The partial derivative of density with potential}
00755 \textcolor{comment}{                                                   !! temperature [R degC-1 ~> kg m-3 degC-1]}
00756   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(inout)} :: drho\_ds\textcolor{comment}{  !< The partial derivative of density with salinity}
00757 \textcolor{comment}{                                                   !! [R degC-1 ~> kg m-3 ppt-1]}
00758   \textcolor{keywordtype}{type}(eos\_type),        \textcolor{keywordtype}{pointer}       :: eos\textcolor{comment}{      !< Equation of state structure}
00759   \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}
00760 \textcolor{comment}{                                                       !! into account that arrays start at 1.}
00761   \textcolor{keywordtype}{real},                  \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scale\textcolor{comment}{ !< A multiplicative factor by which to scale density}
00762 \textcolor{comment}{                                                       !! in combination with scaling given by US [various]}
00763   \textcolor{comment}{! Local variables}
00764   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(size(drho\_dT))} :: pres  \textcolor{comment}{! Pressure converted to [Pa]}
00765   \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]}
00766   \textcolor{keywordtype}{real} :: p\_scale   \textcolor{comment}{! A factor to convert pressure to units of Pa [Pa T2 R-1 L-2 ~> 1]}
00767   \textcolor{keywordtype}{integer} :: i, is, ie, npts
00768 
00769   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
00770     \textcolor{stringliteral}{"calculate\_density\_derivs called with an unassociated EOS\_type EOS."})
00771 
00772   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(dom)) \textcolor{keywordflow}{then}
00773     is = dom(1) ; ie = dom(2) ; npts = 1 + ie - is
00774   \textcolor{keywordflow}{else}
00775     is = 1 ; ie = \textcolor{keyword}{size}(drho\_dt) ; npts = 1 + ie - is
00776 \textcolor{keywordflow}{  endif}
00777 
00778   p\_scale = eos%RL2\_T2\_to\_Pa
00779 
00780   \textcolor{keywordflow}{if} (p\_scale == 1.0) \textcolor{keywordflow}{then}
00781     \textcolor{keyword}{call }calculate\_density\_derivs\_array(t, s, pressure, drho\_dt, drho\_ds, is, npts, eos)
00782   \textcolor{keywordflow}{else}
00783     \textcolor{keywordflow}{do} i=is,ie ; pres(i) = p\_scale * pressure(i) ;\textcolor{keywordflow}{ enddo}
00784     \textcolor{keyword}{call }calculate\_density\_derivs\_array(t, s, pres, drho\_dt, drho\_ds, is, npts, eos)
00785 \textcolor{keywordflow}{  endif}
00786 
00787   rho\_scale = eos%kg\_m3\_to\_R
00788   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scale)) rho\_scale = rho\_scale * scale
00789   \textcolor{keywordflow}{if} (rho\_scale /= 1.0) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{do} i=is,ie
00790     drho\_dt(i) = rho\_scale * drho\_dt(i)
00791     drho\_ds(i) = rho\_scale * drho\_ds(i)
00792 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ endif}
00793 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a27ec57cbbd2e673d542ba2c8dd44053a}\label{namespacemom__eos_a27ec57cbbd2e673d542ba2c8dd44053a}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!calculate\+\_\+density\+\_\+derivs\+\_\+array@{calculate\+\_\+density\+\_\+derivs\+\_\+array}}
\index{calculate\+\_\+density\+\_\+derivs\+\_\+array@{calculate\+\_\+density\+\_\+derivs\+\_\+array}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{calculate\+\_\+density\+\_\+derivs\+\_\+array()}{calculate\_density\_derivs\_array()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::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 \hyperlink{MOM__EOS_8F90_source_l00706}{706} of file \hyperlink{MOM__EOS_8F90_source}{M\+O\+M\+\_\+\+E\+O\+S.\+F90}.



References \hyperlink{namespacemom__eos_a230a2f280b1e27ee913e1b3cf4c412b8}{eos\+\_\+linear}, \hyperlink{namespacemom__eos_ac37477f774acf511e88e96c036fa8292}{eos\+\_\+nemo}, \hyperlink{namespacemom__eos_afcd60f98ea35c6044d38eb4409b0a083}{eos\+\_\+teos10}, \hyperlink{namespacemom__eos_a9eacc16ba79dc66131b54bf31114f35a}{eos\+\_\+unesco}, and \hyperlink{namespacemom__eos_a4bbd0f276fe3878bd01b3ff180fb41c5}{eos\+\_\+wright}.



Referenced by \hyperlink{namespacemom__eos_aed3bb20f32c038dbe84bc44442c6e724}{calculate\+\_\+density\+\_\+derivs\+\_\+1d()}.


\begin{DoxyCode}
00706   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: t\textcolor{comment}{        !< Potential temperature referenced to the surface [degC]}
00707   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: s\textcolor{comment}{        !< Salinity [ppt]}
00708   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: pressure\textcolor{comment}{ !< Pressure [Pa] or [R L2 T-2 ~> Pa]}
00709   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: drho\_dt\textcolor{comment}{  !< The partial derivative of density with potential}
00710 \textcolor{comment}{                                                !! temperature [kg m-3 degC-1] or [R degC-1 ~> kg m-3
       degC-1]}
00711   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: drho\_ds\textcolor{comment}{  !< The partial derivative of density with salinity,}
00712 \textcolor{comment}{                                                !! in [kg m-3 ppt-1] or [R degC-1 ~> kg m-3 ppt-1]}
00713   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}    :: start\textcolor{comment}{    !< Starting index within the array}
00714   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}    :: npts\textcolor{comment}{     !< The number of values to calculate}
00715   \textcolor{keywordtype}{type}(eos\_type),     \textcolor{keywordtype}{pointer}       :: eos\textcolor{comment}{      !< Equation of state structure}
00716   \textcolor{keywordtype}{real},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: scale\textcolor{comment}{ !< A multiplicative factor by which to scale density}
00717 \textcolor{comment}{                                                !! in combination with scaling given by US [various]}
00718 
00719   \textcolor{comment}{! Local variables}
00720   \textcolor{keywordtype}{integer} :: j
00721 
00722   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
00723     \textcolor{stringliteral}{"calculate\_density\_derivs called with an unassociated EOS\_type EOS."})
00724 
00725   \textcolor{keywordflow}{select case} (eos%form\_of\_EOS)
00726     \textcolor{keywordflow}{case} (eos\_linear)
00727       \textcolor{keyword}{call }calculate\_density\_derivs\_linear(t, s, pressure, drho\_dt, drho\_ds, eos%Rho\_T0\_S0, &
00728                                            eos%dRho\_dT, eos%dRho\_dS, start, npts)
00729     \textcolor{keywordflow}{case} (eos\_unesco)
00730       \textcolor{keyword}{call }calculate\_density\_derivs\_unesco(t, s, pressure, drho\_dt, drho\_ds, start, npts)
00731     \textcolor{keywordflow}{case} (eos\_wright)
00732       \textcolor{keyword}{call }calculate\_density\_derivs\_wright(t, s, pressure, drho\_dt, drho\_ds, start, npts)
00733     \textcolor{keywordflow}{case} (eos\_teos10)
00734       \textcolor{keyword}{call }calculate\_density\_derivs\_teos10(t, s, pressure, drho\_dt, drho\_ds, start, npts)
00735     \textcolor{keywordflow}{case} (eos\_nemo)
00736       \textcolor{keyword}{call }calculate\_density\_derivs\_nemo(t, s, pressure, drho\_dt, drho\_ds, start, npts)
00737 \textcolor{keywordflow}{    case default}
00738       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"calculate\_density\_derivs\_array: EOS%form\_of\_EOS is not valid."})
00739 \textcolor{keywordflow}{  end select}
00740 
00741   \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
00742     drho\_dt(j) = scale * drho\_dt(j)
00743     drho\_ds(j) = scale * drho\_ds(j)
00744 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ endif} ;\textcolor{keywordflow}{ endif}
00745 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a06d9d6680e838b965666986e63c980e7}\label{namespacemom__eos_a06d9d6680e838b965666986e63c980e7}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!calculate\+\_\+density\+\_\+derivs\+\_\+scalar@{calculate\+\_\+density\+\_\+derivs\+\_\+scalar}}
\index{calculate\+\_\+density\+\_\+derivs\+\_\+scalar@{calculate\+\_\+density\+\_\+derivs\+\_\+scalar}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{calculate\+\_\+density\+\_\+derivs\+\_\+scalar()}{calculate\_density\_derivs\_scalar()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::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 \hyperlink{MOM__EOS_8F90_source_l00800}{800} of file \hyperlink{MOM__EOS_8F90_source}{M\+O\+M\+\_\+\+E\+O\+S.\+F90}.



References \hyperlink{namespacemom__eos_a230a2f280b1e27ee913e1b3cf4c412b8}{eos\+\_\+linear}, \hyperlink{namespacemom__eos_afcd60f98ea35c6044d38eb4409b0a083}{eos\+\_\+teos10}, and \hyperlink{namespacemom__eos_a4bbd0f276fe3878bd01b3ff180fb41c5}{eos\+\_\+wright}.


\begin{DoxyCode}
00800   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: t\textcolor{comment}{ !< Potential temperature referenced to the surface [degC]}
00801   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: s\textcolor{comment}{ !< Salinity [ppt]}
00802   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< Pressure [Pa] or [R L2 T-2 ~> Pa]}
00803   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(out)} :: drho\_dt\textcolor{comment}{ !< The partial derivative of density with potential}
00804 \textcolor{comment}{                                         !! temperature [kg m-3 degC-1] or [R degC-1 ~> kg m-3 degC-1]}
00805   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(out)} :: drho\_ds\textcolor{comment}{ !< The partial derivative of density with salinity,}
00806 \textcolor{comment}{                                         !! in [kg m-3 ppt-1] or [R ppt-1 ~> kg m-3 ppt-1]}
00807   \textcolor{keywordtype}{type}(eos\_type), \textcolor{keywordtype}{pointer}     :: eos\textcolor{comment}{     !< Equation of state structure}
00808   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: scale\textcolor{comment}{   !< A multiplicative factor by which to scale density}
00809 \textcolor{comment}{                                         !! in combination with scaling given by US [various]}
00810   \textcolor{comment}{! Local variables}
00811   \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]}
00812   \textcolor{keywordtype}{real} :: p\_scale   \textcolor{comment}{! A factor to convert pressure to units of Pa [Pa T2 R-1 L-2 ~> 1]}
00813   \textcolor{keywordtype}{integer} :: j
00814 
00815   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
00816     \textcolor{stringliteral}{"calculate\_density\_derivs called with an unassociated EOS\_type EOS."})
00817 
00818   p\_scale = eos%RL2\_T2\_to\_Pa
00819 
00820   \textcolor{keywordflow}{select case} (eos%form\_of\_EOS)
00821     \textcolor{keywordflow}{case} (eos\_linear)
00822       \textcolor{keyword}{call }calculate\_density\_derivs\_linear(t, s, p\_scale*pressure, drho\_dt, drho\_ds, &
00823                                            eos%Rho\_T0\_S0, eos%dRho\_dT, eos%dRho\_dS)
00824     \textcolor{keywordflow}{case} (eos\_wright)
00825       \textcolor{keyword}{call }calculate\_density\_derivs\_wright(t, s, p\_scale*pressure, drho\_dt, drho\_ds)
00826     \textcolor{keywordflow}{case} (eos\_teos10)
00827       \textcolor{keyword}{call }calculate\_density\_derivs\_teos10(t, s, p\_scale*pressure, drho\_dt, drho\_ds)
00828 \textcolor{keywordflow}{    case default}
00829       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"calculate\_density\_derivs\_scalar: EOS%form\_of\_EOS is not valid."})
00830 \textcolor{keywordflow}{  end select}
00831 
00832   rho\_scale = eos%kg\_m3\_to\_R
00833   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scale)) rho\_scale = rho\_scale * scale
00834   \textcolor{keywordflow}{if} (rho\_scale /= 1.0) \textcolor{keywordflow}{then}
00835     drho\_dt = rho\_scale * drho\_dt
00836     drho\_ds = rho\_scale * drho\_ds
00837 \textcolor{keywordflow}{  endif}
00838 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_ac3bdab784e3535d661c47d1ec8a624fd}\label{namespacemom__eos_ac3bdab784e3535d661c47d1ec8a624fd}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!calculate\+\_\+density\+\_\+scalar@{calculate\+\_\+density\+\_\+scalar}}
\index{calculate\+\_\+density\+\_\+scalar@{calculate\+\_\+density\+\_\+scalar}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{calculate\+\_\+density\+\_\+scalar()}{calculate\_density\_scalar()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calculate\+\_\+density\+\_\+scalar (\begin{DoxyParamCaption}\item[{real, intent(in)}]{T,  }\item[{real, intent(in)}]{S,  }\item[{real, intent(in)}]{pressure,  }\item[{real, intent(out)}]{rho,  }\item[{type(\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}), pointer}]{E\+OS,  }\item[{real, intent(in), optional}]{rho\+\_\+ref,  }\item[{real, intent(in), optional}]{scale }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calls the appropriate subroutine to calculate density of sea water for scalar inputs. If rho\+\_\+ref is present, the anomaly with respect to rho\+\_\+ref is returned. The pressure and density can be rescaled with the US. If both the US and scale arguments are present the density scaling uses the product of the two scaling factors. 


\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 rho} & Density (in-\/situ if pressure is local) \mbox{[}kg m-\/3\mbox{]} or \mbox{[}R $\sim$$>$ kg m-\/3\mbox{]}\\
\hline
 & {\em eos} & Equation of state structure\\
\hline
\mbox{\tt in}  & {\em rho\+\_\+ref} & A reference density \mbox{[}kg m-\/3\mbox{]}\\
\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 \hyperlink{MOM__EOS_8F90_source_l00166}{166} of file \hyperlink{MOM__EOS_8F90_source}{M\+O\+M\+\_\+\+E\+O\+S.\+F90}.



References \hyperlink{namespacemom__eos_a230a2f280b1e27ee913e1b3cf4c412b8}{eos\+\_\+linear}, \hyperlink{namespacemom__eos_ac37477f774acf511e88e96c036fa8292}{eos\+\_\+nemo}, \hyperlink{namespacemom__eos_afcd60f98ea35c6044d38eb4409b0a083}{eos\+\_\+teos10}, \hyperlink{namespacemom__eos_a9eacc16ba79dc66131b54bf31114f35a}{eos\+\_\+unesco}, and \hyperlink{namespacemom__eos_a4bbd0f276fe3878bd01b3ff180fb41c5}{eos\+\_\+wright}.


\begin{DoxyCode}
00166   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: t\textcolor{comment}{        !< Potential temperature referenced to the surface [degC]}
00167   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: s\textcolor{comment}{        !< Salinity [ppt]}
00168   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< Pressure [Pa] or [R L2 T-2 ~> Pa]}
00169   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(out)} :: rho\textcolor{comment}{      !< Density (in-situ if pressure is local) [kg m-3] or [R ~> kg
       m-3]}
00170   \textcolor{keywordtype}{type}(eos\_type), \textcolor{keywordtype}{pointer}     :: eos\textcolor{comment}{      !< Equation of state structure}
00171   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: rho\_ref\textcolor{comment}{  !< A reference density [kg m-3]}
00172   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: scale\textcolor{comment}{    !< A multiplicative factor by which to scale density in}
00173 \textcolor{comment}{                                          !! combination with scaling given by US [various]}
00174 
00175   \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]}
00176   \textcolor{keywordtype}{real} :: p\_scale   \textcolor{comment}{! A factor to convert pressure to units of Pa [Pa T2 R-1 L-2 ~> 1]}
00177 
00178   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
00179     \textcolor{stringliteral}{"calculate\_density\_scalar called with an unassociated EOS\_type EOS."})
00180 
00181   p\_scale = eos%RL2\_T2\_to\_Pa
00182 
00183   \textcolor{keywordflow}{select case} (eos%form\_of\_EOS)
00184     \textcolor{keywordflow}{case} (eos\_linear)
00185       \textcolor{keyword}{call }calculate\_density\_linear(t, s, p\_scale*pressure, rho, &
00186                                     eos%Rho\_T0\_S0, eos%dRho\_dT, eos%dRho\_dS, rho\_ref)
00187     \textcolor{keywordflow}{case} (eos\_unesco)
00188       \textcolor{keyword}{call }calculate\_density\_unesco(t, s, p\_scale*pressure, rho, rho\_ref)
00189     \textcolor{keywordflow}{case} (eos\_wright)
00190       \textcolor{keyword}{call }calculate\_density\_wright(t, s, p\_scale*pressure, rho, rho\_ref)
00191     \textcolor{keywordflow}{case} (eos\_teos10)
00192       \textcolor{keyword}{call }calculate\_density\_teos10(t, s, p\_scale*pressure, rho, rho\_ref)
00193     \textcolor{keywordflow}{case} (eos\_nemo)
00194       \textcolor{keyword}{call }calculate\_density\_nemo(t, s, p\_scale*pressure, rho, rho\_ref)
00195 \textcolor{keywordflow}{    case default}
00196       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"calculate\_density\_scalar: EOS is not valid."})
00197 \textcolor{keywordflow}{  end select}
00198 
00199   rho\_scale = eos%kg\_m3\_to\_R
00200   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scale)) rho\_scale = rho\_scale * scale
00201   rho = rho\_scale * rho
00202 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a8c0fa67a7a4911eb5fa33c5d17b997f9}\label{namespacemom__eos_a8c0fa67a7a4911eb5fa33c5d17b997f9}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+array@{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+array}}
\index{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+array@{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+array}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+array()}{calculate\_density\_second\_derivs\_array()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calculate\+\_\+density\+\_\+second\+\_\+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\+\_\+d\+S\+\_\+dS,  }\item[{real, dimension(\+:), intent(inout)}]{drho\+\_\+d\+S\+\_\+dT,  }\item[{real, dimension(\+:), intent(inout)}]{drho\+\_\+d\+T\+\_\+dT,  }\item[{real, dimension(\+:), intent(inout)}]{drho\+\_\+d\+S\+\_\+dP,  }\item[{real, dimension(\+:), intent(inout)}]{drho\+\_\+d\+T\+\_\+dP,  }\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 second 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\+\_\+ds\+\_\+ds} & Partial derivative of beta with respect to S \mbox{[}kg m-\/3 ppt-\/2\mbox{]} or \mbox{[}R ppt-\/2 $\sim$$>$ kg m-\/3 ppt-\/2\mbox{]}\\
\hline
\mbox{\tt in,out}  & {\em drho\+\_\+ds\+\_\+dt} & Partial derivative of beta with respect to T \mbox{[}kg m-\/3 ppt-\/1 deg\+C-\/1\mbox{]} or \mbox{[}R ppt-\/1 deg\+C-\/1 $\sim$$>$ kg m-\/3 ppt-\/1 deg\+C-\/1\mbox{]}\\
\hline
\mbox{\tt in,out}  & {\em drho\+\_\+dt\+\_\+dt} & Partial derivative of alpha with respect to T \mbox{[}kg m-\/3 deg\+C-\/2\mbox{]} or \mbox{[}R deg\+C-\/2 $\sim$$>$ kg m-\/3 deg\+C-\/2\mbox{]}\\
\hline
\mbox{\tt in,out}  & {\em drho\+\_\+ds\+\_\+dp} & Partial derivative of beta with respect to pressure \mbox{[}kg m-\/3 ppt-\/1 Pa-\/1\mbox{]} or \mbox{[}R ppt-\/1 Pa-\/1 $\sim$$>$ kg m-\/3 ppt-\/1 Pa-\/1\mbox{]}\\
\hline
\mbox{\tt in,out}  & {\em drho\+\_\+dt\+\_\+dp} & Partial derivative of alpha with respect to pressure \mbox{[}kg m-\/3 deg\+C-\/1 Pa-\/1\mbox{]} or \mbox{[}R deg\+C-\/1 Pa-\/1 $\sim$$>$ kg m-\/3 deg\+C-\/1 Pa-\/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 \hyperlink{MOM__EOS_8F90_source_l00844}{844} of file \hyperlink{MOM__EOS_8F90_source}{M\+O\+M\+\_\+\+E\+O\+S.\+F90}.



References \hyperlink{namespacemom__eos_a230a2f280b1e27ee913e1b3cf4c412b8}{eos\+\_\+linear}, \hyperlink{namespacemom__eos_afcd60f98ea35c6044d38eb4409b0a083}{eos\+\_\+teos10}, and \hyperlink{namespacemom__eos_a4bbd0f276fe3878bd01b3ff180fb41c5}{eos\+\_\+wright}.


\begin{DoxyCode}
00844   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: t\textcolor{comment}{ !< Potential temperature referenced to the surface [degC]}
00845   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: s\textcolor{comment}{ !< Salinity [ppt]}
00846   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{   !< Pressure [Pa] or [R L2 T-2 ~> Pa]}
00847   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: drho\_ds\_ds\textcolor{comment}{ !< Partial derivative of beta with respect to S}
00848 \textcolor{comment}{                                                  !!  [kg m-3 ppt-2] or [R ppt-2 ~> kg m-3 ppt-2]}
00849   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: drho\_ds\_dt\textcolor{comment}{ !< Partial derivative of beta with respect to T}
00850 \textcolor{comment}{                                                  !! [kg m-3 ppt-1 degC-1] or [R ppt-1 degC-1 ~> kg m-3
       ppt-1 degC-1]}
00851   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: drho\_dt\_dt\textcolor{comment}{ !< Partial derivative of alpha with respect to T}
00852 \textcolor{comment}{                                                  !! [kg m-3 degC-2] or [R degC-2 ~> kg m-3 degC-2]}
00853   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: drho\_ds\_dp\textcolor{comment}{ !< Partial derivative of beta with respect to pressure}
00854 \textcolor{comment}{                                                  !! [kg m-3 ppt-1 Pa-1] or [R ppt-1 Pa-1 ~> kg m-3 ppt-1
       Pa-1]}
00855   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: drho\_dt\_dp\textcolor{comment}{ !< Partial derivative of alpha with respect to pressure}
00856 \textcolor{comment}{                                                  !! [kg m-3 degC-1 Pa-1] or [R degC-1 Pa-1 ~> kg m-3
       degC-1 Pa-1]}
00857   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: start\textcolor{comment}{ !< Starting index within the array}
00858   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: npts\textcolor{comment}{  !< The number of values to calculate}
00859   \textcolor{keywordtype}{type}(eos\_type),     \textcolor{keywordtype}{pointer}     :: eos\textcolor{comment}{   !< Equation of state structure}
00860   \textcolor{keywordtype}{real},                  \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scale\textcolor{comment}{ !< A multiplicative factor by which to scale density}
00861 \textcolor{comment}{                                                  !! in combination with scaling given by US [various]}
00862   \textcolor{comment}{! Local variables}
00863   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(size(pressure))} :: pres  \textcolor{comment}{! Pressure converted to [Pa]}
00864   \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]}
00865   \textcolor{keywordtype}{real} :: p\_scale   \textcolor{comment}{! A factor to convert pressure to units of Pa [Pa T2 R-1 L-2 ~> 1]}
00866   \textcolor{keywordtype}{real} :: i\_p\_scale \textcolor{comment}{! The inverse of the factor to convert pressure to units of Pa [R L2 T-2 Pa-1 ~> 1]}
00867   \textcolor{keywordtype}{integer} :: j
00868 
00869   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
00870     \textcolor{stringliteral}{"calculate\_density\_derivs called with an unassociated EOS\_type EOS."})
00871 
00872   p\_scale = eos%RL2\_T2\_to\_Pa
00873 
00874   \textcolor{keywordflow}{if} (p\_scale == 1.0) \textcolor{keywordflow}{then}
00875     \textcolor{keywordflow}{select case} (eos%form\_of\_EOS)
00876       \textcolor{keywordflow}{case} (eos\_linear)
00877         \textcolor{keyword}{call }calculate\_density\_second\_derivs\_linear(t, s, pressure, drho\_ds\_ds, drho\_ds\_dt, &
00878                                                     drho\_dt\_dt, drho\_ds\_dp, drho\_dt\_dp, start, npts)
00879       \textcolor{keywordflow}{case} (eos\_wright)
00880         \textcolor{keyword}{call }calculate\_density\_second\_derivs\_wright(t, s, pressure, drho\_ds\_ds, drho\_ds\_dt, &
00881                                                     drho\_dt\_dt, drho\_ds\_dp, drho\_dt\_dp, start, npts)
00882       \textcolor{keywordflow}{case} (eos\_teos10)
00883         \textcolor{keyword}{call }calculate\_density\_second\_derivs\_teos10(t, s, pressure, drho\_ds\_ds, drho\_ds\_dt, &
00884                                                     drho\_dt\_dt, drho\_ds\_dp, drho\_dt\_dp, start, npts)
00885 \textcolor{keywordflow}{      case default}
00886         \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"calculate\_density\_derivs: EOS%form\_of\_EOS is not valid."})
00887 \textcolor{keywordflow}{    end select}
00888   \textcolor{keywordflow}{else}
00889     \textcolor{keywordflow}{do} j=start,start+npts-1 ; pres(j) = p\_scale * pressure(j) ;\textcolor{keywordflow}{ enddo}
00890     \textcolor{keywordflow}{select case} (eos%form\_of\_EOS)
00891       \textcolor{keywordflow}{case} (eos\_linear)
00892         \textcolor{keyword}{call }calculate\_density\_second\_derivs\_linear(t, s, pres, drho\_ds\_ds, drho\_ds\_dt, &
00893                                                     drho\_dt\_dt, drho\_ds\_dp, drho\_dt\_dp, start, npts)
00894       \textcolor{keywordflow}{case} (eos\_wright)
00895         \textcolor{keyword}{call }calculate\_density\_second\_derivs\_wright(t, s, pres, drho\_ds\_ds, drho\_ds\_dt, &
00896                                                     drho\_dt\_dt, drho\_ds\_dp, drho\_dt\_dp, start, npts)
00897       \textcolor{keywordflow}{case} (eos\_teos10)
00898         \textcolor{keyword}{call }calculate\_density\_second\_derivs\_teos10(t, s, pres, drho\_ds\_ds, drho\_ds\_dt, &
00899                                                     drho\_dt\_dt, drho\_ds\_dp, drho\_dt\_dp, start, npts)
00900 \textcolor{keywordflow}{      case default}
00901         \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"calculate\_density\_derivs: EOS%form\_of\_EOS is not valid."})
00902 \textcolor{keywordflow}{    end select}
00903 \textcolor{keywordflow}{  endif}
00904 
00905   rho\_scale = eos%kg\_m3\_to\_R
00906   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scale)) rho\_scale = rho\_scale * scale
00907   \textcolor{keywordflow}{if} (rho\_scale /= 1.0) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{do} j=start,start+npts-1
00908     drho\_ds\_ds(j) = rho\_scale * drho\_ds\_ds(j)
00909     drho\_ds\_dt(j) = rho\_scale * drho\_ds\_dt(j)
00910     drho\_dt\_dt(j) = rho\_scale * drho\_dt\_dt(j)
00911     drho\_ds\_dp(j) = rho\_scale * drho\_ds\_dp(j)
00912     drho\_dt\_dp(j) = rho\_scale * drho\_dt\_dp(j)
00913 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ endif}
00914 
00915   \textcolor{keywordflow}{if} (p\_scale /= 1.0) \textcolor{keywordflow}{then}
00916     i\_p\_scale = 1.0 / p\_scale
00917     \textcolor{keywordflow}{do} j=start,start+npts-1
00918       drho\_ds\_dp(j) = i\_p\_scale * drho\_ds\_dp(j)
00919       drho\_dt\_dp(j) = i\_p\_scale * drho\_dt\_dp(j)
00920 \textcolor{keywordflow}{    enddo}
00921 \textcolor{keywordflow}{  endif}
00922 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a2d7a984ed1c48d9e0ea1046de3eac886}\label{namespacemom__eos_a2d7a984ed1c48d9e0ea1046de3eac886}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+scalar@{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+scalar}}
\index{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+scalar@{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+scalar}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+scalar()}{calculate\_density\_second\_derivs\_scalar()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+scalar (\begin{DoxyParamCaption}\item[{real, intent(in)}]{T,  }\item[{real, intent(in)}]{S,  }\item[{real, intent(in)}]{pressure,  }\item[{real, intent(out)}]{drho\+\_\+d\+S\+\_\+dS,  }\item[{real, intent(out)}]{drho\+\_\+d\+S\+\_\+dT,  }\item[{real, intent(out)}]{drho\+\_\+d\+T\+\_\+dT,  }\item[{real, intent(out)}]{drho\+\_\+d\+S\+\_\+dP,  }\item[{real, intent(out)}]{drho\+\_\+d\+T\+\_\+dP,  }\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 second derivatives for scalar nputs. 


\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\+\_\+ds\+\_\+ds} & Partial derivative of beta with respect to S \mbox{[}kg m-\/3 ppt-\/2\mbox{]} or \mbox{[}R ppt-\/2 $\sim$$>$ kg m-\/3 ppt-\/2\mbox{]}\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+ds\+\_\+dt} & Partial derivative of beta with respect to T \mbox{[}kg m-\/3 ppt-\/1 deg\+C-\/1\mbox{]} or \mbox{[}R ppt-\/1 deg\+C-\/1 $\sim$$>$ kg m-\/3 ppt-\/1 deg\+C-\/1\mbox{]}\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+dt\+\_\+dt} & Partial derivative of alpha with respect to T \mbox{[}kg m-\/3 deg\+C-\/2\mbox{]} or \mbox{[}R deg\+C-\/2 $\sim$$>$ kg m-\/3 deg\+C-\/2\mbox{]}\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+ds\+\_\+dp} & Partial derivative of beta with respect to pressure \mbox{[}kg m-\/3 ppt-\/1 Pa-\/1\mbox{]} or \mbox{[}R ppt-\/1 Pa-\/1 $\sim$$>$ kg m-\/3 ppt-\/1 Pa-\/1\mbox{]}\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+dt\+\_\+dp} & Partial derivative of alpha with respect to pressure \mbox{[}kg m-\/3 deg\+C-\/1 Pa-\/1\mbox{]} or \mbox{[}R deg\+C-\/1 Pa-\/1 $\sim$$>$ kg m-\/3 deg\+C-\/1 Pa-\/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 \hyperlink{MOM__EOS_8F90_source_l00928}{928} of file \hyperlink{MOM__EOS_8F90_source}{M\+O\+M\+\_\+\+E\+O\+S.\+F90}.



References \hyperlink{namespacemom__eos_a230a2f280b1e27ee913e1b3cf4c412b8}{eos\+\_\+linear}, \hyperlink{namespacemom__eos_afcd60f98ea35c6044d38eb4409b0a083}{eos\+\_\+teos10}, and \hyperlink{namespacemom__eos_a4bbd0f276fe3878bd01b3ff180fb41c5}{eos\+\_\+wright}.


\begin{DoxyCode}
00928   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}  :: t\textcolor{comment}{ !< Potential temperature referenced to the surface [degC]}
00929   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}  :: s\textcolor{comment}{ !< Salinity [ppt]}
00930   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{   !< Pressure [Pa] or [R L2 T-2 ~> Pa]}
00931   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(out)} :: drho\_ds\_ds\textcolor{comment}{ !< Partial derivative of beta with respect to S}
00932 \textcolor{comment}{                                  !! [kg m-3 ppt-2] or [R ppt-2 ~> kg m-3 ppt-2]}
00933   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(out)} :: drho\_ds\_dt\textcolor{comment}{ !< Partial derivative of beta with respect to T}
00934 \textcolor{comment}{                                  !! [kg m-3 ppt-1 degC-1] or [R ppt-1 degC-1 ~> kg m-3 ppt-1 degC-1]}
00935   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(out)} :: drho\_dt\_dt\textcolor{comment}{ !< Partial derivative of alpha with respect to T}
00936 \textcolor{comment}{                                  !! [kg m-3 degC-2] or [R degC-2 ~> kg m-3 degC-2]}
00937   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(out)} :: drho\_ds\_dp\textcolor{comment}{ !< Partial derivative of beta with respect to pressure}
00938 \textcolor{comment}{                                  !! [kg m-3 ppt-1 Pa-1] or [R ppt-1 Pa-1 ~> kg m-3 ppt-1 Pa-1]}
00939   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(out)} :: drho\_dt\_dp\textcolor{comment}{ !< Partial derivative of alpha with respect to pressure}
00940 \textcolor{comment}{                                  !! [kg m-3 degC-1 Pa-1] or [R degC-1 Pa-1 ~> kg m-3 degC-1 Pa-1]}
00941   \textcolor{keywordtype}{type}(eos\_type), \textcolor{keywordtype}{pointer}    :: eos\textcolor{comment}{ !< Equation of state structure}
00942   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scale\textcolor{comment}{ !< A multiplicative factor by which to scale density}
00943 \textcolor{comment}{                                  !! in combination with scaling given by US [various]}
00944   \textcolor{comment}{! Local variables}
00945   \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]}
00946   \textcolor{keywordtype}{real} :: p\_scale   \textcolor{comment}{! A factor to convert pressure to units of Pa [Pa T2 R-1 L-2 ~> 1]}
00947   \textcolor{keywordtype}{real} :: i\_p\_scale \textcolor{comment}{! The inverse of the factor to convert pressure to units of Pa [R L2 T-2 Pa-1 ~> 1]}
00948 
00949   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
00950     \textcolor{stringliteral}{"calculate\_density\_derivs called with an unassociated EOS\_type EOS."})
00951 
00952   p\_scale = eos%RL2\_T2\_to\_Pa
00953 
00954   \textcolor{keywordflow}{select case} (eos%form\_of\_EOS)
00955     \textcolor{keywordflow}{case} (eos\_linear)
00956       \textcolor{keyword}{call }calculate\_density\_second\_derivs\_linear(t, s, p\_scale*pressure, drho\_ds\_ds, drho\_ds\_dt, &
00957                                                   drho\_dt\_dt, drho\_ds\_dp, drho\_dt\_dp)
00958     \textcolor{keywordflow}{case} (eos\_wright)
00959       \textcolor{keyword}{call }calculate\_density\_second\_derivs\_wright(t, s, p\_scale*pressure, drho\_ds\_ds, drho\_ds\_dt, &
00960                                                   drho\_dt\_dt, drho\_ds\_dp, drho\_dt\_dp)
00961     \textcolor{keywordflow}{case} (eos\_teos10)
00962       \textcolor{keyword}{call }calculate\_density\_second\_derivs\_teos10(t, s, p\_scale*pressure, drho\_ds\_ds, drho\_ds\_dt, &
00963                                                   drho\_dt\_dt, drho\_ds\_dp, drho\_dt\_dp)
00964 \textcolor{keywordflow}{    case default}
00965       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"calculate\_density\_derivs: EOS%form\_of\_EOS is not valid."})
00966 \textcolor{keywordflow}{  end select}
00967 
00968   rho\_scale = eos%kg\_m3\_to\_R
00969   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scale)) rho\_scale = rho\_scale * scale
00970   \textcolor{keywordflow}{if} (rho\_scale /= 1.0) \textcolor{keywordflow}{then}
00971     drho\_ds\_ds = rho\_scale * drho\_ds\_ds
00972     drho\_ds\_dt = rho\_scale * drho\_ds\_dt
00973     drho\_dt\_dt = rho\_scale * drho\_dt\_dt
00974     drho\_ds\_dp = rho\_scale * drho\_ds\_dp
00975     drho\_dt\_dp = rho\_scale * drho\_dt\_dp
00976 \textcolor{keywordflow}{  endif}
00977 
00978   \textcolor{keywordflow}{if} (p\_scale /= 1.0) \textcolor{keywordflow}{then}
00979     i\_p\_scale = 1.0 / p\_scale
00980     drho\_ds\_dp = i\_p\_scale * drho\_ds\_dp
00981     drho\_dt\_dp = i\_p\_scale * drho\_dt\_dp
00982 \textcolor{keywordflow}{  endif}
00983 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a43d417da1636adb2cd184f76223afded}\label{namespacemom__eos_a43d417da1636adb2cd184f76223afded}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!calculate\+\_\+spec\+\_\+vol\+\_\+array@{calculate\+\_\+spec\+\_\+vol\+\_\+array}}
\index{calculate\+\_\+spec\+\_\+vol\+\_\+array@{calculate\+\_\+spec\+\_\+vol\+\_\+array}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{calculate\+\_\+spec\+\_\+vol\+\_\+array()}{calculate\_spec\_vol\_array()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calculate\+\_\+spec\+\_\+vol\+\_\+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)}]{specvol,  }\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}]{spv\+\_\+ref,  }\item[{real, intent(in), optional}]{scale }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calls the appropriate subroutine to calculate the specific volume of sea water for 1-\/D array inputs. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em t} & potential temperature relative 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{]}\\
\hline
\mbox{\tt in,out}  & {\em specvol} & in situ specific volume \mbox{[}kg m-\/3\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
 & {\em eos} & Equation of state structure\\
\hline
\mbox{\tt in}  & {\em spv\+\_\+ref} & A reference specific volume \mbox{[}m3 kg-\/1\mbox{]}\\
\hline
\mbox{\tt in}  & {\em scale} & A multiplicative factor by which to scale specific volume in combination with scaling given by US \mbox{[}various\mbox{]} \\
\hline
\end{DoxyParams}


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



References \hyperlink{namespacemom__eos_a230a2f280b1e27ee913e1b3cf4c412b8}{eos\+\_\+linear}, \hyperlink{namespacemom__eos_ac37477f774acf511e88e96c036fa8292}{eos\+\_\+nemo}, \hyperlink{namespacemom__eos_afcd60f98ea35c6044d38eb4409b0a083}{eos\+\_\+teos10}, \hyperlink{namespacemom__eos_a9eacc16ba79dc66131b54bf31114f35a}{eos\+\_\+unesco}, and \hyperlink{namespacemom__eos_a4bbd0f276fe3878bd01b3ff180fb41c5}{eos\+\_\+wright}.



Referenced by \hyperlink{namespacemom__eos_afbb6a11d3b826308ddb1ffe0c5cf32d1}{calc\+\_\+spec\+\_\+vol\+\_\+1d()}, and \hyperlink{namespacemom__eos_a246056e557a08ce1c697256cd718d99a}{calc\+\_\+spec\+\_\+vol\+\_\+scalar()}.


\begin{DoxyCode}
00486   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: t\textcolor{comment}{        !< potential temperature relative to the surface [degC]}
00487   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: s\textcolor{comment}{        !< salinity [ppt]}
00488   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: pressure\textcolor{comment}{ !< pressure [Pa]}
00489   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: specvol\textcolor{comment}{  !< in situ specific volume [kg m-3]}
00490   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}    :: start\textcolor{comment}{    !< the starting point in the arrays.}
00491   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}    :: npts\textcolor{comment}{     !< the number of values to calculate.}
00492   \textcolor{keywordtype}{type}(eos\_type),     \textcolor{keywordtype}{pointer}       :: eos\textcolor{comment}{      !< Equation of state structure}
00493   \textcolor{keywordtype}{real},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: spv\_ref\textcolor{comment}{  !< A reference specific volume [m3 kg-1]}
00494   \textcolor{keywordtype}{real},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: scale\textcolor{comment}{    !< A multiplicative factor by which to scale specific}
00495 \textcolor{comment}{                                                !! volume in combination with scaling given by US [various]}
00496 
00497   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(size(specvol))}  :: rho   \textcolor{comment}{! Density [kg m-3]}
00498   \textcolor{keywordtype}{integer} :: j
00499 
00500   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
00501     \textcolor{stringliteral}{"calculate\_spec\_vol\_array called with an unassociated EOS\_type EOS."})
00502 
00503   \textcolor{keywordflow}{select case} (eos%form\_of\_EOS)
00504     \textcolor{keywordflow}{case} (eos\_linear)
00505       \textcolor{keyword}{call }calculate\_spec\_vol\_linear(t, s, pressure, specvol, start, npts, &
00506                eos%rho\_T0\_S0, eos%drho\_dT, eos%drho\_dS, spv\_ref)
00507     \textcolor{keywordflow}{case} (eos\_unesco)
00508       \textcolor{keyword}{call }calculate\_spec\_vol\_unesco(t, s, pressure, specvol, start, npts, spv\_ref)
00509     \textcolor{keywordflow}{case} (eos\_wright)
00510       \textcolor{keyword}{call }calculate\_spec\_vol\_wright(t, s, pressure, specvol, start, npts, spv\_ref)
00511     \textcolor{keywordflow}{case} (eos\_teos10)
00512       \textcolor{keyword}{call }calculate\_spec\_vol\_teos10(t, s, pressure, specvol, start, npts, spv\_ref)
00513     \textcolor{keywordflow}{case} (eos\_nemo)
00514       \textcolor{keyword}{call }calculate\_density\_nemo(t, s, pressure, rho, start, npts)
00515       \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(spv\_ref)) \textcolor{keywordflow}{then}
00516         specvol(:) = 1.0 / rho(:) - spv\_ref
00517       \textcolor{keywordflow}{else}
00518         specvol(:) = 1.0 / rho(:)
00519 \textcolor{keywordflow}{      endif}
00520 \textcolor{keywordflow}{    case default}
00521       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"calculate\_spec\_vol\_array: EOS%form\_of\_EOS is not valid."})
00522 \textcolor{keywordflow}{  end select}
00523 
00524   \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
00525     specvol(j) = scale * specvol(j)
00526 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ endif} ;\textcolor{keywordflow}{ endif}
00527 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a35f9c33d1aeffbf9986349463bab3b9c}\label{namespacemom__eos_a35f9c33d1aeffbf9986349463bab3b9c}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!calculate\+\_\+spec\+\_\+vol\+\_\+derivs\+\_\+array@{calculate\+\_\+spec\+\_\+vol\+\_\+derivs\+\_\+array}}
\index{calculate\+\_\+spec\+\_\+vol\+\_\+derivs\+\_\+array@{calculate\+\_\+spec\+\_\+vol\+\_\+derivs\+\_\+array}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{calculate\+\_\+spec\+\_\+vol\+\_\+derivs\+\_\+array()}{calculate\_spec\_vol\_derivs\_array()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calculate\+\_\+spec\+\_\+vol\+\_\+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)}]{d\+S\+V\+\_\+dT,  }\item[{real, dimension(\+:), intent(inout)}]{d\+S\+V\+\_\+dS,  }\item[{integer, intent(in)}]{start,  }\item[{integer, intent(in)}]{npts,  }\item[{type(\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}), pointer}]{E\+OS }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calls the appropriate subroutine to calculate specific volume derivatives for an 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{]}\\
\hline
\mbox{\tt in,out}  & {\em dsv\+\_\+dt} & The partial derivative of specific volume with potential temperature \mbox{[}m3 kg-\/1 deg\+C-\/1\mbox{]}\\
\hline
\mbox{\tt in,out}  & {\em dsv\+\_\+ds} & The partial derivative of specific volume with salinity \mbox{[}m3 kg-\/1 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
\end{DoxyParams}


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



References \hyperlink{namespacemom__eos_a230a2f280b1e27ee913e1b3cf4c412b8}{eos\+\_\+linear}, \hyperlink{namespacemom__eos_ac37477f774acf511e88e96c036fa8292}{eos\+\_\+nemo}, \hyperlink{namespacemom__eos_afcd60f98ea35c6044d38eb4409b0a083}{eos\+\_\+teos10}, \hyperlink{namespacemom__eos_a9eacc16ba79dc66131b54bf31114f35a}{eos\+\_\+unesco}, and \hyperlink{namespacemom__eos_a4bbd0f276fe3878bd01b3ff180fb41c5}{eos\+\_\+wright}.



Referenced by \hyperlink{namespacemom__eos_a640c3b2292afd3266caa11243549bbf0}{calc\+\_\+spec\+\_\+vol\+\_\+derivs\+\_\+1d()}.


\begin{DoxyCode}
00988   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: t\textcolor{comment}{ !< Potential temperature referenced to the surface [degC]}
00989   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: s\textcolor{comment}{ !< Salinity [ppt]}
00990   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< Pressure [Pa]}
00991   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: dsv\_dt\textcolor{comment}{ !< The partial derivative of specific volume with potential}
00992 \textcolor{comment}{                                              !! temperature [m3 kg-1 degC-1]}
00993   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: dsv\_ds\textcolor{comment}{ !< The partial derivative of specific volume with salinity}
00994 \textcolor{comment}{                                              !! [m3 kg-1 ppt-1]}
00995   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: start\textcolor{comment}{  !< Starting index within the array}
00996   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}  :: npts\textcolor{comment}{   !< The number of values to calculate}
00997   \textcolor{keywordtype}{type}(eos\_type),     \textcolor{keywordtype}{pointer}     :: eos\textcolor{comment}{    !< Equation of state structure}
00998 
00999   \textcolor{comment}{! Local variables}
01000   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(size(T))} :: press   \textcolor{comment}{! Pressure converted to [Pa]}
01001   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(size(T))} :: rho     \textcolor{comment}{! In situ density [kg m-3]}
01002   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(size(T))} :: drho\_dt \textcolor{comment}{! Derivative of density with temperature [kg m-3 degC-1]}
01003   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(size(T))} :: drho\_ds \textcolor{comment}{! Derivative of density with salinity [kg m-3 ppt-1]}
01004   \textcolor{keywordtype}{integer} :: j
01005 
01006   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
01007     \textcolor{stringliteral}{"calculate\_spec\_vol\_derivs\_array called with an unassociated EOS\_type EOS."})
01008 
01009   \textcolor{keywordflow}{select case} (eos%form\_of\_EOS)
01010     \textcolor{keywordflow}{case} (eos\_linear)
01011       \textcolor{keyword}{call }calculate\_specvol\_derivs\_linear(t, s, pressure, dsv\_dt, dsv\_ds, start, &
01012                                            npts, eos%Rho\_T0\_S0, eos%dRho\_dT, eos%dRho\_dS)
01013     \textcolor{keywordflow}{case} (eos\_unesco)
01014       \textcolor{keyword}{call }calculate\_density\_unesco(t, s, pressure, rho, start, npts)
01015       \textcolor{keyword}{call }calculate\_density\_derivs\_unesco(t, s, pressure, drho\_dt, drho\_ds, start, npts)
01016       \textcolor{keywordflow}{do} j=start,start+npts-1
01017         dsv\_dt(j) = -drho\_dt(j)/(rho(j)**2)
01018         dsv\_ds(j) = -drho\_ds(j)/(rho(j)**2)
01019 \textcolor{keywordflow}{      enddo}
01020     \textcolor{keywordflow}{case} (eos\_wright)
01021       \textcolor{keyword}{call }calculate\_specvol\_derivs\_wright(t, s, pressure, dsv\_dt, dsv\_ds, start, npts)
01022     \textcolor{keywordflow}{case} (eos\_teos10)
01023       \textcolor{keyword}{call }calculate\_specvol\_derivs\_teos10(t, s, pressure, dsv\_dt, dsv\_ds, start, npts)
01024     \textcolor{keywordflow}{case} (eos\_nemo)
01025       \textcolor{keyword}{call }calculate\_density\_nemo(t, s, pressure, rho, start, npts)
01026       \textcolor{keyword}{call }calculate\_density\_derivs\_nemo(t, s, pressure, drho\_dt, drho\_ds, start, npts)
01027       \textcolor{keywordflow}{do} j=start,start+npts-1
01028         dsv\_dt(j) = -drho\_dt(j)/(rho(j)**2)
01029         dsv\_ds(j) = -drho\_ds(j)/(rho(j)**2)
01030 \textcolor{keywordflow}{      enddo}
01031 \textcolor{keywordflow}{    case default}
01032       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"calculate\_spec\_vol\_derivs\_array: EOS%form\_of\_EOS is not valid."})
01033 \textcolor{keywordflow}{  end select}
01034 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a58b52a452d779c53e6421aaa3eac6e8b}\label{namespacemom__eos_a58b52a452d779c53e6421aaa3eac6e8b}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!calculate\+\_\+stanley\+\_\+density\+\_\+1d@{calculate\+\_\+stanley\+\_\+density\+\_\+1d}}
\index{calculate\+\_\+stanley\+\_\+density\+\_\+1d@{calculate\+\_\+stanley\+\_\+density\+\_\+1d}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{calculate\+\_\+stanley\+\_\+density\+\_\+1d()}{calculate\_stanley\_density\_1d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calculate\+\_\+stanley\+\_\+density\+\_\+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(in)}]{Tvar,  }\item[{real, dimension(\+:), intent(in)}]{T\+Scov,  }\item[{real, dimension(\+:), intent(in)}]{Svar,  }\item[{real, dimension(\+:), intent(inout)}]{rho,  }\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}]{rho\+\_\+ref,  }\item[{real, intent(in), optional}]{scale }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calls the appropriate subroutine to calculate the density of sea water for 1-\/D array inputs including the variance of T, S and covariance of T-\/S, potentially limiting the domain of indices that are worked on. The calculation uses only the second order correction in a series as discussed in Stanley et al., 2020. If rho\+\_\+ref is present, the anomaly with respect to rho\+\_\+ref is returned. 


\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}  & {\em tvar} & Variance of potential temperature \mbox{[}deg\+C2\mbox{]}\\
\hline
\mbox{\tt in}  & {\em tscov} & Covariance of potential temperature and salinity \mbox{[}degC ppt\mbox{]}\\
\hline
\mbox{\tt in}  & {\em svar} & Variance of salinity \mbox{[}ppt2\mbox{]}\\
\hline
\mbox{\tt in,out}  & {\em rho} & Density (in-\/situ if pressure is local) \mbox{[}R $\sim$$>$ kg m-\/3\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 rho\+\_\+ref} & A reference density \mbox{[}kg m-\/3\mbox{]}\\
\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 \hyperlink{MOM__EOS_8F90_source_l00417}{417} of file \hyperlink{MOM__EOS_8F90_source}{M\+O\+M\+\_\+\+E\+O\+S.\+F90}.



References \hyperlink{namespacemom__eos_a230a2f280b1e27ee913e1b3cf4c412b8}{eos\+\_\+linear}, \hyperlink{namespacemom__eos_afcd60f98ea35c6044d38eb4409b0a083}{eos\+\_\+teos10}, and \hyperlink{namespacemom__eos_a4bbd0f276fe3878bd01b3ff180fb41c5}{eos\+\_\+wright}.


\begin{DoxyCode}
00417   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(in)}    :: t\textcolor{comment}{        !< Potential temperature referenced to the surface
       [degC]}
00418   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(in)}    :: s\textcolor{comment}{        !< Salinity [ppt]}
00419   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(in)}    :: pressure\textcolor{comment}{ !< Pressure [R L2 T-2 ~> Pa]}
00420   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(in)}    :: tvar\textcolor{comment}{     !< Variance of potential temperature [degC2]}
00421   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(in)}    :: tscov\textcolor{comment}{    !< Covariance of potential temperature and salinity
       [degC ppt]}
00422   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(in)}    :: svar\textcolor{comment}{     !< Variance of salinity [ppt2]}
00423   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},    \textcolor{keywordtype}{intent(inout)} :: rho\textcolor{comment}{      !< Density (in-situ if pressure is local) [R ~> kg m-3]}
00424   \textcolor{keywordtype}{type}(eos\_type),        \textcolor{keywordtype}{pointer}       :: eos\textcolor{comment}{      !< Equation of state structure}
00425   \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}
00426 \textcolor{comment}{                                                       !! into account that arrays start at 1.}
00427   \textcolor{keywordtype}{real},                  \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: rho\_ref\textcolor{comment}{ !< A reference density [kg m-3]}
00428   \textcolor{keywordtype}{real},                  \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scale\textcolor{comment}{ !< A multiplicative factor by which to scale density}
00429 \textcolor{comment}{                                                   !! in combination with scaling given by US [various]}
00430   \textcolor{comment}{! Local variables}
00431   \textcolor{keywordtype}{real} :: p\_scale   \textcolor{comment}{! A factor to convert pressure to units of Pa [Pa T2 R-1 L-2 ~> 1]}
00432   \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]}
00433   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(size(rho))} :: pres  \textcolor{comment}{! Pressure converted to [Pa]}
00434   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(size(T))} :: d2rdtt, d2rdst, d2rdss, d2rdsp, d2rdtp \textcolor{comment}{! Second derivatives of density wrt
       T,S,p}
00435   \textcolor{keywordtype}{integer} :: i, is, ie, npts
00436 
00437   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
00438     \textcolor{stringliteral}{"calculate\_density\_1d called with an unassociated EOS\_type EOS."})
00439 
00440   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(dom)) \textcolor{keywordflow}{then}
00441     is = dom(1) ; ie = dom(2) ; npts = 1 + ie - is
00442   \textcolor{keywordflow}{else}
00443     is = 1 ; ie = \textcolor{keyword}{size}(rho) ; npts = 1 + ie - is
00444 \textcolor{keywordflow}{  endif}
00445 
00446   p\_scale = eos%RL2\_T2\_to\_Pa
00447   \textcolor{keywordflow}{do} i=is,ie
00448     pres(i) = p\_scale * pressure(i)
00449 \textcolor{keywordflow}{  enddo}
00450 
00451   \textcolor{keywordflow}{select case} (eos%form\_of\_EOS)
00452     \textcolor{keywordflow}{case} (eos\_linear)
00453       \textcolor{keyword}{call }calculate\_density\_linear(t, s, pres, rho, 1, npts, &
00454                                     eos%Rho\_T0\_S0, eos%dRho\_dT, eos%dRho\_dS, rho\_ref)
00455       \textcolor{keyword}{call }calculate\_density\_second\_derivs\_linear(t, s, pres, d2rdss, d2rdst, &
00456                                                   d2rdtt, d2rdsp, d2rdtp, 1, npts)
00457     \textcolor{keywordflow}{case} (eos\_wright)
00458       \textcolor{keyword}{call }calculate\_density\_wright(t, s, pres, rho, 1, npts, rho\_ref)
00459       \textcolor{keyword}{call }calculate\_density\_second\_derivs\_wright(t, s, pres, d2rdss, d2rdst, &
00460                                                   d2rdtt, d2rdsp, d2rdtp, 1, npts)
00461     \textcolor{keywordflow}{case} (eos\_teos10)
00462       \textcolor{keyword}{call }calculate\_density\_teos10(t, s, pres, rho, 1, npts, rho\_ref)
00463       \textcolor{keyword}{call }calculate\_density\_second\_derivs\_teos10(t, s, pres, d2rdss, d2rdst, &
00464                                                   d2rdtt, d2rdsp, d2rdtp, 1, npts)
00465 \textcolor{keywordflow}{    case default}
00466       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"calculate\_stanley\_density\_scalar: EOS is not valid."})
00467 \textcolor{keywordflow}{  end select}
00468 
00469   \textcolor{comment}{! Equation 25 of Stanley et al., 2020.}
00470   \textcolor{keywordflow}{do} i=is,ie
00471     rho(i) = rho(i) &
00472              + ( 0.5 * d2rdtt(i) * tvar(i) + ( d2rdst(i) * tscov(i) + 0.5 * d2rdss(i) * svar(i) ) )
00473 \textcolor{keywordflow}{  enddo}
00474 
00475   rho\_scale = eos%kg\_m3\_to\_R
00476   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scale)) rho\_scale = rho\_scale * scale
00477   \textcolor{keywordflow}{if} (rho\_scale /= 1.0) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{do} i=is,ie
00478     rho(i) = rho\_scale * rho(i)
00479 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ endif}
00480 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a102df91898d116a6b4346f00dc818612}\label{namespacemom__eos_a102df91898d116a6b4346f00dc818612}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!calculate\+\_\+stanley\+\_\+density\+\_\+array@{calculate\+\_\+stanley\+\_\+density\+\_\+array}}
\index{calculate\+\_\+stanley\+\_\+density\+\_\+array@{calculate\+\_\+stanley\+\_\+density\+\_\+array}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{calculate\+\_\+stanley\+\_\+density\+\_\+array()}{calculate\_stanley\_density\_array()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calculate\+\_\+stanley\+\_\+density\+\_\+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(in)}]{Tvar,  }\item[{real, dimension(\+:), intent(in)}]{T\+Scov,  }\item[{real, dimension(\+:), intent(in)}]{Svar,  }\item[{real, dimension(\+:), intent(inout)}]{rho,  }\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}]{rho\+\_\+ref,  }\item[{real, intent(in), optional}]{scale }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calls the appropriate subroutine to calculate the density of sea water for 1-\/D array inputs including the variance of T, S and covariance of T-\/S. The calculation uses only the second order correction in a series as discussed in Stanley et al., 2020. If rho\+\_\+ref is present, the anomaly with respect to rho\+\_\+ref is returned. 


\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{]}\\
\hline
\mbox{\tt in}  & {\em tvar} & Variance of potential temperature referenced to the surface \mbox{[}deg\+C2\mbox{]}\\
\hline
\mbox{\tt in}  & {\em tscov} & Covariance of potential temperature and salinity \mbox{[}degC ppt\mbox{]}\\
\hline
\mbox{\tt in}  & {\em svar} & Variance of salinity \mbox{[}ppt2\mbox{]}\\
\hline
\mbox{\tt in,out}  & {\em rho} & Density (in-\/situ if pressure is local) \mbox{[}kg m-\/3\mbox{]}\\
\hline
\mbox{\tt in}  & {\em start} & Start index for computation\\
\hline
\mbox{\tt in}  & {\em npts} & Number of point to compute\\
\hline
 & {\em eos} & Equation of state structure\\
\hline
\mbox{\tt in}  & {\em rho\+\_\+ref} & A reference density \mbox{[}kg m-\/3\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em scale} & A multiplicative factor by which to scale density from kg m-\/3 to the desired units \mbox{[}R m3 kg-\/1\mbox{]} \\
\hline
\end{DoxyParams}


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



References \hyperlink{namespacemom__eos_a230a2f280b1e27ee913e1b3cf4c412b8}{eos\+\_\+linear}, \hyperlink{namespacemom__eos_afcd60f98ea35c6044d38eb4409b0a083}{eos\+\_\+teos10}, and \hyperlink{namespacemom__eos_a4bbd0f276fe3878bd01b3ff180fb41c5}{eos\+\_\+wright}.


\begin{DoxyCode}
00306   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: t\textcolor{comment}{        !< Potential temperature referenced to the surface [degC]}
00307   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: s\textcolor{comment}{        !< Salinity [ppt]}
00308   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: pressure\textcolor{comment}{ !< Pressure [Pa]}
00309   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: tvar\textcolor{comment}{     !< Variance of potential temperature referenced to the
       surface [degC2]}
00310   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: tscov\textcolor{comment}{    !< Covariance of potential temperature and salinity [degC
       ppt]}
00311   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(in)}    :: svar\textcolor{comment}{     !< Variance of salinity [ppt2]}
00312   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: rho\textcolor{comment}{      !< Density (in-situ if pressure is local) [kg m-3]}
00313   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}    :: start\textcolor{comment}{    !< Start index for computation}
00314   \textcolor{keywordtype}{integer},            \textcolor{keywordtype}{intent(in)}    :: npts\textcolor{comment}{     !< Number of point to compute}
00315   \textcolor{keywordtype}{type}(eos\_type),     \textcolor{keywordtype}{pointer}       :: eos\textcolor{comment}{      !< Equation of state structure}
00316   \textcolor{keywordtype}{real},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: rho\_ref\textcolor{comment}{  !< A reference density [kg m-3].}
00317   \textcolor{keywordtype}{real},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: scale\textcolor{comment}{    !< A multiplicative factor by which to scale density}
00318 \textcolor{comment}{                                                !! from kg m-3 to the desired units [R m3 kg-1]}
00319   \textcolor{comment}{! Local variables}
00320   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(size(T))} :: d2rdtt, d2rdst, d2rdss, d2rdsp, d2rdtp \textcolor{comment}{! Second derivatives of density wrt
       T,S,p}
00321   \textcolor{keywordtype}{integer} :: j
00322 
00323   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
00324     \textcolor{stringliteral}{"calculate\_density\_array called with an unassociated EOS\_type EOS."})
00325 
00326   \textcolor{keywordflow}{select case} (eos%form\_of\_EOS)
00327     \textcolor{keywordflow}{case} (eos\_linear)
00328       \textcolor{keyword}{call }calculate\_density\_linear(t, s, pressure, rho, start, npts, &
00329                                     eos%Rho\_T0\_S0, eos%dRho\_dT, eos%dRho\_dS, rho\_ref)
00330       \textcolor{keyword}{call }calculate\_density\_second\_derivs\_linear(t, s, pressure, d2rdss, d2rdst, &
00331                                                   d2rdtt, d2rdsp, d2rdtp, start, npts)
00332     \textcolor{keywordflow}{case} (eos\_wright)
00333       \textcolor{keyword}{call }calculate\_density\_wright(t, s, pressure, rho, start, npts, rho\_ref)
00334       \textcolor{keyword}{call }calculate\_density\_second\_derivs\_wright(t, s, pressure, d2rdss, d2rdst, &
00335                                                   d2rdtt, d2rdsp, d2rdtp, start, npts)
00336     \textcolor{keywordflow}{case} (eos\_teos10)
00337       \textcolor{keyword}{call }calculate\_density\_teos10(t, s, pressure, rho, start, npts, rho\_ref)
00338       \textcolor{keyword}{call }calculate\_density\_second\_derivs\_teos10(t, s, pressure, d2rdss, d2rdst, &
00339                                                   d2rdtt, d2rdsp, d2rdtp, start, npts)
00340 \textcolor{keywordflow}{    case default}
00341       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"calculate\_stanley\_density\_array: EOS%form\_of\_EOS is not valid."})
00342 \textcolor{keywordflow}{  end select}
00343 
00344   \textcolor{comment}{! Equation 25 of Stanley et al., 2020.}
00345   \textcolor{keywordflow}{do} j=start,start+npts-1
00346     rho(j) = rho(j) &
00347              + ( 0.5 * d2rdtt(j) * tvar(j) + ( d2rdst(j) * tscov(j) + 0.5 * d2rdss(j) * svar(j) ) )
00348 \textcolor{keywordflow}{  enddo}
00349 
00350   \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
00351     rho(j) = scale * rho(j)
00352 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ endif} ;\textcolor{keywordflow}{ endif}
00353 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a66d40148737ef1a3b1ae44917c7fe0c3}\label{namespacemom__eos_a66d40148737ef1a3b1ae44917c7fe0c3}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!calculate\+\_\+stanley\+\_\+density\+\_\+scalar@{calculate\+\_\+stanley\+\_\+density\+\_\+scalar}}
\index{calculate\+\_\+stanley\+\_\+density\+\_\+scalar@{calculate\+\_\+stanley\+\_\+density\+\_\+scalar}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{calculate\+\_\+stanley\+\_\+density\+\_\+scalar()}{calculate\_stanley\_density\_scalar()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::calculate\+\_\+stanley\+\_\+density\+\_\+scalar (\begin{DoxyParamCaption}\item[{real, intent(in)}]{T,  }\item[{real, intent(in)}]{S,  }\item[{real, intent(in)}]{pressure,  }\item[{real, intent(in)}]{Tvar,  }\item[{real, intent(in)}]{T\+Scov,  }\item[{real, intent(in)}]{Svar,  }\item[{real, intent(out)}]{rho,  }\item[{type(\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}), pointer}]{E\+OS,  }\item[{real, intent(in), optional}]{rho\+\_\+ref,  }\item[{real, intent(in), optional}]{scale }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Calls the appropriate subroutine to calculate density of sea water for scalar inputs including the variance of T, S and covariance of T-\/S. The calculation uses only the second order correction in a series as discussed in Stanley et al., 2020. If rho\+\_\+ref is present, the anomaly with respect to rho\+\_\+ref is returned. The density can be rescaled using rho\+\_\+ref. 


\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 tvar} & Variance of potential temperature referenced to the surface \mbox{[}deg\+C2\mbox{]}\\
\hline
\mbox{\tt in}  & {\em tscov} & Covariance of potential temperature and salinity \mbox{[}degC ppt\mbox{]}\\
\hline
\mbox{\tt in}  & {\em svar} & Variance of salinity \mbox{[}ppt2\mbox{]}\\
\hline
\mbox{\tt in}  & {\em pressure} & Pressure \mbox{[}Pa\mbox{]}\\
\hline
\mbox{\tt out}  & {\em rho} & Density (in-\/situ if pressure is local) \mbox{[}kg m-\/3\mbox{]} or \mbox{[}R $\sim$$>$ kg m-\/3\mbox{]}\\
\hline
 & {\em eos} & Equation of state structure\\
\hline
\mbox{\tt in}  & {\em rho\+\_\+ref} & A reference density \mbox{[}kg m-\/3\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em scale} & A multiplicative factor by which to scale density from kg m-\/3 to the desired units \mbox{[}R m3 kg-\/1\mbox{]} \\
\hline
\end{DoxyParams}


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



References \hyperlink{namespacemom__eos_a230a2f280b1e27ee913e1b3cf4c412b8}{eos\+\_\+linear}, \hyperlink{namespacemom__eos_afcd60f98ea35c6044d38eb4409b0a083}{eos\+\_\+teos10}, and \hyperlink{namespacemom__eos_a4bbd0f276fe3878bd01b3ff180fb41c5}{eos\+\_\+wright}.


\begin{DoxyCode}
00212   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: t\textcolor{comment}{        !< Potential temperature referenced to the surface [degC]}
00213   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: s\textcolor{comment}{        !< Salinity [ppt]}
00214   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: tvar\textcolor{comment}{     !< Variance of potential temperature referenced to the surface
       [degC2]}
00215   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: tscov\textcolor{comment}{    !< Covariance of potential temperature and salinity [degC ppt]}
00216   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: svar\textcolor{comment}{     !< Variance of salinity [ppt2]}
00217   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(in)}  :: pressure\textcolor{comment}{ !< Pressure [Pa]}
00218   \textcolor{keywordtype}{real},           \textcolor{keywordtype}{intent(out)} :: rho\textcolor{comment}{      !< Density (in-situ if pressure is local) [kg m-3] or [R ~> kg
       m-3]}
00219   \textcolor{keywordtype}{type}(eos\_type), \textcolor{keywordtype}{pointer}     :: eos\textcolor{comment}{      !< Equation of state structure}
00220   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: rho\_ref\textcolor{comment}{  !< A reference density [kg m-3].}
00221   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: scale\textcolor{comment}{    !< A multiplicative factor by which to scale density}
00222 \textcolor{comment}{                                          !! from kg m-3 to the desired units [R m3 kg-1]}
00223   \textcolor{comment}{! Local variables}
00224   \textcolor{keywordtype}{real} :: d2rdtt, d2rdst, d2rdss, d2rdsp, d2rdtp \textcolor{comment}{! Second derivatives of density wrt T,S,p}
00225   \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]}
00226   \textcolor{keywordtype}{real} :: p\_scale   \textcolor{comment}{! A factor to convert pressure to units of Pa [Pa T2 R-1 L-2 ~> 1]}
00227 
00228   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
00229     \textcolor{stringliteral}{"calculate\_stanley\_density\_scalar called with an unassociated EOS\_type EOS."})
00230 
00231   p\_scale = eos%RL2\_T2\_to\_Pa
00232 
00233   \textcolor{keywordflow}{select case} (eos%form\_of\_EOS)
00234     \textcolor{keywordflow}{case} (eos\_linear)
00235       \textcolor{keyword}{call }calculate\_density\_linear(t, s, p\_scale*pressure, rho, &
00236                                     eos%Rho\_T0\_S0, eos%dRho\_dT, eos%dRho\_dS, rho\_ref)
00237       \textcolor{keyword}{call }calculate\_density\_second\_derivs\_linear(t, s, pressure, d2rdss, d2rdst, &
00238                                                   d2rdtt, d2rdsp, d2rdtp)
00239     \textcolor{keywordflow}{case} (eos\_wright)
00240       \textcolor{keyword}{call }calculate\_density\_wright(t, s, p\_scale*pressure, rho, rho\_ref)
00241       \textcolor{keyword}{call }calculate\_density\_second\_derivs\_wright(t, s, pressure, d2rdss, d2rdst, &
00242                                                   d2rdtt, d2rdsp, d2rdtp)
00243     \textcolor{keywordflow}{case} (eos\_teos10)
00244       \textcolor{keyword}{call }calculate\_density\_teos10(t, s, p\_scale*pressure, rho, rho\_ref)
00245       \textcolor{keyword}{call }calculate\_density\_second\_derivs\_teos10(t, s, pressure, d2rdss, d2rdst, &
00246                                                   d2rdtt, d2rdsp, d2rdtp)
00247 \textcolor{keywordflow}{    case default}
00248       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"calculate\_stanley\_density\_scalar: EOS is not valid."})
00249 \textcolor{keywordflow}{  end select}
00250 
00251   \textcolor{comment}{! Equation 25 of Stanley et al., 2020.}
00252   rho = rho + ( 0.5 * d2rdtt * tvar + ( d2rdst * tscov + 0.5 * d2rdss * svar ) )
00253 
00254   rho\_scale = eos%kg\_m3\_to\_R
00255   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scale)) rho\_scale = rho\_scale * scale
00256   rho = rho\_scale * rho
00257 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_ab9669ca4a2e4f3507be7efe047c18ab7}\label{namespacemom__eos_ab9669ca4a2e4f3507be7efe047c18ab7}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!calculate\+\_\+tfreeze\+\_\+array@{calculate\+\_\+tfreeze\+\_\+array}}
\index{calculate\+\_\+tfreeze\+\_\+array@{calculate\+\_\+tfreeze\+\_\+array}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{calculate\+\_\+tfreeze\+\_\+array()}{calculate\_tfreeze\_array()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::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}.



References \hyperlink{namespacemom__eos_adcc45ec5c82aaef0aa4d330fa8cbc5c5}{tfreeze\+\_\+linear}, \hyperlink{namespacemom__eos_a7f361d35806d25ac361fea713b7f0b6f}{tfreeze\+\_\+millero}, and \hyperlink{namespacemom__eos_abf1f6edc79b67730c9f47e5645069eda}{tfreeze\+\_\+teos10}.


\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{namespacemom__eos_ad46af8402aba49dbdd73817d33e83270}\label{namespacemom__eos_ad46af8402aba49dbdd73817d33e83270}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!calculate\+\_\+tfreeze\+\_\+scalar@{calculate\+\_\+tfreeze\+\_\+scalar}}
\index{calculate\+\_\+tfreeze\+\_\+scalar@{calculate\+\_\+tfreeze\+\_\+scalar}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{calculate\+\_\+tfreeze\+\_\+scalar()}{calculate\_tfreeze\_scalar()}}
{\footnotesize\ttfamily subroutine mom\+\_\+eos\+::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}.



References \hyperlink{namespacemom__eos_adcc45ec5c82aaef0aa4d330fa8cbc5c5}{tfreeze\+\_\+linear}, \hyperlink{namespacemom__eos_a7f361d35806d25ac361fea713b7f0b6f}{tfreeze\+\_\+millero}, and \hyperlink{namespacemom__eos_abf1f6edc79b67730c9f47e5645069eda}{tfreeze\+\_\+teos10}.


\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}
\mbox{\Hypertarget{namespacemom__eos_a5b1ff89023e9d7da4074c7c1a71c9a85}\label{namespacemom__eos_a5b1ff89023e9d7da4074c7c1a71c9a85}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!convert\+\_\+temp\+\_\+salt\+\_\+for\+\_\+teos10@{convert\+\_\+temp\+\_\+salt\+\_\+for\+\_\+teos10}}
\index{convert\+\_\+temp\+\_\+salt\+\_\+for\+\_\+teos10@{convert\+\_\+temp\+\_\+salt\+\_\+for\+\_\+teos10}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{convert\+\_\+temp\+\_\+salt\+\_\+for\+\_\+teos10()}{convert\_temp\_salt\_for\_teos10()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+eos\+::convert\+\_\+temp\+\_\+salt\+\_\+for\+\_\+teos10 (\begin{DoxyParamCaption}\item[{real, dimension(hi\%isd\+:hi\%ied,hi\%jsd\+:hi\%jed,kd), intent(inout)}]{T,  }\item[{real, dimension(hi\%isd\+:hi\%ied,hi\%jsd\+:hi\%jed,kd), intent(inout)}]{S,  }\item[{type(hor\+\_\+index\+\_\+type), intent(in)}]{HI,  }\item[{integer, intent(in)}]{kd,  }\item[{real, dimension(hi\%isd\+:hi\%ied,hi\%jsd\+:hi\%jed,kd), intent(in)}]{mask\+\_\+z,  }\item[{type(\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}), pointer}]{E\+OS }\end{DoxyParamCaption})}



Convert T\&S to Absolute Salinity and Conservative Temperature if using T\+E\+O\+S10. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em kd} & The number of layers to work on\\
\hline
\mbox{\tt in}  & {\em hi} & The horizontal index structure\\
\hline
\mbox{\tt in,out}  & {\em t} & Potential temperature referenced to the surface \mbox{[}degC\mbox{]}\\
\hline
\mbox{\tt in,out}  & {\em s} & Salinity \mbox{[}ppt\mbox{]}\\
\hline
\mbox{\tt in}  & {\em mask\+\_\+z} & 3d mask regulating which points to convert.\\
\hline
 & {\em eos} & Equation of state structure \\
\hline
\end{DoxyParams}


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



References \hyperlink{namespacemom__eos_ac37477f774acf511e88e96c036fa8292}{eos\+\_\+nemo}, and \hyperlink{namespacemom__eos_afcd60f98ea35c6044d38eb4409b0a083}{eos\+\_\+teos10}.


\begin{DoxyCode}
01532   \textcolor{keywordtype}{integer},               \textcolor{keywordtype}{intent(in)}    :: kd\textcolor{comment}{  !< The number of layers to work on}
01533   \textcolor{keywordtype}{type}(hor\_index\_type),  \textcolor{keywordtype}{intent(in)}    :: hi\textcolor{comment}{       !< The horizontal index structure}
01534   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%isd:HI%ied,HI%jsd:HI%jed,kd)}, &
01535                          \textcolor{keywordtype}{intent(inout)} :: t\textcolor{comment}{   !< Potential temperature referenced to the surface [degC]}
01536   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%isd:HI%ied,HI%jsd:HI%jed,kd)}, &
01537                          \textcolor{keywordtype}{intent(inout)} :: s\textcolor{comment}{   !< Salinity [ppt]}
01538   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%isd:HI%ied,HI%jsd:HI%jed,kd)}, &
01539                          \textcolor{keywordtype}{intent(in)}    :: mask\_z\textcolor{comment}{ !< 3d mask regulating which points to convert.}
01540   \textcolor{keywordtype}{type}(eos\_type),        \textcolor{keywordtype}{pointer}       :: eos\textcolor{comment}{ !< Equation of state structure}
01541 
01542   \textcolor{keywordtype}{integer} :: i, j, k
01543   \textcolor{keywordtype}{real} :: gsw\_sr\_from\_sp, gsw\_ct\_from\_pt, gsw\_sa\_from\_sp
01544   \textcolor{keywordtype}{real} :: p
01545 
01546   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
01547     \textcolor{stringliteral}{"convert\_temp\_salt\_to\_TEOS10 called with an unassociated EOS\_type EOS."})
01548 
01549   \textcolor{keywordflow}{if} ((eos%form\_of\_EOS /= eos\_teos10) .and. (eos%form\_of\_EOS /= eos\_nemo)) \textcolor{keywordflow}{return}
01550 
01551   \textcolor{keywordflow}{do} k=1,kd ; \textcolor{keywordflow}{do} j=hi%jsc,hi%jec ; \textcolor{keywordflow}{do} i=hi%isc,hi%iec
01552     \textcolor{keywordflow}{if} (mask\_z(i,j,k) >= 1.0) \textcolor{keywordflow}{then}
01553      s(i,j,k) = gsw\_sr\_from\_sp(s(i,j,k))
01554 \textcolor{comment}{!     Get absolute salinity from practical salinity, converting pressures from Pascal to dbar.}
01555 \textcolor{comment}{!     If this option is activated, pressure will need to be added as an argument, and it should be}
01556 \textcolor{comment}{!     moved out into module that is not shared between components, where the ocean\_grid can be used.}
01557 \textcolor{comment}{!     S(i,j,k) = gsw\_sa\_from\_sp(S(i,j,k),pres(i,j,k)*1.0e-4,G%geoLonT(i,j),G%geoLatT(i,j))}
01558      t(i,j,k) = gsw\_ct\_from\_pt(s(i,j,k), t(i,j,k))
01559 \textcolor{keywordflow}{    endif}
01560 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ enddo} ;\textcolor{keywordflow}{ enddo}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a1108fb5de7a69d01746df3995f7e3f0d}\label{namespacemom__eos_a1108fb5de7a69d01746df3995f7e3f0d}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!eos\+\_\+allocate@{eos\+\_\+allocate}}
\index{eos\+\_\+allocate@{eos\+\_\+allocate}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{eos\+\_\+allocate()}{eos\_allocate()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+eos\+::eos\+\_\+allocate (\begin{DoxyParamCaption}\item[{type(\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}), pointer}]{E\+OS }\end{DoxyParamCaption})}



Allocates E\+O\+S\+\_\+type. 


\begin{DoxyParams}{Parameters}
{\em eos} & Equation of state structure \\
\hline
\end{DoxyParams}


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



Referenced by \hyperlink{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}{eos\+\_\+init()}.


\begin{DoxyCode}
01491   \textcolor{keywordtype}{type}(eos\_type), \textcolor{keywordtype}{pointer} :: eos\textcolor{comment}{ !< Equation of state structure}
01492 
01493   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{allocate}(eos)
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a782d326108e390902e520efc078e8296}\label{namespacemom__eos_a782d326108e390902e520efc078e8296}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!eos\+\_\+domain@{eos\+\_\+domain}}
\index{eos\+\_\+domain@{eos\+\_\+domain}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{eos\+\_\+domain()}{eos\_domain()}}
{\footnotesize\ttfamily integer function, dimension(2), public mom\+\_\+eos\+::eos\+\_\+domain (\begin{DoxyParamCaption}\item[{type(hor\+\_\+index\+\_\+type), intent(in)}]{HI,  }\item[{integer, intent(in), optional}]{halo }\end{DoxyParamCaption})}



This subroutine returns a two point integer array indicating the domain of i-\/indices to work on in E\+OS calls based on information from a hor\+\_\+index type. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em hi} & The horizontal index structure\\
\hline
\mbox{\tt in}  & {\em halo} & The halo size to work on; missing is equivalent to 0.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The index domain that the E\+OS will work on, taking into account that the arrays inside the E\+OS routines will start at 1. 
\end{DoxyReturn}


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


\begin{DoxyCode}
01163   \textcolor{keywordtype}{type}(hor\_index\_type), \textcolor{keywordtype}{intent(in)}  :: hi\textcolor{comment}{    !< The horizontal index structure}
01164   \textcolor{keywordtype}{integer},    \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: halo\textcolor{comment}{  !< The halo size to work on; missing is equivalent to 0.}
01165   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{dimension(2)} :: eosdom\textcolor{comment}{   !< The index domain that the EOS will work on, taking into account}
01166 \textcolor{comment}{                                    !! that the arrays inside the EOS routines will start at 1.}
01167 
01168   \textcolor{comment}{! Local variables}
01169   \textcolor{keywordtype}{integer} :: halo\_sz
01170 
01171   halo\_sz = 0 ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(halo)) halo\_sz = halo
01172 
01173   eosdom(1) = hi%isc - (hi%isd-1) - halo\_sz
01174   eosdom(2) = hi%iec - (hi%isd-1) + halo\_sz
01175 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_acab6a23bef0a98f15f0a479bdd1ec63c}\label{namespacemom__eos_acab6a23bef0a98f15f0a479bdd1ec63c}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!eos\+\_\+end@{eos\+\_\+end}}
\index{eos\+\_\+end@{eos\+\_\+end}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{eos\+\_\+end()}{eos\_end()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+eos\+::eos\+\_\+end (\begin{DoxyParamCaption}\item[{type(\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}), pointer}]{E\+OS }\end{DoxyParamCaption})}



Deallocates E\+O\+S\+\_\+type. 


\begin{DoxyParams}{Parameters}
{\em eos} & Equation of state structure \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}
01498   \textcolor{keywordtype}{type}(eos\_type), \textcolor{keywordtype}{pointer} :: eos\textcolor{comment}{ !< Equation of state structure}
01499 
01500   \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{deallocate}(eos)
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}\label{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!eos\+\_\+init@{eos\+\_\+init}}
\index{eos\+\_\+init@{eos\+\_\+init}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{eos\+\_\+init()}{eos\_init()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+eos\+::eos\+\_\+init (\begin{DoxyParamCaption}\item[{type(param\+\_\+file\+\_\+type), intent(in)}]{param\+\_\+file,  }\item[{type(\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}), pointer}]{E\+OS,  }\item[{type(unit\+\_\+scale\+\_\+type), intent(in), optional}]{US }\end{DoxyParamCaption})}



Initializes E\+O\+S\+\_\+type by allocating and reading parameters. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em param\+\_\+file} & Parameter file structure\\
\hline
 & {\em eos} & Equation of state structure\\
\hline
\mbox{\tt in}  & {\em us} & A dimensional unit scaling type \\
\hline
\end{DoxyParams}


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



References \hyperlink{namespacemom__eos_a1108fb5de7a69d01746df3995f7e3f0d}{eos\+\_\+allocate()}, \hyperlink{namespacemom__eos_a3d4e14a920e46cac8cec72c79690de7c}{eos\+\_\+default}, \hyperlink{namespacemom__eos_a230a2f280b1e27ee913e1b3cf4c412b8}{eos\+\_\+linear}, \hyperlink{namespacemom__eos_adba0a32cc2c8f110e58447a29bf885d3}{eos\+\_\+linear\+\_\+string}, \hyperlink{namespacemom__eos_ac37477f774acf511e88e96c036fa8292}{eos\+\_\+nemo}, \hyperlink{namespacemom__eos_a9348dc6c296a8dad0fe5cf27e47119a5}{eos\+\_\+nemo\+\_\+string}, \hyperlink{namespacemom__eos_afcd60f98ea35c6044d38eb4409b0a083}{eos\+\_\+teos10}, \hyperlink{namespacemom__eos_a9dc2b7c2c67a47b336de4db21b0c9cf5}{eos\+\_\+teos10\+\_\+string}, \hyperlink{namespacemom__eos_a9eacc16ba79dc66131b54bf31114f35a}{eos\+\_\+unesco}, \hyperlink{namespacemom__eos_aa725e4d064e1dd5cb0c6208096ad05fe}{eos\+\_\+unesco\+\_\+string}, \hyperlink{namespacemom__eos_a4bbd0f276fe3878bd01b3ff180fb41c5}{eos\+\_\+wright}, \hyperlink{namespacemom__eos_acacee5907ae295a83b1a9b65175d5a1e}{eos\+\_\+wright\+\_\+string}, \hyperlink{namespacemom__eos_a26afc0610c00badaeedddf818c0dc48c}{tfreeze\+\_\+default}, \hyperlink{namespacemom__eos_adcc45ec5c82aaef0aa4d330fa8cbc5c5}{tfreeze\+\_\+linear}, \hyperlink{namespacemom__eos_ae3ee69a3e4a38b6925b121e3f34d8a15}{tfreeze\+\_\+linear\+\_\+string}, \hyperlink{namespacemom__eos_a7f361d35806d25ac361fea713b7f0b6f}{tfreeze\+\_\+millero}, \hyperlink{namespacemom__eos_a3922b6088618d34983c6125e0aa553ad}{tfreeze\+\_\+millero\+\_\+string}, \hyperlink{namespacemom__eos_abf1f6edc79b67730c9f47e5645069eda}{tfreeze\+\_\+teos10}, and \hyperlink{namespacemom__eos_ad96b484fe337e2c37b2b11bcd3cbd7af}{tfreeze\+\_\+teos10\+\_\+string}.



Referenced by \hyperlink{namespacemom__ice__shelf_a5990f9918493ff4984245eac74e5f4d9}{mom\+\_\+ice\+\_\+shelf\+::initialize\+\_\+ice\+\_\+shelf()}.


\begin{DoxyCode}
01349   \textcolor{keywordtype}{type}(param\_file\_type), \textcolor{keywordtype}{intent(in)} :: param\_file\textcolor{comment}{ !< Parameter file structure}
01350   \textcolor{keywordtype}{type}(eos\_type),        \textcolor{keywordtype}{pointer}    :: eos\textcolor{comment}{ !< Equation of state structure}
01351   \textcolor{keywordtype}{type}(unit\_scale\_type), \textcolor{keywordtype}{intent(in)} :: us\textcolor{comment}{  !< A dimensional unit scaling type}
01352   \textcolor{keywordtype}{optional} :: us
01353   \textcolor{comment}{! Local variables}
01354 \textcolor{preprocessor}{#include "version\_variable.h"}
01355 \textcolor{preprocessor}{}  \textcolor{keywordtype}{character(len=40)}  :: mdl = \textcolor{stringliteral}{"MOM\_EOS"} \textcolor{comment}{! This module's name.}
01356   \textcolor{keywordtype}{character(len=40)}  :: tmpstr
01357 
01358   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }eos\_allocate(eos)
01359 
01360   \textcolor{comment}{! Read all relevant parameters and write them to the model log.}
01361   \textcolor{keyword}{call }log\_version(param\_file, mdl, version, \textcolor{stringliteral}{""})
01362 
01363   \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"EQN\_OF\_STATE"}, tmpstr, &
01364                  \textcolor{stringliteral}{"EQN\_OF\_STATE determines which ocean equation of state "}//&
01365                  \textcolor{stringliteral}{"should be used.  Currently, the valid choices are "}//&
01366                  \textcolor{stringliteral}{'"LINEAR", "UNESCO", "WRIGHT", "NEMO" and "TEOS10". '}//&
01367                  \textcolor{stringliteral}{"This is only used if USE\_EOS is true."}, default=eos\_default)
01368   \textcolor{keywordflow}{select case} (uppercase(tmpstr))
01369     \textcolor{keywordflow}{case} (eos\_linear\_string)
01370       eos%form\_of\_EOS = eos\_linear
01371     \textcolor{keywordflow}{case} (eos\_unesco\_string)
01372       eos%form\_of\_EOS = eos\_unesco
01373     \textcolor{keywordflow}{case} (eos\_wright\_string)
01374       eos%form\_of\_EOS = eos\_wright
01375     \textcolor{keywordflow}{case} (eos\_teos10\_string)
01376       eos%form\_of\_EOS = eos\_teos10
01377     \textcolor{keywordflow}{case} (eos\_nemo\_string)
01378       eos%form\_of\_EOS = eos\_nemo
01379 \textcolor{keywordflow}{    case default}
01380       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"interpret\_eos\_selection: EQN\_OF\_STATE "}//&
01381                               trim(tmpstr) // \textcolor{stringliteral}{"in input file is invalid."})
01382 \textcolor{keywordflow}{  end select}
01383   \textcolor{keyword}{call }mom\_mesg(\textcolor{stringliteral}{'interpret\_eos\_selection: equation of state set to "'} // &
01384                 trim(tmpstr)//\textcolor{stringliteral}{'"'}, 5)
01385 
01386   \textcolor{keywordflow}{if} (eos%form\_of\_EOS == eos\_linear) \textcolor{keywordflow}{then}
01387     eos%Compressible = .false.
01388     \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"RHO\_T0\_S0"}, eos%Rho\_T0\_S0, &
01389                  \textcolor{stringliteral}{"When EQN\_OF\_STATE="}//trim(eos\_linear\_string)//\textcolor{stringliteral}{", "}//&
01390                  \textcolor{stringliteral}{"this is the density at T=0, S=0."}, units=\textcolor{stringliteral}{"kg m-3"}, &
01391                  default=1000.0)
01392     \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"DRHO\_DT"}, eos%dRho\_dT, &
01393                  \textcolor{stringliteral}{"When EQN\_OF\_STATE="}//trim(eos\_linear\_string)//\textcolor{stringliteral}{", "}//&
01394                  \textcolor{stringliteral}{"this is the partial derivative of density with "}//&
01395                  \textcolor{stringliteral}{"temperature."}, units=\textcolor{stringliteral}{"kg m-3 K-1"}, default=-0.2)
01396     \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"DRHO\_DS"}, eos%dRho\_dS, &
01397                  \textcolor{stringliteral}{"When EQN\_OF\_STATE="}//trim(eos\_linear\_string)//\textcolor{stringliteral}{", "}//&
01398                  \textcolor{stringliteral}{"this is the partial derivative of density with "}//&
01399                  \textcolor{stringliteral}{"salinity."}, units=\textcolor{stringliteral}{"kg m-3 PSU-1"}, default=0.8)
01400 \textcolor{keywordflow}{  endif}
01401 
01402   \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"EOS\_QUADRATURE"}, eos%EOS\_quadrature, &
01403                  \textcolor{stringliteral}{"If true, always use the generic (quadrature) code "}//&
01404                  \textcolor{stringliteral}{"code for the integrals of density."}, default=.false.)
01405 
01406   \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"TFREEZE\_FORM"}, tmpstr, &
01407                  \textcolor{stringliteral}{"TFREEZE\_FORM determines which expression should be "}//&
01408                  \textcolor{stringliteral}{"used for the freezing point.  Currently, the valid "}//&
01409                  \textcolor{stringliteral}{'choices are "LINEAR", "MILLERO\_78", "TEOS10"'}, &
01410                  default=tfreeze\_default)
01411   \textcolor{keywordflow}{select case} (uppercase(tmpstr))
01412     \textcolor{keywordflow}{case} (tfreeze\_linear\_string)
01413       eos%form\_of\_TFreeze = tfreeze\_linear
01414     \textcolor{keywordflow}{case} (tfreeze\_millero\_string)
01415       eos%form\_of\_TFreeze = tfreeze\_millero
01416     \textcolor{keywordflow}{case} (tfreeze\_teos10\_string)
01417       eos%form\_of\_TFreeze = tfreeze\_teos10
01418 \textcolor{keywordflow}{    case default}
01419       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"interpret\_eos\_selection:  TFREEZE\_FORM "}//&
01420                               trim(tmpstr) // \textcolor{stringliteral}{"in input file is invalid."})
01421 \textcolor{keywordflow}{  end select}
01422 
01423   \textcolor{keywordflow}{if} (eos%form\_of\_TFreeze == tfreeze\_linear) \textcolor{keywordflow}{then}
01424     \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"TFREEZE\_S0\_P0"},eos%TFr\_S0\_P0, &
01425                  \textcolor{stringliteral}{"When TFREEZE\_FORM="}//trim(tfreeze\_linear\_string)//\textcolor{stringliteral}{", "}//&
01426                  \textcolor{stringliteral}{"this is the freezing potential temperature at "}//&
01427                  \textcolor{stringliteral}{"S=0, P=0."}, units=\textcolor{stringliteral}{"deg C"}, default=0.0)
01428     \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"DTFREEZE\_DS"},eos%dTFr\_dS, &
01429                  \textcolor{stringliteral}{"When TFREEZE\_FORM="}//trim(tfreeze\_linear\_string)//\textcolor{stringliteral}{", "}//&
01430                  \textcolor{stringliteral}{"this is the derivative of the freezing potential "}//&
01431                  \textcolor{stringliteral}{"temperature with salinity."}, &
01432                  units=\textcolor{stringliteral}{"deg C PSU-1"}, default=-0.054)
01433     \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"DTFREEZE\_DP"},eos%dTFr\_dP, &
01434                  \textcolor{stringliteral}{"When TFREEZE\_FORM="}//trim(tfreeze\_linear\_string)//\textcolor{stringliteral}{", "}//&
01435                  \textcolor{stringliteral}{"this is the derivative of the freezing potential "}//&
01436                  \textcolor{stringliteral}{"temperature with pressure."}, &
01437                  units=\textcolor{stringliteral}{"deg C Pa-1"}, default=0.0)
01438 \textcolor{keywordflow}{  endif}
01439 
01440   \textcolor{keywordflow}{if} ((eos%form\_of\_EOS == eos\_teos10 .OR. eos%form\_of\_EOS == eos\_nemo) .AND. &
01441       eos%form\_of\_TFreeze /= tfreeze\_teos10) \textcolor{keywordflow}{then}
01442       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"interpret\_eos\_selection:  EOS\_TEOS10 or EOS\_NEMO \(\backslash\)n"} //&
01443       \textcolor{stringliteral}{"should only be used along with TFREEZE\_FORM = TFREEZE\_TEOS10 ."})
01444 \textcolor{keywordflow}{  endif}
01445 
01446   \textcolor{comment}{! Unit conversions}
01447   eos%m\_to\_Z = 1. ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(us)) eos%m\_to\_Z = us%m\_to\_Z
01448   eos%kg\_m3\_to\_R = 1. ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(us)) eos%kg\_m3\_to\_R = us%kg\_m3\_to\_R
01449   eos%R\_to\_kg\_m3 = 1. ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(us)) eos%R\_to\_kg\_m3 = us%R\_to\_kg\_m3
01450   eos%RL2\_T2\_to\_Pa = 1. ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(us)) eos%RL2\_T2\_to\_Pa = us%RL2\_T2\_to\_Pa
01451   eos%L\_T\_to\_m\_s = 1. ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(us)) eos%L\_T\_to\_m\_s = us%L\_T\_to\_m\_s
01452 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a949f5bb0744c827bf11cca01316ceed4}\label{namespacemom__eos_a949f5bb0744c827bf11cca01316ceed4}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!eos\+\_\+manual\+\_\+init@{eos\+\_\+manual\+\_\+init}}
\index{eos\+\_\+manual\+\_\+init@{eos\+\_\+manual\+\_\+init}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{eos\+\_\+manual\+\_\+init()}{eos\_manual\_init()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+eos\+::eos\+\_\+manual\+\_\+init (\begin{DoxyParamCaption}\item[{type(\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}), pointer}]{E\+OS,  }\item[{integer, intent(in), optional}]{form\+\_\+of\+\_\+\+E\+OS,  }\item[{integer, intent(in), optional}]{form\+\_\+of\+\_\+\+T\+Freeze,  }\item[{logical, intent(in), optional}]{E\+O\+S\+\_\+quadrature,  }\item[{logical, intent(in), optional}]{Compressible,  }\item[{real, intent(in), optional}]{Rho\+\_\+\+T0\+\_\+\+S0,  }\item[{real, intent(in), optional}]{drho\+\_\+dT,  }\item[{real, intent(in), optional}]{d\+Rho\+\_\+dS,  }\item[{real, intent(in), optional}]{T\+Fr\+\_\+\+S0\+\_\+\+P0,  }\item[{real, intent(in), optional}]{d\+T\+Fr\+\_\+dS,  }\item[{real, intent(in), optional}]{d\+T\+Fr\+\_\+dp }\end{DoxyParamCaption})}



Manually initialized an E\+OS type (intended for unit testing of routines which need a specific E\+OS) 


\begin{DoxyParams}[1]{Parameters}
 & {\em eos} & Equation of state structure\\
\hline
\mbox{\tt in}  & {\em form\+\_\+of\+\_\+eos} & A coded integer indicating the equation of state to use.\\
\hline
\mbox{\tt in}  & {\em form\+\_\+of\+\_\+tfreeze} & A coded integer indicating the expression for the potential temperature of the freezing point.\\
\hline
\mbox{\tt in}  & {\em eos\+\_\+quadrature} & If true, always use the generic (quadrature) code for the integrals of density.\\
\hline
\mbox{\tt in}  & {\em compressible} & If true, in situ density is a function of pressure.\\
\hline
\mbox{\tt in}  & {\em rho\+\_\+t0\+\_\+s0} & Density at T=0 degC and S=0 ppt \mbox{[}kg m-\/3\mbox{]}\\
\hline
\mbox{\tt in}  & {\em drho\+\_\+dt} & Partial derivative of density with temperature in \mbox{[}kg m-\/3 deg\+C-\/1\mbox{]}\\
\hline
\mbox{\tt in}  & {\em drho\+\_\+ds} & Partial derivative of density with salinity in \mbox{[}kg m-\/3 ppt-\/1\mbox{]}\\
\hline
\mbox{\tt in}  & {\em tfr\+\_\+s0\+\_\+p0} & The freezing potential temperature at S=0, P=0 \mbox{[}degC\mbox{]}\\
\hline
\mbox{\tt in}  & {\em dtfr\+\_\+ds} & The derivative of freezing point with salinity in \mbox{[}degC ppt-\/1\mbox{]}\\
\hline
\mbox{\tt in}  & {\em dtfr\+\_\+dp} & The derivative of freezing point with pressure in \mbox{[}degC Pa-\/1\mbox{]} \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}
01458   \textcolor{keywordtype}{type}(eos\_type),    \textcolor{keywordtype}{pointer}    :: eos\textcolor{comment}{ !< Equation of state structure}
01459   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: form\_of\_eos\textcolor{comment}{ !< A coded integer indicating the equation of state to use.}
01460   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: form\_of\_tfreeze\textcolor{comment}{ !< A coded integer indicating the expression for}
01461 \textcolor{comment}{                                       !! the potential temperature of the freezing point.}
01462   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: eos\_quadrature\textcolor{comment}{ !< If true, always use the generic (quadrature)}
01463 \textcolor{comment}{                                       !! code for the integrals of density.}
01464   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: compressible\textcolor{comment}{  !< If true, in situ density is a function of pressure.}
01465   \textcolor{keywordtype}{real}   , \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: rho\_t0\_s0\textcolor{comment}{ !< Density at T=0 degC and S=0 ppt [kg m-3]}
01466   \textcolor{keywordtype}{real}   , \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: drho\_dt\textcolor{comment}{   !< Partial derivative of density with temperature}
01467 \textcolor{comment}{                                             !! in [kg m-3 degC-1]}
01468   \textcolor{keywordtype}{real}   , \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: drho\_ds\textcolor{comment}{   !< Partial derivative of density with salinity}
01469 \textcolor{comment}{                                             !! in [kg m-3 ppt-1]}
01470   \textcolor{keywordtype}{real}   , \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: tfr\_s0\_p0\textcolor{comment}{ !< The freezing potential temperature at S=0, P=0 [degC]}
01471   \textcolor{keywordtype}{real}   , \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: dtfr\_ds\textcolor{comment}{   !< The derivative of freezing point with salinity}
01472 \textcolor{comment}{                                             !! in [degC ppt-1]}
01473   \textcolor{keywordtype}{real}   , \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: dtfr\_dp\textcolor{comment}{   !< The derivative of freezing point with pressure}
01474 \textcolor{comment}{                                             !! in [degC Pa-1]}
01475 
01476   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(form\_of\_eos    ))  eos%form\_of\_EOS     = form\_of\_eos
01477   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(form\_of\_tfreeze))  eos%form\_of\_TFreeze = form\_of\_tfreeze
01478   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(eos\_quadrature ))  eos%EOS\_quadrature  = eos\_quadrature
01479   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(compressible   ))  eos%Compressible    = compressible
01480   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(rho\_t0\_s0      ))  eos%Rho\_T0\_S0       = rho\_t0\_s0
01481   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(drho\_dt        ))  eos%drho\_dT         = drho\_dt
01482   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(drho\_ds        ))  eos%dRho\_dS         = drho\_ds
01483   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(tfr\_s0\_p0      ))  eos%TFr\_S0\_P0       = tfr\_s0\_p0
01484   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(dtfr\_ds        ))  eos%dTFr\_dS         = dtfr\_ds
01485   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(dtfr\_dp        ))  eos%dTFr\_dp         = dtfr\_dp
01486 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_aad531f2540628368c33198bb31d51201}\label{namespacemom__eos_aad531f2540628368c33198bb31d51201}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!eos\+\_\+quadrature@{eos\+\_\+quadrature}}
\index{eos\+\_\+quadrature@{eos\+\_\+quadrature}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{eos\+\_\+quadrature()}{eos\_quadrature()}}
{\footnotesize\ttfamily logical function, public mom\+\_\+eos\+::eos\+\_\+quadrature (\begin{DoxyParamCaption}\item[{type(\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}), pointer}]{E\+OS }\end{DoxyParamCaption})}



Return value of E\+O\+S\+\_\+quadrature. 


\begin{DoxyParams}{Parameters}
{\em eos} & Equation of state structure \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}
01565   \textcolor{keywordtype}{type}(eos\_type),    \textcolor{keywordtype}{pointer}     :: eos\textcolor{comment}{ !< Equation of state structure}
01566 
01567   eos\_quadrature  = eos%EOS\_quadrature
01568 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_ae608600501a98f8f317d8f27a054327e}\label{namespacemom__eos_ae608600501a98f8f317d8f27a054327e}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!eos\+\_\+use\+\_\+linear@{eos\+\_\+use\+\_\+linear}}
\index{eos\+\_\+use\+\_\+linear@{eos\+\_\+use\+\_\+linear}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{eos\+\_\+use\+\_\+linear()}{eos\_use\_linear()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+eos\+::eos\+\_\+use\+\_\+linear (\begin{DoxyParamCaption}\item[{real, intent(in)}]{Rho\+\_\+\+T0\+\_\+\+S0,  }\item[{real, intent(in)}]{d\+Rho\+\_\+dT,  }\item[{real, intent(in)}]{d\+Rho\+\_\+dS,  }\item[{type(\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}), pointer}]{E\+OS,  }\item[{logical, intent(in), optional}]{use\+\_\+quadrature }\end{DoxyParamCaption})}



Set equation of state structure (E\+OS) to linear with given coefficients. 

\begin{DoxyNote}{Note}
This routine is primarily for testing and allows a local copy of the E\+O\+S\+\_\+type (E\+OS argument) to be set to use the linear equation of state independent from the rest of the model.
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em rho\+\_\+t0\+\_\+s0} & Density at T=0 degC and S=0 ppt \mbox{[}kg m-\/3\mbox{]}\\
\hline
\mbox{\tt in}  & {\em drho\+\_\+dt} & Partial derivative of density with temperature \mbox{[}kg m-\/3 deg\+C-\/1\mbox{]}\\
\hline
\mbox{\tt in}  & {\em drho\+\_\+ds} & Partial derivative of density with salinity \mbox{[}kg m-\/3 ppt-\/1\mbox{]}\\
\hline
\mbox{\tt in}  & {\em use\+\_\+quadrature} & If true, always use the generic (quadrature) code for the integrals of density.\\
\hline
 & {\em eos} & Equation of state structure \\
\hline
\end{DoxyParams}


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



References \hyperlink{namespacemom__eos_a230a2f280b1e27ee913e1b3cf4c412b8}{eos\+\_\+linear}.


\begin{DoxyCode}
01509   \textcolor{keywordtype}{real},              \textcolor{keywordtype}{intent(in)} :: rho\_t0\_s0\textcolor{comment}{ !< Density at T=0 degC and S=0 ppt [kg m-3]}
01510   \textcolor{keywordtype}{real},              \textcolor{keywordtype}{intent(in)} :: drho\_dt\textcolor{comment}{   !< Partial derivative of density with temperature [kg m-3
       degC-1]}
01511   \textcolor{keywordtype}{real},              \textcolor{keywordtype}{intent(in)} :: drho\_ds\textcolor{comment}{   !< Partial derivative of density with salinity [kg m-3 ppt-1]}
01512   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: use\_quadrature\textcolor{comment}{ !< If true, always use the generic (quadrature)}
01513 \textcolor{comment}{                                             !! code for the integrals of density.}
01514   \textcolor{keywordtype}{type}(eos\_type),    \textcolor{keywordtype}{pointer}    :: eos\textcolor{comment}{       !< Equation of state structure}
01515 
01516   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
01517     \textcolor{stringliteral}{"MOM\_EOS.F90: EOS\_use\_linear() called with an unassociated EOS\_type EOS."})
01518 
01519   eos%form\_of\_EOS = eos\_linear
01520   eos%Compressible = .false.
01521   eos%Rho\_T0\_S0 = rho\_t0\_s0
01522   eos%dRho\_dT = drho\_dt
01523   eos%dRho\_dS = drho\_ds
01524   eos%EOS\_quadrature = .false.
01525   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(use\_quadrature)) eos%EOS\_quadrature = use\_quadrature
01526 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a5e15d4f5b758ab149421c33145b0444c}\label{namespacemom__eos_a5e15d4f5b758ab149421c33145b0444c}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!extract\+\_\+member\+\_\+eos@{extract\+\_\+member\+\_\+eos}}
\index{extract\+\_\+member\+\_\+eos@{extract\+\_\+member\+\_\+eos}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{extract\+\_\+member\+\_\+eos()}{extract\_member\_eos()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+eos\+::extract\+\_\+member\+\_\+eos (\begin{DoxyParamCaption}\item[{type(\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}), pointer}]{E\+OS,  }\item[{integer, intent(out), optional}]{form\+\_\+of\+\_\+\+E\+OS,  }\item[{integer, intent(out), optional}]{form\+\_\+of\+\_\+\+T\+Freeze,  }\item[{logical, intent(out), optional}]{E\+O\+S\+\_\+quadrature,  }\item[{logical, intent(out), optional}]{Compressible,  }\item[{real, intent(out), optional}]{Rho\+\_\+\+T0\+\_\+\+S0,  }\item[{real, intent(out), optional}]{drho\+\_\+dT,  }\item[{real, intent(out), optional}]{d\+Rho\+\_\+dS,  }\item[{real, intent(out), optional}]{T\+Fr\+\_\+\+S0\+\_\+\+P0,  }\item[{real, intent(out), optional}]{d\+T\+Fr\+\_\+dS,  }\item[{real, intent(out), optional}]{d\+T\+Fr\+\_\+dp }\end{DoxyParamCaption})}



Extractor routine for the E\+OS type if the members need to be accessed outside this module. 


\begin{DoxyParams}[1]{Parameters}
 & {\em eos} & Equation of state structure\\
\hline
\mbox{\tt out}  & {\em form\+\_\+of\+\_\+eos} & A coded integer indicating the equation of state to use.\\
\hline
\mbox{\tt out}  & {\em form\+\_\+of\+\_\+tfreeze} & A coded integer indicating the expression for the potential temperature of the freezing point.\\
\hline
\mbox{\tt out}  & {\em eos\+\_\+quadrature} & If true, always use the generic (quadrature) code for the integrals of density.\\
\hline
\mbox{\tt out}  & {\em compressible} & If true, in situ density is a function of pressure.\\
\hline
\mbox{\tt out}  & {\em rho\+\_\+t0\+\_\+s0} & Density at T=0 degC and S=0 ppt \mbox{[}kg m-\/3\mbox{]}\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+dt} & Partial derivative of density with temperature in \mbox{[}kg m-\/3 deg\+C-\/1\mbox{]}\\
\hline
\mbox{\tt out}  & {\em drho\+\_\+ds} & Partial derivative of density with salinity in \mbox{[}kg m-\/3 ppt-\/1\mbox{]}\\
\hline
\mbox{\tt out}  & {\em tfr\+\_\+s0\+\_\+p0} & The freezing potential temperature at S=0, P=0 \mbox{[}degC\mbox{]}\\
\hline
\mbox{\tt out}  & {\em dtfr\+\_\+ds} & The derivative of freezing point with salinity \mbox{[}degC P\+S\+U-\/1\mbox{]}\\
\hline
\mbox{\tt out}  & {\em dtfr\+\_\+dp} & The derivative of freezing point with pressure \mbox{[}degC Pa-\/1\mbox{]} \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}
01574   \textcolor{keywordtype}{type}(eos\_type),    \textcolor{keywordtype}{pointer}     :: eos\textcolor{comment}{ !< Equation of state structure}
01575   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(out)} :: form\_of\_eos\textcolor{comment}{ !< A coded integer indicating the equation of state to use.}
01576   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(out)} :: form\_of\_tfreeze\textcolor{comment}{ !< A coded integer indicating the expression for}
01577 \textcolor{comment}{                                       !! the potential temperature of the freezing point.}
01578   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(out)} :: eos\_quadrature\textcolor{comment}{ !< If true, always use the generic (quadrature)}
01579 \textcolor{comment}{                                       !! code for the integrals of density.}
01580   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(out)} :: compressible\textcolor{comment}{ !< If true, in situ density is a function of pressure.}
01581   \textcolor{keywordtype}{real}   , \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(out)} :: rho\_t0\_s0\textcolor{comment}{ !< Density at T=0 degC and S=0 ppt [kg m-3]}
01582   \textcolor{keywordtype}{real}   , \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(out)} :: drho\_dt\textcolor{comment}{   !< Partial derivative of density with temperature}
01583 \textcolor{comment}{                                              !! in [kg m-3 degC-1]}
01584   \textcolor{keywordtype}{real}   , \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(out)} :: drho\_ds\textcolor{comment}{   !< Partial derivative of density with salinity}
01585 \textcolor{comment}{                                              !! in [kg m-3 ppt-1]}
01586   \textcolor{keywordtype}{real}   , \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(out)} :: tfr\_s0\_p0\textcolor{comment}{ !< The freezing potential temperature at S=0, P=0 [degC]}
01587   \textcolor{keywordtype}{real}   , \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(out)} :: dtfr\_ds\textcolor{comment}{   !< The derivative of freezing point with salinity}
01588 \textcolor{comment}{                                              !! [degC PSU-1]}
01589   \textcolor{keywordtype}{real}   , \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(out)} :: dtfr\_dp\textcolor{comment}{   !< The derivative of freezing point with pressure}
01590 \textcolor{comment}{                                              !! [degC Pa-1]}
01591 
01592   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(form\_of\_eos    ))  form\_of\_eos     = eos%form\_of\_EOS
01593   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(form\_of\_tfreeze))  form\_of\_tfreeze = eos%form\_of\_TFreeze
01594   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(eos\_quadrature ))  eos\_quadrature  = eos%EOS\_quadrature
01595   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(compressible   ))  compressible    = eos%Compressible
01596   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(rho\_t0\_s0      ))  rho\_t0\_s0       = eos%Rho\_T0\_S0
01597   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(drho\_dt        ))  drho\_dt         = eos%drho\_dT
01598   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(drho\_ds        ))  drho\_ds         = eos%dRho\_dS
01599   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(tfr\_s0\_p0      ))  tfr\_s0\_p0       = eos%TFr\_S0\_P0
01600   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(dtfr\_ds        ))  dtfr\_ds         = eos%dTFr\_dS
01601   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(dtfr\_dp        ))  dtfr\_dp         = eos%dTFr\_dp
01602 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_aee169aee0e4cbed420782d772282bb69}\label{namespacemom__eos_aee169aee0e4cbed420782d772282bb69}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!query\+\_\+compressible@{query\+\_\+compressible}}
\index{query\+\_\+compressible@{query\+\_\+compressible}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{query\+\_\+compressible()}{query\_compressible()}}
{\footnotesize\ttfamily logical function, public mom\+\_\+eos\+::query\+\_\+compressible (\begin{DoxyParamCaption}\item[{type(\hyperlink{structmom__eos_1_1eos__type}{eos\+\_\+type}), pointer}]{E\+OS }\end{DoxyParamCaption})}



Returns true if the equation of state is compressible (i.\+e. has pressure dependence) 


\begin{DoxyParams}{Parameters}
{\em eos} & Equation of state structure \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}
01339   \textcolor{keywordtype}{type}(eos\_type), \textcolor{keywordtype}{pointer} :: eos\textcolor{comment}{ !< Equation of state structure}
01340 
01341   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(eos)) \textcolor{keyword}{call }mom\_error(fatal, &
01342     \textcolor{stringliteral}{"query\_compressible called with an unassociated EOS\_type EOS."})
01343 
01344   query\_compressible = eos%compressible
\end{DoxyCode}


\subsection{Variable Documentation}
\mbox{\Hypertarget{namespacemom__eos_a3d4e14a920e46cac8cec72c79690de7c}\label{namespacemom__eos_a3d4e14a920e46cac8cec72c79690de7c}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!eos\+\_\+default@{eos\+\_\+default}}
\index{eos\+\_\+default@{eos\+\_\+default}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{eos\+\_\+default}{eos\_default}}
{\footnotesize\ttfamily character$\ast$(10), parameter mom\+\_\+eos\+::eos\+\_\+default = E\+O\+S\+\_\+\+W\+R\+I\+G\+H\+T\+\_\+\+S\+T\+R\+I\+NG\hspace{0.3cm}{\ttfamily [private]}}



The default equation of state. 



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



Referenced by \hyperlink{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}{eos\+\_\+init()}.


\begin{DoxyCode}
00148 \textcolor{comment}{character*(10), parameter :: EOS\_DEFAULT = EOS\_WRIGHT\_STRING !< The default equation of state}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a230a2f280b1e27ee913e1b3cf4c412b8}\label{namespacemom__eos_a230a2f280b1e27ee913e1b3cf4c412b8}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!eos\+\_\+linear@{eos\+\_\+linear}}
\index{eos\+\_\+linear@{eos\+\_\+linear}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{eos\+\_\+linear}{eos\_linear}}
{\footnotesize\ttfamily integer, parameter, public mom\+\_\+eos\+::eos\+\_\+linear = 1}



A named integer specifying an equation of state. 



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



Referenced by \hyperlink{namespacemom__eos_a2787233a5f7a0935206ba2cf4c278aab}{analytic\+\_\+int\+\_\+density\+\_\+dz()}, \hyperlink{namespacemom__eos_a09b6cb637246b8aa287ef7cdb482aaea}{analytic\+\_\+int\+\_\+specific\+\_\+vol\+\_\+dp()}, \hyperlink{namespacemom__eos_a3296609bd60bfe7ed2c5eac1170d07a3}{calculate\+\_\+compress\+\_\+array()}, \hyperlink{namespacemom__eos_a3be8289c391088bdd3af78d272b92521}{calculate\+\_\+density\+\_\+array()}, \hyperlink{namespacemom__eos_a27ec57cbbd2e673d542ba2c8dd44053a}{calculate\+\_\+density\+\_\+derivs\+\_\+array()}, \hyperlink{namespacemom__eos_a06d9d6680e838b965666986e63c980e7}{calculate\+\_\+density\+\_\+derivs\+\_\+scalar()}, \hyperlink{namespacemom__eos_ac3bdab784e3535d661c47d1ec8a624fd}{calculate\+\_\+density\+\_\+scalar()}, \hyperlink{namespacemom__eos_a8c0fa67a7a4911eb5fa33c5d17b997f9}{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+array()}, \hyperlink{namespacemom__eos_a2d7a984ed1c48d9e0ea1046de3eac886}{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+scalar()}, \hyperlink{namespacemom__eos_a43d417da1636adb2cd184f76223afded}{calculate\+\_\+spec\+\_\+vol\+\_\+array()}, \hyperlink{namespacemom__eos_a35f9c33d1aeffbf9986349463bab3b9c}{calculate\+\_\+spec\+\_\+vol\+\_\+derivs\+\_\+array()}, \hyperlink{namespacemom__eos_a58b52a452d779c53e6421aaa3eac6e8b}{calculate\+\_\+stanley\+\_\+density\+\_\+1d()}, \hyperlink{namespacemom__eos_a102df91898d116a6b4346f00dc818612}{calculate\+\_\+stanley\+\_\+density\+\_\+array()}, \hyperlink{namespacemom__eos_a66d40148737ef1a3b1ae44917c7fe0c3}{calculate\+\_\+stanley\+\_\+density\+\_\+scalar()}, \hyperlink{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}{eos\+\_\+init()}, and \hyperlink{namespacemom__eos_ae608600501a98f8f317d8f27a054327e}{eos\+\_\+use\+\_\+linear()}.


\begin{DoxyCode}
00137 \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}, \textcolor{keywordtype}{public} :: eos\_linear = 1\textcolor{comment}{ !< A named integer specifying an equation of state}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_adba0a32cc2c8f110e58447a29bf885d3}\label{namespacemom__eos_adba0a32cc2c8f110e58447a29bf885d3}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!eos\+\_\+linear\+\_\+string@{eos\+\_\+linear\+\_\+string}}
\index{eos\+\_\+linear\+\_\+string@{eos\+\_\+linear\+\_\+string}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{eos\+\_\+linear\+\_\+string}{eos\_linear\_string}}
{\footnotesize\ttfamily character$\ast$(10), parameter mom\+\_\+eos\+::eos\+\_\+linear\+\_\+string = \char`\"{}L\+I\+N\+E\+AR\char`\"{}\hspace{0.3cm}{\ttfamily [private]}}



A string for specifying the equation of state. 



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



Referenced by \hyperlink{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}{eos\+\_\+init()}.


\begin{DoxyCode}
00143 \textcolor{comment}{character*(10), parameter :: EOS\_LINEAR\_STRING = "LINEAR" !< A string for specifying the equation of state}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_ac37477f774acf511e88e96c036fa8292}\label{namespacemom__eos_ac37477f774acf511e88e96c036fa8292}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!eos\+\_\+nemo@{eos\+\_\+nemo}}
\index{eos\+\_\+nemo@{eos\+\_\+nemo}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{eos\+\_\+nemo}{eos\_nemo}}
{\footnotesize\ttfamily integer, parameter, public mom\+\_\+eos\+::eos\+\_\+nemo = 5}



A named integer specifying an equation of state. 



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



Referenced by \hyperlink{namespacemom__eos_a3296609bd60bfe7ed2c5eac1170d07a3}{calculate\+\_\+compress\+\_\+array()}, \hyperlink{namespacemom__eos_a3be8289c391088bdd3af78d272b92521}{calculate\+\_\+density\+\_\+array()}, \hyperlink{namespacemom__eos_a27ec57cbbd2e673d542ba2c8dd44053a}{calculate\+\_\+density\+\_\+derivs\+\_\+array()}, \hyperlink{namespacemom__eos_ac3bdab784e3535d661c47d1ec8a624fd}{calculate\+\_\+density\+\_\+scalar()}, \hyperlink{namespacemom__eos_a43d417da1636adb2cd184f76223afded}{calculate\+\_\+spec\+\_\+vol\+\_\+array()}, \hyperlink{namespacemom__eos_a35f9c33d1aeffbf9986349463bab3b9c}{calculate\+\_\+spec\+\_\+vol\+\_\+derivs\+\_\+array()}, \hyperlink{namespacemom__eos_a5b1ff89023e9d7da4074c7c1a71c9a85}{convert\+\_\+temp\+\_\+salt\+\_\+for\+\_\+teos10()}, and \hyperlink{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}{eos\+\_\+init()}.


\begin{DoxyCode}
00141 \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}, \textcolor{keywordtype}{public} :: eos\_nemo   = 5\textcolor{comment}{ !< A named integer specifying an equation of state}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a9348dc6c296a8dad0fe5cf27e47119a5}\label{namespacemom__eos_a9348dc6c296a8dad0fe5cf27e47119a5}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!eos\+\_\+nemo\+\_\+string@{eos\+\_\+nemo\+\_\+string}}
\index{eos\+\_\+nemo\+\_\+string@{eos\+\_\+nemo\+\_\+string}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{eos\+\_\+nemo\+\_\+string}{eos\_nemo\_string}}
{\footnotesize\ttfamily character$\ast$(10), parameter mom\+\_\+eos\+::eos\+\_\+nemo\+\_\+string = \char`\"{}N\+E\+MO\char`\"{}\hspace{0.3cm}{\ttfamily [private]}}



A string for specifying the equation of state. 



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



Referenced by \hyperlink{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}{eos\+\_\+init()}.


\begin{DoxyCode}
00147 \textcolor{comment}{character*(10), parameter :: EOS\_NEMO\_STRING   = "NEMO"   !< A string for specifying the equation of state}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_afcd60f98ea35c6044d38eb4409b0a083}\label{namespacemom__eos_afcd60f98ea35c6044d38eb4409b0a083}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!eos\+\_\+teos10@{eos\+\_\+teos10}}
\index{eos\+\_\+teos10@{eos\+\_\+teos10}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{eos\+\_\+teos10}{eos\_teos10}}
{\footnotesize\ttfamily integer, parameter, public mom\+\_\+eos\+::eos\+\_\+teos10 = 4}



A named integer specifying an equation of state. 



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



Referenced by \hyperlink{namespacemom__eos_a3296609bd60bfe7ed2c5eac1170d07a3}{calculate\+\_\+compress\+\_\+array()}, \hyperlink{namespacemom__eos_a3be8289c391088bdd3af78d272b92521}{calculate\+\_\+density\+\_\+array()}, \hyperlink{namespacemom__eos_a27ec57cbbd2e673d542ba2c8dd44053a}{calculate\+\_\+density\+\_\+derivs\+\_\+array()}, \hyperlink{namespacemom__eos_a06d9d6680e838b965666986e63c980e7}{calculate\+\_\+density\+\_\+derivs\+\_\+scalar()}, \hyperlink{namespacemom__eos_ac3bdab784e3535d661c47d1ec8a624fd}{calculate\+\_\+density\+\_\+scalar()}, \hyperlink{namespacemom__eos_a8c0fa67a7a4911eb5fa33c5d17b997f9}{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+array()}, \hyperlink{namespacemom__eos_a2d7a984ed1c48d9e0ea1046de3eac886}{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+scalar()}, \hyperlink{namespacemom__eos_a43d417da1636adb2cd184f76223afded}{calculate\+\_\+spec\+\_\+vol\+\_\+array()}, \hyperlink{namespacemom__eos_a35f9c33d1aeffbf9986349463bab3b9c}{calculate\+\_\+spec\+\_\+vol\+\_\+derivs\+\_\+array()}, \hyperlink{namespacemom__eos_a58b52a452d779c53e6421aaa3eac6e8b}{calculate\+\_\+stanley\+\_\+density\+\_\+1d()}, \hyperlink{namespacemom__eos_a102df91898d116a6b4346f00dc818612}{calculate\+\_\+stanley\+\_\+density\+\_\+array()}, \hyperlink{namespacemom__eos_a66d40148737ef1a3b1ae44917c7fe0c3}{calculate\+\_\+stanley\+\_\+density\+\_\+scalar()}, \hyperlink{namespacemom__eos_a5b1ff89023e9d7da4074c7c1a71c9a85}{convert\+\_\+temp\+\_\+salt\+\_\+for\+\_\+teos10()}, and \hyperlink{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}{eos\+\_\+init()}.


\begin{DoxyCode}
00140 \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}, \textcolor{keywordtype}{public} :: eos\_teos10 = 4\textcolor{comment}{ !< A named integer specifying an equation of state}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a9dc2b7c2c67a47b336de4db21b0c9cf5}\label{namespacemom__eos_a9dc2b7c2c67a47b336de4db21b0c9cf5}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!eos\+\_\+teos10\+\_\+string@{eos\+\_\+teos10\+\_\+string}}
\index{eos\+\_\+teos10\+\_\+string@{eos\+\_\+teos10\+\_\+string}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{eos\+\_\+teos10\+\_\+string}{eos\_teos10\_string}}
{\footnotesize\ttfamily character$\ast$(10), parameter mom\+\_\+eos\+::eos\+\_\+teos10\+\_\+string = \char`\"{}T\+E\+O\+S10\char`\"{}\hspace{0.3cm}{\ttfamily [private]}}



A string for specifying the equation of state. 



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



Referenced by \hyperlink{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}{eos\+\_\+init()}.


\begin{DoxyCode}
00146 \textcolor{comment}{character*(10), parameter :: EOS\_TEOS10\_STRING = "TEOS10" !< A string for specifying the equation of state}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a9eacc16ba79dc66131b54bf31114f35a}\label{namespacemom__eos_a9eacc16ba79dc66131b54bf31114f35a}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!eos\+\_\+unesco@{eos\+\_\+unesco}}
\index{eos\+\_\+unesco@{eos\+\_\+unesco}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{eos\+\_\+unesco}{eos\_unesco}}
{\footnotesize\ttfamily integer, parameter, public mom\+\_\+eos\+::eos\+\_\+unesco = 2}



A named integer specifying an equation of state. 



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



Referenced by \hyperlink{namespacemom__eos_a3296609bd60bfe7ed2c5eac1170d07a3}{calculate\+\_\+compress\+\_\+array()}, \hyperlink{namespacemom__eos_a3be8289c391088bdd3af78d272b92521}{calculate\+\_\+density\+\_\+array()}, \hyperlink{namespacemom__eos_a27ec57cbbd2e673d542ba2c8dd44053a}{calculate\+\_\+density\+\_\+derivs\+\_\+array()}, \hyperlink{namespacemom__eos_ac3bdab784e3535d661c47d1ec8a624fd}{calculate\+\_\+density\+\_\+scalar()}, \hyperlink{namespacemom__eos_a43d417da1636adb2cd184f76223afded}{calculate\+\_\+spec\+\_\+vol\+\_\+array()}, \hyperlink{namespacemom__eos_a35f9c33d1aeffbf9986349463bab3b9c}{calculate\+\_\+spec\+\_\+vol\+\_\+derivs\+\_\+array()}, and \hyperlink{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}{eos\+\_\+init()}.


\begin{DoxyCode}
00138 \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}, \textcolor{keywordtype}{public} :: eos\_unesco = 2\textcolor{comment}{ !< A named integer specifying an equation of state}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_aa725e4d064e1dd5cb0c6208096ad05fe}\label{namespacemom__eos_aa725e4d064e1dd5cb0c6208096ad05fe}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!eos\+\_\+unesco\+\_\+string@{eos\+\_\+unesco\+\_\+string}}
\index{eos\+\_\+unesco\+\_\+string@{eos\+\_\+unesco\+\_\+string}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{eos\+\_\+unesco\+\_\+string}{eos\_unesco\_string}}
{\footnotesize\ttfamily character$\ast$(10), parameter mom\+\_\+eos\+::eos\+\_\+unesco\+\_\+string = \char`\"{}U\+N\+E\+S\+CO\char`\"{}\hspace{0.3cm}{\ttfamily [private]}}



A string for specifying the equation of state. 



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



Referenced by \hyperlink{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}{eos\+\_\+init()}.


\begin{DoxyCode}
00144 \textcolor{comment}{character*(10), parameter :: EOS\_UNESCO\_STRING = "UNESCO" !< A string for specifying the equation of state}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a4bbd0f276fe3878bd01b3ff180fb41c5}\label{namespacemom__eos_a4bbd0f276fe3878bd01b3ff180fb41c5}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!eos\+\_\+wright@{eos\+\_\+wright}}
\index{eos\+\_\+wright@{eos\+\_\+wright}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{eos\+\_\+wright}{eos\_wright}}
{\footnotesize\ttfamily integer, parameter, public mom\+\_\+eos\+::eos\+\_\+wright = 3}



A named integer specifying an equation of state. 



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



Referenced by \hyperlink{namespacemom__eos_a2787233a5f7a0935206ba2cf4c278aab}{analytic\+\_\+int\+\_\+density\+\_\+dz()}, \hyperlink{namespacemom__eos_a09b6cb637246b8aa287ef7cdb482aaea}{analytic\+\_\+int\+\_\+specific\+\_\+vol\+\_\+dp()}, \hyperlink{namespacemom__eos_a3296609bd60bfe7ed2c5eac1170d07a3}{calculate\+\_\+compress\+\_\+array()}, \hyperlink{namespacemom__eos_a3be8289c391088bdd3af78d272b92521}{calculate\+\_\+density\+\_\+array()}, \hyperlink{namespacemom__eos_a27ec57cbbd2e673d542ba2c8dd44053a}{calculate\+\_\+density\+\_\+derivs\+\_\+array()}, \hyperlink{namespacemom__eos_a06d9d6680e838b965666986e63c980e7}{calculate\+\_\+density\+\_\+derivs\+\_\+scalar()}, \hyperlink{namespacemom__eos_ac3bdab784e3535d661c47d1ec8a624fd}{calculate\+\_\+density\+\_\+scalar()}, \hyperlink{namespacemom__eos_a8c0fa67a7a4911eb5fa33c5d17b997f9}{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+array()}, \hyperlink{namespacemom__eos_a2d7a984ed1c48d9e0ea1046de3eac886}{calculate\+\_\+density\+\_\+second\+\_\+derivs\+\_\+scalar()}, \hyperlink{namespacemom__eos_a43d417da1636adb2cd184f76223afded}{calculate\+\_\+spec\+\_\+vol\+\_\+array()}, \hyperlink{namespacemom__eos_a35f9c33d1aeffbf9986349463bab3b9c}{calculate\+\_\+spec\+\_\+vol\+\_\+derivs\+\_\+array()}, \hyperlink{namespacemom__eos_a58b52a452d779c53e6421aaa3eac6e8b}{calculate\+\_\+stanley\+\_\+density\+\_\+1d()}, \hyperlink{namespacemom__eos_a102df91898d116a6b4346f00dc818612}{calculate\+\_\+stanley\+\_\+density\+\_\+array()}, \hyperlink{namespacemom__eos_a66d40148737ef1a3b1ae44917c7fe0c3}{calculate\+\_\+stanley\+\_\+density\+\_\+scalar()}, and \hyperlink{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}{eos\+\_\+init()}.


\begin{DoxyCode}
00139 \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}, \textcolor{keywordtype}{public} :: eos\_wright = 3\textcolor{comment}{ !< A named integer specifying an equation of state}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_acacee5907ae295a83b1a9b65175d5a1e}\label{namespacemom__eos_acacee5907ae295a83b1a9b65175d5a1e}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!eos\+\_\+wright\+\_\+string@{eos\+\_\+wright\+\_\+string}}
\index{eos\+\_\+wright\+\_\+string@{eos\+\_\+wright\+\_\+string}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{eos\+\_\+wright\+\_\+string}{eos\_wright\_string}}
{\footnotesize\ttfamily character$\ast$(10), parameter mom\+\_\+eos\+::eos\+\_\+wright\+\_\+string = \char`\"{}W\+R\+I\+G\+HT\char`\"{}\hspace{0.3cm}{\ttfamily [private]}}



A string for specifying the equation of state. 



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



Referenced by \hyperlink{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}{eos\+\_\+init()}.


\begin{DoxyCode}
00145 \textcolor{comment}{character*(10), parameter :: EOS\_WRIGHT\_STRING = "WRIGHT" !< A string for specifying the equation of state}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a26afc0610c00badaeedddf818c0dc48c}\label{namespacemom__eos_a26afc0610c00badaeedddf818c0dc48c}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!tfreeze\+\_\+default@{tfreeze\+\_\+default}}
\index{tfreeze\+\_\+default@{tfreeze\+\_\+default}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{tfreeze\+\_\+default}{tfreeze\_default}}
{\footnotesize\ttfamily character$\ast$(10), parameter mom\+\_\+eos\+::tfreeze\+\_\+default = T\+F\+R\+E\+E\+Z\+E\+\_\+\+L\+I\+N\+E\+A\+R\+\_\+\+S\+T\+R\+I\+NG\hspace{0.3cm}{\ttfamily [private]}}



The default freezing point expression. 



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



Referenced by \hyperlink{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}{eos\+\_\+init()}.


\begin{DoxyCode}
00157 \textcolor{comment}{character*(10), parameter :: TFREEZE\_DEFAULT = TFREEZE\_LINEAR\_STRING !< The default freezing point
       expression}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_adcc45ec5c82aaef0aa4d330fa8cbc5c5}\label{namespacemom__eos_adcc45ec5c82aaef0aa4d330fa8cbc5c5}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!tfreeze\+\_\+linear@{tfreeze\+\_\+linear}}
\index{tfreeze\+\_\+linear@{tfreeze\+\_\+linear}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{tfreeze\+\_\+linear}{tfreeze\_linear}}
{\footnotesize\ttfamily integer, parameter mom\+\_\+eos\+::tfreeze\+\_\+linear = 1\hspace{0.3cm}{\ttfamily [private]}}



A named integer specifying a freezing point expression. 



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



Referenced by \hyperlink{namespacemom__eos_ab9669ca4a2e4f3507be7efe047c18ab7}{calculate\+\_\+tfreeze\+\_\+array()}, \hyperlink{namespacemom__eos_ad46af8402aba49dbdd73817d33e83270}{calculate\+\_\+tfreeze\+\_\+scalar()}, and \hyperlink{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}{eos\+\_\+init()}.


\begin{DoxyCode}
00150 \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter} :: tfreeze\_linear = 1\textcolor{comment}{  !< A named integer specifying a freezing point expression}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_ae3ee69a3e4a38b6925b121e3f34d8a15}\label{namespacemom__eos_ae3ee69a3e4a38b6925b121e3f34d8a15}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!tfreeze\+\_\+linear\+\_\+string@{tfreeze\+\_\+linear\+\_\+string}}
\index{tfreeze\+\_\+linear\+\_\+string@{tfreeze\+\_\+linear\+\_\+string}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{tfreeze\+\_\+linear\+\_\+string}{tfreeze\_linear\_string}}
{\footnotesize\ttfamily character$\ast$(10), parameter mom\+\_\+eos\+::tfreeze\+\_\+linear\+\_\+string = \char`\"{}L\+I\+N\+E\+AR\char`\"{}\hspace{0.3cm}{\ttfamily [private]}}



A string for specifying the freezing point expression. 



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



Referenced by \hyperlink{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}{eos\+\_\+init()}.


\begin{DoxyCode}
00153 \textcolor{comment}{character*(10), parameter :: TFREEZE\_LINEAR\_STRING = "LINEAR" !< A string for specifying the freezing point
       expression}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a7f361d35806d25ac361fea713b7f0b6f}\label{namespacemom__eos_a7f361d35806d25ac361fea713b7f0b6f}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!tfreeze\+\_\+millero@{tfreeze\+\_\+millero}}
\index{tfreeze\+\_\+millero@{tfreeze\+\_\+millero}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{tfreeze\+\_\+millero}{tfreeze\_millero}}
{\footnotesize\ttfamily integer, parameter mom\+\_\+eos\+::tfreeze\+\_\+millero = 2\hspace{0.3cm}{\ttfamily [private]}}



A named integer specifying a freezing point expression. 



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



Referenced by \hyperlink{namespacemom__eos_ab9669ca4a2e4f3507be7efe047c18ab7}{calculate\+\_\+tfreeze\+\_\+array()}, \hyperlink{namespacemom__eos_ad46af8402aba49dbdd73817d33e83270}{calculate\+\_\+tfreeze\+\_\+scalar()}, and \hyperlink{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}{eos\+\_\+init()}.


\begin{DoxyCode}
00151 \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter} :: tfreeze\_millero = 2\textcolor{comment}{ !< A named integer specifying a freezing point expression}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_a3922b6088618d34983c6125e0aa553ad}\label{namespacemom__eos_a3922b6088618d34983c6125e0aa553ad}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!tfreeze\+\_\+millero\+\_\+string@{tfreeze\+\_\+millero\+\_\+string}}
\index{tfreeze\+\_\+millero\+\_\+string@{tfreeze\+\_\+millero\+\_\+string}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{tfreeze\+\_\+millero\+\_\+string}{tfreeze\_millero\_string}}
{\footnotesize\ttfamily character$\ast$(10), parameter mom\+\_\+eos\+::tfreeze\+\_\+millero\+\_\+string = \char`\"{}M\+I\+L\+L\+E\+R\+O\+\_\+78\char`\"{}\hspace{0.3cm}{\ttfamily [private]}}



A string for specifying freezing point expression. 



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



Referenced by \hyperlink{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}{eos\+\_\+init()}.


\begin{DoxyCode}
00154 \textcolor{comment}{character*(10), parameter :: TFREEZE\_MILLERO\_STRING = "MILLERO\_78" !< A string for specifying}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_abf1f6edc79b67730c9f47e5645069eda}\label{namespacemom__eos_abf1f6edc79b67730c9f47e5645069eda}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!tfreeze\+\_\+teos10@{tfreeze\+\_\+teos10}}
\index{tfreeze\+\_\+teos10@{tfreeze\+\_\+teos10}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{tfreeze\+\_\+teos10}{tfreeze\_teos10}}
{\footnotesize\ttfamily integer, parameter mom\+\_\+eos\+::tfreeze\+\_\+teos10 = 3\hspace{0.3cm}{\ttfamily [private]}}



A named integer specifying a freezing point expression. 



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



Referenced by \hyperlink{namespacemom__eos_ab9669ca4a2e4f3507be7efe047c18ab7}{calculate\+\_\+tfreeze\+\_\+array()}, \hyperlink{namespacemom__eos_ad46af8402aba49dbdd73817d33e83270}{calculate\+\_\+tfreeze\+\_\+scalar()}, and \hyperlink{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}{eos\+\_\+init()}.


\begin{DoxyCode}
00152 \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter} :: tfreeze\_teos10 = 3\textcolor{comment}{  !< A named integer specifying a freezing point expression}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__eos_ad96b484fe337e2c37b2b11bcd3cbd7af}\label{namespacemom__eos_ad96b484fe337e2c37b2b11bcd3cbd7af}} 
\index{mom\+\_\+eos@{mom\+\_\+eos}!tfreeze\+\_\+teos10\+\_\+string@{tfreeze\+\_\+teos10\+\_\+string}}
\index{tfreeze\+\_\+teos10\+\_\+string@{tfreeze\+\_\+teos10\+\_\+string}!mom\+\_\+eos@{mom\+\_\+eos}}
\subsubsection{\texorpdfstring{tfreeze\+\_\+teos10\+\_\+string}{tfreeze\_teos10\_string}}
{\footnotesize\ttfamily character$\ast$(10), parameter mom\+\_\+eos\+::tfreeze\+\_\+teos10\+\_\+string = \char`\"{}T\+E\+O\+S10\char`\"{}\hspace{0.3cm}{\ttfamily [private]}}



A string for specifying the freezing point expression. 



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



Referenced by \hyperlink{namespacemom__eos_a3ab220b9c98dac3b8f6b7c1606b811cf}{eos\+\_\+init()}.


\begin{DoxyCode}
00156 \textcolor{comment}{character*(10), parameter :: TFREEZE\_TEOS10\_STRING = "TEOS10" !< A string for specifying the freezing point
       expression}
\end{DoxyCode}
