MOM_density_integrals module reference

Provides integrals of density

Functions/Subroutines

int_density_dz

Calls the appropriate subroutine to calculate analytical and nearly-analytical integrals in z across layers of pressure anomalies, which are required for calculating the finite-volume form pressure accelerations in a Boussinesq model.

int_density_dz_generic_pcm

Calculates (by numerical quadrature) integrals of pressure anomalies across layers, which are required for calculating the finite-volume form pressure accelerations in a Boussinesq model.

int_density_dz_generic_plm

Compute pressure gradient force integrals by quadrature for the case where T and S are linear profiles.

int_density_dz_generic_ppm

Compute pressure gradient force integrals for layer "k" and the case where T and S are parabolic profiles

int_specific_vol_dp

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's rule to do the horizontal integrals, and from a truncation in the series for log(1-eps/1+eps) that assumes that |eps| < 0.34.

int_spec_vol_dp_generic_pcm

This subroutine calculates integrals of specific volume anomalies in pressure across layers, 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's rule quadrature to do the integrals.

int_spec_vol_dp_generic_plm

This subroutine calculates integrals of specific volume anomalies in pressure across layers, 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's rule quadrature to do the integrals.

diagnose_mass_weight_Z

Diagnose the fractional mass weighting in a layer that might be used with a Boussinesq calculation.

diagnose_mass_weight_p

Diagnose the fractional mass weighting in a layer that might be used with a non-Boussinesq calculation.

find_depth_of_pressure_in_cell

Find the depth at which the reconstructed pressure matches P_tgt

avg_specific_vol

Calculate the average in situ specific volume across layers

frac_dp_at_pos

Returns change in anomalous pressure change from top to non-dimensional position pos between z_t and z_b [R L2 T-2 ~> Pa]

Functions/Subroutine Documentation

subroutine int_density_dz(T, S, z_t, z_b, rho_ref, rho_0, G_e, HI, EOS, US, dpa, intz_dpa, intx_dpa, inty_dpa, bathyT, SSH, dz_neglect, MassWghtInterp, Z_0p, MassWghtInterpVanOnly, h_nv)

Calls the appropriate subroutine to calculate analytical and nearly-analytical integrals in z across layers of pressure anomalies, which are required for calculating the finite-volume form pressure accelerations in a Boussinesq model.

Parameters
  • HI [in]

    Ocean horizontal index structures for the arrays

  • T [in]

    Potential temperature referenced to the surface [C ~> degC]

  • S [in]

    Salinity [S ~> ppt]

  • z_t [in]

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

  • z_b [in]

    Height at the bottom of the layer [Z ~> m]

  • rho_ref [in]

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

  • rho_0 [in]

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

  • G_e [in]

    The Earth's gravitational acceleration [L2 Z-1 T-2 ~> m s-2]

  • EOS [in]

    Equation of state structure

  • US [in]

    A dimensional unit scaling type

  • dpa [inout]

    The change in the pressure anomaly across the layer [R L2 T-2 ~> Pa]

  • intz_dpa [inout]

    The integral through the thickness of the layer of the pressure anomaly relative to the anomaly at the top of the layer [R L2 Z T-2 ~> Pa m]

  • intx_dpa [inout]

    The integral in x of the difference between the pressure anomaly at the top and bottom of the layer divided by the x grid spacing [R L2 T-2 ~> Pa]

  • inty_dpa [inout]

    The integral in y of the difference between the pressure anomaly at the top and bottom of the layer divided by the y grid spacing [R L2 T-2 ~> Pa]

  • bathyT [in]

    The depth of the bathymetry [Z ~> m]

  • SSH [in]

    The sea surface height [Z ~> m]

  • dz_neglect [in]

    A minuscule thickness change [Z ~> m]

  • MassWghtInterp [in]

    A flag indicating whether and how to use mass weighting to interpolate T/S in integrals

  • MassWghtInterpVanOnly [in]

    If true, does not do mass weighting of T/S unless one side smaller than h_nv (i.e. vanished)

  • h_nv [in]

    Nonvanished height [Z ~> m]

  • Z_0p [in]

    The height at which the pressure is 0 [Z ~> m]

