MOM6
mom_eos::calculate_density Interface Reference

Detailed Description

Calculates density of sea water from T, S and P.

Definition at line 60 of file MOM_EOS.F90.

Private functions

subroutine calculate_density_scalar (T, S, pressure, rho, EOS, rho_ref)
 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. More...
 
subroutine calculate_density_array (T, S, pressure, rho, start, npts, EOS, rho_ref)
 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. More...
 

Functions and subroutines

◆ calculate_density_array()

subroutine mom_eos::calculate_density::calculate_density_array ( real, dimension(:), intent(in)  T,
real, dimension(:), intent(in)  S,
real, dimension(:), intent(in)  pressure,
real, dimension(:), intent(out)  rho,
integer, intent(in)  start,
integer, intent(in)  npts,
type(eos_type), pointer  EOS,
real, intent(in), optional  rho_ref 
)
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.

Parameters
[in]tPotential temperature referenced to the surface [degC]
[in]sSalinity [ppt]
[in]pressurePressure [Pa]
[out]rhoDensity (in-situ if pressure is local) [kg m-3]
[in]startStart index for computation
[in]nptsNumber of point to compute
eosEquation of state structure
[in]rho_refA reference density [kg m-3].

Definition at line 166 of file MOM_EOS.F90.

166  real, dimension(:), intent(in) :: T !< Potential temperature referenced to the surface [degC]
167  real, dimension(:), intent(in) :: S !< Salinity [ppt]
168  real, dimension(:), intent(in) :: pressure !< Pressure [Pa]
169  real, dimension(:), intent(out) :: rho !< Density (in-situ if pressure is local) [kg m-3]
170  integer, intent(in) :: start !< Start index for computation
171  integer, intent(in) :: npts !< Number of point to compute
172  type(EOS_type), pointer :: EOS !< Equation of state structure
173  real, optional, intent(in) :: rho_ref !< A reference density [kg m-3].
174 
175  if (.not.associated(eos)) call mom_error(fatal, &
176  "calculate_density_array called with an unassociated EOS_type EOS.")
177 
178  select case (eos%form_of_EOS)
179  case (eos_linear)
180  call calculate_density_linear(t, s, pressure, rho, start, npts, &
181  eos%Rho_T0_S0, eos%dRho_dT, eos%dRho_dS, rho_ref)
182  case (eos_unesco)
183  call calculate_density_unesco(t, s, pressure, rho, start, npts, rho_ref)
184  case (eos_wright)
185  call calculate_density_wright(t, s, pressure, rho, start, npts, rho_ref)
186  case (eos_teos10)
187  call calculate_density_teos10(t, s, pressure, rho, start, npts, rho_ref)
188  case (eos_nemo)
189  call calculate_density_nemo (t, s, pressure, rho, start, npts, rho_ref)
190  case default
191  call mom_error(fatal, &
192  "calculate_density_array: EOS%form_of_EOS is not valid.")
193  end select
194 

◆ calculate_density_scalar()

subroutine mom_eos::calculate_density::calculate_density_scalar ( real, intent(in)  T,
real, intent(in)  S,
real, intent(in)  pressure,
real, intent(out)  rho,
type(eos_type), pointer  EOS,
real, intent(in), optional  rho_ref 
)
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.

Parameters
[in]tPotential temperature referenced to the surface [degC]
[in]sSalinity [ppt]
[in]pressurePressure [Pa]
[out]rhoDensity (in-situ if pressure is local) [kg m-3]
eosEquation of state structure
[in]rho_refA reference density [kg m-3].

Definition at line 134 of file MOM_EOS.F90.

134  real, intent(in) :: T !< Potential temperature referenced to the surface [degC]
135  real, intent(in) :: S !< Salinity [ppt]
136  real, intent(in) :: pressure !< Pressure [Pa]
137  real, intent(out) :: rho !< Density (in-situ if pressure is local) [kg m-3]
138  type(EOS_type), pointer :: EOS !< Equation of state structure
139  real, optional, intent(in) :: rho_ref !< A reference density [kg m-3].
140 
141  if (.not.associated(eos)) call mom_error(fatal, &
142  "calculate_density_scalar called with an unassociated EOS_type EOS.")
143 
144  select case (eos%form_of_EOS)
145  case (eos_linear)
146  call calculate_density_linear(t, s, pressure, rho, &
147  eos%Rho_T0_S0, eos%dRho_dT, eos%dRho_dS, rho_ref)
148  case (eos_unesco)
149  call calculate_density_unesco(t, s, pressure, rho, rho_ref)
150  case (eos_wright)
151  call calculate_density_wright(t, s, pressure, rho, rho_ref)
152  case (eos_teos10)
153  call calculate_density_teos10(t, s, pressure, rho, rho_ref)
154  case (eos_nemo)
155  call calculate_density_nemo(t, s, pressure, rho, rho_ref)
156  case default
157  call mom_error(fatal, &
158  "calculate_density_scalar: EOS is not valid.")
159  end select
160 

The documentation for this interface was generated from the following file: