Calculates the compressibility of water from T, S, and P.
Definition at line 86 of file MOM_EOS.F90.
|
subroutine | calculate_compress_scalar (T, S, pressure, rho, drho_dp, EOS) |
| Calculate density and compressibility for a scalar. This just promotes the scalar to an array with a singleton dimension and calls calculate_compress_array. More...
|
|
subroutine | calculate_compress_array (T, S, pressure, rho, drho_dp, start, npts, EOS) |
| Calls the appropriate subroutine to calculate the density and compressibility for 1-D array inputs. More...
|
|
◆ calculate_compress_array()
subroutine mom_eos::calculate_compress::calculate_compress_array |
( |
real, dimension(:), intent(in) |
T, |
|
|
real, dimension(:), intent(in) |
S, |
|
|
real, dimension(:), intent(in) |
pressure, |
|
|
real, dimension(:), intent(out) |
rho, |
|
|
real, dimension(:), intent(out) |
drho_dp, |
|
|
integer, intent(in) |
start, |
|
|
integer, intent(in) |
npts, |
|
|
type(eos_type), pointer |
EOS |
|
) |
| |
|
private |
Calls the appropriate subroutine to calculate the density and compressibility for 1-D array inputs.
- Parameters
-
[in] | t | Potential temperature referenced to the surface [degC] |
[in] | s | Salinity [PSU] |
[in] | pressure | Pressure [Pa] |
[out] | rho | In situ density [kg m-3]. |
[out] | drho_dp | The partial derivative of density with pressure (also the inverse of the square of sound speed) [s2 m-2]. |
[in] | start | Starting index within the array |
[in] | npts | The number of values to calculate |
| eos | Equation of state structure |
Definition at line 603 of file MOM_EOS.F90.
603 real,
dimension(:),
intent(in) :: T
604 real,
dimension(:),
intent(in) :: S
605 real,
dimension(:),
intent(in) :: pressure
606 real,
dimension(:),
intent(out) :: rho
607 real,
dimension(:),
intent(out) :: drho_dp
609 integer,
intent(in) :: start
610 integer,
intent(in) :: npts
611 type(EOS_type),
pointer :: EOS
613 if (.not.
associated(eos))
call mom_error(fatal, &
614 "calculate_compress called with an unassociated EOS_type EOS.")
616 select case (eos%form_of_EOS)
618 call calculate_compress_linear(t, s, pressure, rho, drho_dp, start, npts, &
619 eos%Rho_T0_S0, eos%dRho_dT, eos%dRho_dS)
621 call calculate_compress_unesco(t, s, pressure, rho, drho_dp, start, npts)
623 call calculate_compress_wright(t, s, pressure, rho, drho_dp, start, npts)
625 call calculate_compress_teos10(t, s, pressure, rho, drho_dp, start, npts)
627 call calculate_compress_nemo(t, s, pressure, rho, drho_dp, start, npts)
629 call mom_error(fatal, &
630 "calculate_compress: EOS%form_of_EOS is not valid.")
◆ calculate_compress_scalar()
subroutine mom_eos::calculate_compress::calculate_compress_scalar |
( |
real, intent(in) |
T, |
|
|
real, intent(in) |
S, |
|
|
real, intent(in) |
pressure, |
|
|
real, intent(out) |
rho, |
|
|
real, intent(out) |
drho_dp, |
|
|
type(eos_type), pointer |
EOS |
|
) |
| |
|
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.
- Parameters
-
[in] | t | Potential temperature referenced to the surface (degC) |
[in] | s | Salinity (PSU) |
[in] | pressure | Pressure (Pa) |
[out] | rho | In situ density in kg m-3. |
[out] | drho_dp | The partial derivative of density with pressure (also the inverse of the square of sound speed) in s2 m-2. |
| eos | Equation of state structure |
Definition at line 638 of file MOM_EOS.F90.
638 real,
intent(in) :: T
639 real,
intent(in) :: S
640 real,
intent(in) :: pressure
641 real,
intent(out) :: rho
642 real,
intent(out) :: drho_dp
644 type(EOS_type),
pointer :: EOS
646 real,
dimension(1) :: Ta, Sa, pa, rhoa, drho_dpa
648 if (.not.
associated(eos))
call mom_error(fatal, &
649 "calculate_compress called with an unassociated EOS_type EOS.")
650 ta(1) = t ; sa(1) = s; pa(1) = pressure
652 call calculate_compress_array(ta, sa, pa, rhoa, drho_dpa, 1, 1, eos)
653 rho = rhoa(1) ; drho_dp = drho_dpa(1)
The documentation for this interface was generated from the following file:
- /glade/work/altuntas/cesm.sandboxes/cesm2_2_alpha_X_mom/components/mom/MOM6/src/equation_of_state/MOM_EOS.F90