Callees call graph
Callees of mom_density_integrals::int_density_dz calls cluster_mom_density_integrals MOM_density_integrals cluster_mom_eos MOM_EOS mom_density_integrals::int_density_dz int_density_dz mom_density_integrals::int_density_dz_generic_pcm int_density_dz_generic_pcm mom_density_integrals::int_density_dz->mom_density_integrals::int_density_dz_generic_pcm mom_eos::analytic_int_density_dz analytic_int_density_dz mom_density_integrals::int_density_dz->mom_eos::analytic_int_density_dz mom_eos::eos_quadrature EOS_quadrature mom_density_integrals::int_density_dz->mom_eos::eos_quadrature
Text view
Callers call graph
Callers of mom_density_integrals::int_density_dz calls cluster_mom_density_integrals MOM_density_integrals cluster_mom_interface_heights MOM_interface_heights cluster_mom_pressureforce_fv MOM_PressureForce_FV mom_density_integrals::int_density_dz int_density_dz mom_interface_heights::find_col_mass find_col_mass mom_interface_heights::find_col_mass->mom_density_integrals::int_density_dz mom_pressureforce_fv::pressureforce_fv_bouss PressureForce_FV_Bouss mom_pressureforce_fv::pressureforce_fv_bouss->mom_density_integrals::int_density_dz
Text view
subroutine int_density_dz_generic_pcm(T, S, z_t, z_b, rho_ref, rho_0, G_e, HI, EOS, US, dpa, intz_dpa, intx_dpa, inty_dpa, bathyT, SSH, dz_neglect, MassWghtInterp, use_inaccurate_form, Z_0p, MassWghtInterpVanOnly, h_nv)

Calculates (by numerical quadrature) integrals of pressure anomalies across layers, which are required for calculating the finite-volume form pressure accelerations in a Boussinesq model.

Parameters
  • HI [in]

    Horizontal index type for input variables.

  • T [in]

    Potential temperature of the layer [C ~> degC]

  • S [in]

    Salinity of the layer [S ~> ppt]

  • z_t [in]

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

  • z_b [in]

    Height at the bottom of the layer [Z ~> m]

  • rho_ref [in]

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

  • rho_0 [in]

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

  • G_e [in]

    The Earth's gravitational acceleration [L2 Z-1 T-2 ~> m s-2]

  • EOS [in]

    Equation of state structure

  • US [in]

    A dimensional unit scaling type

  • dpa [inout]

    The change in the pressure anomaly across the layer [R L2 T-2 ~> Pa]

  • intz_dpa [inout]

    The integral through the thickness of the layer of the pressure anomaly relative to the anomaly at the top of the layer [R L2 Z T-2 ~> Pa m]

  • intx_dpa [inout]

    The integral in x of the difference between the pressure anomaly at the top and bottom of the layer divided by the x grid spacing [R L2 T-2 ~> Pa]

  • inty_dpa [inout]

    The integral in y of the difference between the pressure anomaly at the top and bottom of the layer divided by the y grid spacing [R L2 T-2 ~> Pa]

  • bathyT [in]

    The depth of the bathymetry [Z ~> m]

  • SSH [in]

    The sea surface height [Z ~> m]

  • dz_neglect [in]

    A minuscule thickness change [Z ~> m]

  • MassWghtInterp [in]

    A flag indicating whether and how to use mass weighting to interpolate T/S in integrals

  • MassWghtInterpVanOnly [in]

    If true, does not do mass weighting of T/S unless one side smaller than h_nv (i.e. vanished)

  • h_nv [in]

    Nonvanished height [Z ~> m]

  • use_inaccurate_form [in]

    If true, uses an inaccurate form of density anomalies, as was used prior to March 2018.

  • Z_0p [in]

    The height at which the pressure is 0 [Z ~> m]

Callees call graph
Callees of mom_density_integrals::int_density_dz_generic_pcm calls cluster_mom_density_integrals MOM_density_integrals cluster_mom_eos MOM_EOS cluster_mom_error_handler MOM_error_handler mom_density_integrals::int_density_dz_generic_pcm int_density_dz_generic_pcm mom_eos::interface::calculate_density calculate_density (interface) mom_density_integrals::int_density_dz_generic_pcm->mom_eos::interface::calculate_density mom_error_handler::mom_error MOM_error mom_density_integrals::int_density_dz_generic_pcm->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_density_integrals::int_density_dz_generic_pcm calls cluster_mom_density_integrals MOM_density_integrals mom_density_integrals::int_density_dz int_density_dz mom_density_integrals::int_density_dz_generic_pcm int_density_dz_generic_pcm mom_density_integrals::int_density_dz->mom_density_integrals::int_density_dz_generic_pcm
Text view
subroutine int_density_dz_generic_plm(k, tv, T_t, T_b, S_t, S_b, e, rho_ref, rho_0, G_e, dz_subroundoff, bathyT, HI, GV, EOS, US, use_stanley_eos, dpa, intz_dpa, intx_dpa, inty_dpa, MassWghtInterp, use_inaccurate_form, Z_0p, MassWghtInterpVanOnly, h_nv)

Compute pressure gradient force integrals by quadrature for the case where T and S are linear profiles.

