namespace mom_eos_linear

Overview

A simple linear equation of state for sea water with constant coefficients. More…

namespace mom_eos_linear {

// interfaces

interface calculate_density_derivs_linear;
interface calculate_density_linear;
interface calculate_density_second_derivs_linear;
interface calculate_spec_vol_linear;

// global functions

subroutine, public calculate_density_scalar_linear(
    T T,
    S S,
    pressure pressure,
    rho rho,
    Rho_T0_S0 Rho_T0_S0,
    dRho_dT dRho_dT,
    dRho_dS dRho_dS,
    rho_ref rho_ref
    );

subroutine, public calculate_density_array_linear(
    T T,
    S S,
    pressure pressure,
    rho rho,
    start start,
    npts npts,
    Rho_T0_S0 Rho_T0_S0,
    dRho_dT dRho_dT,
    dRho_dS dRho_dS,
    rho_ref rho_ref
    );

subroutine, public calculate_density_derivs_scalar_linear(
    T T,
    S S,
    pressure pressure,
    drho_dT_out drho_dT_out,
    drho_dS_out drho_dS_out,
    Rho_T0_S0 Rho_T0_S0,
    dRho_dT dRho_dT,
    dRho_dS dRho_dS
    );

subroutine, public calculate_specvol_derivs_linear(
    T T,
    S S,
    pressure pressure,
    dSV_dT dSV_dT,
    dSV_dS dSV_dS,
    start start,
    npts npts,
    Rho_T0_S0 Rho_T0_S0,
    dRho_dT dRho_dT,
    dRho_dS dRho_dS
    );

subroutine, public calculate_compress_linear(
    T T,
    S S,
    pressure pressure,
    rho rho,
    drho_dp drho_dp,
    start start,
    npts npts,
    Rho_T0_S0 Rho_T0_S0,
    dRho_dT dRho_dT,
    dRho_dS dRho_dS
    );

subroutine, public int_density_dz_linear(
    T T,
    S S,
    z_t z_t,
    z_b z_b,
    rho_ref rho_ref,
    rho_0_pres rho_0_pres,
    G_e G_e,
    HII HII,
    HIO HIO,
    Rho_T0_S0 Rho_T0_S0,
    dRho_dT dRho_dT,
    dRho_dS dRho_dS,
    dpa dpa,
    intz_dpa intz_dpa,
    intx_dpa intx_dpa,
    inty_dpa inty_dpa,
    bathyT bathyT,
    dz_neglect dz_neglect,
    useMassWghtInterp useMassWghtInterp
    );

subroutine, public int_spec_vol_dp_linear(
    T T,
    S S,
    p_t p_t,
    p_b p_b,
    alpha_ref alpha_ref,
    HI HI,
    Rho_T0_S0 Rho_T0_S0,
    dRho_dT dRho_dT,
    dRho_dS dRho_dS,
    dza dza,
    intp_dza intp_dza,
    intx_dza intx_dza,
    inty_dza inty_dza,
    halo_size halo_size,
    bathyP bathyP,
    dP_neglect dP_neglect,
    useMassWghtInterp useMassWghtInterp
    );

} // namespace mom_eos_linear

Detailed Documentation

A simple linear equation of state for sea water with constant coefficients.

Global Functions

subroutine, public calculate_density_scalar_linear(
    T T,
    S S,
    pressure pressure,
    rho rho,
    Rho_T0_S0 Rho_T0_S0,
    dRho_dT dRho_dT,
    dRho_dS dRho_dS,
    rho_ref rho_ref
    )

This subroutine computes the density of sea water with a trivial linear equation of state (in [kg m-3]) from salinity (sal [PSU]), potential temperature (T [degC]), and pressure [Pa].

Parameters:

t

Potential temperature relative to the surface [degC].

s

Salinity [PSU].

pressure

pressure [Pa].

rho

In situ density [kg m-3].

rho_t0_s0

The density at T=0, S=0 [kg m-3].

