MOM_EOS module reference

Provides subroutines for quantities specific to the equation of state

Data Types

EOS_type

A control structure for the equation of state

Generic Interfaces

calculate_density

Calculates density of sea water from T, S and P

calculate_spec_vol

Calculates specific volume of sea water from T, S and P

calculate_density_derivs

Calculate the derivatives of density with temperature and salinity from T, S, and P

calculate_specific_vol_derivs

Calculate the derivatives of specific volume with temperature and salinity from T, S, and P

calculate_density_second_derivs

Calculates the second derivatives of density with various combinations of temperature, salinity, and pressure from T, S and P

calculate_TFreeze

Calculates the freezing point of sea water from T, S and P

calculate_compress

Calculates the compressibility of water from T, S, and P

Functions/Subroutines

calculate_density_elem

Density of sea water (in-situ if pressure is local) [R ~> kg m-3]

calculate_density_scalar

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. The pressure and density can be rescaled with the values stored in EOS. If the scale argument is present the density scaling uses the product of the two scaling factors.

calculate_stanley_density_scalar

Calls the appropriate subroutine to calculate density of sea water for scalar inputs including the variance of T, S and covariance of T-S. The calculation uses only the second order correction in a series as discussed in Stanley et al., 2020. If rho_ref is present, the anomaly with respect to rho_ref is returned. The density can be rescaled using rho_ref.

calculate_density_1d

Calls the appropriate subroutine to calculate the density of sea water for 1-D array inputs, potentially limiting the domain of indices that are worked on. If rho_ref is present, the anomaly with respect to rho_ref is returned.

calculate_stanley_density_1d

Calls the appropriate subroutine to calculate the density of sea water for 1-D array inputs including the variance of T, S and covariance of T-S, potentially limiting the domain of indices that are worked on. The calculation uses only the second order correction in a series as discussed in Stanley et al., 2020. If rho_ref is present, the anomaly with respect to rho_ref is returned.

calculate_spec_vol_array

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

calc_spec_vol_scalar

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

calc_spec_vol_1d

Calls the appropriate subroutine to calculate the specific volume of sea water for 1-D array inputs, potentially limiting the domain of indices that are worked on.

calculate_TFreeze_scalar

Calls the appropriate subroutine to calculate the freezing point for scalar inputs.

calculate_TFreeze_array

Calls the appropriate subroutine to calculate the freezing point for a 1-D array.

calculate_TFreeze_1d

Calls the appropriate subroutine to calculate the freezing point for a 1-D array, taking dimensionally rescaled arguments with factors stored in EOS.

calculate_density_derivs_array

Calls the appropriate subroutine to calculate density derivatives for 1-D array inputs.

calculate_density_derivs_1d

Calls the appropriate subroutine to calculate density derivatives for 1-D array inputs.

calculate_density_derivs_scalar

Calls the appropriate subroutines to calculate density derivatives by promoting a scalar to a one-element array

calculate_density_second_derivs_1d

Calls the appropriate subroutine to calculate density second derivatives for 1-D array inputs.

calculate_density_second_derivs_scalar

Calls the appropriate subroutine to calculate density second derivatives for scalar inputs.

calculate_spec_vol_derivs_array

Calls the appropriate subroutine to calculate specific volume derivatives for an array.

calc_spec_vol_derivs_1d

Calls the appropriate subroutine to calculate specific volume derivatives for 1-d array inputs, potentially limiting the domain of indices that are worked on.

calculate_compress_1d

Calls the appropriate subroutine to calculate the density and compressibility for 1-D array inputs. The inputs and outputs use dimensionally rescaled units.

calculate_compress_scalar

Calculate density and compressibility for a scalar. This just promotes the scalar to an array with a singleton dimension and calls calculate_compress_1d. The inputs and outputs use dimensionally rescaled units.

average_specific_vol

Calls the appropriate subroutine to calculate the layer averaged specific volume either using Boole's rule quadrature or analytical and nearly-analytical averages in pressure.

EoS_fit_range

Return the range of temperatures, salinities and pressures for which the equation of state that is being used has been fitted to observations. Care should be taken when applying this equation of state outside of its fit range.

EOS_domain

This subroutine returns a two point integer array indicating the domain of i-indices to work on in EOS calls based on information from a hor_index type

analytic_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.

analytic_int_density_dz

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.

query_compressible

Returns true if the equation of state is compressible (i.e. has pressure dependence)

get_EOS_name

Returns the string identifying the equation of state with enumeration "id"

EOS_init

Initializes EOS_type by allocating and reading parameters. The scaling factors in US are stored in EOS for later use.

EOS_manual_init

Manually initialized an EOS type (intended for unit testing of routines which need a specific EOS)

convert_temp_salt_for_TEOS10

Convert T&S to Absolute Salinity and Conservative Temperature if using TEOS10

cons_temp_to_pot_temp

Converts an array of conservative temperatures to potential temperatures. The input arguments use the dimensionally rescaling as specified within the EOS type. The output potential temperature uses this same scaling, but this can be replaced by the factor given by scale.

pot_temp_to_cons_temp

Converts an array of potential temperatures to conservative temperatures. The input arguments use the dimensionally rescaling as specified within the EOS type. The output potential temperature uses this same scaling, but this can be replaced by the factor given by scale.

abs_saln_to_prac_saln

Converts an array of absolute salinity to practical salinity. The input arguments use the dimensionally rescaling as specified within the EOS type. The output potential temperature uses this same scaling, but this can be replaced by the factor given by scale.

prac_saln_to_abs_saln

Converts an array of absolute salinity to practical salinity. The input arguments use the dimensionally rescaling as specified within the EOS type. The output potential temperature uses this same scaling, but this can be replaced by the factor given by scale.

EOS_quadrature

Return value of EOS_quadrature

EOS_unit_tests

Runs unit tests for consistency on the equations of state. This should only be called from a single/root thread. It returns True if any test fails, otherwise it returns False.

test_TS_conversion_consistency

test_TFr_consistency

write_check_msg

Write a message indicating how well a value matches its check value.

test_EOS_consistency

Test an equation of state for self-consistency and consistency with check values, returning false if it is consistent by all tests, and true if it fails any test.

Type Documentation

type, public :: EOS_type

A control structure for the equation of state

Parameters
  • form_of_EOS

    The equation of state to use.

  • form_of_TFreeze

    The expression for the potential temperature of the freezing point.

  • EOS_quadrature

    If true, always use the generic (quadrature) code for the integrals of density.

  • Compressible

    If true, in situ density is a function of pressure.

  • Rho_T0_S0

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

  • dRho_dT

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

  • dRho_dS

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

  • dRho_dp

    The partial derivative of density with pressure [s2 m-2]

  • TFr_S0_P0

    The freezing potential temperature at S=0, P=0 [degC]

  • dTFr_dS

    The derivative of freezing point with salinity [degC ppt-1]

  • dTFr_dp

    The derivative of freezing point with pressure [degC Pa-1]

  • use_conT_absS

    True if the model internal temperature is the conservative temperature and the salinity is absolute salinity. These could be separated into two flags, but right now it is controlled by one input parameter and there is no known need to have one True and one False.

  • TFreeze_S_is_pracS

    True if the freezing point expression is formulated from practical salinity

  • TFreeze_T_is_potT

    True if the freezing point expression yields a potential temperature

  • use_Wright_2nd_deriv_bug

    If true, use a separate subroutine that retains a buggy version of the calculations of the second derivative of density with temperature and with temperature and pressure. This bug is corrected in the default version.

  • m_to_Z

    A constant that translates distances in meters to the units of depth [Z m-1 ~> 1]

  • kg_m3_to_R

    A constant that translates kilograms per meter cubed to the units of density [R m3 kg-1 ~> 1]

  • R_to_kg_m3

    A constant that translates the units of density to kilograms per meter cubed [kg m-3 R-1 ~> 1]

  • RL2_T2_to_Pa

    Convert pressures from R L2 T-2 to Pa [Pa T2 R-1 L-2 ~> 1]

  • L_T_to_m_s

    Convert lateral velocities from L T-1 to m s-1 [m T s-1 L-1 ~> 1]

  • degC_to_C

    A constant that translates degrees Celsius to the units of temperature [C degC-1 ~> 1]

  • C_to_degC

    A constant that translates the units of temperature to degrees Celsius [degC C-1 ~> 1]

  • ppt_to_S

    A constant that translates parts per thousand to the units of salinity [S ppt-1 ~> 1]

  • S_to_ppt

    A constant that translates the units of salinity to parts per thousand [ppt S-1 ~> 1]

    The instance of the actual equation of state

Generic Interface Documentation

interface calculate_density

Calculates density of sea water from T, S and P