Parameters
  • k [in]

    Layer index to calculate integrals for

  • HI [in]

    Ocean horizontal index structures for the input arrays

  • GV [in]

    Vertical grid structure

  • tv [in]

    Thermodynamic variables

  • T_t [in]

    Potential temperature at the cell top [C ~> degC]

  • T_b [in]

    Potential temperature at the cell bottom [C ~> degC]

  • S_t [in]

    Salinity at the cell top [S ~> ppt]

  • S_b [in]

    Salinity at the cell bottom [S ~> ppt]

  • e [in]

    Height of interfaces [Z ~> m]

  • rho_ref [in]

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

  • rho_0 [in]

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

  • G_e [in]

    The Earth's gravitational acceleration [L2 Z-1 T-2 ~> m s-2]

  • dz_subroundoff [in]

    A minuscule thickness change [Z ~> m]

  • bathyT [in]

    The depth of the bathymetry [Z ~> m]

  • EOS [in]

    Equation of state structure

  • US [in]

    A dimensional unit scaling type

  • use_stanley_eos [in]

    If true, turn on Stanley SGS T variance parameterization

  • dpa [inout]

    The change in the pressure anomaly across the layer [R L2 T-2 ~> Pa]

  • intz_dpa [inout]

    The integral through the thickness of the layer of the pressure anomaly relative to the anomaly at the top of the layer [R L2 Z T-2 ~> Pa m]

  • intx_dpa [inout]

    The integral in x of the difference between the pressure anomaly at the top and bottom of the layer divided by the x grid spacing [R L2 T-2 ~> Pa]

  • inty_dpa [inout]

    The integral in y of the difference between the pressure anomaly at the top and bottom of the layer divided by the y grid spacing [R L2 T-2 ~> Pa]

  • MassWghtInterp [in]

    A flag indicating whether and how to use mass weighting to interpolate T/S in integrals

  • use_inaccurate_form [in]

    If true, uses an inaccurate form of density anomalies, as was used prior to March 2018.

  • MassWghtInterpVanOnly [in]

    If true, does not do mass weighting of T/S unless one side smaller than h_nv (i.e. vanished)

  • h_nv [in]

    Nonvanished height [Z ~> m]

  • Z_0p [in]

    The height at which the pressure is 0 [Z ~> m]

Callees call graph
Callees of mom_density_integrals::int_density_dz_generic_plm calls cluster_mom_density_integrals MOM_density_integrals cluster_mom_eos MOM_EOS mom_density_integrals::int_density_dz_generic_plm int_density_dz_generic_plm mom_eos::interface::calculate_density calculate_density (interface) mom_density_integrals::int_density_dz_generic_plm->mom_eos::interface::calculate_density
Text view
Callers call graph
Callers of mom_density_integrals::int_density_dz_generic_plm calls cluster_mom_density_integrals MOM_density_integrals cluster_mom_pressureforce_fv MOM_PressureForce_FV mom_density_integrals::int_density_dz_generic_plm int_density_dz_generic_plm mom_pressureforce_fv::pressureforce_fv_bouss PressureForce_FV_Bouss mom_pressureforce_fv::pressureforce_fv_bouss->mom_density_integrals::int_density_dz_generic_plm
Text view
subroutine int_density_dz_generic_ppm(k, tv, T_t, T_b, S_t, S_b, e, rho_ref, rho_0, G_e, dz_subroundoff, bathyT, HI, GV, EOS, US, use_stanley_eos, dpa, intz_dpa, intx_dpa, inty_dpa, MassWghtInterp, Z_0p, MassWghtInterpVanOnly, h_nv)

Compute pressure gradient force integrals for layer "k" and the case where T and S are parabolic profiles

Parameters
  • k [in]

    Layer index to calculate integrals for

  • HI [in]

    Ocean horizontal index structures for the input arrays

  • GV [in]

    Vertical grid structure

  • tv [in]

    Thermodynamic variables

  • T_t [in]

    Potential temperature at the cell top [C ~> degC]

  • T_b [in]

    Potential temperature at the cell bottom [C ~> degC]

  • S_t [in]

    Salinity at the cell top [S ~> ppt]

  • S_b [in]

    Salinity at the cell bottom [S ~> ppt]

  • e [in]

    Height of interfaces [Z ~> m]

  • rho_ref [in]

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

  • rho_0 [in]

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

  • G_e [in]

    The Earth's gravitational acceleration [L2 Z-1 T-2 ~> m s-2]

  • dz_subroundoff [in]

    A minuscule thickness change [Z ~> m]

  • bathyT [in]

    The depth of the bathymetry [Z ~> m]

  • EOS [in]

    Equation of state structure

  • US [in]

    A dimensional unit scaling type

  • use_stanley_eos [in]

    If true, turn on Stanley SGS T variance parameterization

  • dpa [inout]

    The change in the pressure anomaly across the layer [R L2 T-2 ~> Pa]

  • intz_dpa [inout]

    The integral through the thickness of the layer of the pressure anomaly relative to the anomaly at the top of the layer [R L2 Z T-2 ~> Pa m]

  • intx_dpa [inout]

    The integral in x of the difference between the pressure anomaly at the top and bottom of the layer divided by the x grid spacing [R L2 T-2 ~> Pa]

  • inty_dpa [inout]

    The integral in y of the difference between the pressure anomaly at the top and bottom of the layer divided by the y grid spacing [R L2 T-2 ~> Pa]

  • MassWghtInterp [in]

    A flag indicating whether and how to use mass weighting to interpolate T/S in integrals

  • MassWghtInterpVanOnly [in]

    If true, does not do mass weighting of T/S unless one side smaller than h_nv (i.e. vanished)

  • h_nv [in]

    Nonvanished height [Z ~> m]

  • Z_0p [in]

    The height at which the pressure is 0 [Z ~> m]