drho_dt

The derivatives of density with temperature [kg m-3 degC-1].

drho_ds

The derivatives of density with salinity in [kg m-3 ppt-1].

rho_ref

A reference density [kg m-3].

subroutine, public calculate_density_array_linear(
    T T,
    S S,
    pressure pressure,
    rho rho,
    start start,
    npts npts,
    Rho_T0_S0 Rho_T0_S0,
    dRho_dT dRho_dT,
    dRho_dS dRho_dS,
    rho_ref rho_ref
    )

This subroutine computes the density of sea water with a trivial linear equation of state (in kg/m^3) from salinity (sal in psu), potential temperature (T [degC]), and pressure [Pa].

Parameters:

t

potential temperature relative to the surface [degC].

s

salinity [PSU].

pressure

pressure [Pa].

rho

in situ density [kg m-3].

start

the starting point in the arrays.

npts

the number of values to calculate.

rho_t0_s0

The density at T=0, S=0 [kg m-3].

drho_dt

The derivatives of density with temperature [kg m-3 degC-1].

drho_ds

The derivatives of density with salinity in [kg m-3 ppt-1].

rho_ref

A reference density [kg m-3].

subroutine, public calculate_density_derivs_scalar_linear(
    T T,
    S S,
    pressure pressure,
    drho_dT_out drho_dT_out,
    drho_dS_out drho_dS_out,
    Rho_T0_S0 Rho_T0_S0,
    dRho_dT dRho_dT,
    dRho_dS dRho_dS
    )

This subroutine calculates the partial derivatives of density * with potential temperature and salinity for a single point.

Parameters:

t

Potential temperature relative to the surface [degC].

s

Salinity [PSU].

pressure

pressure [Pa].

drho_dt_out

The partial derivative of density with potential temperature [kg m-3 degC-1].

drho_ds_out

The partial derivative of density with salinity [kg m-3 ppt-1].

rho_t0_s0

The density at T=0, S=0 [kg m-3].

drho_dt

The derivatives of density with temperature [kg m-3 degC-1].

drho_ds

The derivatives of density with salinity [kg m-3 ppt-1].

subroutine, public calculate_specvol_derivs_linear(
    T T,
    S S,
    pressure pressure,
    dSV_dT dSV_dT,
    dSV_dS dSV_dS,
    start start,
    npts npts,
    Rho_T0_S0 Rho_T0_S0,
    dRho_dT dRho_dT,
    dRho_dS dRho_dS
    )

Calculate the derivatives of specific volume with temperature and salinity.

Parameters:

t

Potential temperature relative to the surface [degC].

s

Salinity [PSU].

pressure

pressure [Pa].

dsv_ds

The partial derivative of specific volume with salinity [m3 kg-1 PSU-1].

dsv_dt

The partial derivative of specific volume with potential temperature [m3 kg-1 degC-1].

start

The starting point in the arrays.

npts

The number of values to calculate.

rho_t0_s0

The density at T=0, S=0 [kg m-3].

drho_dt

The derivative of density with temperature, [kg m-3 degC-1].

drho_ds

The derivative of density with salinity [kg m-3 ppt-1].

subroutine, public calculate_compress_linear(
    T T,
    S S,
    pressure pressure,
    rho rho,
    drho_dp drho_dp,
    start start,
    npts npts,
    Rho_T0_S0 Rho_T0_S0,
    dRho_dT dRho_dT,
    dRho_dS dRho_dS
    )

This subroutine computes the in situ density of sea water (rho) and the compressibility (drho/dp == C_sound^-2) at the given salinity, potential temperature, and pressure.

Parameters:

t

Potential temperature relative to the surface [degC].

s

Salinity [PSU].

pressure

pressure [Pa].

rho

In situ density [kg m-3].

drho_dp

The partial derivative of density with pressure (also the inverse of the square of sound speed) [s2 m-2].

start

The starting point in the arrays.

npts

The number of values to calculate.

rho_t0_s0

