MOM6
mom_eos::calculate_density Interface Reference

Detailed Description

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

Definition at line 45 of file MOM_EOS.F90.

Private functions

subroutine calculate_density_scalar (T, S, pressure, rho, EOS)
 Calls the appropriate subroutine to calculate density of sea water for scalar inputs. More...
 
subroutine calculate_density_array (T, S, pressure, rho, start, npts, EOS)
 Calls the appropriate subroutine to calculate the density of sea water for 1-D array inputs. 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 
)
private

Calls the appropriate subroutine to calculate the density of sea water for 1-D array inputs.

Parameters
[in]tPotential temperature referenced to the surface (degC)
[in]sSalinity (PSU)
[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

Definition at line 130 of file MOM_EOS.F90.

130  real, dimension(:), intent(in) :: t !< Potential temperature referenced to the surface (degC)
131  real, dimension(:), intent(in) :: s !< Salinity (PSU)
132  real, dimension(:), intent(in) :: pressure !< Pressure (Pa)
133  real, dimension(:), intent(out) :: rho !< Density (in-situ if pressure is local) (kg m-3)
134  integer, intent(in) :: start !< Start index for computation
135  integer, intent(in) :: npts !< Number of point to compute
136  type(eos_type), pointer :: eos !< Equation of state structure
137 
138  if (.not.associated(eos)) call mom_error(fatal, &
139  "calculate_density_array called with an unassociated EOS_type EOS.")
140 
141  select case (eos%form_of_EOS)
142  case (eos_linear)
143  call calculate_density_array_linear(t, s, pressure, rho, start, npts, &
144  eos%Rho_T0_S0, eos%dRho_dT, eos%dRho_dS)
145  case (eos_unesco)
146  call calculate_density_array_unesco(t, s, pressure, rho, start, npts)
147  case (eos_wright)
148  call calculate_density_array_wright(t, s, pressure, rho, start, npts)
149  case (eos_teos10)
150  call calculate_density_array_teos10(t, s, pressure, rho, start, npts)
151  case (eos_nemo)
152  call calculate_density_array_nemo (t, s, pressure, rho, start, npts)
153  case default
154  call mom_error(fatal, &
155  "calculate_density_array: EOS%form_of_EOS is not valid.")
156  end select
157 

◆ 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 
)
private

Calls the appropriate subroutine to calculate density of sea water for scalar inputs.

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

Definition at line 100 of file MOM_EOS.F90.

100  real, intent(in) :: t !< Potential temperature referenced to the surface (degC)
101  real, intent(in) :: s !< Salinity (PSU)
102  real, intent(in) :: pressure !< Pressure (Pa)
103  real, intent(out) :: rho !< Density (in-situ if pressure is local) (kg m-3)
104  type(eos_type), pointer :: eos !< Equation of state structure
105 
106  if (.not.associated(eos)) call mom_error(fatal, &
107  "calculate_density_scalar called with an unassociated EOS_type EOS.")
108 
109  select case (eos%form_of_EOS)
110  case (eos_linear)
111  call calculate_density_scalar_linear(t, s, pressure, rho, &
112  eos%Rho_T0_S0, eos%dRho_dT, eos%dRho_dS)
113  case (eos_unesco)
114  call calculate_density_scalar_unesco(t, s, pressure, rho)
115  case (eos_wright)
116  call calculate_density_scalar_wright(t, s, pressure, rho)
117  case (eos_teos10)
118  call calculate_density_scalar_teos10(t, s, pressure, rho)
119  case (eos_nemo)
120  call calculate_density_scalar_nemo(t, s, pressure, rho)
121  case default
122  call mom_error(fatal, &
123  "calculate_density_scalar: EOS is not valid.")
124  end select
125 

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