Callees call graph
Callees of mom_density_integrals::int_density_dz_generic_ppm calls cluster_mom_density_integrals MOM_density_integrals cluster_mom_eos MOM_EOS mom_density_integrals::int_density_dz_generic_ppm int_density_dz_generic_ppm mom_eos::interface::calculate_density calculate_density (interface) mom_density_integrals::int_density_dz_generic_ppm->mom_eos::interface::calculate_density
Text view
Callers call graph
Callers of mom_density_integrals::int_density_dz_generic_ppm calls cluster_mom_density_integrals MOM_density_integrals cluster_mom_pressureforce_fv MOM_PressureForce_FV mom_density_integrals::int_density_dz_generic_ppm int_density_dz_generic_ppm mom_pressureforce_fv::pressureforce_fv_bouss PressureForce_FV_Bouss mom_pressureforce_fv::pressureforce_fv_bouss->mom_density_integrals::int_density_dz_generic_ppm
Text view
subroutine int_specific_vol_dp(T, S, p_t, p_b, alpha_ref, HI, EOS, US, dza, intp_dza, intx_dza, inty_dza, halo_size, bathyP, P_surf, dP_tiny, MassWghtInterp, MassWghtInterpVanOnly, p_nv)

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's rule to do the horizontal integrals, and from a truncation in the series for log(1-eps/1+eps) that assumes that |eps| < 0.34.

Parameters
  • HI [in]

    The horizontal index structure

  • T [in]

    Potential temperature referenced to the surface [C ~> degC]

  • S [in]

    Salinity [S ~> ppt]

  • p_t [in]

    Pressure at the top of the layer [R L2 T-2 ~> Pa]

  • p_b [in]

    Pressure at the bottom of the layer [R L2 T-2 ~> Pa]

  • alpha_ref [in]

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

  • EOS [in]

    Equation of state structure

  • US [in]

    A dimensional unit scaling type

  • dza [inout]

    The change in the geopotential anomaly across the layer [L2 T-2 ~> m2 s-2]

  • intp_dza [inout]

    The integral in pressure through the layer of the geopotential anomaly relative to the anomaly at the bottom of the layer [R L4 T-4 ~> Pa m2 s-2]

  • intx_dza [inout]

    The integral in x of the difference between the geopotential anomaly at the top and bottom of the layer divided by the x grid spacing [L2 T-2 ~> m2 s-2]

  • inty_dza [inout]

    The integral in y of the difference between the geopotential anomaly at the top and bottom of the layer divided by the y grid spacing [L2 T-2 ~> m2 s-2]

  • halo_size [in]

    The width of halo points on which to calculate dza.

  • bathyP [in]

    The pressure at the bathymetry [R L2 T-2 ~> Pa]

  • P_surf [in]

    The pressure at the ocean surface [R L2 T-2 ~> Pa]

  • dP_tiny [in]

    A minuscule pressure change with the same units as p_t [R L2 T-2 ~> Pa]

  • MassWghtInterp [in]

    A flag indicating whether and how to use mass weighting to interpolate T/S in integrals

  • MassWghtInterpVanOnly [in]

    If true, does not do mass weighting of T/S unless one side smaller than h_nv (i.e. vanished)

  • p_nv [in]

    Nonvanished pressure [R L2 T-2 ~> Pa]