The density at T=0, S=0 [kg m-3].

drho_dt

The derivative of density with temperature [kg m-3 degC-1].

drho_ds

The derivative of density with salinity [kg m-3 ppt-1].

subroutine, public int_density_dz_linear(
    T T,
    S S,
    z_t z_t,
    z_b z_b,
    rho_ref rho_ref,
    rho_0_pres rho_0_pres,
    G_e G_e,
    HII HII,
    HIO HIO,
    Rho_T0_S0 Rho_T0_S0,
    dRho_dT dRho_dT,
    dRho_dS dRho_dS,
    dpa dpa,
    intz_dpa intz_dpa,
    intx_dpa intx_dpa,
    inty_dpa inty_dpa,
    bathyT bathyT,
    dz_neglect dz_neglect,
    useMassWghtInterp useMassWghtInterp
    )

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.

Parameters:

hii

The horizontal index type for the input arrays.

hio

The horizontal index type for the output arrays.

t

Potential temperature relative to the surface

s

Salinity [PSU].

z_t

Height at the top of the layer in depth units [Z ~> m].

z_b

Height at the top of the layer [Z ~> m].

rho_ref

A mean density [kg m-3], that is subtracted out to reduce the magnitude of each of the integrals.

rho_0_pres

A density [kg m-3], that is used to calculate the pressure (as p~=-z*rho_0_pres*G_e) used in the equation of state. rho_0_pres is not used here.

g_e

The Earth’s gravitational acceleration [m2 Z-1 s-2 ~> m s-2].

rho_t0_s0

The density at T=0, S=0 [kg m-3].

drho_dt

The derivative of density with temperature, [kg m-3 degC-1].

drho_ds

The derivative of density with salinity, in [kg m-3 ppt-1].

dpa

The change in the pressure anomaly across the

intz_dpa

The integral through the thickness of the layer

intx_dpa

The integral in x of the difference between the

inty_dpa

The integral in y of the difference between the

bathyt

The depth of the bathymetry [Z ~> m].

dz_neglect

A miniscule thickness change [Z ~> m].

usemasswghtinterp

If true, uses mass weighting to interpolate T/S for top and bottom integrals.

subroutine, public int_spec_vol_dp_linear(
    T T,
    S S,
    p_t p_t,
    p_b p_b,
    alpha_ref alpha_ref,
    HI HI,
    Rho_T0_S0 Rho_T0_S0,
    dRho_dT dRho_dT,
    dRho_dS dRho_dS,
    dza dza,
    intp_dza intp_dza,
    intx_dza intx_dza,
    inty_dza inty_dza,
    halo_size halo_size,
    bathyP bathyP,
    dP_neglect dP_neglect,
    useMassWghtInterp useMassWghtInterp
    )

Calculates 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. Specific volume is assumed to vary linearly between adjacent points.

Parameters:

hi

The ocean’s horizontal index type.

t

Potential temperature relative to the surface

s

Salinity [PSU].

p_t

Pressure at the top of the layer [Pa].

p_b

Pressure at the top of the layer [Pa].

alpha_ref

A mean specific volume that is subtracted out to reduce the magnitude of each of the integrals, m3 kg-1. The calculation is mathematically identical with different values of alpha_ref, but this reduces the effects of roundoff.

rho_t0_s0

The density at T=0, S=0 [kg m-3].

drho_dt

The derivative of density with temperature [kg m-3 degC-1].

drho_ds

The derivative of density with salinity, in [kg m-3 ppt-1].

dza

The change in the geopotential anomaly across

intp_dza

The integral in pressure through the layer of

intx_dza

The integral in x of the difference between the

inty_dza

The integral in y of the difference between the

halo_size

The width of halo points on which to calculate dza.

bathyp

The pressure at the bathymetry [Pa]

dp_neglect

A miniscule pressure change with the same units as p_t [Pa]

usemasswghtinterp

If true, uses mass weighting to interpolate T/S for top and bottom integrals.