MOM6
|
Provides subroutines for quantities specific to the equation of state.
The MOM_EOS module is a wrapper for various equations of state (e.g. Linear, Wright, UNESCO) and provides a uniform interface to the rest of the model independent of which equation of state is being used.
Data Types | |
interface | calculate_compress |
Calculates the compressibility of water from T, S, and P. More... | |
interface | calculate_density |
Calculates density of sea water from T, S and P. More... | |
interface | calculate_density_derivs |
Calculate the derivatives of density with temperature and salinity from T, S, and P. More... | |
interface | calculate_density_second_derivs |
Calculates the second derivatives of density with various combinations of temperature, salinity, and pressure from T, S and P. More... | |
interface | calculate_spec_vol |
Calculates specific volume of sea water from T, S and P. More... | |
interface | calculate_tfreeze |
Calculates the freezing point of sea water from T, S and P. More... | |
type | eos_type |
A control structure for the equation of state. More... | |
Functions/Subroutines | |
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. More... | |
subroutine | calculate_density_array (T, S, pressure, rho, start, npts, EOS, rho_ref, scale) |
Calls the appropriate subroutine to calculate the density of sea water for 1-D array inputs. If rho_ref is present, the anomaly with respect to rho_ref is returned. More... | |
subroutine | calculate_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. More... | |
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. More... | |
subroutine | calculate_tfreeze_scalar (S, pressure, T_fr, EOS) |
Calls the appropriate subroutine to calculate the freezing point for scalar inputs. More... | |
subroutine | calculate_tfreeze_array (S, pressure, T_fr, start, npts, EOS) |
Calls the appropriate subroutine to calculate the freezing point for a 1-D array. More... | |
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. More... | |
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. More... | |
subroutine | calculate_density_second_derivs_array (T, S, pressure, drho_dS_dS, drho_dS_dT, drho_dT_dT, drho_dS_dP, drho_dT_dP, start, npts, EOS, scale) |
Calls the appropriate subroutine to calculate density second derivatives for 1-D array inputs. More... | |
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 nputs. More... | |
subroutine, public | calculate_specific_vol_derivs (T, S, pressure, dSV_dT, dSV_dS, start, npts, EOS, scale) |
Calls the appropriate subroutine to calculate specific volume derivatives for an array. More... | |
subroutine | calculate_compress_array (T, S, pressure, rho, drho_dp, start, npts, EOS) |
Calls the appropriate subroutine to calculate the density and compressibility for 1-D array inputs. More... | |
subroutine | calculate_compress_scalar (T, S, pressure, rho, drho_dp, EOS) |
Calculate density and compressibility for a scalar. This just promotes the scalar to an array with a singleton dimension and calls calculate_compress_array. More... | |
subroutine, public | int_specific_vol_dp (T, S, p_t, p_b, alpha_ref, HI, EOS, dza, intp_dza, intx_dza, inty_dza, halo_size, bathyP, dP_tiny, useMassWghtInterp) |
Calls the appropriate subroutine to alculate 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 Bode's rule to do the horizontal integrals, and from a truncation in the series for log(1-eps/1+eps) that assumes that |eps| < . More... | |
subroutine, public | int_density_dz (T, S, z_t, z_b, rho_ref, rho_0, G_e, HII, HIO, EOS, dpa, intz_dpa, intx_dpa, inty_dpa, bathyT, dz_neglect, useMassWghtInterp) |
This subroutine calculates analytical and nearly-analytical integrals of pressure anomalies across layers, which are required for calculating the finite-volume form pressure accelerations in a Boussinesq model. More... | |
logical function, public | query_compressible (EOS) |
Returns true if the equation of state is compressible (i.e. has pressure dependence) More... | |
subroutine, public | eos_init (param_file, EOS) |
Initializes EOS_type by allocating and reading parameters. More... | |
subroutine, public | eos_manual_init (EOS, form_of_EOS, form_of_TFreeze, EOS_quadrature, Compressible, Rho_T0_S0, drho_dT, dRho_dS, TFr_S0_P0, dTFr_dS, dTFr_dp) |
Manually initialized an EOS type (intended for unit testing of routines which need a specific EOS) More... | |
subroutine, public | eos_allocate (EOS) |
Allocates EOS_type. More... | |
subroutine, public | eos_end (EOS) |
Deallocates EOS_type. More... | |
subroutine, public | eos_use_linear (Rho_T0_S0, dRho_dT, dRho_dS, EOS, use_quadrature) |
Set equation of state structure (EOS) to linear with given coefficients. More... | |
subroutine, public | int_density_dz_generic (T, S, z_t, z_b, rho_ref, rho_0, G_e, HII, HIO, EOS, dpa, intz_dpa, intx_dpa, inty_dpa, bathyT, dz_neglect, useMassWghtInterp) |
This subroutine calculates (by numerical quadrature) integrals of pressure anomalies across layers, which are required for calculating the finite-volume form pressure accelerations in a Boussinesq model. More... | |
subroutine, public | int_density_dz_generic_plm (T_t, T_b, S_t, S_b, z_t, z_b, rho_ref, rho_0, G_e, dz_subroundoff, bathyT, HII, HIO, EOS, dpa, intz_dpa, intx_dpa, inty_dpa, useMassWghtInterp) |
Compute pressure gradient force integrals by quadrature for the case where T and S are linear profiles. More... | |
subroutine, public | find_depth_of_pressure_in_cell (T_t, T_b, S_t, S_b, z_t, z_b, P_t, P_tgt, rho_ref, G_e, EOS, P_b, z_out, z_tol) |
Find the depth at which the reconstructed pressure matches P_tgt. More... | |
real function | frac_dp_at_pos (T_t, T_b, S_t, S_b, z_t, z_b, rho_ref, G_e, pos, EOS) |
Returns change in anomalous pressure change from top to non-dimensional position pos between z_t and z_b. More... | |
subroutine, public | int_density_dz_generic_ppm (T, T_t, T_b, S, S_t, S_b, z_t, z_b, rho_ref, rho_0, G_e, HII, HIO, EOS, dpa, intz_dpa, intx_dpa, inty_dpa) |
Compute pressure gradient force integrals for the case where T and S are parabolic profiles. More... | |
subroutine | compute_integral_quadratic (x, y, f, integral) |
Compute the integral of the quadratic function. More... | |
subroutine | evaluate_shape_bilinear (xi, eta, phi, dphidxi, dphideta) |
Evaluation of the four bilinear shape fn and their gradients at (xi,eta) More... | |
subroutine | evaluate_shape_quadratic (xi, eta, phi, dphidxi, dphideta) |
Evaluation of the nine quadratic shape fn weights and their gradients at (xi,eta) More... | |
subroutine, public | int_spec_vol_dp_generic (T, S, p_t, p_b, alpha_ref, HI, EOS, dza, intp_dza, intx_dza, inty_dza, halo_size, bathyP, dP_neglect, useMassWghtInterp) |
This subroutine calculates integrals of specific volume anomalies in pressure across layers, which are required for calculating the finite-volume form pressure accelerations in a non-Boussinesq model. There are essentially no free assumptions, apart from the use of Bode's rule quadrature to do the integrals. More... | |
subroutine, public | int_spec_vol_dp_generic_plm (T_t, T_b, S_t, S_b, p_t, p_b, alpha_ref, dP_neglect, bathyP, HI, EOS, dza, intp_dza, intx_dza, inty_dza, useMassWghtInterp) |
This subroutine calculates integrals of specific volume anomalies in pressure across layers, which are required for calculating the finite-volume form pressure accelerations in a non-Boussinesq model. There are essentially no free assumptions, apart from the use of Bode's rule quadrature to do the integrals. More... | |
subroutine, public | convert_temp_salt_for_teos10 (T, S, press, G, kd, mask_z, EOS) |
Convert T&S to Absolute Salinity and Conservative Temperature if using TEOS10. More... | |
subroutine, public | extract_member_eos (EOS, form_of_EOS, form_of_TFreeze, EOS_quadrature, Compressible, Rho_T0_S0, drho_dT, dRho_dS, TFr_S0_P0, dTFr_dS, dTFr_dp) |
Extractor routine for the EOS type if the members need to be accessed outside this module. More... | |
Variables | |
integer, parameter, public | eos_linear = 1 |
A named integer specifying an equation of state. More... | |
integer, parameter, public | eos_unesco = 2 |
A named integer specifying an equation of state. More... | |
integer, parameter, public | eos_wright = 3 |
A named integer specifying an equation of state. More... | |
integer, parameter, public | eos_teos10 = 4 |
A named integer specifying an equation of state. More... | |
integer, parameter, public | eos_nemo = 5 |
A named integer specifying an equation of state. More... | |
character *(10), parameter | eos_linear_string = "LINEAR" |
A string for specifying the equation of state. More... | |
character *(10), parameter | eos_unesco_string = "UNESCO" |
A string for specifying the equation of state. More... | |
character *(10), parameter | eos_wright_string = "WRIGHT" |
A string for specifying the equation of state. More... | |
character *(10), parameter | eos_teos10_string = "TEOS10" |
A string for specifying the equation of state. More... | |
character *(10), parameter | eos_nemo_string = "NEMO" |
A string for specifying the equation of state. More... | |
character *(10), parameter | eos_default = EOS_WRIGHT_STRING |
The default equation of state. More... | |
integer, parameter | tfreeze_linear = 1 |
A named integer specifying a freezing point expression. More... | |
integer, parameter | tfreeze_millero = 2 |
A named integer specifying a freezing point expression. More... | |
integer, parameter | tfreeze_teos10 = 3 |
A named integer specifying a freezing point expression. More... | |
character *(10), parameter | tfreeze_linear_string = "LINEAR" |
A string for specifying the freezing point expression. More... | |
character *(10), parameter | tfreeze_millero_string = "MILLERO_78" |
A string for specifying freezing point expression. More... | |
character *(10), parameter | tfreeze_teos10_string = "TEOS10" |
A string for specifying the freezing point expression. More... | |
character *(10), parameter | tfreeze_default = TFREEZE_LINEAR_STRING |
The default freezing point expression. More... | |
|
private |
Calls the appropriate subroutine to calculate the density and compressibility for 1-D array inputs.
[in] | t | Potential temperature referenced to the surface [degC] |
[in] | s | Salinity [PSU] |
[in] | pressure | Pressure [Pa] |
[out] | rho | In situ density [kg m-3]. |
[out] | drho_dp | The partial derivative of density with pressure (also the inverse of the square of sound speed) [s2 m-2]. |
[in] | start | Starting index within the array |
[in] | npts | The number of values to calculate |
eos | Equation of state structure |
Definition at line 603 of file MOM_EOS.F90.
References mom_eos_linear::calculate_compress_linear(), mom_eos_nemo::calculate_compress_nemo(), mom_eos_unesco::calculate_compress_unesco(), eos_linear, eos_nemo, eos_teos10, eos_unesco, eos_wright, and mom_error_handler::mom_error().
Referenced by calculate_compress_scalar().
|
private |
Calculate density and compressibility for a scalar. This just promotes the scalar to an array with a singleton dimension and calls calculate_compress_array.
[in] | t | Potential temperature referenced to the surface (degC) |
[in] | s | Salinity (PSU) |
[in] | pressure | Pressure (Pa) |
[out] | rho | In situ density in kg m-3. |
[out] | drho_dp | The partial derivative of density with pressure (also the inverse of the square of sound speed) in s2 m-2. |
eos | Equation of state structure |
Definition at line 638 of file MOM_EOS.F90.
References calculate_compress_array(), and mom_error_handler::mom_error().
|
private |
Calls the appropriate subroutine to calculate the density of sea water for 1-D array inputs. If rho_ref is present, the anomaly with respect to rho_ref is returned.
[in] | t | Potential temperature referenced to the surface [degC] |
[in] | s | Salinity [ppt] |
[in] | pressure | Pressure [Pa] |
[out] | rho | Density (in-situ if pressure is local) [kg m-3] or [R ~> kg m-3] |
[in] | start | Start index for computation |
[in] | npts | Number of point to compute |
eos | Equation of state structure | |
[in] | rho_ref | A reference density [kg m-3]. |
[in] | scale | A multiplicative factor by which to scale density from kg m-3 to the desired units [R m3 kg-1] |
Definition at line 177 of file MOM_EOS.F90.
References eos_linear, eos_nemo, eos_teos10, eos_unesco, eos_wright, and mom_error_handler::mom_error().
Referenced by frac_dp_at_pos(), and int_density_dz_generic_plm().
|
private |
Calls the appropriate subroutine to calculate density derivatives for 1-D array inputs.
[in] | t | Potential temperature referenced to the surface [degC] |
[in] | s | Salinity [ppt] |
[in] | pressure | Pressure [Pa] |
[out] | drho_dt | The partial derivative of density with potential temperature [kg m-3 degC-1] or [R degC-1 ~> kg m-3 degC-1]. |
[out] | drho_ds | The partial derivative of density with salinity, in [kg m-3 ppt-1] or [R degC-1 ~> kg m-3 ppt-1]. |
[in] | start | Starting index within the array |
[in] | npts | The number of values to calculate |
eos | Equation of state structure | |
[in] | scale | A multiplicative factor by which to scale density from kg m-3 to the desired units [R m3 kg-1] |
Definition at line 367 of file MOM_EOS.F90.
References eos_linear, eos_nemo, eos_teos10, eos_unesco, eos_wright, and mom_error_handler::mom_error().
|
private |
Calls the appropriate subroutines to calculate density derivatives by promoting a scalar to a one-element array.
[in] | t | Potential temperature referenced to the surface [degC] |
[in] | s | Salinity [ppt] |
[in] | pressure | Pressure [Pa] |
[out] | drho_dt | The partial derivative of density with potential temperature [kg m-3 degC-1] or [R degC-1 ~> kg m-3 degC-1] |
[out] | drho_ds | The partial derivative of density with salinity, in [kg m-3 ppt-1] or [R ppt-1 ~> kg m-3 ppt-1]. |
eos | Equation of state structure | |
[in] | scale | A multiplicative factor by which to scale density from kg m-3 to the desired units [R m3 kg-1] |
Definition at line 411 of file MOM_EOS.F90.
References eos_linear, eos_teos10, eos_wright, and mom_error_handler::mom_error().
|
private |
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.
[in] | t | Potential temperature referenced to the surface [degC] |
[in] | s | Salinity [ppt] |
[in] | pressure | Pressure [Pa] |
[out] | rho | Density (in-situ if pressure is local) [kg m-3] or [R ~> kg m-3] |
eos | Equation of state structure | |
[in] | rho_ref | A reference density [kg m-3]. |
[in] | scale | A multiplicative factor by which to scale density from kg m-3 to the desired units [R m3 kg-1] |
Definition at line 139 of file MOM_EOS.F90.
References eos_linear, eos_nemo, eos_teos10, eos_unesco, eos_wright, and mom_error_handler::mom_error().
|
private |
Calls the appropriate subroutine to calculate density second derivatives for 1-D array inputs.
[in] | t | Potential temperature referenced to the surface [degC] |
[in] | s | Salinity [ppt] |
[in] | pressure | Pressure [Pa] |
[out] | drho_ds_ds | Partial derivative of beta with respect to S [kg m-3 ppt-2] or [R ppt-2 ~> kg m-3 ppt-2] |
[out] | drho_ds_dt | Partial derivative of beta with respect to T [kg m-3 ppt-1 degC-1] or [R ppt-1 degC-1 ~> kg m-3 ppt-1 degC-1] |
[out] | drho_dt_dt | Partial derivative of alpha with respect to T [kg m-3 degC-2] or [R degC-2 ~> kg m-3 degC-2] |
[out] | drho_ds_dp | Partial derivative of beta with respect to pressure [kg m-3 ppt-1 Pa-1] or [R ppt-1 Pa-1 ~> kg m-3 ppt-1 Pa-1] |
[out] | drho_dt_dp | Partial derivative of alpha with respect to pressure [kg m-3 degC-1 Pa-1] or [R degC-1 Pa-1 ~> kg m-3 degC-1 Pa-1] |
[in] | start | Starting index within the array |
[in] | npts | The number of values to calculate |
eos | Equation of state structure | |
[in] | scale | A multiplicative factor by which to scale density from kg m-3 to the desired units [R m3 kg-1] |
Definition at line 448 of file MOM_EOS.F90.
References eos_linear, eos_teos10, eos_wright, and mom_error_handler::mom_error().
|
private |
Calls the appropriate subroutine to calculate density second derivatives for scalar nputs.
[in] | t | Potential temperature referenced to the surface [degC] |
[in] | s | Salinity [ppt] |
[in] | pressure | Pressure [Pa] |
[out] | drho_ds_ds | Partial derivative of beta with respect to S [kg m-3 ppt-2] or [R ppt-2 ~> kg m-3 ppt-2] |
[out] | drho_ds_dt | Partial derivative of beta with respect to T [kg m-3 ppt-1 degC-1] or [R ppt-1 degC-1 ~> kg m-3 ppt-1 degC-1] |
[out] | drho_dt_dt | Partial derivative of alpha with respect to T [kg m-3 degC-2] or [R degC-2 ~> kg m-3 degC-2] |
[out] | drho_ds_dp | Partial derivative of beta with respect to pressure [kg m-3 ppt-1 Pa-1] or [R ppt-1 Pa-1 ~> kg m-3 ppt-1 Pa-1] |
[out] | drho_dt_dp | Partial derivative of alpha with respect to pressure [kg m-3 degC-1 Pa-1] or [R degC-1 Pa-1 ~> kg m-3 degC-1 Pa-1] |
eos | Equation of state structure | |
[in] | scale | A multiplicative factor by which to scale density from kg m-3 to the desired units [R m3 kg-1] |
Definition at line 499 of file MOM_EOS.F90.
References eos_linear, eos_teos10, eos_wright, and mom_error_handler::mom_error().
|
private |
Calls the appropriate subroutine to calculate the specific volume of sea water for 1-D array inputs.
[in] | t | potential temperature relative to the surface [degC]. |
[in] | s | salinity [ppt]. |
[in] | pressure | pressure [Pa]. |
[out] | specvol | in situ specific volume [kg m-3] or [R-1 ~> m3 kg-1]. |
[in] | start | the starting point in the arrays. |
[in] | npts | the number of values to calculate. |
eos | Equation of state structure | |
[in] | spv_ref | A reference specific volume [m3 kg-1]. |
[in] | scale | A multiplicative factor by which to scale specific volume from m3 kg-1 to the desired units [kg m-3 R-1] |
Definition at line 264 of file MOM_EOS.F90.
References eos_linear, eos_nemo, eos_teos10, eos_unesco, eos_wright, and mom_error_handler::mom_error().
|
private |
Calls the appropriate subroutine to calculate specific volume of sea water for scalar inputs.
[in] | t | Potential temperature referenced to the surface [degC] |
[in] | s | Salinity [ppt] |
[in] | pressure | Pressure [Pa] |
[out] | specvol | In situ? specific volume [m3 kg-1] or [R-1 ~> m3 kg-1] |
eos | Equation of state structure | |
[in] | spv_ref | A reference specific volume [m3 kg-1]. |
[in] | scale | A multiplicative factor by which to scale specific volume from m3 kg-1 to the desired units [kg m-3 R-1] |
Definition at line 218 of file MOM_EOS.F90.
References eos_linear, eos_nemo, eos_teos10, eos_unesco, eos_wright, and mom_error_handler::mom_error().
subroutine, public mom_eos::calculate_specific_vol_derivs | ( | real, dimension(:), intent(in) | T, |
real, dimension(:), intent(in) | S, | ||
real, dimension(:), intent(in) | pressure, | ||
real, dimension(:), intent(out) | dSV_dT, | ||
real, dimension(:), intent(out) | dSV_dS, | ||
integer, intent(in) | start, | ||
integer, intent(in) | npts, | ||
type(eos_type), pointer | EOS, | ||
real, intent(in), optional | scale | ||
) |
Calls the appropriate subroutine to calculate specific volume derivatives for an array.
[in] | t | Potential temperature referenced to the surface [degC] |
[in] | s | Salinity [ppt] |
[in] | pressure | Pressure [Pa] |
[out] | dsv_dt | The partial derivative of specific volume with potential temperature [m3 kg-1 degC-1] or [R-1 degC-1 ~> m3 kg-1 degC-1] |
[out] | dsv_ds | The partial derivative of specific volume with salinity [m3 kg-1 ppt-1] or [R-1 ppt-1 ~> m3 kg-1 ppt-1]. |
[in] | start | Starting index within the array |
[in] | npts | The number of values to calculate |
eos | Equation of state structure | |
[in] | scale | A multiplicative factor by which to scale specific volume from m3 kg-1 to the desired units [kg m-3 R-1] |
Definition at line 546 of file MOM_EOS.F90.
References eos_linear, eos_nemo, eos_teos10, eos_unesco, eos_wright, and mom_error_handler::mom_error().
Referenced by mom_diabatic_aux::applyboundaryfluxesinout(), and mom_diapyc_energy_req::diapyc_energy_req_calc().
|
private |
Calls the appropriate subroutine to calculate the freezing point for a 1-D array.
[in] | s | Salinity [ppt] |
[in] | pressure | Pressure [Pa] |
[out] | t_fr | Freezing point potential temperature referenced to the surface [degC] |
[in] | start | Starting index within the array |
[in] | npts | The number of values to calculate |
eos | Equation of state structure |
Definition at line 339 of file MOM_EOS.F90.
References mom_error_handler::mom_error(), tfreeze_linear, tfreeze_millero, and tfreeze_teos10.
|
private |
Calls the appropriate subroutine to calculate the freezing point for scalar inputs.
[in] | s | Salinity [ppt] |
[in] | pressure | Pressure [Pa] |
[out] | t_fr | Freezing point potential temperature referenced to the surface [degC] |
eos | Equation of state structure |
Definition at line 313 of file MOM_EOS.F90.
References mom_error_handler::mom_error(), tfreeze_linear, tfreeze_millero, and tfreeze_teos10.
|
private |
Compute the integral of the quadratic function.
[in] | x | The x-position of the corners |
[in] | y | The y-position of the corners |
[in] | f | The function at the quadrature points |
[out] | integral | The returned integral |
Definition at line 1834 of file MOM_EOS.F90.
References evaluate_shape_bilinear(), and evaluate_shape_quadratic().
Referenced by int_density_dz_generic_ppm().
subroutine, public mom_eos::convert_temp_salt_for_teos10 | ( | real, dimension( g %isd: g %ied, g %jsd: g %jed, g %ke), intent(inout) | T, |
real, dimension( g %isd: g %ied, g %jsd: g %jed, g %ke), intent(inout) | S, | ||
real, dimension(:), intent(in) | press, | ||
type(ocean_grid_type), intent(in) | G, | ||
integer, intent(in) | kd, | ||
real, dimension( g %isd: g %ied, g %jsd: g %jed, g %ke), intent(in) | mask_z, | ||
type(eos_type), pointer | EOS | ||
) |
Convert T&S to Absolute Salinity and Conservative Temperature if using TEOS10.
[in] | g | The ocean's grid structure |
[in,out] | t | Potential temperature referenced to the surface [degC] |
[in,out] | s | Salinity [ppt] |
[in] | press | Pressure at the top of the layer [Pa]. |
eos | Equation of state structure | |
[in] | mask_z | 3d mask regulating which points to convert. |
[in] | kd | The number of layers to work on |
Definition at line 2438 of file MOM_EOS.F90.
References eos_nemo, eos_teos10, and mom_error_handler::mom_error().
subroutine, public mom_eos::eos_allocate | ( | type(eos_type), pointer | EOS | ) |
Allocates EOS_type.
eos | Equation of state structure |
Definition at line 940 of file MOM_EOS.F90.
Referenced by eos_init().
subroutine, public mom_eos::eos_end | ( | type(eos_type), pointer | EOS | ) |
Deallocates EOS_type.
eos | Equation of state structure |
Definition at line 947 of file MOM_EOS.F90.
subroutine, public mom_eos::eos_init | ( | type(param_file_type), intent(in) | param_file, |
type(eos_type), pointer | EOS | ||
) |
Initializes EOS_type by allocating and reading parameters.
[in] | param_file | Parameter file structure |
eos | Equation of state structure |
Definition at line 806 of file MOM_EOS.F90.
References eos_allocate(), eos_default, eos_linear, eos_linear_string, eos_nemo, eos_nemo_string, eos_teos10, eos_teos10_string, eos_unesco, eos_unesco_string, eos_wright, eos_wright_string, mom_error_handler::mom_error(), mom_error_handler::mom_mesg(), tfreeze_default, tfreeze_linear, tfreeze_linear_string, tfreeze_millero, tfreeze_millero_string, tfreeze_teos10, tfreeze_teos10_string, and mom_string_functions::uppercase().
Referenced by mom_ice_shelf::initialize_ice_shelf(), and mom::initialize_mom().
subroutine, public mom_eos::eos_manual_init | ( | type(eos_type), pointer | EOS, |
integer, intent(in), optional | form_of_EOS, | ||
integer, intent(in), optional | form_of_TFreeze, | ||
logical, intent(in), optional | EOS_quadrature, | ||
logical, intent(in), optional | Compressible, | ||
real, intent(in), optional | Rho_T0_S0, | ||
real, intent(in), optional | drho_dT, | ||
real, intent(in), optional | dRho_dS, | ||
real, intent(in), optional | TFr_S0_P0, | ||
real, intent(in), optional | dTFr_dS, | ||
real, intent(in), optional | dTFr_dp | ||
) |
Manually initialized an EOS type (intended for unit testing of routines which need a specific EOS)
eos | Equation of state structure | |
[in] | form_of_eos | A coded integer indicating the equation of state to use. |
[in] | form_of_tfreeze | A coded integer indicating the expression for the potential temperature of the freezing point. |
[in] | eos_quadrature | If true, always use the generic (quadrature) code for the integrals of density. |
[in] | compressible | If true, in situ density is a function of pressure. |
[in] | rho_t0_s0 | Density at T=0 degC and S=0 ppt [kg m-3] |
[in] | drho_dt | Partial derivative of density with temperature in [kg m-3 degC-1] |
[in] | drho_ds | Partial derivative of density with salinity in [kg m-3 ppt-1] |
[in] | tfr_s0_p0 | The freezing potential temperature at S=0, P=0 [degC]. |
[in] | dtfr_ds | The derivative of freezing point with salinity in [degC ppt-1]. |
[in] | dtfr_dp | The derivative of freezing point with pressure in [degC Pa-1]. |
Definition at line 907 of file MOM_EOS.F90.
subroutine, public mom_eos::eos_use_linear | ( | real, intent(in) | Rho_T0_S0, |
real, intent(in) | dRho_dT, | ||
real, intent(in) | dRho_dS, | ||
type(eos_type), pointer | EOS, | ||
logical, intent(in), optional | use_quadrature | ||
) |
Set equation of state structure (EOS) to linear with given coefficients.
[in] | rho_t0_s0 | Density at T=0 degC and S=0 ppt [kg m-3] |
[in] | drho_dt | Partial derivative of density with temperature [kg m-3 degC-1] |
[in] | drho_ds | Partial derivative of density with salinity [kg m-3 ppt-1] |
[in] | use_quadrature | If true, always use the generic (quadrature) code for the integrals of density. |
eos | Equation of state structure |
Definition at line 958 of file MOM_EOS.F90.
References eos_linear, and mom_error_handler::mom_error().
|
private |
Evaluation of the four bilinear shape fn and their gradients at (xi,eta)
[in] | xi | The x position to evaluate |
[in] | eta | The z position to evaluate |
[out] | phi | The weights of the four corners at this point |
[out] | dphidxi | The x-gradient of the weights of the four corners at this point |
[out] | dphideta | The z-gradient of the weights of the four corners at this point |
Definition at line 1917 of file MOM_EOS.F90.
Referenced by compute_integral_quadratic().
|
private |
Evaluation of the nine quadratic shape fn weights and their gradients at (xi,eta)
[in] | xi | The x position to evaluate |
[in] | eta | The z position to evaluate |
[out] | phi | The weights of the 9 bilinear quadrature points at this point |
[out] | dphidxi | The x-gradient of the weights of the 9 bilinear quadrature points corners at this point |
[out] | dphideta | The z-gradient of the weights of the 9 bilinear quadrature points corners at this point |
Definition at line 1956 of file MOM_EOS.F90.
Referenced by compute_integral_quadratic().
subroutine, public mom_eos::extract_member_eos | ( | type(eos_type), pointer | EOS, |
integer, intent(out), optional | form_of_EOS, | ||
integer, intent(out), optional | form_of_TFreeze, | ||
logical, intent(out), optional | EOS_quadrature, | ||
logical, intent(out), optional | Compressible, | ||
real, intent(out), optional | Rho_T0_S0, | ||
real, intent(out), optional | drho_dT, | ||
real, intent(out), optional | dRho_dS, | ||
real, intent(out), optional | TFr_S0_P0, | ||
real, intent(out), optional | dTFr_dS, | ||
real, intent(out), optional | dTFr_dp | ||
) |
Extractor routine for the EOS type if the members need to be accessed outside this module.
eos | Equation of state structure | |
[out] | form_of_eos | A coded integer indicating the equation of state to use. |
[out] | form_of_tfreeze | A coded integer indicating the expression for the potential temperature of the freezing point. |
[out] | eos_quadrature | If true, always use the generic (quadrature) code for the integrals of density. |
[out] | compressible | If true, in situ density is a function of pressure. |
[out] | rho_t0_s0 | Density at T=0 degC and S=0 ppt [kg m-3] |
[out] | drho_dt | Partial derivative of density with temperature in [kg m-3 degC-1] |
[out] | drho_ds | Partial derivative of density with salinity in [kg m-3 ppt-1] |
[out] | tfr_s0_p0 | The freezing potential temperature at S=0, P=0 [degC]. |
[out] | dtfr_ds | The derivative of freezing point with salinity [degC PSU-1]. |
[out] | dtfr_dp | The derivative of freezing point with pressure [degC Pa-1]. |
Definition at line 2473 of file MOM_EOS.F90.
subroutine, public mom_eos::find_depth_of_pressure_in_cell | ( | real, intent(in) | T_t, |
real, intent(in) | T_b, | ||
real, intent(in) | S_t, | ||
real, intent(in) | S_b, | ||
real, intent(in) | z_t, | ||
real, intent(in) | z_b, | ||
real, intent(in) | P_t, | ||
real, intent(in) | P_tgt, | ||
real, intent(in) | rho_ref, | ||
real, intent(in) | G_e, | ||
type(eos_type), pointer | EOS, | ||
real, intent(out) | P_b, | ||
real, intent(out) | z_out, | ||
real, intent(in), optional | z_tol | ||
) |
Find the depth at which the reconstructed pressure matches P_tgt.
[in] | t_t | Potential temperatue at the cell top [degC] |
[in] | t_b | Potential temperatue at the cell bottom [degC] |
[in] | s_t | Salinity at the cell top [ppt] |
[in] | s_b | Salinity at the cell bottom [ppt] |
[in] | z_t | Absolute height of top of cell [Z ~> m]. (Boussinesq ????) |
[in] | z_b | Absolute height of bottom of cell [Z ~> m]. |
[in] | p_t | Anomalous pressure of top of cell, relative to g*rho_ref*z_t [Pa] |
[in] | p_tgt | Target pressure at height z_out, relative to g*rho_ref*z_out [Pa] |
[in] | rho_ref | Reference density with which calculation are anomalous to |
[in] | g_e | Gravitational acceleration [m2 Z-1 s-2 ~> m s-2] |
eos | Equation of state structure | |
[out] | p_b | Pressure at the bottom of the cell [Pa] |
[out] | z_out | Absolute depth at which anomalous pressure = p_tgt [Z ~> m]. |
[in] | z_tol | The tolerance in finding z_out [Z ~> m]. |
Definition at line 1470 of file MOM_EOS.F90.
References frac_dp_at_pos().
|
private |
Returns change in anomalous pressure change from top to non-dimensional position pos between z_t and z_b.
[in] | t_t | Potential temperatue at the cell top [degC] |
[in] | t_b | Potential temperatue at the cell bottom [degC] |
[in] | s_t | Salinity at the cell top [ppt] |
[in] | s_b | Salinity at the cell bottom [ppt] |
[in] | z_t | The geometric height at the top of the layer [Z ~> m] |
[in] | z_b | The geometric height at the bottom of the layer [Z ~> m] |
[in] | rho_ref | A mean density [kg m-3], that is subtracted out to reduce the magnitude of each of the integrals. |
[in] | g_e | The Earth's gravitational acceleration [m s-2] |
[in] | pos | The fractional vertical position, 0 to 1 [nondim]. |
eos | Equation of state structure |
Definition at line 1542 of file MOM_EOS.F90.
References calculate_density_array().
Referenced by find_depth_of_pressure_in_cell().
subroutine, public mom_eos::int_density_dz | ( | real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | T, |
real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | S, | ||
real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | z_t, | ||
real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | z_b, | ||
real, intent(in) | rho_ref, | ||
real, intent(in) | rho_0, | ||
real, intent(in) | G_e, | ||
type(hor_index_type), intent(in) | HII, | ||
type(hor_index_type), intent(in) | HIO, | ||
type(eos_type), pointer | EOS, | ||
real, dimension(hio%isd:hio%ied,hio%jsd:hio%jed), intent(out) | dpa, | ||
real, dimension(hio%isd:hio%ied,hio%jsd:hio%jed), intent(out), optional | intz_dpa, | ||
real, dimension(hio%isdb:hio%iedb,hio%jsd:hio%jed), intent(out), optional | intx_dpa, | ||
real, dimension(hio%isd:hio%ied,hio%jsdb:hio%jedb), intent(out), optional | inty_dpa, | ||
real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in), optional | bathyT, | ||
real, intent(in), optional | dz_neglect, | ||
logical, intent(in), optional | useMassWghtInterp | ||
) |
This subroutine calculates analytical and nearly-analytical integrals of pressure anomalies across layers, which are required for calculating the finite-volume form pressure accelerations in a Boussinesq model.
[in] | hii | Ocean horizontal index structures for the input arrays |
[in] | hio | Ocean horizontal index structures for the output arrays |
[in] | t | Potential temperature referenced to the surface [degC] |
[in] | s | Salinity [ppt] |
[in] | z_t | Height at the top of the layer in depth units [Z ~> m]. |
[in] | z_b | Height at the bottom of the layer [Z ~> m]. |
[in] | rho_ref | A mean density [kg m-3], that is subtracted out to reduce the magnitude of each of the integrals. |
[in] | rho_0 | A density [kg m-3], that is used to calculate the pressure (as p~=-z*rho_0*G_e) used in the equation of state. |
[in] | g_e | The Earth's gravitational acceleration [m2 Z-1 s-2 ~> m s-2]. |
eos | Equation of state structure | |
[out] | dpa | The change in the pressure anomaly across the layer [Pa]. |
[out] | intz_dpa | The integral through the thickness of the layer of |
[out] | intx_dpa | The integral in x of the difference between the |
[out] | inty_dpa | The integral in y of the difference between the |
[in] | bathyt | The depth of the bathymetry [Z ~> m]. |
[in] | dz_neglect | A miniscule thickness change [Z ~> m]. |
[in] | usemasswghtinterp | If true, uses mass weighting to interpolate T/S for top and bottom integrals. |
Definition at line 733 of file MOM_EOS.F90.
References eos_linear, eos_wright, int_density_dz_generic(), and mom_error_handler::mom_error().
subroutine, public mom_eos::int_density_dz_generic | ( | real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | T, |
real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | S, | ||
real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | z_t, | ||
real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | z_b, | ||
real, intent(in) | rho_ref, | ||
real, intent(in) | rho_0, | ||
real, intent(in) | G_e, | ||
type(hor_index_type), intent(in) | HII, | ||
type(hor_index_type), intent(in) | HIO, | ||
type(eos_type), pointer | EOS, | ||
real, dimension(hio%isd:hio%ied,hio%jsd:hio%jed), intent(out) | dpa, | ||
real, dimension(hio%isd:hio%ied,hio%jsd:hio%jed), intent(out), optional | intz_dpa, | ||
real, dimension(hio%isdb:hio%iedb,hio%jsd:hio%jed), intent(out), optional | intx_dpa, | ||
real, dimension(hio%isd:hio%ied,hio%jsdb:hio%jedb), intent(out), optional | inty_dpa, | ||
real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in), optional | bathyT, | ||
real, intent(in), optional | dz_neglect, | ||
logical, intent(in), optional | useMassWghtInterp | ||
) |
This subroutine calculates (by numerical quadrature) integrals of pressure anomalies across layers, which are required for calculating the finite-volume form pressure accelerations in a Boussinesq model.
[in] | hii | Horizontal index type for input variables. |
[in] | hio | Horizontal index type for output variables. |
[in] | t | Potential temperature of the layer [degC]. |
[in] | s | Salinity of the layer [ppt]. |
[in] | z_t | Height at the top of the layer in depth units [Z ~> m]. |
[in] | z_b | Height at the bottom of the layer [Z ~> m]. |
[in] | rho_ref | A mean density [kg m-3], that is subtracted out to reduce the magnitude of each of the integrals. |
[in] | rho_0 | A density [kg m-3], that is used to calculate the pressure (as p~=-z*rho_0*G_e) used in the equation of state. |
[in] | g_e | The Earth's gravitational acceleration [m2 Z-1 s-2 ~> m s-2]. |
eos | Equation of state structure | |
[out] | dpa | The change in the pressure anomaly |
[out] | intz_dpa | The integral through the thickness of the |
[out] | intx_dpa | The integral in x of the difference between |
[out] | inty_dpa | The integral in y of the difference between |
[in] | bathyt | The depth of the bathymetry [Z ~> m]. |
[in] | dz_neglect | A miniscule thickness change [Z ~> m]. |
[in] | usemasswghtinterp | If true, uses mass weighting to interpolate T/S for top and bottom integrals. |
Definition at line 984 of file MOM_EOS.F90.
References mom_error_handler::mom_error().
Referenced by int_density_dz().
subroutine, public mom_eos::int_density_dz_generic_plm | ( | real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | T_t, |
real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | T_b, | ||
real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | S_t, | ||
real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | S_b, | ||
real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | z_t, | ||
real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | z_b, | ||
real, intent(in) | rho_ref, | ||
real, intent(in) | rho_0, | ||
real, intent(in) | G_e, | ||
real, intent(in) | dz_subroundoff, | ||
real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | bathyT, | ||
type(hor_index_type), intent(in) | HII, | ||
type(hor_index_type), intent(in) | HIO, | ||
type(eos_type), pointer | EOS, | ||
real, dimension(hio%isd:hio%ied,hio%jsd:hio%jed), intent(out) | dpa, | ||
real, dimension(hio%isd:hio%ied,hio%jsd:hio%jed), intent(out), optional | intz_dpa, | ||
real, dimension(hio%isdb:hio%iedb,hio%jsd:hio%jed), intent(out), optional | intx_dpa, | ||
real, dimension(hio%isd:hio%ied,hio%jsdb:hio%jedb), intent(out), optional | inty_dpa, | ||
logical, intent(in), optional | useMassWghtInterp | ||
) |
Compute pressure gradient force integrals by quadrature for the case where T and S are linear profiles.
[in] | hii | Ocean horizontal index structures for the input arrays |
[in] | hio | Ocean horizontal index structures for the output arrays |
[in] | t_t | Potential temperatue at the cell top [degC] |
[in] | t_b | Potential temperatue at the cell bottom [degC] |
[in] | s_t | Salinity at the cell top [ppt] |
[in] | s_b | Salinity at the cell bottom [ppt] |
[in] | z_t | The geometric height at the top of the layer, |
[in] | z_b | The geometric height at the bottom of the layer [Z ~> m]. |
[in] | rho_ref | A mean density [kg m-3], that is subtracted out to reduce the magnitude of each of the integrals. |
[in] | rho_0 | A density [kg m-3], that is used to calculate the pressure (as p~=-z*rho_0*G_e) used in the equation of state. |
[in] | g_e | The Earth's gravitational acceleration [m2 Z-1 s-2 ~> m s-2]. |
[in] | dz_subroundoff | A miniscule thickness change [Z ~> m]. |
[in] | bathyt | The depth of the bathymetry [Z ~> m]. |
eos | Equation of state structure | |
[out] | dpa | The change in the pressure anomaly across the layer [Pa]. |
[out] | intz_dpa | The integral through the thickness of the layer of |
[out] | intx_dpa | The integral in x of the difference between the |
[out] | inty_dpa | The integral in y of the difference between the |
[in] | usemasswghtinterp | If true, uses mass weighting to interpolate T/S for top and bottom integrals. |
Definition at line 1171 of file MOM_EOS.F90.
References calculate_density_array().
subroutine, public mom_eos::int_density_dz_generic_ppm | ( | real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | T, |
real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | T_t, | ||
real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | T_b, | ||
real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | S, | ||
real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | S_t, | ||
real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | S_b, | ||
real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | z_t, | ||
real, dimension(hii%isd:hii%ied,hii%jsd:hii%jed), intent(in) | z_b, | ||
real, intent(in) | rho_ref, | ||
real, intent(in) | rho_0, | ||
real, intent(in) | G_e, | ||
type(hor_index_type), intent(in) | HII, | ||
type(hor_index_type), intent(in) | HIO, | ||
type(eos_type), pointer | EOS, | ||
real, dimension(hio%isd:hio%ied,hio%jsd:hio%jed), intent(out) | dpa, | ||
real, dimension(hio%isd:hio%ied,hio%jsd:hio%jed), intent(out), optional | intz_dpa, | ||
real, dimension(hio%isdb:hio%iedb,hio%jsd:hio%jed), intent(out), optional | intx_dpa, | ||
real, dimension(hio%isd:hio%ied,hio%jsdb:hio%jedb), intent(out), optional | inty_dpa | ||
) |
Compute pressure gradient force integrals for the case where T and S are parabolic profiles.
[in] | hii | Ocean horizontal index structures for the input arrays |
[in] | hio | Ocean horizontal index structures for the output arrays |
[in] | t | Potential temperature referenced to the surface [degC] |
[in] | t_t | Potential temperatue at the cell top [degC] |
[in] | t_b | Potential temperatue at the cell bottom [degC] |
[in] | s | Salinity [ppt] |
[in] | s_t | Salinity at the cell top [ppt] |
[in] | s_b | Salinity at the cell bottom [ppt] |
[in] | z_t | Height at the top of the layer [Z ~> m]. |
[in] | z_b | Height at the bottom of the layer [Z ~> m]. |
[in] | rho_ref | A mean density [kg m-3], that is subtracted out to reduce the magnitude of each of the integrals. |
[in] | rho_0 | A density [kg m-3], that is used to calculate the pressure (as p~=-z*rho_0*G_e) used in the equation of state. |
[in] | g_e | The Earth's gravitational acceleration [m s-2] |
eos | Equation of state structure | |
[out] | dpa | The change in the pressure anomaly across the layer [Pa]. |
[out] | intz_dpa | The integral through the thickness of the layer of |
[out] | intx_dpa | The integral in x of the difference between the |
[out] | inty_dpa | The integral in y of the difference between the |
Definition at line 1585 of file MOM_EOS.F90.
References compute_integral_quadratic(), and mom_error_handler::mom_error().
subroutine, public mom_eos::int_spec_vol_dp_generic | ( | real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(in) | T, |
real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(in) | S, | ||
real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(in) | p_t, | ||
real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(in) | p_b, | ||
real, intent(in) | alpha_ref, | ||
type(hor_index_type), intent(in) | HI, | ||
type(eos_type), pointer | EOS, | ||
real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(out) | dza, | ||
real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(out), optional | intp_dza, | ||
real, dimension(hi%isdb:hi%iedb,hi%jsd:hi%jed), intent(out), optional | intx_dza, | ||
real, dimension(hi%isd:hi%ied,hi%jsdb:hi%jedb), intent(out), optional | inty_dza, | ||
integer, intent(in), optional | halo_size, | ||
real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(in), optional | bathyP, | ||
real, intent(in), optional | dP_neglect, | ||
logical, intent(in), optional | useMassWghtInterp | ||
) |
This subroutine calculates integrals of specific volume anomalies in pressure across layers, which are required for calculating the finite-volume form pressure accelerations in a non-Boussinesq model. There are essentially no free assumptions, apart from the use of Bode's rule quadrature to do the integrals.
[in] | hi | A horizontal index type structure. |
[in] | t | Potential temperature of the layer [degC]. |
[in] | s | Salinity of the layer [ppt]. |
[in] | p_t | Pressure atop the layer [Pa]. |
[in] | p_b | Pressure below the layer [Pa]. |
[in] | alpha_ref | A mean specific volume that is subtracted out to reduce the magnitude of each of the integrals [m3 kg-1]. The calculation is mathematically identical with different values of alpha_ref, but alpha_ref alters the effects of roundoff, and answers do change. |
eos | Equation of state structure | |
[out] | dza | The change in the geopotential anomaly |
[out] | intp_dza | The integral in pressure through the |
[out] | intx_dza | The integral in x of the difference |
[out] | inty_dza | The integral in y of the difference |
[in] | halo_size | The width of halo points on which to calculate dza. |
[in] | bathyp | The pressure at the bathymetry [Pa] |
[in] | dp_neglect | A miniscule pressure change with the same units as p_t (Pa?) |
[in] | usemasswghtinterp | If true, uses mass weighting to interpolate T/S for top and bottom integrals. |
Definition at line 2024 of file MOM_EOS.F90.
References mom_error_handler::mom_error().
Referenced by int_specific_vol_dp().
subroutine, public mom_eos::int_spec_vol_dp_generic_plm | ( | real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(in) | T_t, |
real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(in) | T_b, | ||
real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(in) | S_t, | ||
real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(in) | S_b, | ||
real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(in) | p_t, | ||
real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(in) | p_b, | ||
real, intent(in) | alpha_ref, | ||
real, intent(in) | dP_neglect, | ||
real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(in) | bathyP, | ||
type(hor_index_type), intent(in) | HI, | ||
type(eos_type), pointer | EOS, | ||
real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(out) | dza, | ||
real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(out), optional | intp_dza, | ||
real, dimension(hi%isdb:hi%iedb,hi%jsd:hi%jed), intent(out), optional | intx_dza, | ||
real, dimension(hi%isd:hi%ied,hi%jsdb:hi%jedb), intent(out), optional | inty_dza, | ||
logical, intent(in), optional | useMassWghtInterp | ||
) |
This subroutine calculates integrals of specific volume anomalies in pressure across layers, which are required for calculating the finite-volume form pressure accelerations in a non-Boussinesq model. There are essentially no free assumptions, apart from the use of Bode's rule quadrature to do the integrals.
[in] | hi | A horizontal index type structure. |
[in] | t_t | Potential temperature at the top of the layer [degC]. |
[in] | t_b | Potential temperature at the bottom of the layer [degC]. |
[in] | s_t | Salinity at the top the layer [ppt]. |
[in] | s_b | Salinity at the bottom the layer [ppt]. |
[in] | p_t | Pressure atop the layer [Pa]. |
[in] | p_b | Pressure below the layer [Pa]. |
[in] | alpha_ref | A mean specific volume that is subtracted out to reduce the magnitude of each of the integrals [m3 kg-1]. The calculation is mathematically identical with different values of alpha_ref, but alpha_ref alters the effects of roundoff, and answers do change. |
[in] | dp_neglect | A miniscule pressure change with the same units as p_t (Pa?) |
[in] | bathyp | The pressure at the bathymetry [Pa] |
eos | Equation of state structure | |
[out] | dza | The change in the geopotential anomaly |
[out] | intp_dza | The integral in pressure through the |
[out] | intx_dza | The integral in x of the difference |
[out] | inty_dza | The integral in y of the difference |
[in] | usemasswghtinterp | If true, uses mass weighting to interpolate T/S for top and bottom integrals. |
Definition at line 2214 of file MOM_EOS.F90.
subroutine, public mom_eos::int_specific_vol_dp | ( | real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(in) | T, |
real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(in) | S, | ||
real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(in) | p_t, | ||
real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(in) | p_b, | ||
real, intent(in) | alpha_ref, | ||
type(hor_index_type), intent(in) | HI, | ||
type(eos_type), pointer | EOS, | ||
real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(out) | dza, | ||
real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(out), optional | intp_dza, | ||
real, dimension(hi%isdb:hi%iedb,hi%jsd:hi%jed), intent(out), optional | intx_dza, | ||
real, dimension(hi%isd:hi%ied,hi%jsdb:hi%jedb), intent(out), optional | inty_dza, | ||
integer, intent(in), optional | halo_size, | ||
real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(in), optional | bathyP, | ||
real, intent(in), optional | dP_tiny, | ||
logical, intent(in), optional | useMassWghtInterp | ||
) |
Calls the appropriate subroutine to alculate 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 Bode's rule to do the horizontal integrals, and from a truncation in the series for log(1-eps/1+eps) that assumes that |eps| < .
[in] | hi | The horizontal index structure |
[in] | t | Potential temperature referenced to the surface [degC] |
[in] | s | Salinity [ppt] |
[in] | p_t | Pressure at the top of the layer [Pa]. |
[in] | p_b | Pressure at the bottom of the layer [Pa]. |
[in] | alpha_ref | A mean specific volume that is subtracted out to reduce the magnitude of each of the integrals, m3 kg-1. The calculation is mathematically identical with different values of alpha_ref, but this reduces the effects of roundoff. |
eos | Equation of state structure | |
[out] | dza | The change in the geopotential anomaly across |
[out] | intp_dza | The integral in pressure through the layer of the |
[out] | intx_dza | The integral in x of the difference between the |
[out] | inty_dza | The integral in y of the difference between the |
[in] | halo_size | The width of halo points on which to calculate dza. |
[in] | bathyp | The pressure at the bathymetry [Pa] |
[in] | dp_tiny | A miniscule pressure change with the same units as p_t (Pa?) |
[in] | usemasswghtinterp | If true, uses mass weighting to interpolate T/S for top and bottom integrals. |
Definition at line 665 of file MOM_EOS.F90.
References eos_linear, eos_wright, int_spec_vol_dp_generic(), mom_eos_linear::int_spec_vol_dp_linear(), and mom_error_handler::mom_error().
Referenced by mom_state_initialization::convert_thickness(), mom_interface_heights::find_eta_2d(), mom_interface_heights::find_eta_3d(), and mom_pressureforce_mont::pressureforce_mont_nonbouss().
logical function, public mom_eos::query_compressible | ( | type(eos_type), pointer | EOS | ) |
Returns true if the equation of state is compressible (i.e. has pressure dependence)
eos | Equation of state structure |
Definition at line 796 of file MOM_EOS.F90.
References mom_error_handler::mom_error().
Referenced by mom_pressureforce_mont::pressureforce_mont_bouss(), and mom_pressureforce_mont::pressureforce_mont_nonbouss().
|
private |
The default equation of state.
Definition at line 123 of file MOM_EOS.F90.
Referenced by eos_init().
integer, parameter, public mom_eos::eos_linear = 1 |
A named integer specifying an equation of state.
Definition at line 112 of file MOM_EOS.F90.
Referenced by calculate_compress_array(), calculate_density_array(), calculate_density_derivs_array(), calculate_density_derivs_scalar(), calculate_density_scalar(), calculate_density_second_derivs_array(), calculate_density_second_derivs_scalar(), calculate_spec_vol_array(), calculate_spec_vol_scalar(), calculate_specific_vol_derivs(), eos_init(), eos_use_linear(), int_density_dz(), int_specific_vol_dp(), and mom_neutral_diffusion::ndiff_unit_tests_discontinuous().
|
private |
A string for specifying the equation of state.
Definition at line 118 of file MOM_EOS.F90.
Referenced by eos_init().
integer, parameter, public mom_eos::eos_nemo = 5 |
A named integer specifying an equation of state.
Definition at line 116 of file MOM_EOS.F90.
Referenced by calculate_compress_array(), calculate_density_array(), calculate_density_derivs_array(), calculate_density_scalar(), calculate_spec_vol_array(), calculate_spec_vol_scalar(), calculate_specific_vol_derivs(), convert_temp_salt_for_teos10(), and eos_init().
|
private |
A string for specifying the equation of state.
Definition at line 122 of file MOM_EOS.F90.
Referenced by eos_init().
integer, parameter, public mom_eos::eos_teos10 = 4 |
A named integer specifying an equation of state.
Definition at line 115 of file MOM_EOS.F90.
Referenced by calculate_compress_array(), calculate_density_array(), calculate_density_derivs_array(), calculate_density_derivs_scalar(), calculate_density_scalar(), calculate_density_second_derivs_array(), calculate_density_second_derivs_scalar(), calculate_spec_vol_array(), calculate_spec_vol_scalar(), calculate_specific_vol_derivs(), convert_temp_salt_for_teos10(), and eos_init().
|
private |
A string for specifying the equation of state.
Definition at line 121 of file MOM_EOS.F90.
Referenced by eos_init().
integer, parameter, public mom_eos::eos_unesco = 2 |
A named integer specifying an equation of state.
Definition at line 113 of file MOM_EOS.F90.
Referenced by calculate_compress_array(), calculate_density_array(), calculate_density_derivs_array(), calculate_density_scalar(), calculate_spec_vol_array(), calculate_spec_vol_scalar(), calculate_specific_vol_derivs(), and eos_init().
|
private |
A string for specifying the equation of state.
Definition at line 119 of file MOM_EOS.F90.
Referenced by eos_init().
integer, parameter, public mom_eos::eos_wright = 3 |
A named integer specifying an equation of state.
Definition at line 114 of file MOM_EOS.F90.
Referenced by calculate_compress_array(), calculate_density_array(), calculate_density_derivs_array(), calculate_density_derivs_scalar(), calculate_density_scalar(), calculate_density_second_derivs_array(), calculate_density_second_derivs_scalar(), calculate_spec_vol_array(), calculate_spec_vol_scalar(), calculate_specific_vol_derivs(), eos_init(), int_density_dz(), and int_specific_vol_dp().
|
private |
A string for specifying the equation of state.
Definition at line 120 of file MOM_EOS.F90.
Referenced by eos_init().
|
private |
The default freezing point expression.
Definition at line 132 of file MOM_EOS.F90.
Referenced by eos_init().
|
private |
A named integer specifying a freezing point expression.
Definition at line 125 of file MOM_EOS.F90.
Referenced by calculate_tfreeze_array(), calculate_tfreeze_scalar(), and eos_init().
|
private |
A string for specifying the freezing point expression.
Definition at line 128 of file MOM_EOS.F90.
Referenced by eos_init().
|
private |
A named integer specifying a freezing point expression.
Definition at line 126 of file MOM_EOS.F90.
Referenced by calculate_tfreeze_array(), calculate_tfreeze_scalar(), and eos_init().
|
private |
A string for specifying freezing point expression.
Definition at line 129 of file MOM_EOS.F90.
Referenced by eos_init().
|
private |
A named integer specifying a freezing point expression.
Definition at line 127 of file MOM_EOS.F90.
Referenced by calculate_tfreeze_array(), calculate_tfreeze_scalar(), and eos_init().
|
private |
A string for specifying the freezing point expression.
Definition at line 131 of file MOM_EOS.F90.
Referenced by eos_init().