Callees call graph
Callees of mom_density_integrals::int_specific_vol_dp calls cluster_mom_density_integrals MOM_density_integrals cluster_mom_eos MOM_EOS mom_density_integrals::int_spec_vol_dp_generic_pcm int_spec_vol_dp_generic_pcm mom_density_integrals::int_specific_vol_dp int_specific_vol_dp mom_density_integrals::int_specific_vol_dp->mom_density_integrals::int_spec_vol_dp_generic_pcm mom_eos::analytic_int_specific_vol_dp analytic_int_specific_vol_dp mom_density_integrals::int_specific_vol_dp->mom_eos::analytic_int_specific_vol_dp mom_eos::eos_quadrature EOS_quadrature mom_density_integrals::int_specific_vol_dp->mom_eos::eos_quadrature
Text view
Callers call graph
Callers of mom_density_integrals::int_specific_vol_dp calls cluster_mom_density_integrals MOM_density_integrals cluster_mom_interface_heights MOM_interface_heights cluster_mom_pressureforce_fv MOM_PressureForce_FV cluster_mom_pressureforce_mont MOM_PressureForce_Mont mom_density_integrals::int_specific_vol_dp int_specific_vol_dp mom_interface_heights::dz_to_thickness_eos dz_to_thickness_EOS [private/internal] mom_interface_heights::dz_to_thickness_eos->mom_density_integrals::int_specific_vol_dp mom_interface_heights::find_dz_for_eta find_dz_for_eta mom_interface_heights::find_dz_for_eta->mom_density_integrals::int_specific_vol_dp mom_pressureforce_fv::pressureforce_fv_nonbouss PressureForce_FV_nonBouss mom_pressureforce_fv::pressureforce_fv_nonbouss->mom_density_integrals::int_specific_vol_dp mom_pressureforce_mont::pressureforce_mont_nonbouss PressureForce_Mont_nonBouss mom_pressureforce_mont::pressureforce_mont_nonbouss->mom_density_integrals::int_specific_vol_dp
Text view
subroutine int_spec_vol_dp_generic_pcm(T, S, p_t, p_b, alpha_ref, HI, EOS, US, dza, intp_dza, intx_dza, inty_dza, halo_size, bathyP, P_surf, dP_neglect, MassWghtInterp, MassWghtInterpVanOnly, p_nv)

This subroutine calculates integrals of specific volume anomalies in pressure across layers, 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's rule quadrature to do the integrals.

Parameters
  • HI [in]

    A horizontal index type structure.

  • T [in]

    Potential temperature of the layer [C ~> degC]

  • S [in]

    Salinity of the layer [S ~> ppt]

  • p_t [in]

    Pressure atop the layer [R L2 T-2 ~> Pa]

  • p_b [in]

    Pressure below the layer [R L2 T-2 ~> Pa]

  • alpha_ref [in]

    A mean specific volume that is subtracted out to reduce the magnitude of each of the integrals [R-1 ~> m3 kg-1] The calculation is mathematically identical with different values of alpha_ref, but alpha_ref alters the effects of roundoff, and answers do change.

  • EOS [in]

    Equation of state structure

  • US [in]

    A dimensional unit scaling type

  • dza [inout]

    The change in the geopotential anomaly across the layer [L2 T-2 ~> m2 s-2]

  • intp_dza [inout]

    The integral in pressure through the layer of the geopotential anomaly relative to the anomaly at the bottom of the layer [R L4 T-4 ~> Pa m2 s-2]

  • intx_dza [inout]

    The integral in x of the difference between the geopotential anomaly at the top and bottom of the layer divided by the x grid spacing [L2 T-2 ~> m2 s-2]

  • inty_dza [inout]

    The integral in y of the difference between the geopotential anomaly at the top and bottom of the layer divided by the y grid spacing [L2 T-2 ~> m2 s-2]

  • halo_size [in]

    The width of halo points on which to calculate dza.

  • bathyP [in]

    The pressure at the bathymetry [R L2 T-2 ~> Pa]

  • P_surf [in]

    The pressure at the ocean surface [R L2 T-2 ~> Pa]

  • dP_neglect [in]

    A minuscule pressure change with the same units as p_t [R L2 T-2 ~> Pa]

  • MassWghtInterp [in]

    A flag indicating whether and how to use mass weighting to interpolate T/S in integrals

  • MassWghtInterpVanOnly [in]

    If true, does not do mass weighting of T/S unless one side smaller than h_nv (i.e. vanished)

  • p_nv [in]

    Nonvanished pressure [R L2 T-2 ~> Pa]

Callees call graph
Callees of mom_density_integrals::int_spec_vol_dp_generic_pcm calls cluster_mom_density_integrals MOM_density_integrals cluster_mom_eos MOM_EOS cluster_mom_error_handler MOM_error_handler mom_density_integrals::int_spec_vol_dp_generic_pcm int_spec_vol_dp_generic_pcm mom_eos::interface::calculate_spec_vol calculate_spec_vol (interface) mom_density_integrals::int_spec_vol_dp_generic_pcm->mom_eos::interface::calculate_spec_vol mom_error_handler::mom_error MOM_error mom_density_integrals::int_spec_vol_dp_generic_pcm->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_density_integrals::int_spec_vol_dp_generic_pcm calls cluster_mom_density_integrals MOM_density_integrals mom_density_integrals::int_spec_vol_dp_generic_pcm int_spec_vol_dp_generic_pcm mom_density_integrals::int_specific_vol_dp int_specific_vol_dp mom_density_integrals::int_specific_vol_dp->mom_density_integrals::int_spec_vol_dp_generic_pcm
Text view
subroutine int_spec_vol_dp_generic_plm(T_t, T_b, S_t, S_b, p_t, p_b, alpha_ref, dP_neglect, bathyP, HI, EOS, US, dza, intp_dza, intx_dza, inty_dza, P_surf, MassWghtInterp, MassWghtInterpVanOnly, p_nv)