Callers call graph
Callers of mom_eos::interface::calculate_density calls cluster_benchmark_initialization benchmark_initialization cluster_coord_hycom coord_hycom cluster_coord_rho coord_rho cluster_dome_initialization DOME_initialization cluster_isomip_initialization ISOMIP_initialization cluster_mom MOM cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer cluster_mom_coord_initialization MOM_coord_initialization cluster_mom_cvmix_conv MOM_CVMix_conv cluster_mom_cvmix_kpp MOM_CVMix_KPP cluster_mom_cvmix_shear MOM_CVMix_shear cluster_mom_density_integrals MOM_density_integrals cluster_mom_diabatic_driver MOM_diabatic_driver cluster_mom_diagnose_mld MOM_diagnose_mld cluster_mom_diagnostics MOM_diagnostics cluster_mom_diapyc_energy_req MOM_diapyc_energy_req cluster_mom_entrain_diffusive MOM_entrain_diffusive cluster_mom_eos MOM_EOS cluster_mom_geothermal MOM_geothermal cluster_mom_hybgen_regrid MOM_hybgen_regrid cluster_mom_hybgen_unmix MOM_hybgen_unmix cluster_mom_ice_shelf MOM_ice_shelf cluster_mom_interface_heights MOM_interface_heights cluster_mom_kappa_shear MOM_kappa_shear cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat cluster_mom_neutral_diffusion MOM_neutral_diffusion cluster_mom_pressureforce_fv MOM_PressureForce_FV cluster_mom_pressureforce_mont MOM_PressureForce_Mont cluster_mom_regridding MOM_regridding cluster_mom_regularize_layers MOM_regularize_layers cluster_mom_set_diffusivity MOM_set_diffusivity cluster_mom_set_visc MOM_set_visc cluster_mom_state_initialization MOM_state_initialization cluster_mom_tracer_hor_diff MOM_tracer_hor_diff cluster_mom_tracer_z_init MOM_tracer_Z_init cluster_rgc_initialization RGC_initialization cluster_user_change_diffusivity user_change_diffusivity benchmark_initialization::benchmark_init_temperature_salinity benchmark_init_temperature_salinity mom_eos::interface::calculate_density calculate_density (interface) benchmark_initialization::benchmark_init_temperature_salinity->mom_eos::interface::calculate_density benchmark_initialization::benchmark_initialize_thickness benchmark_initialize_thickness benchmark_initialization::benchmark_initialize_thickness->mom_eos::interface::calculate_density coord_hycom::build_hycom1_column build_hycom1_column coord_hycom::build_hycom1_column->mom_eos::interface::calculate_density coord_hycom::build_hycom1_target_anomaly build_hycom1_target_anomaly [private/internal] coord_hycom::build_hycom1_target_anomaly->mom_eos::interface::calculate_density coord_rho::build_rho_column build_rho_column coord_rho::build_rho_column->mom_eos::interface::calculate_density coord_rho::build_rho_column_iteratively build_rho_column_iteratively [private/internal] coord_rho::build_rho_column_iteratively->mom_eos::interface::calculate_density dome_initialization::dome_set_obc_data DOME_set_OBC_data dome_initialization::dome_set_obc_data->mom_eos::interface::calculate_density isomip_initialization::isomip_initialize_sponges ISOMIP_initialize_sponges isomip_initialization::isomip_initialize_sponges->mom_eos::interface::calculate_density isomip_initialization::isomip_initialize_temperature_salinity ISOMIP_initialize_temperature_salinity isomip_initialization::isomip_initialize_temperature_salinity->mom_eos::interface::calculate_density isomip_initialization::isomip_initialize_thickness ISOMIP_initialize_thickness isomip_initialization::isomip_initialize_thickness->mom_eos::interface::calculate_density mom::adjust_ssh_for_p_atm adjust_ssh_for_p_atm [private/internal] mom::adjust_ssh_for_p_atm->mom_eos::interface::calculate_density mom_bulk_mixed_layer::bulkmixedlayer bulkmixedlayer mom_bulk_mixed_layer::bulkmixedlayer->mom_eos::interface::calculate_density mom_coord_initialization::set_coord_from_ts_profile set_coord_from_TS_profile [private/internal] mom_coord_initialization::set_coord_from_ts_profile->mom_eos::interface::calculate_density mom_coord_initialization::set_coord_from_ts_range set_coord_from_TS_range [private/internal] mom_coord_initialization::set_coord_from_ts_range->mom_eos::interface::calculate_density mom_coord_initialization::set_coord_from_ts_ref set_coord_from_TS_ref [private/internal] mom_coord_initialization::set_coord_from_ts_ref->mom_eos::interface::calculate_density mom_cvmix_conv::calculate_cvmix_conv calculate_CVMix_conv mom_cvmix_conv::calculate_cvmix_conv->mom_eos::interface::calculate_density mom_cvmix_kpp::kpp_compute_bld KPP_compute_BLD mom_cvmix_kpp::kpp_compute_bld->mom_eos::interface::calculate_density mom_cvmix_shear::calculate_cvmix_shear calculate_CVMix_shear mom_cvmix_shear::calculate_cvmix_shear->mom_eos::interface::calculate_density mom_density_integrals::frac_dp_at_pos frac_dp_at_pos [private/internal] mom_density_integrals::frac_dp_at_pos->mom_eos::interface::calculate_density mom_density_integrals::int_density_dz_generic_pcm int_density_dz_generic_pcm mom_density_integrals::int_density_dz_generic_pcm->mom_eos::interface::calculate_density mom_density_integrals::int_density_dz_generic_plm int_density_dz_generic_plm mom_density_integrals::int_density_dz_generic_plm->mom_eos::interface::calculate_density mom_density_integrals::int_density_dz_generic_ppm int_density_dz_generic_ppm mom_density_integrals::int_density_dz_generic_ppm->mom_eos::interface::calculate_density mom_diabatic_driver::layered_diabatic layered_diabatic [private/internal] mom_diabatic_driver::layered_diabatic->mom_eos::interface::calculate_density mom_diagnose_mld::diagnosemldbydensitydifference diagnoseMLDbyDensityDifference mom_diagnose_mld::diagnosemldbydensitydifference->mom_eos::interface::calculate_density mom_diagnose_mld::diagnosemldbyenergy diagnoseMLDbyEnergy mom_diagnose_mld::diagnosemldbyenergy->mom_eos::interface::calculate_density mom_diagnostics::calculate_diagnostic_fields calculate_diagnostic_fields mom_diagnostics::calculate_diagnostic_fields->mom_eos::interface::calculate_density mom_diapyc_energy_req::diapyc_energy_req_calc diapyc_energy_req_calc mom_diapyc_energy_req::diapyc_energy_req_calc->mom_eos::interface::calculate_density mom_entrain_diffusive::entrainment_diffusive entrainment_diffusive mom_entrain_diffusive::entrainment_diffusive->mom_eos::interface::calculate_density mom_entrain_diffusive::set_ent_bl set_Ent_bl [private/internal] mom_entrain_diffusive::set_ent_bl->mom_eos::interface::calculate_density mom_eos::test_eos_consistency test_EOS_consistency [private/internal] mom_eos::test_eos_consistency->mom_eos::interface::calculate_density mom_geothermal::geothermal_entraining geothermal_entraining mom_geothermal::geothermal_entraining->mom_eos::interface::calculate_density mom_hybgen_regrid::hybgen_regrid hybgen_regrid mom_hybgen_regrid::hybgen_regrid->mom_eos::interface::calculate_density mom_hybgen_unmix::hybgen_column_unmix hybgen_column_unmix [private/internal] mom_hybgen_unmix::hybgen_column_unmix->mom_eos::interface::calculate_density mom_hybgen_unmix::hybgen_unmix hybgen_unmix mom_hybgen_unmix::hybgen_unmix->mom_eos::interface::calculate_density mom_ice_shelf::shelf_calc_flux shelf_calc_flux mom_ice_shelf::shelf_calc_flux->mom_eos::interface::calculate_density mom_interface_heights::dz_to_thickness_eos dz_to_thickness_EOS [private/internal] mom_interface_heights::dz_to_thickness_eos->mom_eos::interface::calculate_density mom_kappa_shear::kappa_shear_column kappa_shear_column [private/internal] mom_kappa_shear::kappa_shear_column->mom_eos::interface::calculate_density mom_mixed_layer_restrat::detect_mld detect_mld [private/internal] mom_mixed_layer_restrat::detect_mld->mom_eos::interface::calculate_density mom_mixed_layer_restrat::mixedlayer_restrat_bml mixedlayer_restrat_BML [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_bml->mom_eos::interface::calculate_density mom_mixed_layer_restrat::mixedlayer_restrat_bodner mixedlayer_restrat_Bodner [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_bodner->mom_eos::interface::calculate_density mom_mixed_layer_restrat::mixedlayer_restrat_om4 mixedlayer_restrat_OM4 [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_om4->mom_eos::interface::calculate_density mom_neutral_diffusion::calc_delta_rho_and_derivs calc_delta_rho_and_derivs [private/internal] mom_neutral_diffusion::calc_delta_rho_and_derivs->mom_eos::interface::calculate_density mom_pressureforce_fv::pressureforce_fv_bouss PressureForce_FV_Bouss mom_pressureforce_fv::pressureforce_fv_bouss->mom_eos::interface::calculate_density mom_pressureforce_fv::pressureforce_fv_nonbouss PressureForce_FV_nonBouss mom_pressureforce_fv::pressureforce_fv_nonbouss->mom_eos::interface::calculate_density mom_pressureforce_mont::pressureforce_mont_bouss PressureForce_Mont_Bouss mom_pressureforce_mont::pressureforce_mont_bouss->mom_eos::interface::calculate_density mom_pressureforce_mont::pressureforce_mont_nonbouss PressureForce_Mont_nonBouss mom_pressureforce_mont::pressureforce_mont_nonbouss->mom_eos::interface::calculate_density mom_pressureforce_mont::set_pbce_bouss Set_pbce_Bouss mom_pressureforce_mont::set_pbce_bouss->mom_eos::interface::calculate_density mom_pressureforce_mont::set_pbce_nonbouss Set_pbce_nonBouss mom_pressureforce_mont::set_pbce_nonbouss->mom_eos::interface::calculate_density mom_regridding::convective_adjustment convective_adjustment mom_regridding::convective_adjustment->mom_eos::interface::calculate_density mom_regularize_layers::regularize_surface regularize_surface [private/internal] mom_regularize_layers::regularize_surface->mom_eos::interface::calculate_density mom_set_diffusivity::find_tke_to_kd find_TKE_to_Kd [private/internal] mom_set_diffusivity::find_tke_to_kd->mom_eos::interface::calculate_density mom_set_diffusivity::set_density_ratios set_density_ratios [private/internal] mom_set_diffusivity::set_density_ratios->mom_eos::interface::calculate_density mom_set_visc::set_viscous_bbl set_viscous_BBL mom_set_visc::set_viscous_bbl->mom_eos::interface::calculate_density mom_state_initialization::calc_sfc_displacement calc_sfc_displacement [private/internal] mom_state_initialization::calc_sfc_displacement->mom_eos::interface::calculate_density mom_state_initialization::initialize_sponges_file initialize_sponges_file [private/internal] mom_state_initialization::initialize_sponges_file->mom_eos::interface::calculate_density mom_state_initialization::initialize_temp_salt_fit initialize_temp_salt_fit [private/internal] mom_state_initialization::initialize_temp_salt_fit->mom_eos::interface::calculate_density mom_state_initialization::mom_state_init_tests MOM_state_init_tests [private/internal] mom_state_initialization::mom_state_init_tests->mom_eos::interface::calculate_density mom_state_initialization::mom_temp_salt_initialize_from_z MOM_temp_salt_initialize_from_Z [private/internal] mom_state_initialization::mom_temp_salt_initialize_from_z->mom_eos::interface::calculate_density mom_tracer_hor_diff::tracer_epipycnal_ml_diff tracer_epipycnal_ML_diff [private/internal] mom_tracer_hor_diff::tracer_epipycnal_ml_diff->mom_eos::interface::calculate_density mom_tracer_z_init::determine_temperature determine_temperature mom_tracer_z_init::determine_temperature->mom_eos::interface::calculate_density rgc_initialization::rgc_initialize_sponges RGC_initialize_sponges rgc_initialization::rgc_initialize_sponges->mom_eos::interface::calculate_density user_change_diffusivity::user_change_diff user_change_diff user_change_diffusivity::user_change_diff->mom_eos::interface::calculate_density
Text view
interface calculate_spec_vol

Calculates specific volume of sea water from T, S and P

Callers call graph
Callers of mom_eos::interface::calculate_spec_vol calls cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer cluster_mom_density_integrals MOM_density_integrals cluster_mom_eos MOM_EOS cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat cluster_mom_pressureforce_fv MOM_PressureForce_FV mom_bulk_mixed_layer::bulkmixedlayer bulkmixedlayer mom_eos::interface::calculate_spec_vol calculate_spec_vol (interface) mom_bulk_mixed_layer::bulkmixedlayer->mom_eos::interface::calculate_spec_vol mom_density_integrals::int_spec_vol_dp_generic_pcm int_spec_vol_dp_generic_pcm mom_density_integrals::int_spec_vol_dp_generic_pcm->mom_eos::interface::calculate_spec_vol mom_density_integrals::int_spec_vol_dp_generic_plm int_spec_vol_dp_generic_plm mom_density_integrals::int_spec_vol_dp_generic_plm->mom_eos::interface::calculate_spec_vol mom_eos::average_specific_vol average_specific_vol mom_eos::average_specific_vol->mom_eos::interface::calculate_spec_vol mom_eos::test_eos_consistency test_EOS_consistency [private/internal] mom_eos::test_eos_consistency->mom_eos::interface::calculate_spec_vol mom_mixed_layer_restrat::mixedlayer_restrat_bml mixedlayer_restrat_BML [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_bml->mom_eos::interface::calculate_spec_vol mom_mixed_layer_restrat::mixedlayer_restrat_bodner mixedlayer_restrat_Bodner [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_bodner->mom_eos::interface::calculate_spec_vol mom_mixed_layer_restrat::mixedlayer_restrat_om4 mixedlayer_restrat_OM4 [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_om4->mom_eos::interface::calculate_spec_vol mom_pressureforce_fv::pressureforce_fv_nonbouss PressureForce_FV_nonBouss mom_pressureforce_fv::pressureforce_fv_nonbouss->mom_eos::interface::calculate_spec_vol
Text view
interface calculate_density_derivs

Calculate the derivatives of density with temperature and salinity from T, S, and P

Callers call graph
Callers of mom_eos::interface::calculate_density_derivs calls cluster_benchmark_initialization benchmark_initialization cluster_coord_adapt coord_adapt cluster_dome_initialization DOME_initialization cluster_isomip_initialization ISOMIP_initialization cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer cluster_mom_cvmix_ddiff MOM_CVMix_ddiff cluster_mom_diabatic_aux MOM_diabatic_aux cluster_mom_diabatic_driver MOM_diabatic_driver cluster_mom_diagnostics MOM_diagnostics cluster_mom_entrain_diffusive MOM_entrain_diffusive cluster_mom_eos MOM_EOS cluster_mom_forcing_type MOM_forcing_type cluster_mom_full_convection MOM_full_convection cluster_mom_geothermal MOM_geothermal cluster_mom_hybgen_unmix MOM_hybgen_unmix cluster_mom_ice_shelf MOM_ice_shelf cluster_mom_int_tide_input MOM_int_tide_input cluster_mom_isopycnal_slopes MOM_isopycnal_slopes cluster_mom_kappa_shear MOM_kappa_shear cluster_mom_lateral_mixing_coeffs MOM_lateral_mixing_coeffs cluster_mom_neutral_diffusion MOM_neutral_diffusion cluster_mom_pressureforce_mont MOM_PressureForce_Mont cluster_mom_set_diffusivity MOM_set_diffusivity cluster_mom_set_visc MOM_set_visc cluster_mom_state_initialization MOM_state_initialization cluster_mom_thickness_diffuse MOM_thickness_diffuse cluster_mom_tracer_z_init MOM_tracer_Z_init cluster_mom_wave_speed MOM_wave_speed benchmark_initialization::benchmark_init_temperature_salinity benchmark_init_temperature_salinity mom_eos::interface::calculate_density_derivs calculate_density_derivs (interface) benchmark_initialization::benchmark_init_temperature_salinity->mom_eos::interface::calculate_density_derivs benchmark_initialization::benchmark_initialize_thickness benchmark_initialize_thickness benchmark_initialization::benchmark_initialize_thickness->mom_eos::interface::calculate_density_derivs coord_adapt::build_adapt_column build_adapt_column coord_adapt::build_adapt_column->mom_eos::interface::calculate_density_derivs dome_initialization::dome_set_obc_data DOME_set_OBC_data dome_initialization::dome_set_obc_data->mom_eos::interface::calculate_density_derivs isomip_initialization::isomip_initialize_temperature_salinity ISOMIP_initialize_temperature_salinity isomip_initialization::isomip_initialize_temperature_salinity->mom_eos::interface::calculate_density_derivs mom_bulk_mixed_layer::bulkmixedlayer bulkmixedlayer mom_bulk_mixed_layer::bulkmixedlayer->mom_eos::interface::calculate_density_derivs mom_cvmix_ddiff::compute_ddiff_coeffs compute_ddiff_coeffs mom_cvmix_ddiff::compute_ddiff_coeffs->mom_eos::interface::calculate_density_derivs mom_diabatic_aux::applyboundaryfluxesinout applyBoundaryFluxesInOut mom_diabatic_aux::applyboundaryfluxesinout->mom_eos::interface::calculate_density_derivs mom_diabatic_driver::diabatic_ale diabatic_ALE [private/internal] mom_diabatic_driver::diabatic_ale->mom_eos::interface::calculate_density_derivs mom_diabatic_driver::diabatic_ale_legacy diabatic_ALE_legacy [private/internal] mom_diabatic_driver::diabatic_ale_legacy->mom_eos::interface::calculate_density_derivs mom_diagnostics::calculate_diagnostic_fields calculate_diagnostic_fields mom_diagnostics::calculate_diagnostic_fields->mom_eos::interface::calculate_density_derivs mom_entrain_diffusive::entrainment_diffusive entrainment_diffusive mom_entrain_diffusive::entrainment_diffusive->mom_eos::interface::calculate_density_derivs mom_eos::test_eos_consistency test_EOS_consistency [private/internal] mom_eos::test_eos_consistency->mom_eos::interface::calculate_density_derivs mom_forcing_type::calculatebuoyancyflux1d calculateBuoyancyFlux1d mom_forcing_type::calculatebuoyancyflux1d->mom_eos::interface::calculate_density_derivs mom_full_convection::smoothed_drdt_drds smoothed_dRdT_dRdS [private/internal] mom_full_convection::smoothed_drdt_drds->mom_eos::interface::calculate_density_derivs mom_geothermal::geothermal_entraining geothermal_entraining mom_geothermal::geothermal_entraining->mom_eos::interface::calculate_density_derivs mom_geothermal::geothermal_in_place geothermal_in_place mom_geothermal::geothermal_in_place->mom_eos::interface::calculate_density_derivs mom_hybgen_unmix::hybgen_column_unmix hybgen_column_unmix [private/internal] mom_hybgen_unmix::hybgen_column_unmix->mom_eos::interface::calculate_density_derivs mom_ice_shelf::shelf_calc_flux shelf_calc_flux mom_ice_shelf::shelf_calc_flux->mom_eos::interface::calculate_density_derivs mom_int_tide_input::find_n2_bottom find_N2_bottom [private/internal] mom_int_tide_input::find_n2_bottom->mom_eos::interface::calculate_density_derivs mom_isopycnal_slopes::calc_isoneutral_slopes calc_isoneutral_slopes mom_isopycnal_slopes::calc_isoneutral_slopes->mom_eos::interface::calculate_density_derivs mom_kappa_shear::kappa_shear_column kappa_shear_column [private/internal] mom_kappa_shear::kappa_shear_column->mom_eos::interface::calculate_density_derivs mom_lateral_mixing_coeffs::calc_sqg_struct calc_sqg_struct mom_lateral_mixing_coeffs::calc_sqg_struct->mom_eos::interface::calculate_density_derivs mom_neutral_diffusion::calc_delta_rho_and_derivs calc_delta_rho_and_derivs [private/internal] mom_neutral_diffusion::calc_delta_rho_and_derivs->mom_eos::interface::calculate_density_derivs mom_neutral_diffusion::neutral_diffusion_calc_coeffs neutral_diffusion_calc_coeffs mom_neutral_diffusion::neutral_diffusion_calc_coeffs->mom_eos::interface::calculate_density_derivs mom_pressureforce_mont::set_pbce_bouss Set_pbce_Bouss mom_pressureforce_mont::set_pbce_bouss->mom_eos::interface::calculate_density_derivs mom_pressureforce_mont::set_pbce_nonbouss Set_pbce_nonBouss mom_pressureforce_mont::set_pbce_nonbouss->mom_eos::interface::calculate_density_derivs mom_set_diffusivity::double_diffusion double_diffusion [private/internal] mom_set_diffusivity::double_diffusion->mom_eos::interface::calculate_density_derivs mom_set_diffusivity::find_n2 find_N2 [private/internal] mom_set_diffusivity::find_n2->mom_eos::interface::calculate_density_derivs mom_set_visc::set_viscous_bbl set_viscous_BBL mom_set_visc::set_viscous_bbl->mom_eos::interface::calculate_density_derivs mom_set_visc::set_viscous_ml set_viscous_ML mom_set_visc::set_viscous_ml->mom_eos::interface::calculate_density_derivs mom_state_initialization::initialize_temp_salt_fit initialize_temp_salt_fit [private/internal] mom_state_initialization::initialize_temp_salt_fit->mom_eos::interface::calculate_density_derivs mom_thickness_diffuse::thickness_diffuse_full thickness_diffuse_full [private/internal] mom_thickness_diffuse::thickness_diffuse_full->mom_eos::interface::calculate_density_derivs mom_tracer_z_init::determine_temperature determine_temperature mom_tracer_z_init::determine_temperature->mom_eos::interface::calculate_density_derivs mom_wave_speed::wave_speed wave_speed mom_wave_speed::wave_speed->mom_eos::interface::calculate_density_derivs mom_wave_speed::wave_speeds wave_speeds mom_wave_speed::wave_speeds->mom_eos::interface::calculate_density_derivs
Text view
interface calculate_specific_vol_derivs

Calculate the derivatives of specific volume with temperature and salinity from T, S, and P

Callers call graph
Callers of mom_eos::interface::calculate_specific_vol_derivs calls cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer cluster_mom_diabatic_aux MOM_diabatic_aux cluster_mom_diabatic_driver MOM_diabatic_driver cluster_mom_diapyc_energy_req MOM_diapyc_energy_req cluster_mom_entrain_diffusive MOM_entrain_diffusive cluster_mom_eos MOM_EOS cluster_mom_forcing_type MOM_forcing_type cluster_mom_geothermal MOM_geothermal cluster_mom_kappa_shear MOM_kappa_shear cluster_mom_set_visc MOM_set_visc cluster_mom_wave_speed MOM_wave_speed mom_bulk_mixed_layer::bulkmixedlayer bulkmixedlayer mom_eos::interface::calculate_specific_vol_derivs calculate_specific_vol_derivs (interface) mom_bulk_mixed_layer::bulkmixedlayer->mom_eos::interface::calculate_specific_vol_derivs mom_diabatic_aux::applyboundaryfluxesinout applyBoundaryFluxesInOut mom_diabatic_aux::applyboundaryfluxesinout->mom_eos::interface::calculate_specific_vol_derivs mom_diabatic_driver::diabatic_ale diabatic_ALE [private/internal] mom_diabatic_driver::diabatic_ale->mom_eos::interface::calculate_specific_vol_derivs mom_diabatic_driver::diabatic_ale_legacy diabatic_ALE_legacy [private/internal] mom_diabatic_driver::diabatic_ale_legacy->mom_eos::interface::calculate_specific_vol_derivs mom_diapyc_energy_req::diapyc_energy_req_calc diapyc_energy_req_calc mom_diapyc_energy_req::diapyc_energy_req_calc->mom_eos::interface::calculate_specific_vol_derivs mom_entrain_diffusive::entrainment_diffusive entrainment_diffusive mom_entrain_diffusive::entrainment_diffusive->mom_eos::interface::calculate_specific_vol_derivs mom_eos::test_eos_consistency test_EOS_consistency [private/internal] mom_eos::test_eos_consistency->mom_eos::interface::calculate_specific_vol_derivs mom_forcing_type::calculatebuoyancyflux1d calculateBuoyancyFlux1d mom_forcing_type::calculatebuoyancyflux1d->mom_eos::interface::calculate_specific_vol_derivs mom_geothermal::geothermal_in_place geothermal_in_place mom_geothermal::geothermal_in_place->mom_eos::interface::calculate_specific_vol_derivs mom_kappa_shear::kappa_shear_column kappa_shear_column [private/internal] mom_kappa_shear::kappa_shear_column->mom_eos::interface::calculate_specific_vol_derivs mom_set_visc::set_viscous_ml set_viscous_ML mom_set_visc::set_viscous_ml->mom_eos::interface::calculate_specific_vol_derivs mom_wave_speed::wave_speed wave_speed mom_wave_speed::wave_speed->mom_eos::interface::calculate_specific_vol_derivs mom_wave_speed::wave_speeds wave_speeds mom_wave_speed::wave_speeds->mom_eos::interface::calculate_specific_vol_derivs
Text view
interface calculate_density_second_derivs

Calculates the second derivatives of density with various combinations of temperature, salinity, and pressure from T, S and P

Callers call graph
Callers of mom_eos::interface::calculate_density_second_derivs calls cluster_mom_eos MOM_EOS cluster_mom_isopycnal_slopes MOM_isopycnal_slopes cluster_mom_thickness_diffuse MOM_thickness_diffuse mom_eos::interface::calculate_density_second_derivs calculate_density_second_derivs (interface) mom_eos::test_eos_consistency test_EOS_consistency [private/internal] mom_eos::test_eos_consistency->mom_eos::interface::calculate_density_second_derivs mom_isopycnal_slopes::calc_isoneutral_slopes calc_isoneutral_slopes mom_isopycnal_slopes::calc_isoneutral_slopes->mom_eos::interface::calculate_density_second_derivs mom_thickness_diffuse::thickness_diffuse_full thickness_diffuse_full [private/internal] mom_thickness_diffuse::thickness_diffuse_full->mom_eos::interface::calculate_density_second_derivs
Text view
interface calculate_TFreeze

Calculates the freezing point of sea water from T, S and P

Callers call graph
Callers of mom_eos::interface::calculate_tfreeze calls cluster_mom MOM cluster_mom_diabatic_aux MOM_diabatic_aux cluster_mom_diabatic_driver MOM_diabatic_driver cluster_mom_eos MOM_EOS cluster_mom_ice_shelf MOM_ice_shelf mom::extract_surface_state extract_surface_state mom_eos::interface::calculate_tfreeze calculate_TFreeze (interface) mom::extract_surface_state->mom_eos::interface::calculate_tfreeze mom_diabatic_aux::make_frazil make_frazil mom_diabatic_aux::make_frazil->mom_eos::interface::calculate_tfreeze mom_diabatic_driver::diabatic diabatic mom_diabatic_driver::diabatic->mom_eos::interface::calculate_tfreeze mom_eos::test_tfr_consistency test_TFr_consistency [private/internal] mom_eos::test_tfr_consistency->mom_eos::interface::calculate_tfreeze mom_ice_shelf::shelf_calc_flux shelf_calc_flux mom_ice_shelf::shelf_calc_flux->mom_eos::interface::calculate_tfreeze
Text view
interface calculate_compress

Calculates the compressibility of water from T, S, and P

Callers call graph
Callers of mom_eos::interface::calculate_compress calls cluster_mom_eos MOM_EOS mom_eos::interface::calculate_compress calculate_compress (interface) mom_eos::test_eos_consistency test_EOS_consistency [private/internal] mom_eos::test_eos_consistency->mom_eos::interface::calculate_compress
Text view

Functions/Subroutine Documentation

real elemental function calculate_density_elem(EOS, T, S, pressure, rho_ref, scale)

Density of sea water (in-situ if pressure is local) [R ~> kg m-3]

If rho_ref is present, the anomaly with respect to rho_ref is returned. The pressure and density can be rescaled with the values stored in EOS. If the scale argument is present the density scaling uses the product of the two scaling factors.

Parameters
  • EOS [in]

    Equation of state structure

  • T [in]

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

  • S [in]

    Salinity [S ~> ppt]

  • pressure [in]

    Pressure [R L2 T-2 ~> Pa]

  • rho_ref [in]

    A reference density [R ~> kg m-3]

  • scale [in]

    A multiplicative factor by which to scale output density in combination with scaling stored in EOS [various]

subroutine calculate_density_scalar(T, S, pressure, rho, EOS, rho_ref, scale)

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. The pressure and density can be rescaled with the values stored in EOS. If the scale argument is present the density scaling uses the product of the two scaling factors.

Parameters
  • T [in]

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

  • S [in]

    Salinity [S ~> ppt]

  • pressure [in]

    Pressure [R L2 T-2 ~> Pa]

  • rho [out]

    Density (in-situ if pressure is local) [R ~> kg m-3]

  • EOS [in]

    Equation of state structure

  • rho_ref [in]

    A reference density [R ~> kg m-3]

  • scale [in]

    A multiplicative factor by which to scale output density in combination with scaling stored in EOS [various]

Callers call graph
Callers of mom_eos::calculate_density_scalar calls cluster_mom_eos MOM_EOS mom_eos::calculate_density_scalar calculate_density_scalar [private/internal] mom_eos::calculate_stanley_density_scalar calculate_stanley_density_scalar [private/internal] mom_eos::calculate_stanley_density_scalar->mom_eos::calculate_density_scalar
Text view
subroutine calculate_stanley_density_scalar(T, S, pressure, Tvar, TScov, Svar, rho, EOS, rho_ref, scale)

Calls the appropriate subroutine to calculate density of sea water for scalar inputs including the variance of T, S and covariance of T-S. The calculation uses only the second order correction in a series as discussed in Stanley et al., 2020. If rho_ref is present, the anomaly with respect to rho_ref is returned. The density can be rescaled using rho_ref.

Parameters
  • T [in]

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

  • S [in]

    Salinity [S ~> ppt]

  • Tvar [in]

    Variance of potential temperature referenced to the surface [C2 ~> degC2]

  • TScov [in]

    Covariance of potential temperature and salinity [C S ~> degC ppt]

  • Svar [in]

    Variance of salinity [S2 ~> ppt2]

  • pressure [in]

    Pressure [R L2 T-2 ~> Pa]

  • rho [out]

    Density (in-situ if pressure is local) [R ~> kg m-3]

  • EOS [in]

    Equation of state structure

  • rho_ref [in]

    A reference density [R ~> kg m-3].

  • scale [in]

    A multiplicative factor by which to scale output density in combination with scaling stored in EOS [various]

Callees call graph
Callees of mom_eos::calculate_stanley_density_scalar calls cluster_mom_eos MOM_EOS mom_eos::calculate_density_scalar calculate_density_scalar [private/internal] mom_eos::calculate_density_second_derivs_scalar calculate_density_second_derivs_scalar [private/internal] mom_eos::calculate_stanley_density_scalar calculate_stanley_density_scalar [private/internal] mom_eos::calculate_stanley_density_scalar->mom_eos::calculate_density_scalar mom_eos::calculate_stanley_density_scalar->mom_eos::calculate_density_second_derivs_scalar
Text view
subroutine calculate_density_1d(T, S, pressure, rho, EOS, dom, rho_ref, scale)

Calls the appropriate subroutine to calculate the density of sea water for 1-D array inputs, potentially limiting the domain of indices that are worked on. If rho_ref is present, the anomaly with respect to rho_ref is returned.

Parameters
  • T [in]

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

  • S [in]

    Salinity [S ~> ppt]

  • pressure [in]

    Pressure [R L2 T-2 ~> Pa]

  • rho [inout]

    Density (in-situ if pressure is local) [R ~> kg m-3]

  • EOS [in]

    Equation of state structure

  • dom [in]

    The domain of indices to work on, taking into account that arrays start at 1.

  • rho_ref [in]

    A reference density [R ~> kg m-3]

  • scale [in]

    A multiplicative factor by which to scale density in combination with scaling stored in EOS [various]

Callers call graph
Callers of mom_eos::calculate_density_1d calls cluster_mom_eos MOM_EOS mom_eos::calculate_density_1d calculate_density_1d [private/internal] mom_eos::calculate_stanley_density_1d calculate_stanley_density_1d [private/internal] mom_eos::calculate_stanley_density_1d->mom_eos::calculate_density_1d
Text view
subroutine calculate_stanley_density_1d(T, S, pressure, Tvar, TScov, Svar, rho, EOS, dom, rho_ref, scale)

Calls the appropriate subroutine to calculate the density of sea water for 1-D array inputs including the variance of T, S and covariance of T-S, potentially limiting the domain of indices that are worked on. The calculation uses only the second order correction in a series as discussed in Stanley et al., 2020. If rho_ref is present, the anomaly with respect to rho_ref is returned.

Parameters
  • T [in]

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

  • S [in]

    Salinity [S ~> ppt]

  • pressure [in]

    Pressure [R L2 T-2 ~> Pa]

  • Tvar [in]

    Variance of potential temperature [C2 ~> degC2]

  • TScov [in]

    Covariance of potential temperature and salinity [C S ~> degC ppt]

  • Svar [in]

    Variance of salinity [S2 ~> ppt2]

  • rho [inout]

    Density (in-situ if pressure is local) [R ~> kg m-3]

  • EOS [in]

    Equation of state structure

  • dom [in]

    The domain of indices to work on, taking into account that arrays start at 1.

  • rho_ref [in]

    A reference density [R ~> kg m-3]

  • scale [in]

    A multiplicative factor by which to scale density in combination with scaling stored in EOS [various]

Callees call graph
Callees of mom_eos::calculate_stanley_density_1d calls cluster_mom_eos MOM_EOS mom_eos::calculate_density_1d calculate_density_1d [private/internal] mom_eos::calculate_density_second_derivs_1d calculate_density_second_derivs_1d [private/internal] mom_eos::calculate_stanley_density_1d calculate_stanley_density_1d [private/internal] mom_eos::calculate_stanley_density_1d->mom_eos::calculate_density_1d mom_eos::calculate_stanley_density_1d->mom_eos::calculate_density_second_derivs_1d
Text view
subroutine calculate_spec_vol_array(T, S, pressure, specvol, start, npts, EOS, spv_ref, scale)

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

Parameters
  • T [in]

    potential temperature relative to the surface [degC]

  • S [in]

    salinity [ppt]

  • pressure [in]

    pressure [Pa]

  • specvol [inout]

    in situ specific volume [kg m-3]

  • start [in]

    the starting point in the arrays.

  • npts [in]

    the number of values to calculate.

  • EOS [in]

    Equation of state structure

  • spv_ref [in]

    A reference specific volume [m3 kg-1]

  • scale [in]

    A multiplicative factor by which to scale specific volume in combination with scaling stored in EOS [various]

Callees call graph
Callees of mom_eos::calculate_spec_vol_array calls cluster_mom_eos MOM_EOS cluster_mom_error_handler MOM_error_handler mom_eos::calculate_spec_vol_array calculate_spec_vol_array [private/internal] mom_error_handler::mom_error MOM_error mom_eos::calculate_spec_vol_array->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_eos::calculate_spec_vol_array calls cluster_mom_eos MOM_EOS mom_eos::calc_spec_vol_1d calc_spec_vol_1d [private/internal] mom_eos::calculate_spec_vol_array calculate_spec_vol_array [private/internal] mom_eos::calc_spec_vol_1d->mom_eos::calculate_spec_vol_array mom_eos::calc_spec_vol_scalar calc_spec_vol_scalar [private/internal] mom_eos::calc_spec_vol_scalar->mom_eos::calculate_spec_vol_array
Text view
subroutine calc_spec_vol_scalar(T, S, pressure, specvol, EOS, spv_ref, scale)

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

Parameters
  • T [in]

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

  • S [in]

    Salinity [S ~> ppt]

  • pressure [in]

    Pressure [R L2 T-2 ~> Pa]

  • specvol [out]

    In situ or potential specific volume [R-1 ~> m3 kg-1] or other units determined by the scale argument

  • EOS [in]

    Equation of state structure

  • spv_ref [in]

    A reference specific volume [R-1 ~> m3 kg-1]

  • scale [in]

    A multiplicative factor by which to scale specific volume in combination with scaling stored in EOS [various]

Callees call graph
Callees of mom_eos::calc_spec_vol_scalar calls cluster_mom_eos MOM_EOS mom_eos::calc_spec_vol_scalar calc_spec_vol_scalar [private/internal] mom_eos::calculate_spec_vol_array calculate_spec_vol_array [private/internal] mom_eos::calc_spec_vol_scalar->mom_eos::calculate_spec_vol_array
Text view
subroutine calc_spec_vol_1d(T, S, pressure, specvol, EOS, dom, spv_ref, scale)

Calls the appropriate subroutine to calculate the specific volume of sea water for 1-D array inputs, potentially limiting the domain of indices that are worked on.

Parameters
  • T [in]

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

  • S [in]

    Salinity [S ~> ppt]

  • pressure [in]

    Pressure [R L2 T-2 ~> Pa]

  • specvol [inout]

    In situ specific volume [R-1 ~> m3 kg-1]

  • EOS [in]

    Equation of state structure

  • dom [in]

    The domain of indices to work on, taking into account that arrays start at 1.

  • spv_ref [in]

    A reference specific volume [R-1 ~> m3 kg-1]

  • scale [in]

    A multiplicative factor by which to scale output specific volume in combination with scaling stored in EOS [various]

Callees call graph
Callees of mom_eos::calc_spec_vol_1d calls cluster_mom_eos MOM_EOS mom_eos::calc_spec_vol_1d calc_spec_vol_1d [private/internal] mom_eos::calculate_spec_vol_array calculate_spec_vol_array [private/internal] mom_eos::calc_spec_vol_1d->mom_eos::calculate_spec_vol_array
Text view
subroutine calculate_TFreeze_scalar(S, pressure, T_fr, EOS, pres_scale, scale_from_EOS)

Calls the appropriate subroutine to calculate the freezing point for scalar inputs.

Parameters
  • S [in]

    Salinity, [ppt] or [S ~> ppt] depending on scale_from_EOS

  • pressure [in]

    Pressure, in [Pa] or [R L2 T-2 ~> Pa] depending on pres_scale or scale_from_EOS

  • T_fr [out]

    Freezing point potential temperature referenced to the surface [degC] or [C ~> degC] depending on scale_from_EOS

  • EOS [in]

    Equation of state structure

  • pres_scale [in]

    A multiplicative factor to convert pressure into Pa [Pa T2 R-1 L-2 ~> 1].

  • scale_from_EOS [in]

    If present true use the dimensional scaling factors stored in EOS. Omission is the same .false.

Callees call graph
Callees of mom_eos::calculate_tfreeze_scalar calls cluster_mom_eos MOM_EOS cluster_mom_error_handler MOM_error_handler cluster_mom_tfreeze MOM_TFreeze mom_eos::calculate_tfreeze_scalar calculate_TFreeze_scalar [private/internal] mom_error_handler::mom_error MOM_error mom_eos::calculate_tfreeze_scalar->mom_error_handler::mom_error mom_tfreeze::interface::calculate_tfreeze_linear calculate_TFreeze_linear (interface) mom_eos::calculate_tfreeze_scalar->mom_tfreeze::interface::calculate_tfreeze_linear mom_tfreeze::interface::calculate_tfreeze_millero calculate_TFreeze_Millero (interface) mom_eos::calculate_tfreeze_scalar->mom_tfreeze::interface::calculate_tfreeze_millero mom_tfreeze::interface::calculate_tfreeze_teos10 calculate_TFreeze_teos10 (interface) mom_eos::calculate_tfreeze_scalar->mom_tfreeze::interface::calculate_tfreeze_teos10 mom_tfreeze::interface::calculate_tfreeze_teos_poly calculate_TFreeze_TEOS_poly (interface) mom_eos::calculate_tfreeze_scalar->mom_tfreeze::interface::calculate_tfreeze_teos_poly
Text view

External calls

gsw_mod_toolbox
  • gsw_ct_from_pt (gsw_mod_toolbox::gsw_ct_from_pt)

  • gsw_sp_from_sr (gsw_mod_toolbox::gsw_sp_from_sr)

subroutine calculate_TFreeze_array(S, pressure, T_fr, start, npts, EOS, pres_scale)

Calls the appropriate subroutine to calculate the freezing point for a 1-D array.

Parameters
  • S [in]

    Salinity [ppt]

  • pressure [in]

    Pressure, in [Pa] or [R L2 T-2 ~> Pa] depending on pres_scale

  • T_fr [inout]

    Freezing point, either potential temperature referenced to the surface or conservative temperature depending on settings [degC]

  • start [in]

    Starting index within the array

  • npts [in]

    The number of values to calculate

  • EOS [in]

    Equation of state structure

  • pres_scale [in]

    A multiplicative factor to convert pressure into Pa [Pa T2 R-1 L-2 ~> 1].

Callees call graph
Callees of mom_eos::calculate_tfreeze_array calls cluster_mom_eos MOM_EOS cluster_mom_error_handler MOM_error_handler cluster_mom_tfreeze MOM_TFreeze mom_eos::calculate_tfreeze_array calculate_TFreeze_array [private/internal] mom_error_handler::mom_error MOM_error mom_eos::calculate_tfreeze_array->mom_error_handler::mom_error mom_tfreeze::interface::calculate_tfreeze_linear calculate_TFreeze_linear (interface) mom_eos::calculate_tfreeze_array->mom_tfreeze::interface::calculate_tfreeze_linear mom_tfreeze::interface::calculate_tfreeze_millero calculate_TFreeze_Millero (interface) mom_eos::calculate_tfreeze_array->mom_tfreeze::interface::calculate_tfreeze_millero mom_tfreeze::interface::calculate_tfreeze_teos10 calculate_TFreeze_teos10 (interface) mom_eos::calculate_tfreeze_array->mom_tfreeze::interface::calculate_tfreeze_teos10 mom_tfreeze::interface::calculate_tfreeze_teos_poly calculate_TFreeze_TEOS_poly (interface) mom_eos::calculate_tfreeze_array->mom_tfreeze::interface::calculate_tfreeze_teos_poly
Text view

External calls

gsw_mod_toolbox
  • gsw_ct_from_pt (gsw_mod_toolbox::gsw_ct_from_pt)

  • gsw_sp_from_sr (gsw_mod_toolbox::gsw_sp_from_sr)

subroutine calculate_TFreeze_1d(S, pressure, T_fr, EOS, dom)

Calls the appropriate subroutine to calculate the freezing point for a 1-D array, taking dimensionally rescaled arguments with factors stored in EOS.

Parameters
  • S [in]

    Salinity [S ~> ppt]

  • pressure [in]

    Pressure [R L2 T-2 ~> Pa]

  • T_fr [inout]

    Freezing point, either potential temperature referenced to the surface or conservative temperature depending on settings [C ~> degC]

  • EOS [in]

    Equation of state structure

  • dom [in]

    The domain of indices to work on, taking into account that arrays start at 1.

Callees call graph
Callees of mom_eos::calculate_tfreeze_1d calls cluster_mom_eos MOM_EOS cluster_mom_error_handler MOM_error_handler cluster_mom_tfreeze MOM_TFreeze mom_eos::calculate_tfreeze_1d calculate_TFreeze_1d [private/internal] mom_error_handler::mom_error MOM_error mom_eos::calculate_tfreeze_1d->mom_error_handler::mom_error mom_tfreeze::interface::calculate_tfreeze_linear calculate_TFreeze_linear (interface) mom_eos::calculate_tfreeze_1d->mom_tfreeze::interface::calculate_tfreeze_linear mom_tfreeze::interface::calculate_tfreeze_millero calculate_TFreeze_Millero (interface) mom_eos::calculate_tfreeze_1d->mom_tfreeze::interface::calculate_tfreeze_millero mom_tfreeze::interface::calculate_tfreeze_teos10 calculate_TFreeze_teos10 (interface) mom_eos::calculate_tfreeze_1d->mom_tfreeze::interface::calculate_tfreeze_teos10 mom_tfreeze::interface::calculate_tfreeze_teos_poly calculate_TFreeze_TEOS_poly (interface) mom_eos::calculate_tfreeze_1d->mom_tfreeze::interface::calculate_tfreeze_teos_poly
Text view

External calls

gsw_mod_toolbox
  • gsw_ct_from_pt (gsw_mod_toolbox::gsw_ct_from_pt)

  • gsw_sp_from_sr (gsw_mod_toolbox::gsw_sp_from_sr)

subroutine calculate_density_derivs_array(T, S, pressure, drho_dT, drho_dS, start, npts, EOS, scale)

Calls the appropriate subroutine to calculate density derivatives for 1-D array inputs.

Parameters
  • T [in]

    Potential temperature referenced to the surface [degC]

  • S [in]

    Salinity [ppt]

  • pressure [in]

    Pressure [Pa]

  • drho_dT [inout]

    The partial derivative of density with potential temperature [kg m-3 degC-1] or other units determined by the optional scale argument

  • drho_dS [inout]

    The partial derivative of density with salinity, in [kg m-3 ppt-1] or other units determined by the optional scale argument

  • start [in]

    Starting index within the array

  • npts [in]

    The number of values to calculate

  • EOS [in]

    Equation of state structure

  • scale [in]

    A multiplicative factor by which to scale density in combination with scaling stored in EOS [various]

Callees call graph
Callees of mom_eos::calculate_density_derivs_array calls cluster_mom_eos MOM_EOS cluster_mom_error_handler MOM_error_handler mom_eos::calculate_density_derivs_array calculate_density_derivs_array [private/internal] mom_error_handler::mom_error MOM_error mom_eos::calculate_density_derivs_array->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_eos::calculate_density_derivs_array calls cluster_mom_eos MOM_EOS mom_eos::calculate_density_derivs_1d calculate_density_derivs_1d [private/internal] mom_eos::calculate_density_derivs_array calculate_density_derivs_array [private/internal] mom_eos::calculate_density_derivs_1d->mom_eos::calculate_density_derivs_array
Text view
subroutine calculate_density_derivs_1d(T, S, pressure, drho_dT, drho_dS, EOS, dom, scale)

Calls the appropriate subroutine to calculate density derivatives for 1-D array inputs.

Parameters
  • T [in]

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

  • S [in]

    Salinity [S ~> ppt]

  • pressure [in]

    Pressure [R L2 T-2 ~> Pa]

  • drho_dT [inout]

    The partial derivative of density with potential temperature [R C-1 ~> kg m-3 degC-1]

  • drho_dS [inout]

    The partial derivative of density with salinity [R S-1 ~> kg m-3 ppt-1]

  • EOS [in]

    Equation of state structure

  • dom [in]

    The domain of indices to work on, taking into account that arrays start at 1.

  • scale [in]

    A multiplicative factor by which to scale density in combination with scaling stored in EOS [various]

Callees call graph
Callees of mom_eos::calculate_density_derivs_1d calls cluster_mom_eos MOM_EOS mom_eos::calculate_density_derivs_1d calculate_density_derivs_1d [private/internal] mom_eos::calculate_density_derivs_array calculate_density_derivs_array [private/internal] mom_eos::calculate_density_derivs_1d->mom_eos::calculate_density_derivs_array
Text view
subroutine calculate_density_derivs_scalar(T, S, pressure, drho_dT, drho_dS, EOS, scale)

Calls the appropriate subroutines to calculate density derivatives by promoting a scalar to a one-element array

Parameters
  • T [in]

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

  • S [in]

    Salinity [S ~> ppt]

  • pressure [in]

    Pressure [R L2 T-2 ~> Pa]

  • drho_dT [out]

    The partial derivative of density with potential temperature [R C-1 ~> kg m-3 degC-1] or other units determined by the optional scale argument

  • drho_dS [out]

    The partial derivative of density with salinity, in [R S-1 ~> kg m-3 ppt-1] or other units determined by the optional scale argument

  • EOS [in]

    Equation of state structure

  • scale [in]

    A multiplicative factor by which to scale density in combination with scaling stored in EOS [various]

subroutine calculate_density_second_derivs_1d(T, S, pressure, drho_dS_dS, drho_dS_dT, drho_dT_dT, drho_dS_dP, drho_dT_dP, EOS, dom, scale)

Calls the appropriate subroutine to calculate density second derivatives for 1-D array inputs.

Parameters
  • T [in]

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

  • S [in]

    Salinity [S ~> ppt]

  • pressure [in]

    Pressure [R L2 T-2 ~> Pa]

  • drho_dS_dS [inout]

    Partial derivative of beta with respect to S [R S-2 ~> kg m-3 ppt-2]

  • drho_dS_dT [inout]

    Partial derivative of beta with respect to T [R S-1 C-1 ~> kg m-3 ppt-1 degC-1]

  • drho_dT_dT [inout]

    Partial derivative of alpha with respect to T [R C-2 ~> kg m-3 degC-2]

  • drho_dS_dP [inout]

    Partial derivative of beta with respect to pressure [T2 S-1 L-2 ~> kg m-3 ppt-1 Pa-1]

  • drho_dT_dP [inout]

    Partial derivative of alpha with respect to pressure [T2 C-1 L-2 ~> kg m-3 degC-1 Pa-1]

  • EOS [in]

    Equation of state structure

  • dom [in]

    The domain of indices to work on, taking into account that arrays start at 1.

  • scale [in]

    A multiplicative factor by which to scale density in combination with scaling stored in EOS [various]

Callees call graph
Callees of mom_eos::calculate_density_second_derivs_1d calls cluster_mom_eos MOM_EOS cluster_mom_error_handler MOM_error_handler mom_eos::calculate_density_second_derivs_1d calculate_density_second_derivs_1d [private/internal] mom_error_handler::mom_error MOM_error mom_eos::calculate_density_second_derivs_1d->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_eos::calculate_density_second_derivs_1d calls cluster_mom_eos MOM_EOS mom_eos::calculate_density_second_derivs_1d calculate_density_second_derivs_1d [private/internal] mom_eos::calculate_stanley_density_1d calculate_stanley_density_1d [private/internal] mom_eos::calculate_stanley_density_1d->mom_eos::calculate_density_second_derivs_1d
Text view
subroutine calculate_density_second_derivs_scalar(T, S, pressure, drho_dS_dS, drho_dS_dT, drho_dT_dT, drho_dS_dP, drho_dT_dP, EOS, scale)

Calls the appropriate subroutine to calculate density second derivatives for scalar inputs.

Parameters
  • T [in]

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

  • S [in]

    Salinity [S ~> ppt]

  • pressure [in]

    Pressure [R L2 T-2 ~> Pa]

  • drho_dS_dS [out]

    Partial derivative of beta with respect to S [R S-2 ~> kg m-3 ppt-2]

  • drho_dS_dT [out]

    Partial derivative of beta with respect to T [R S-1 C-1 ~> kg m-3 ppt-1 degC-1]

  • drho_dT_dT [out]

    Partial derivative of alpha with respect to T [R C-2 ~> kg m-3 degC-2]

  • drho_dS_dP [out]

    Partial derivative of beta with respect to pressure [T2 S-1 L-2 ~> kg m-3 ppt-1 Pa-1]

  • drho_dT_dP [out]

    Partial derivative of alpha with respect to pressure [T2 C-1 L-2 ~> kg m-3 degC-1 Pa-1]

  • EOS [in]

    Equation of state structure

  • scale [in]

    A multiplicative factor by which to scale density in combination with scaling stored in EOS [various]

Callees call graph
Callees of mom_eos::calculate_density_second_derivs_scalar calls cluster_mom_eos MOM_EOS cluster_mom_error_handler MOM_error_handler mom_eos::calculate_density_second_derivs_scalar calculate_density_second_derivs_scalar [private/internal] mom_error_handler::mom_error MOM_error mom_eos::calculate_density_second_derivs_scalar->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_eos::calculate_density_second_derivs_scalar calls cluster_mom_eos MOM_EOS mom_eos::calculate_density_second_derivs_scalar calculate_density_second_derivs_scalar [private/internal] mom_eos::calculate_stanley_density_scalar calculate_stanley_density_scalar [private/internal] mom_eos::calculate_stanley_density_scalar->mom_eos::calculate_density_second_derivs_scalar
Text view
subroutine calculate_spec_vol_derivs_array(T, S, pressure, dSV_dT, dSV_dS, start, npts, EOS)

Calls the appropriate subroutine to calculate specific volume derivatives for an array.

Parameters
  • T [in]

    Potential temperature referenced to the surface [degC]

  • S [in]

    Salinity [ppt]

  • pressure [in]

    Pressure [Pa]

  • dSV_dT [inout]

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

  • dSV_dS [inout]

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

  • start [in]

    Starting index within the array

  • npts [in]

    The number of values to calculate

  • EOS [in]

    Equation of state structure

Callees call graph
Callees of mom_eos::calculate_spec_vol_derivs_array calls cluster_mom_eos MOM_EOS cluster_mom_error_handler MOM_error_handler mom_eos::calculate_spec_vol_derivs_array calculate_spec_vol_derivs_array [private/internal] mom_error_handler::mom_error MOM_error mom_eos::calculate_spec_vol_derivs_array->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_eos::calculate_spec_vol_derivs_array calls cluster_mom_eos MOM_EOS mom_eos::calc_spec_vol_derivs_1d calc_spec_vol_derivs_1d [private/internal] mom_eos::calculate_spec_vol_derivs_array calculate_spec_vol_derivs_array [private/internal] mom_eos::calc_spec_vol_derivs_1d->mom_eos::calculate_spec_vol_derivs_array
Text view
subroutine calc_spec_vol_derivs_1d(T, S, pressure, dSV_dT, dSV_dS, EOS, dom, scale)

Calls the appropriate subroutine to calculate specific volume derivatives for 1-d array inputs, potentially limiting the domain of indices that are worked on.

Parameters
  • T [in]

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

  • S [in]

    Salinity [S ~> ppt]

  • pressure [in]

    Pressure [R L2 T-2 ~> Pa]

  • dSV_dT [inout]

    The partial derivative of specific volume with potential temperature [R-1 C-1 ~> m3 kg-1 degC-1]

  • dSV_dS [inout]

    The partial derivative of specific volume with salinity [R-1 S-1 ~> m3 kg-1 ppt-1]

  • EOS [in]

    Equation of state structure

  • dom [in]

    The domain of indices to work on, taking into account that arrays start at 1.

  • scale [in]

    A multiplicative factor by which to scale specific volume in combination with scaling stored in EOS [various]

Callees call graph
Callees of mom_eos::calc_spec_vol_derivs_1d calls cluster_mom_eos MOM_EOS mom_eos::calc_spec_vol_derivs_1d calc_spec_vol_derivs_1d [private/internal] mom_eos::calculate_spec_vol_derivs_array calculate_spec_vol_derivs_array [private/internal] mom_eos::calc_spec_vol_derivs_1d->mom_eos::calculate_spec_vol_derivs_array
Text view
subroutine calculate_compress_1d(T, S, pressure, rho, drho_dp, EOS, dom)

Calls the appropriate subroutine to calculate the density and compressibility for 1-D array inputs. The inputs and outputs use dimensionally rescaled units.

Parameters
  • T [in]

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

  • S [in]

    Salinity [S ~> ppt]

  • pressure [in]

    Pressure [R L2 T-2 ~> Pa]

  • rho [inout]

    In situ density [R ~> kg m-3]

  • drho_dp [inout]

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

  • EOS [in]

    Equation of state structure

  • dom [in]

    The domain of indices to work on, taking into account that arrays start at 1.

Callees call graph
Callees of mom_eos::calculate_compress_1d calls cluster_mom_eos MOM_EOS cluster_mom_error_handler MOM_error_handler mom_eos::calculate_compress_1d calculate_compress_1d [private/internal] mom_error_handler::mom_error MOM_error mom_eos::calculate_compress_1d->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_eos::calculate_compress_1d calls cluster_mom_eos MOM_EOS mom_eos::calculate_compress_1d calculate_compress_1d [private/internal] mom_eos::calculate_compress_scalar calculate_compress_scalar [private/internal] mom_eos::calculate_compress_scalar->mom_eos::calculate_compress_1d
Text view
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_1d. The inputs and outputs use dimensionally rescaled units.

Parameters
  • T [in]

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

  • S [in]

    Salinity [S ~> ppt]

  • pressure [in]

    Pressure [R L2 T-2 ~> Pa]

  • rho [out]

    In situ density [R ~> kg m-3]

  • drho_dp [out]

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

  • EOS [in]

    Equation of state structure

Callees call graph
Callees of mom_eos::calculate_compress_scalar calls cluster_mom_eos MOM_EOS mom_eos::calculate_compress_1d calculate_compress_1d [private/internal] mom_eos::calculate_compress_scalar calculate_compress_scalar [private/internal] mom_eos::calculate_compress_scalar->mom_eos::calculate_compress_1d
Text view
subroutine average_specific_vol(T, S, p_t, dp, SpV_avg, EOS, dom, scale)

Calls the appropriate subroutine to calculate the layer averaged specific volume either using Boole's rule quadrature or analytical and nearly-analytical averages in pressure.

Parameters
  • 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]

  • dp [in]

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

  • SpV_avg [inout]

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

  • EOS [in]

    Equation of state structure

  • dom [in]

    The domain of indices to work on, taking into account that arrays start at 1.

  • scale [in]

    A multiplicative factor by which to scale output specific volume in combination with scaling stored in EOS [various]

Callees call graph
Callees of mom_eos::average_specific_vol calls cluster_mom_eos MOM_EOS cluster_mom_eos_linear MOM_EOS_linear cluster_mom_eos_wright MOM_EOS_Wright cluster_mom_eos_wright_full MOM_EOS_Wright_full cluster_mom_eos_wright_red MOM_EOS_Wright_red cluster_mom_error_handler MOM_error_handler mom_eos::average_specific_vol average_specific_vol mom_eos::interface::calculate_spec_vol calculate_spec_vol (interface) mom_eos::average_specific_vol->mom_eos::interface::calculate_spec_vol mom_eos_linear::avg_spec_vol_linear avg_spec_vol_linear mom_eos::average_specific_vol->mom_eos_linear::avg_spec_vol_linear mom_eos_wright::avg_spec_vol_buggy_wright avg_spec_vol_buggy_Wright mom_eos::average_specific_vol->mom_eos_wright::avg_spec_vol_buggy_wright mom_eos_wright_full::avg_spec_vol_wright_full avg_spec_vol_Wright_full mom_eos::average_specific_vol->mom_eos_wright_full::avg_spec_vol_wright_full mom_eos_wright_red::avg_spec_vol_wright_red avg_spec_vol_Wright_red mom_eos::average_specific_vol->mom_eos_wright_red::avg_spec_vol_wright_red mom_error_handler::mom_error MOM_error mom_eos::average_specific_vol->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_eos::average_specific_vol calls cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer cluster_mom_density_integrals MOM_density_integrals cluster_mom_eos MOM_EOS cluster_mom_interface_heights MOM_interface_heights mom_bulk_mixed_layer::bulkmixedlayer bulkmixedlayer mom_eos::average_specific_vol average_specific_vol mom_bulk_mixed_layer::bulkmixedlayer->mom_eos::average_specific_vol mom_density_integrals::avg_specific_vol avg_specific_vol mom_density_integrals::avg_specific_vol->mom_eos::average_specific_vol mom_eos::test_eos_consistency test_EOS_consistency [private/internal] mom_eos::test_eos_consistency->mom_eos::average_specific_vol mom_interface_heights::find_rho_bottom find_rho_bottom mom_interface_heights::find_rho_bottom->mom_eos::average_specific_vol
Text view
subroutine EoS_fit_range(EOS, T_min, T_max, S_min, S_max, p_min, p_max)

Return the range of temperatures, salinities and pressures for which the equation of state that is being used has been fitted to observations. Care should be taken when applying this equation of state outside of its fit range.

Parameters
  • EOS [in]

    Equation of state structure

  • T_min [out]

    The minimum temperature over which this EoS is fitted [degC]

  • T_max [out]

    The maximum temperature over which this EoS is fitted [degC]

  • S_min [out]

    The minimum salinity over which this EoS is fitted [ppt]

  • S_max [out]

    The maximum salinity over which this EoS is fitted [ppt]

  • p_min [out]

    The minimum pressure over which this EoS is fitted [Pa]

  • p_max [out]

    The maximum pressure over which this EoS is fitted [Pa]

Callees call graph
Callees of mom_eos::eos_fit_range calls cluster_mom_eos MOM_EOS cluster_mom_error_handler MOM_error_handler mom_eos::eos_fit_range EoS_fit_range mom_error_handler::mom_error MOM_error mom_eos::eos_fit_range->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_eos::eos_fit_range calls cluster_mom_eos MOM_EOS mom_eos::eos_fit_range EoS_fit_range mom_eos::test_eos_consistency test_EOS_consistency [private/internal] mom_eos::test_eos_consistency->mom_eos::eos_fit_range
Text view
function EOS_domain(HI, halo) result(EOSdom)

This subroutine returns a two point integer array indicating the domain of i-indices to work on in EOS calls based on information from a hor_index type

Parameters
  • HI [in]

    The horizontal index structure

  • halo [in]

    The halo size to work on; missing is equivalent to 0.

  • EOSdom

    The index domain that the EOS will work on, taking into account that the arrays inside the EOS routines will start at 1.

Callers call graph
Callers of mom_eos::eos_domain calls cluster_mom MOM cluster_mom_bulk_mixed_layer MOM_bulk_mixed_layer cluster_mom_density_integrals MOM_density_integrals cluster_mom_diabatic_aux MOM_diabatic_aux cluster_mom_diabatic_driver MOM_diabatic_driver cluster_mom_diagnose_mld MOM_diagnose_mld cluster_mom_diagnostics MOM_diagnostics cluster_mom_entrain_diffusive MOM_entrain_diffusive cluster_mom_eos MOM_EOS cluster_mom_forcing_type MOM_forcing_type cluster_mom_full_convection MOM_full_convection cluster_mom_geothermal MOM_geothermal cluster_mom_ice_shelf MOM_ice_shelf cluster_mom_int_tide_input MOM_int_tide_input cluster_mom_interface_heights MOM_interface_heights cluster_mom_isopycnal_slopes MOM_isopycnal_slopes cluster_mom_lateral_mixing_coeffs MOM_lateral_mixing_coeffs cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat cluster_mom_neutral_diffusion MOM_neutral_diffusion cluster_mom_pressureforce_fv MOM_PressureForce_FV cluster_mom_regularize_layers MOM_regularize_layers cluster_mom_set_diffusivity MOM_set_diffusivity cluster_mom_state_initialization MOM_state_initialization cluster_mom_thickness_diffuse MOM_thickness_diffuse cluster_mom_tracer_hor_diff MOM_tracer_hor_diff cluster_mom_tracer_z_init MOM_tracer_Z_init cluster_rgc_initialization RGC_initialization cluster_user_change_diffusivity user_change_diffusivity mom::adjust_ssh_for_p_atm adjust_ssh_for_p_atm [private/internal] mom_eos::eos_domain EOS_domain mom::adjust_ssh_for_p_atm->mom_eos::eos_domain mom_bulk_mixed_layer::bulkmixedlayer bulkmixedlayer mom_bulk_mixed_layer::bulkmixedlayer->mom_eos::eos_domain mom_density_integrals::avg_specific_vol avg_specific_vol mom_density_integrals::avg_specific_vol->mom_eos::eos_domain mom_diabatic_aux::applyboundaryfluxesinout applyBoundaryFluxesInOut mom_diabatic_aux::applyboundaryfluxesinout->mom_eos::eos_domain mom_diabatic_driver::diabatic_ale diabatic_ALE [private/internal] mom_diabatic_driver::diabatic_ale->mom_eos::eos_domain mom_diabatic_driver::diabatic_ale_legacy diabatic_ALE_legacy [private/internal] mom_diabatic_driver::diabatic_ale_legacy->mom_eos::eos_domain mom_diabatic_driver::layered_diabatic layered_diabatic [private/internal] mom_diabatic_driver::layered_diabatic->mom_eos::eos_domain mom_diagnose_mld::diagnosemldbydensitydifference diagnoseMLDbyDensityDifference mom_diagnose_mld::diagnosemldbydensitydifference->mom_eos::eos_domain mom_diagnose_mld::diagnosemldbyenergy diagnoseMLDbyEnergy mom_diagnose_mld::diagnosemldbyenergy->mom_eos::eos_domain mom_diagnostics::calculate_diagnostic_fields calculate_diagnostic_fields mom_diagnostics::calculate_diagnostic_fields->mom_eos::eos_domain mom_diagnostics::calculate_vertical_integrals calculate_vertical_integrals [private/internal] mom_diagnostics::calculate_vertical_integrals->mom_eos::eos_domain mom_diagnostics::post_surface_thermo_diags post_surface_thermo_diags mom_diagnostics::post_surface_thermo_diags->mom_eos::eos_domain mom_entrain_diffusive::entrainment_diffusive entrainment_diffusive mom_entrain_diffusive::entrainment_diffusive->mom_eos::eos_domain mom_entrain_diffusive::set_ent_bl set_Ent_bl [private/internal] mom_entrain_diffusive::set_ent_bl->mom_eos::eos_domain mom_forcing_type::calculatebuoyancyflux1d calculateBuoyancyFlux1d mom_forcing_type::calculatebuoyancyflux1d->mom_eos::eos_domain mom_full_convection::smoothed_drdt_drds smoothed_dRdT_dRdS [private/internal] mom_full_convection::smoothed_drdt_drds->mom_eos::eos_domain mom_geothermal::geothermal_in_place geothermal_in_place mom_geothermal::geothermal_in_place->mom_eos::eos_domain mom_ice_shelf::shelf_calc_flux shelf_calc_flux mom_ice_shelf::shelf_calc_flux->mom_eos::eos_domain mom_int_tide_input::find_n2_bottom find_N2_bottom [private/internal] mom_int_tide_input::find_n2_bottom->mom_eos::eos_domain mom_interface_heights::dz_to_thickness_eos dz_to_thickness_EOS [private/internal] mom_interface_heights::dz_to_thickness_eos->mom_eos::eos_domain mom_interface_heights::find_rho_bottom find_rho_bottom mom_interface_heights::find_rho_bottom->mom_eos::eos_domain mom_isopycnal_slopes::calc_isoneutral_slopes calc_isoneutral_slopes mom_isopycnal_slopes::calc_isoneutral_slopes->mom_eos::eos_domain mom_lateral_mixing_coeffs::calc_sqg_struct calc_sqg_struct mom_lateral_mixing_coeffs::calc_sqg_struct->mom_eos::eos_domain mom_mixed_layer_restrat::detect_mld detect_mld [private/internal] mom_mixed_layer_restrat::detect_mld->mom_eos::eos_domain mom_mixed_layer_restrat::mixedlayer_restrat_bml mixedlayer_restrat_BML [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_bml->mom_eos::eos_domain mom_mixed_layer_restrat::mixedlayer_restrat_bodner mixedlayer_restrat_Bodner [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_bodner->mom_eos::eos_domain mom_mixed_layer_restrat::mixedlayer_restrat_om4 mixedlayer_restrat_OM4 [private/internal] mom_mixed_layer_restrat::mixedlayer_restrat_om4->mom_eos::eos_domain mom_neutral_diffusion::neutral_diffusion_calc_coeffs neutral_diffusion_calc_coeffs mom_neutral_diffusion::neutral_diffusion_calc_coeffs->mom_eos::eos_domain mom_pressureforce_fv::pressureforce_fv_bouss PressureForce_FV_Bouss mom_pressureforce_fv::pressureforce_fv_bouss->mom_eos::eos_domain mom_regularize_layers::regularize_surface regularize_surface [private/internal] mom_regularize_layers::regularize_surface->mom_eos::eos_domain mom_set_diffusivity::double_diffusion double_diffusion [private/internal] mom_set_diffusivity::double_diffusion->mom_eos::eos_domain mom_set_diffusivity::find_n2 find_N2 [private/internal] mom_set_diffusivity::find_n2->mom_eos::eos_domain mom_set_diffusivity::find_tke_to_kd find_TKE_to_Kd [private/internal] mom_set_diffusivity::find_tke_to_kd->mom_eos::eos_domain mom_set_diffusivity::set_density_ratios set_density_ratios [private/internal] mom_set_diffusivity::set_density_ratios->mom_eos::eos_domain mom_state_initialization::initialize_sponges_file initialize_sponges_file [private/internal] mom_state_initialization::initialize_sponges_file->mom_eos::eos_domain mom_state_initialization::mom_temp_salt_initialize_from_z MOM_temp_salt_initialize_from_Z [private/internal] mom_state_initialization::mom_temp_salt_initialize_from_z->mom_eos::eos_domain mom_thickness_diffuse::thickness_diffuse_full thickness_diffuse_full [private/internal] mom_thickness_diffuse::thickness_diffuse_full->mom_eos::eos_domain mom_tracer_hor_diff::tracer_epipycnal_ml_diff tracer_epipycnal_ML_diff [private/internal] mom_tracer_hor_diff::tracer_epipycnal_ml_diff->mom_eos::eos_domain mom_tracer_z_init::determine_temperature determine_temperature mom_tracer_z_init::determine_temperature->mom_eos::eos_domain rgc_initialization::rgc_initialize_sponges RGC_initialize_sponges rgc_initialization::rgc_initialize_sponges->mom_eos::eos_domain user_change_diffusivity::user_change_diff user_change_diff user_change_diffusivity::user_change_diff->mom_eos::eos_domain
Text view
subroutine analytic_int_specific_vol_dp(T, S, p_t, p_b, alpha_ref, HI, EOS, dza, intp_dza, intx_dza, inty_dza, halo_size, bathyP, P_surf, dP_tiny, MassWghtInterp)

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

  • 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 miniscule 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

Callees call graph
Callees of mom_eos::analytic_int_specific_vol_dp calls cluster_mom_eos MOM_EOS cluster_mom_eos_linear MOM_EOS_linear cluster_mom_eos_wright MOM_EOS_Wright cluster_mom_eos_wright_full MOM_EOS_Wright_full cluster_mom_eos_wright_red MOM_EOS_Wright_red cluster_mom_error_handler MOM_error_handler mom_eos::analytic_int_specific_vol_dp analytic_int_specific_vol_dp mom_eos_linear::int_spec_vol_dp_linear int_spec_vol_dp_linear mom_eos::analytic_int_specific_vol_dp->mom_eos_linear::int_spec_vol_dp_linear mom_eos_wright::int_spec_vol_dp_wright int_spec_vol_dp_wright mom_eos::analytic_int_specific_vol_dp->mom_eos_wright::int_spec_vol_dp_wright mom_eos_wright_full::int_spec_vol_dp_wright_full int_spec_vol_dp_wright_full mom_eos::analytic_int_specific_vol_dp->mom_eos_wright_full::int_spec_vol_dp_wright_full mom_eos_wright_red::int_spec_vol_dp_wright_red int_spec_vol_dp_wright_red mom_eos::analytic_int_specific_vol_dp->mom_eos_wright_red::int_spec_vol_dp_wright_red mom_error_handler::mom_error MOM_error mom_eos::analytic_int_specific_vol_dp->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_eos::analytic_int_specific_vol_dp calls cluster_mom_density_integrals MOM_density_integrals cluster_mom_eos MOM_EOS mom_density_integrals::int_specific_vol_dp int_specific_vol_dp 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
Text view
subroutine analytic_int_density_dz(T, S, z_t, z_b, rho_ref, rho_0, G_e, HI, EOS, dpa, intz_dpa, intx_dpa, inty_dpa, bathyT, SSH, dz_neglect, MassWghtInterp, Z_0p)

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
  • HI [in]

    Ocean horizontal index structure

  • 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

  • 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 miniscule thickness change [Z ~> m]

  • MassWghtInterp [in]

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

  • Z_0p [in]

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

Callees call graph
Callees of mom_eos::analytic_int_density_dz calls cluster_mom_eos MOM_EOS cluster_mom_eos_linear MOM_EOS_linear cluster_mom_eos_wright MOM_EOS_Wright cluster_mom_eos_wright_full MOM_EOS_Wright_full cluster_mom_eos_wright_red MOM_EOS_Wright_red cluster_mom_error_handler MOM_error_handler mom_eos::analytic_int_density_dz analytic_int_density_dz mom_eos_linear::int_density_dz_linear int_density_dz_linear mom_eos::analytic_int_density_dz->mom_eos_linear::int_density_dz_linear mom_eos_wright::int_density_dz_wright int_density_dz_wright mom_eos::analytic_int_density_dz->mom_eos_wright::int_density_dz_wright mom_eos_wright_full::int_density_dz_wright_full int_density_dz_wright_full mom_eos::analytic_int_density_dz->mom_eos_wright_full::int_density_dz_wright_full mom_eos_wright_red::int_density_dz_wright_red int_density_dz_wright_red mom_eos::analytic_int_density_dz->mom_eos_wright_red::int_density_dz_wright_red mom_error_handler::mom_error MOM_error mom_eos::analytic_int_density_dz->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_eos::analytic_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_eos::analytic_int_density_dz analytic_int_density_dz mom_density_integrals::int_density_dz->mom_eos::analytic_int_density_dz
Text view
logical function query_compressible(EOS)

Returns true if the equation of state is compressible (i.e. has pressure dependence)

Parameters
  • EOS [in]

    Equation of state structure

Callers call graph
Callers of mom_eos::query_compressible calls cluster_mom_eos MOM_EOS cluster_mom_pressureforce_mont MOM_PressureForce_Mont mom_eos::query_compressible query_compressible mom_pressureforce_mont::pressureforce_mont_bouss PressureForce_Mont_Bouss mom_pressureforce_mont::pressureforce_mont_bouss->mom_eos::query_compressible mom_pressureforce_mont::pressureforce_mont_nonbouss PressureForce_Mont_nonBouss mom_pressureforce_mont::pressureforce_mont_nonbouss->mom_eos::query_compressible
Text view
function get_EOS_name(id) result(eos_name)

Returns the string identifying the equation of state with enumeration "id"

Parameters
  • id [in]

    Enumerated ID

  • eos_name

    The name of the EOS

Callees call graph
Callees of mom_eos::get_eos_name calls cluster_mom_eos MOM_EOS cluster_mom_error_handler MOM_error_handler mom_eos::get_eos_name get_EOS_name mom_error_handler::mom_error MOM_error mom_eos::get_eos_name->mom_error_handler::mom_error
Text view
subroutine EOS_init(param_file, EOS, US, use_conT_absS)

Initializes EOS_type by allocating and reading parameters. The scaling factors in US are stored in EOS for later use.

Parameters
  • param_file [in]

    Parameter file structure

  • EOS [inout]

    Equation of state structure

  • US [in]

    A dimensional unit scaling type

  • use_conT_absS [in]

    True if the model is formulated for conservative temp and absolute salinity

Callees call graph
Callees of mom_eos::eos_init calls cluster_mom_eos MOM_EOS cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_string_functions MOM_string_functions mom_eos::eos_init EOS_init mom_eos::eos_manual_init EOS_manual_init mom_eos::eos_init->mom_eos::eos_manual_init mom_error_handler::mom_error MOM_error mom_eos::eos_init->mom_error_handler::mom_error mom_error_handler::mom_mesg MOM_mesg mom_eos::eos_init->mom_error_handler::mom_mesg mom_file_parser::interface::get_param get_param (interface) mom_eos::eos_init->mom_file_parser::interface::get_param mom_file_parser::interface::log_version log_version (interface) mom_eos::eos_init->mom_file_parser::interface::log_version mom_string_functions::uppercase uppercase mom_eos::eos_init->mom_string_functions::uppercase
Text view
Callers call graph
Callers of mom_eos::eos_init calls cluster_mom MOM cluster_mom_eos MOM_EOS cluster_mom_ice_shelf MOM_ice_shelf mom::initialize_mom initialize_MOM mom_eos::eos_init EOS_init mom::initialize_mom->mom_eos::eos_init mom_ice_shelf::initialize_ice_shelf initialize_ice_shelf mom_ice_shelf::initialize_ice_shelf->mom_eos::eos_init
Text view
subroutine EOS_manual_init(EOS, form_of_EOS, form_of_TFreeze, EOS_quadrature, Compressible, Rho_T0_S0, drho_dT, dRho_dS, dRho_dp, TFr_S0_P0, dTFr_dS, dTFr_dp, use_Wright_2nd_deriv_bug)

Manually initialized an EOS type (intended for unit testing of routines which need a specific EOS)

Parameters
  • EOS [inout]

    Equation of state structure

  • form_of_EOS [in]

    A coded integer indicating the equation of state to use.

  • form_of_TFreeze [in]

    A coded integer indicating the expression for the potential temperature of the freezing point.

  • EOS_quadrature [in]

    If true, always use the generic (quadrature) code for the integrals of density.

  • Compressible [in]

    If true, in situ density is a function of pressure.

  • Rho_T0_S0 [in]

    Density at T=0 degC and S=0 ppt [kg m-3]

  • drho_dT [in]

    Partial derivative of density with temperature in [kg m-3 degC-1]

  • dRho_dS [in]

    Partial derivative of density with salinity in [kg m-3 ppt-1]

  • dRho_dp [in]

    Partial derivative of density with pressure in [s2 m-2]

  • TFr_S0_P0 [in]

    The freezing potential temperature at S=0, P=0 [degC]

  • dTFr_dS [in]

    The derivative of freezing point with salinity in [degC ppt-1]

  • dTFr_dp [in]

    The derivative of freezing point with pressure in [degC Pa-1]

  • use_Wright_2nd_deriv_bug [in]

    Allow the Wright 2nd deriv bug

Callers call graph
Callers of mom_eos::eos_manual_init calls cluster_mom_eos MOM_EOS cluster_mom_neutral_diffusion MOM_neutral_diffusion mom_eos::eos_init EOS_init mom_eos::eos_manual_init EOS_manual_init mom_eos::eos_init->mom_eos::eos_manual_init mom_eos::eos_unit_tests EOS_unit_tests mom_eos::eos_unit_tests->mom_eos::eos_manual_init mom_eos::test_eos_consistency test_EOS_consistency [private/internal] mom_eos::test_eos_consistency->mom_eos::eos_manual_init mom_neutral_diffusion::ndiff_unit_tests_discontinuous ndiff_unit_tests_discontinuous [private/internal] mom_neutral_diffusion::ndiff_unit_tests_discontinuous->mom_eos::eos_manual_init
Text view
subroutine convert_temp_salt_for_TEOS10(T, S, HI, kd, mask_z, EOS)

Convert T&S to Absolute Salinity and Conservative Temperature if using TEOS10

Parameters
  • kd [in]

    The number of layers to work on

  • HI [in]

    The horizontal index structure

  • T [inout]

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

  • S [inout]

    Salinity [S ~> ppt]

  • mask_z [in]

    3d mask regulating which points to convert [nondim]

  • EOS [in]

    Equation of state structure

Callees call graph
Callees of mom_eos::convert_temp_salt_for_teos10 calls cluster_mom_eos MOM_EOS cluster_mom_temperature_convert MOM_temperature_convert mom_eos::convert_temp_salt_for_teos10 convert_temp_salt_for_TEOS10 mom_temperature_convert::potemp_to_constemp poTemp_to_consTemp mom_eos::convert_temp_salt_for_teos10->mom_temperature_convert::potemp_to_constemp
Text view
Callers call graph
Callers of mom_eos::convert_temp_salt_for_teos10 calls cluster_mom_eos MOM_EOS cluster_mom_state_initialization MOM_state_initialization mom_eos::convert_temp_salt_for_teos10 convert_temp_salt_for_TEOS10 mom_state_initialization::mom_temp_salt_initialize_from_z MOM_temp_salt_initialize_from_Z [private/internal] mom_state_initialization::mom_temp_salt_initialize_from_z->mom_eos::convert_temp_salt_for_teos10
Text view
subroutine cons_temp_to_pot_temp(T, S, poTemp, EOS, dom, scale)

Converts an array of conservative temperatures to potential temperatures. The input arguments use the dimensionally rescaling as specified within the EOS type. The output potential temperature uses this same scaling, but this can be replaced by the factor given by scale.

Parameters
  • T [in]

    Conservative temperature [C ~> degC]

  • S [in]

    Absolute salinity [S ~> ppt]

  • poTemp [inout]

    The potential temperature with a reference pressure of 0 Pa, [C ~> degC]

  • EOS [in]

    Equation of state structure

  • dom [in]

    The domain of indices to work on, taking into account that arrays start at 1.

  • scale [in]

    A multiplicative factor by which to scale the output potential temperature in place of with scaling stored in EOS. A value of 1.0 returns temperatures in [degC], while the default is equivalent to EOS%degC_to_C.

Callees call graph
Callees of mom_eos::cons_temp_to_pot_temp calls cluster_mom_eos MOM_EOS cluster_mom_temperature_convert MOM_temperature_convert mom_eos::cons_temp_to_pot_temp cons_temp_to_pot_temp mom_temperature_convert::constemp_to_potemp consTemp_to_poTemp mom_eos::cons_temp_to_pot_temp->mom_temperature_convert::constemp_to_potemp
Text view
Callers call graph
Callers of mom_eos::cons_temp_to_pot_temp calls cluster_mom_diagnostics MOM_diagnostics cluster_mom_eos MOM_EOS mom_diagnostics::calculate_diagnostic_fields calculate_diagnostic_fields mom_eos::cons_temp_to_pot_temp cons_temp_to_pot_temp mom_diagnostics::calculate_diagnostic_fields->mom_eos::cons_temp_to_pot_temp mom_diagnostics::calculate_vertical_integrals calculate_vertical_integrals [private/internal] mom_diagnostics::calculate_vertical_integrals->mom_eos::cons_temp_to_pot_temp mom_diagnostics::post_surface_thermo_diags post_surface_thermo_diags mom_diagnostics::post_surface_thermo_diags->mom_eos::cons_temp_to_pot_temp mom_eos::test_ts_conversion_consistency test_TS_conversion_consistency [private/internal] mom_eos::test_ts_conversion_consistency->mom_eos::cons_temp_to_pot_temp
Text view
subroutine pot_temp_to_cons_temp(T, S, consTemp, EOS, dom, scale)

Converts an array of potential temperatures to conservative temperatures. The input arguments use the dimensionally rescaling as specified within the EOS type. The output potential temperature uses this same scaling, but this can be replaced by the factor given by scale.

Parameters
  • T [in]

    Potential temperature [C ~> degC]

  • S [in]

    Absolute salinity [S ~> ppt]

  • consTemp [inout]

    The conservative temperature [C ~> degC]

  • EOS [in]

    Equation of state structure

  • dom [in]

    The domain of indices to work on, taking into account that arrays start at 1.

  • scale [in]

    A multiplicative factor by which to scale the output potential temperature in place of with scaling stored in EOS. A value of 1.0 returns temperatures in [degC], while the default is equivalent to EOS%degC_to_C.

Callees call graph
Callees of mom_eos::pot_temp_to_cons_temp calls cluster_mom_eos MOM_EOS cluster_mom_temperature_convert MOM_temperature_convert mom_eos::pot_temp_to_cons_temp pot_temp_to_cons_temp mom_temperature_convert::potemp_to_constemp poTemp_to_consTemp mom_eos::pot_temp_to_cons_temp->mom_temperature_convert::potemp_to_constemp
Text view
Callers call graph
Callers of mom_eos::pot_temp_to_cons_temp calls cluster_mom_diagnostics MOM_diagnostics cluster_mom_eos MOM_EOS mom_diagnostics::calculate_vertical_integrals calculate_vertical_integrals [private/internal] mom_eos::pot_temp_to_cons_temp pot_temp_to_cons_temp mom_diagnostics::calculate_vertical_integrals->mom_eos::pot_temp_to_cons_temp mom_eos::test_ts_conversion_consistency test_TS_conversion_consistency [private/internal] mom_eos::test_ts_conversion_consistency->mom_eos::pot_temp_to_cons_temp
Text view
subroutine abs_saln_to_prac_saln(S, prSaln, EOS, dom, scale)

Converts an array of absolute salinity to practical salinity. The input arguments use the dimensionally rescaling as specified within the EOS type. The output potential temperature uses this same scaling, but this can be replaced by the factor given by scale.

Parameters
  • S [in]

    Absolute salinity [S ~> ppt]

  • prSaln [inout]

    Practical salinity [S ~> PSU]

  • EOS [in]

    Equation of state structure

  • dom [in]

    The domain of indices to work on, taking into account that arrays start at 1.

  • scale [in]

    A multiplicative factor by which to scale the output practical salinities in place of with scaling stored in EOS. A value of 1.0 returns salinities in [PSU], while the default is equivalent to EOS%ppt_to_S.

Callers call graph
Callers of mom_eos::abs_saln_to_prac_saln calls cluster_mom_diagnostics MOM_diagnostics cluster_mom_eos MOM_EOS mom_diagnostics::calculate_diagnostic_fields calculate_diagnostic_fields mom_eos::abs_saln_to_prac_saln abs_saln_to_prac_saln mom_diagnostics::calculate_diagnostic_fields->mom_eos::abs_saln_to_prac_saln mom_diagnostics::calculate_vertical_integrals calculate_vertical_integrals [private/internal] mom_diagnostics::calculate_vertical_integrals->mom_eos::abs_saln_to_prac_saln mom_diagnostics::post_surface_thermo_diags post_surface_thermo_diags mom_diagnostics::post_surface_thermo_diags->mom_eos::abs_saln_to_prac_saln mom_eos::test_ts_conversion_consistency test_TS_conversion_consistency [private/internal] mom_eos::test_ts_conversion_consistency->mom_eos::abs_saln_to_prac_saln
Text view
subroutine prac_saln_to_abs_saln(S, absSaln, EOS, dom, scale)

Converts an array of absolute salinity to practical salinity. The input arguments use the dimensionally rescaling as specified within the EOS type. The output potential temperature uses this same scaling, but this can be replaced by the factor given by scale.

Parameters
  • S [in]

    Practical salinity [S ~> PSU]

  • absSaln [inout]

    Absolute salinity [S ~> ppt]

  • EOS [in]

    Equation of state structure

  • dom [in]

    The domain of indices to work on, taking into account that arrays start at 1.

  • scale [in]

    A multiplicative factor by which to scale the output absolute salnities in place of with scaling stored in EOS. A value of 1.0 returns salinities in [ppt], while the default is equivalent to EOS%ppt_to_S.

Callers call graph
Callers of mom_eos::prac_saln_to_abs_saln calls cluster_mom_diagnostics MOM_diagnostics cluster_mom_eos MOM_EOS mom_diagnostics::calculate_vertical_integrals calculate_vertical_integrals [private/internal] mom_eos::prac_saln_to_abs_saln prac_saln_to_abs_saln mom_diagnostics::calculate_vertical_integrals->mom_eos::prac_saln_to_abs_saln mom_eos::test_ts_conversion_consistency test_TS_conversion_consistency [private/internal] mom_eos::test_ts_conversion_consistency->mom_eos::prac_saln_to_abs_saln
Text view
logical function EOS_quadrature(EOS)

Return value of EOS_quadrature

Parameters
  • EOS [in]

    Equation of state structure

Callers call graph
Callers of mom_eos::eos_quadrature calls cluster_mom_density_integrals MOM_density_integrals cluster_mom_eos MOM_EOS mom_density_integrals::int_density_dz int_density_dz mom_eos::eos_quadrature EOS_quadrature mom_density_integrals::int_density_dz->mom_eos::eos_quadrature mom_density_integrals::int_specific_vol_dp int_specific_vol_dp mom_density_integrals::int_specific_vol_dp->mom_eos::eos_quadrature
Text view
logical function EOS_unit_tests(verbose)

Runs unit tests for consistency on the equations of state. This should only be called from a single/root thread. It returns True if any test fails, otherwise it returns False.

Parameters
  • verbose [in]

    If true, write results to stdout

Callees call graph
Callees of mom_eos::eos_unit_tests calls cluster_mom_eos MOM_EOS cluster_mom_error_handler MOM_error_handler mom_eos::eos_manual_init EOS_manual_init mom_eos::eos_unit_tests EOS_unit_tests mom_eos::eos_unit_tests->mom_eos::eos_manual_init mom_eos::test_eos_consistency test_EOS_consistency [private/internal] mom_eos::eos_unit_tests->mom_eos::test_eos_consistency mom_eos::test_tfr_consistency test_TFr_consistency [private/internal] mom_eos::eos_unit_tests->mom_eos::test_tfr_consistency mom_eos::test_ts_conversion_consistency test_TS_conversion_consistency [private/internal] mom_eos::eos_unit_tests->mom_eos::test_ts_conversion_consistency mom_error_handler::mom_error MOM_error mom_eos::eos_unit_tests->mom_error_handler::mom_error mom_error_handler::mom_mesg MOM_mesg mom_eos::eos_unit_tests->mom_error_handler::mom_mesg
Text view
Callers call graph
Callers of mom_eos::eos_unit_tests calls cluster_mom_eos MOM_EOS cluster_mom_unit_tests MOM_unit_tests mom_eos::eos_unit_tests EOS_unit_tests mom_unit_tests::unit_tests unit_tests mom_unit_tests::unit_tests->mom_eos::eos_unit_tests
Text view

logical function test_TS_conversion_consistency(T_cons, S_abs, T_pot, S_prac, EOS, verbose) result(inconsistent)

Parameters
  • T_cons [in]

    Conservative temperature [degC]

  • S_abs [in]

    Absolute salinity [g kg-1]

  • T_pot [in]

    Potential temperature [degC]

  • S_prac [in]

    Practical salinity [PSU]

  • EOS [in]

    Equation of state structure

  • verbose [in]

    If true, write results to stdout

Callees call graph
Callees of mom_eos::test_ts_conversion_consistency calls cluster_mom_eos MOM_EOS mom_eos::abs_saln_to_prac_saln abs_saln_to_prac_saln mom_eos::cons_temp_to_pot_temp cons_temp_to_pot_temp mom_eos::pot_temp_to_cons_temp pot_temp_to_cons_temp mom_eos::prac_saln_to_abs_saln prac_saln_to_abs_saln mom_eos::test_ts_conversion_consistency test_TS_conversion_consistency [private/internal] mom_eos::test_ts_conversion_consistency->mom_eos::abs_saln_to_prac_saln mom_eos::test_ts_conversion_consistency->mom_eos::cons_temp_to_pot_temp mom_eos::test_ts_conversion_consistency->mom_eos::pot_temp_to_cons_temp mom_eos::test_ts_conversion_consistency->mom_eos::prac_saln_to_abs_saln mom_eos::write_check_msg write_check_msg [private/internal] mom_eos::test_ts_conversion_consistency->mom_eos::write_check_msg
Text view
Callers call graph
Callers of mom_eos::test_ts_conversion_consistency calls cluster_mom_eos MOM_EOS mom_eos::eos_unit_tests EOS_unit_tests mom_eos::test_ts_conversion_consistency test_TS_conversion_consistency [private/internal] mom_eos::eos_unit_tests->mom_eos::test_ts_conversion_consistency
Text view

logical function test_TFr_consistency(S_test, p_test, EOS, verbose, EOS_name, TFr_check) result(inconsistent)

Parameters
  • S_test [in]

    Salinity or absolute salinity [S ~> ppt]

  • p_test [in]

    Pressure [R L2 T-2 ~> Pa]

  • EOS [in]

    Equation of state structure

  • verbose [in]

    If true, write results to stdout

  • EOS_name [in]

    A name used in error messages to describe the EoS

  • TFr_check [in]

    A check value for the Freezing point [C ~> degC]

Callees call graph
Callees of mom_eos::test_tfr_consistency calls cluster_mom_eos MOM_EOS mom_eos::interface::calculate_tfreeze calculate_TFreeze (interface) mom_eos::test_tfr_consistency test_TFr_consistency [private/internal] mom_eos::test_tfr_consistency->mom_eos::interface::calculate_tfreeze mom_eos::write_check_msg write_check_msg [private/internal] mom_eos::test_tfr_consistency->mom_eos::write_check_msg
Text view
Callers call graph
Callers of mom_eos::test_tfr_consistency calls cluster_mom_eos MOM_EOS mom_eos::eos_unit_tests EOS_unit_tests mom_eos::test_tfr_consistency test_TFr_consistency [private/internal] mom_eos::eos_unit_tests->mom_eos::test_tfr_consistency
Text view
subroutine write_check_msg(var_name, val, val_chk, val_tol, test_OK)

Write a message indicating how well a value matches its check value.

Parameters
  • var_name [in]

    The name of the variable being tested.

  • val [in]

    The value being checked [various]

  • val_chk [in]

    The value being checked [various]

  • val_tol [in]

    The value being checked [various]

  • test_OK [in]

    True if the values are within their tolerance

Callers call graph
Callers of mom_eos::write_check_msg calls cluster_mom_eos MOM_EOS mom_eos::test_eos_consistency test_EOS_consistency [private/internal] mom_eos::write_check_msg write_check_msg [private/internal] mom_eos::test_eos_consistency->mom_eos::write_check_msg mom_eos::test_tfr_consistency test_TFr_consistency [private/internal] mom_eos::test_tfr_consistency->mom_eos::write_check_msg mom_eos::test_ts_conversion_consistency test_TS_conversion_consistency [private/internal] mom_eos::test_ts_conversion_consistency->mom_eos::write_check_msg
Text view
logical function test_EOS_consistency(T_test, S_test, p_test, EOS, verbose, EOS_name, rho_check, spv_check, skip_2nd, avg_Sv_check) result(inconsistent)

Test an equation of state for self-consistency and consistency with check values, returning false if it is consistent by all tests, and true if it fails any test.

Parameters
  • T_test [in]

    Potential temperature or conservative temperature [C ~> degC]

  • S_test [in]

    Salinity or absolute salinity [S ~> ppt]

  • p_test [in]

    Pressure [R L2 T-2 ~> Pa]

  • EOS [in]

    Equation of state structure

  • verbose [in]

    If true, write results to stdout

  • EOS_name [in]

    A name used in error messages to describe the EoS

  • rho_check [in]

    A check value for the density [R ~> kg m-3]

  • spv_check [in]

    A check value for the specific volume [R-1 ~> m3 kg-1]

  • skip_2nd [in]

    If present and true, do not check the 2nd derivatives.

  • avg_Sv_check [in]

    If present and true, compare analytical and numerical quadrature estimates of the layer-averaged specific volume.

Callees call graph
Callees of mom_eos::test_eos_consistency calls cluster_mom_eos MOM_EOS cluster_mom_error_handler MOM_error_handler mom_eos::average_specific_vol average_specific_vol mom_eos::eos_fit_range EoS_fit_range mom_eos::eos_manual_init EOS_manual_init mom_eos::interface::calculate_compress calculate_compress (interface) mom_eos::interface::calculate_density calculate_density (interface) mom_eos::interface::calculate_density_derivs calculate_density_derivs (interface) mom_eos::interface::calculate_density_second_derivs calculate_density_second_derivs (interface) mom_eos::interface::calculate_spec_vol calculate_spec_vol (interface) mom_eos::interface::calculate_specific_vol_derivs calculate_specific_vol_derivs (interface) mom_eos::test_eos_consistency test_EOS_consistency [private/internal] mom_eos::test_eos_consistency->mom_eos::average_specific_vol mom_eos::test_eos_consistency->mom_eos::eos_fit_range mom_eos::test_eos_consistency->mom_eos::eos_manual_init mom_eos::test_eos_consistency->mom_eos::interface::calculate_compress mom_eos::test_eos_consistency->mom_eos::interface::calculate_density mom_eos::test_eos_consistency->mom_eos::interface::calculate_density_derivs mom_eos::test_eos_consistency->mom_eos::interface::calculate_density_second_derivs mom_eos::test_eos_consistency->mom_eos::interface::calculate_spec_vol mom_eos::test_eos_consistency->mom_eos::interface::calculate_specific_vol_derivs mom_eos::test_eos_consistency::check_fd test_eos_consistency check_FD [private/internal] mom_eos::test_eos_consistency->mom_eos::test_eos_consistency::check_fd mom_eos::test_eos_consistency::derivs_2d test_eos_consistency derivs_2d [private/internal] mom_eos::test_eos_consistency->mom_eos::test_eos_consistency::derivs_2d mom_eos::test_eos_consistency::first_deriv test_eos_consistency first_deriv [private/internal] mom_eos::test_eos_consistency->mom_eos::test_eos_consistency::first_deriv mom_eos::test_eos_consistency::second_deriv test_eos_consistency second_deriv [private/internal] mom_eos::test_eos_consistency->mom_eos::test_eos_consistency::second_deriv mom_eos::write_check_msg write_check_msg [private/internal] mom_eos::test_eos_consistency->mom_eos::write_check_msg mom_error_handler::mom_error MOM_error mom_eos::test_eos_consistency->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_eos::test_eos_consistency calls cluster_mom_eos MOM_EOS mom_eos::eos_unit_tests EOS_unit_tests mom_eos::test_eos_consistency test_EOS_consistency [private/internal] mom_eos::eos_unit_tests->mom_eos::test_eos_consistency
Text view
real function first_deriv(R, dx, order)

Return a finite difference estimate of the first derivative of a field in arbitrary units [A B-1]

Parameters
  • R [in]

    The field whose derivative is being taken, in arbitrary units [A]

  • dx [in]

    The spacing in parameter space, in different arbitrary units [B]

  • order [in]

    The order of accuracy of the centered finite difference estimates (2, 4 or 6)

Callers call graph
Callers of mom_eos::test_eos_consistency::first_deriv calls cluster_mom_eos MOM_EOS mom_eos::test_eos_consistency test_EOS_consistency [private/internal] mom_eos::test_eos_consistency::first_deriv test_eos_consistency first_deriv [private/internal] mom_eos::test_eos_consistency->mom_eos::test_eos_consistency::first_deriv mom_eos::test_eos_consistency::derivs_2d test_eos_consistency derivs_2d [private/internal] mom_eos::test_eos_consistency::derivs_2d->mom_eos::test_eos_consistency::first_deriv
Text view
real function second_deriv(R, dx, order)

Return a finite difference estimate of the second derivative of a field in arbitrary units [A B-2]

Parameters
  • R [in]

    The field whose derivative is being taken, in arbitrary units [A]

  • dx [in]

    The spacing in parameter space, in different arbitrary units [B]

  • order [in]

    The order of accuracy of the centered finite difference estimates (2, 4 or 6)

Callers call graph
Callers of mom_eos::test_eos_consistency::second_deriv calls cluster_mom_eos MOM_EOS mom_eos::test_eos_consistency test_EOS_consistency [private/internal] mom_eos::test_eos_consistency::second_deriv test_eos_consistency second_deriv [private/internal] mom_eos::test_eos_consistency->mom_eos::test_eos_consistency::second_deriv
Text view
real function derivs_2d(R, dxdy, order)

Return a finite difference estimate of the second derivative with respect to two different parameters of a field in arbitrary units [A B-1 C-1]

Parameters
  • R [in]

    The field whose derivative is being taken in arbitrary units [A]

  • dxdy [in]

    The spacing in two directions in parameter space in different arbitrary units [B C]

  • order [in]

    The order of accuracy of the centered finite difference estimates (2, 4 or 6)

Callees call graph
Callees of mom_eos::test_eos_consistency::derivs_2d calls cluster_mom_eos MOM_EOS mom_eos::test_eos_consistency::derivs_2d test_eos_consistency derivs_2d [private/internal] mom_eos::test_eos_consistency::first_deriv test_eos_consistency first_deriv [private/internal] mom_eos::test_eos_consistency::derivs_2d->mom_eos::test_eos_consistency::first_deriv
Text view
Callers call graph
Callers of mom_eos::test_eos_consistency::derivs_2d calls cluster_mom_eos MOM_EOS mom_eos::test_eos_consistency test_EOS_consistency [private/internal] mom_eos::test_eos_consistency::derivs_2d test_eos_consistency derivs_2d [private/internal] mom_eos::test_eos_consistency->mom_eos::test_eos_consistency::derivs_2d
Text view
logical function check_FD(val, val_fd, tol, verbose, field_name, order)

Check for the rate of convergence expected with a finite difference discretization with a 20% margin of error and a tolerance for contributions from roundoff.

Parameters
  • val [in]

    The derivative being checked, in arbitrary units [arbitrary]

  • val_fd [in]

    Two finite difference estimates of val taken with a spacing in parameter space and twice this spacing, in the same arbitrary units as val [arbitrary]

  • tol [in]

    An estimated fractional tolerance due to roundoff [arbitrary]

  • verbose [in]

    If true, write results to stdout

  • field_name [in]

    A name used to describe the field in error messages

  • order [in]

    The order of accuracy of the centered finite difference estimates (2, 4 or 6)

Callers call graph
Callers of mom_eos::test_eos_consistency::check_fd calls cluster_mom_eos MOM_EOS mom_eos::test_eos_consistency test_EOS_consistency [private/internal] mom_eos::test_eos_consistency::check_fd test_eos_consistency check_FD [private/internal] mom_eos::test_eos_consistency->mom_eos::test_eos_consistency::check_fd
Text view
API generated with Flint · Rendered from reStructuredText