This subroutine calculates integrals of specific volume anomalies in pressure across layers, 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's rule quadrature to do the integrals.

Parameters
  • HI [in]

    A horizontal index type structure.

  • T_t [in]

    Potential temperature at the top of the layer [C ~> degC]

  • T_b [in]

    Potential temperature at the bottom of the layer [C ~> degC]

  • S_t [in]

    Salinity at the top the layer [S ~> ppt]

  • S_b [in]

    Salinity at the bottom the layer [S ~> ppt]

  • p_t [in]

    Pressure atop the layer [R L2 T-2 ~> Pa]

  • p_b [in]

    Pressure below the layer [R L2 T-2 ~> Pa]

  • alpha_ref [in]

    A mean specific volume that is subtracted out to reduce the magnitude of each of the integrals [R-1 ~> m3 kg-1] The calculation is mathematically identical with different values of alpha_ref, but alpha_ref alters the effects of roundoff, and answers do change.

  • dP_neglect [in]

    !< A miniscule pressure change with the same units as p_t [R L2 T-2 ~> Pa]

  • bathyP [in]

    The pressure at the bathymetry [R L2 T-2 ~> Pa]

  • EOS [in]

    Equation of state structure

  • US [in]

    A dimensional unit scaling type

  • dza [inout]

    The change in the geopotential anomaly across the layer [L2 T-2 ~> m2 s-2]

  • intp_dza [inout]

    The integral in pressure through the layer of the geopotential anomaly relative to the anomaly at the bottom of the layer [R L4 T-4 ~> Pa m2 s-2]

  • intx_dza [inout]

    The integral in x of the difference between the geopotential anomaly at the top and bottom of the layer divided by the x grid spacing [L2 T-2 ~> m2 s-2]

  • inty_dza [inout]

    The integral in y of the difference between the geopotential anomaly at the top and bottom of the layer divided by the y grid spacing [L2 T-2 ~> m2 s-2]

  • P_surf [in]

    The pressure at the ocean surface [R L2 T-2 ~> Pa]

  • MassWghtInterp [in]

    A flag indicating whether and how to use mass weighting to interpolate T/S in integrals

  • MassWghtInterpVanOnly [in]

    If true, does not do mass weighting of T/S unless one side smaller than h_nv (i.e. vanished)

  • p_nv [in]

    Nonvanished pressure [R L2 T-2 ~> Pa]

Callees call graph
Callees of mom_density_integrals::int_spec_vol_dp_generic_plm calls cluster_mom_density_integrals MOM_density_integrals cluster_mom_eos MOM_EOS cluster_mom_error_handler MOM_error_handler mom_density_integrals::int_spec_vol_dp_generic_plm int_spec_vol_dp_generic_plm mom_eos::interface::calculate_spec_vol calculate_spec_vol (interface) mom_density_integrals::int_spec_vol_dp_generic_plm->mom_eos::interface::calculate_spec_vol mom_error_handler::mom_error MOM_error mom_density_integrals::int_spec_vol_dp_generic_plm->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_density_integrals::int_spec_vol_dp_generic_plm calls cluster_mom_density_integrals MOM_density_integrals cluster_mom_pressureforce_fv MOM_PressureForce_FV mom_density_integrals::int_spec_vol_dp_generic_plm int_spec_vol_dp_generic_plm mom_pressureforce_fv::pressureforce_fv_nonbouss PressureForce_FV_nonBouss mom_pressureforce_fv::pressureforce_fv_nonbouss->mom_density_integrals::int_spec_vol_dp_generic_plm
Text view
subroutine diagnose_mass_weight_Z(z_t, z_b, bathyT, SSH, dz_neglect, MassWghtInterp, HI, MassWt_u, MassWt_v, MassWghtInterpVanOnly, h_nv)

Diagnose the fractional mass weighting in a layer that might be used with a Boussinesq calculation.

Parameters
  • HI [in]

    A horizontal index type structure.

  • z_t [in]

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

  • z_b [in]

    Height at the bottom of the layer [Z ~> m]

  • bathyT [in]

    The depth of the bathymetry [Z ~> m]

  • SSH [in]

    The sea surface height [Z ~> m]

  • dz_neglect [in]

    A minuscule thickness change [Z ~> m]

  • MassWghtInterp [in]

    A flag indicating whether and how to use mass weighting to interpolate T/S in integrals

  • MassWt_u [inout]

    The fractional mass weighting at u-points [nondim]

  • MassWt_v [inout]

    The fractional mass weighting at v-points [nondim]

  • MassWghtInterpVanOnly [in]

    If true, does not do mass weighting of T/S unless one side smaller than h_nv (i.e. vanished)

  • h_nv [in]

    Nonvanished height [Z ~> m]

Callers call graph
Callers of mom_density_integrals::diagnose_mass_weight_z calls cluster_mom_density_integrals MOM_density_integrals cluster_mom_pressureforce_fv MOM_PressureForce_FV mom_density_integrals::diagnose_mass_weight_z diagnose_mass_weight_Z mom_pressureforce_fv::pressureforce_fv_bouss PressureForce_FV_Bouss mom_pressureforce_fv::pressureforce_fv_bouss->mom_density_integrals::diagnose_mass_weight_z
Text view
subroutine diagnose_mass_weight_p(p_t, p_b, bathyP, P_surf, dP_neglect, MassWghtInterp, HI, MassWt_u, MassWt_v, MassWghtInterpVanOnly, p_nv)

Diagnose the fractional mass weighting in a layer that might be used with a non-Boussinesq calculation.

Parameters
  • HI [in]

    A horizontal index type structure.

  • p_t [in]

    Pressure atop the layer [R L2 T-2 ~> Pa]

  • p_b [in]

    Pressure below the layer [R L2 T-2 ~> Pa]

  • dP_neglect [in]

    !< A miniscule pressure change with the same units as p_t [R L2 T-2 ~> Pa]

  • bathyP [in]

    The pressure at the bathymetry [R L2 T-2 ~> Pa]

  • P_surf [in]

    The pressure at the ocean surface [R L2 T-2 ~> Pa]

  • MassWghtInterp [in]

    A flag indicating whether and how to use mass weighting to interpolate T/S in integrals

  • MassWt_u [inout]

    The fractional mass weighting at u-points [nondim]

  • MassWt_v [inout]

    The fractional mass weighting at v-points [nondim]

  • MassWghtInterpVanOnly [in]

    If true, does not do mass weighting of T/S unless one side smaller than h_nv (i.e. vanished)

  • p_nv [in]

    Nonvanished pressure [R L2 T-2 ~> Pa]

Callers call graph
Callers of mom_density_integrals::diagnose_mass_weight_p calls cluster_mom_density_integrals MOM_density_integrals cluster_mom_pressureforce_fv MOM_PressureForce_FV mom_density_integrals::diagnose_mass_weight_p diagnose_mass_weight_p mom_pressureforce_fv::pressureforce_fv_nonbouss PressureForce_FV_nonBouss mom_pressureforce_fv::pressureforce_fv_nonbouss->mom_density_integrals::diagnose_mass_weight_p
Text view
subroutine find_depth_of_pressure_in_cell(T_t, T_b, S_t, S_b, z_t, z_b, P_t, P_tgt, rho_ref, G_e, EOS, US, P_b, z_out, z_tol, frac_dp_bugfix)

Find the depth at which the reconstructed pressure matches P_tgt

Parameters
  • T_t [in]

    Potential temperature at the cell top [C ~> degC]

  • T_b [in]

    Potential temperature at the cell bottom [C ~> degC]

  • S_t [in]

    Salinity at the cell top [S ~> ppt]

  • S_b [in]

    Salinity at the cell bottom [S ~> ppt]

  • z_t [in]

    Absolute height of top of cell [Z ~> m] (Boussinesq ????)

  • z_b [in]

    Absolute height of bottom of cell [Z ~> m]

  • P_t [in]

    Anomalous pressure of top of cell, relative to g*rho_ref*z_t [R L2 T-2 ~> Pa]

  • P_tgt [in]

    Target pressure at height z_out, relative to g*rho_ref*z_out [R L2 T-2 ~> Pa]

  • rho_ref [in]

    Reference density with which calculation are anomalous to [R ~> kg m-3]

  • G_e [in]

    Gravitational acceleration [L2 Z-1 T-2 ~> m s-2]

  • EOS [in]

    Equation of state structure

  • US [in]

    A dimensional unit scaling type

  • P_b [out]

    Pressure at the bottom of the cell [R L2 T-2 ~> Pa]

  • z_out [out]

    Absolute depth at which anomalous pressure = p_tgt [Z ~> m]

  • z_tol [in]

    The tolerance in finding z_out [Z ~> m]

  • frac_dp_bugfix [in]

    If true, use bugfix in frac_dp_at_pos

Callees call graph
Callees of mom_density_integrals::find_depth_of_pressure_in_cell calls cluster_mom_density_integrals MOM_density_integrals cluster_mom_error_handler MOM_error_handler mom_density_integrals::find_depth_of_pressure_in_cell find_depth_of_pressure_in_cell mom_density_integrals::frac_dp_at_pos frac_dp_at_pos [private/internal] mom_density_integrals::find_depth_of_pressure_in_cell->mom_density_integrals::frac_dp_at_pos mom_error_handler::mom_error MOM_error mom_density_integrals::find_depth_of_pressure_in_cell->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_density_integrals::find_depth_of_pressure_in_cell calls cluster_mom_density_integrals MOM_density_integrals cluster_mom_state_initialization MOM_state_initialization mom_density_integrals::find_depth_of_pressure_in_cell find_depth_of_pressure_in_cell mom_state_initialization::cut_off_column_top cut_off_column_top [private/internal] mom_state_initialization::cut_off_column_top->mom_density_integrals::find_depth_of_pressure_in_cell mom_state_initialization::mom_state_init_tests MOM_state_init_tests [private/internal] mom_state_initialization::mom_state_init_tests->mom_density_integrals::find_depth_of_pressure_in_cell
Text view
subroutine avg_specific_vol(T, S, p_t, dp, HI, EOS, SpV_avg, halo_size)

Calculate the average in situ specific volume across layers

Parameters
  • HI [in]

    The horizontal index structure

  • T [in]

    Potential temperature of the layer [C ~> degC]

  • S [in]

    Salinity of the layer [S ~> ppt]

  • p_t [in]

    Pressure at the top of the layer [R L2 T-2 ~> Pa]

  • dp [in]

    Pressure change in the layer [R L2 T-2 ~> Pa]

  • EOS [in]

    Equation of state structure

  • SpV_avg [inout]

    The vertical average specific volume in the layer [R-1 ~> m3 kg-1]

  • halo_size [in]

    The number of halo points in which to work.

Callees call graph
Callees of mom_density_integrals::avg_specific_vol calls cluster_mom_density_integrals MOM_density_integrals cluster_mom_eos MOM_EOS mom_density_integrals::avg_specific_vol avg_specific_vol mom_eos::average_specific_vol average_specific_vol mom_density_integrals::avg_specific_vol->mom_eos::average_specific_vol mom_eos::eos_domain EOS_domain mom_density_integrals::avg_specific_vol->mom_eos::eos_domain
Text view
Callers call graph
Callers of mom_density_integrals::avg_specific_vol calls cluster_mom_density_integrals MOM_density_integrals cluster_mom_interface_heights MOM_interface_heights mom_density_integrals::avg_specific_vol avg_specific_vol mom_interface_heights::calc_derived_thermo calc_derived_thermo mom_interface_heights::calc_derived_thermo->mom_density_integrals::avg_specific_vol
Text view
real function frac_dp_at_pos(T_t, T_b, S_t, S_b, z_t, z_b, rho_ref, G_e, pos, EOS, frac_dp_bugfix)

Returns change in anomalous pressure change from top to non-dimensional position pos between z_t and z_b [R L2 T-2 ~> Pa]

Parameters
  • T_t [in]

    Potential temperature at the cell top [C ~> degC]

  • T_b [in]

    Potential temperature at the cell bottom [C ~> degC]

  • S_t [in]

    Salinity at the cell top [S ~> ppt]

  • S_b [in]

    Salinity at the cell bottom [S ~> ppt]

  • z_t [in]

    The geometric height at the top of the layer [Z ~> m]

  • z_b [in]

    The geometric height at the bottom of the layer [Z ~> m]

  • rho_ref [in]

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

  • G_e [in]

    The Earth's gravitational acceleration [L2 Z-1 T-2 ~> m s-2]

  • pos [in]

    The fractional vertical position, 0 to 1 [nondim]

  • EOS [in]

    Equation of state structure

  • frac_dp_bugfix [in]

    If true, use bugfix in frac_dp_at_pos

Callees call graph
Callees of mom_density_integrals::frac_dp_at_pos calls cluster_mom_density_integrals MOM_density_integrals cluster_mom_eos MOM_EOS mom_density_integrals::frac_dp_at_pos frac_dp_at_pos [private/internal] mom_eos::interface::calculate_density calculate_density (interface) mom_density_integrals::frac_dp_at_pos->mom_eos::interface::calculate_density
Text view
Callers call graph
Callers of mom_density_integrals::frac_dp_at_pos calls cluster_mom_density_integrals MOM_density_integrals mom_density_integrals::find_depth_of_pressure_in_cell find_depth_of_pressure_in_cell mom_density_integrals::frac_dp_at_pos frac_dp_at_pos [private/internal] mom_density_integrals::find_depth_of_pressure_in_cell->mom_density_integrals::frac_dp_at_pos
Text view
API generated with Flint · Rendered from reStructuredText