|
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_specific_vol_derivs |
| Calculate the derivatives of specific volume with temperature and salinity 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. The pressure and density can be rescaled with the US. If both the US and scale arguments are present the density scaling uses the product of the two scaling factors. More... | |
| 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. 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_stanley_density_array (T, S, pressure, Tvar, TScov, Svar, rho, start, npts, EOS, 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. 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. More... | |
| 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. More... | |
| 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. 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 | 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. More... | |
| 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. More... | |
| subroutine | calculate_tfreeze_scalar (S, pressure, T_fr, EOS, pres_scale) |
| Calls the appropriate subroutine to calculate the freezing point for scalar inputs. More... | |
| 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. 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_1d (T, S, pressure, drho_dT, drho_dS, EOS, dom, 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 | 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. More... | |
| 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. More... | |
| subroutine | calculate_compress_array (T, S, press, rho, drho_dp, start, npts, EOS) |
| Calls the appropriate subroutine to calculate the density and compressibility for 1-D array inputs. If US is present, the units of the inputs and outputs are rescaled. 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. If US is present, the units of the inputs and outputs are rescaled. More... | |
| integer function, dimension(2), public | eos_domain (HI, halo) |
| 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. More... | |
| subroutine, public | 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, dP_tiny, useMassWghtInterp) |
| 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. More... | |
| subroutine, public | 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, 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, US) |
| 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 | convert_temp_salt_for_teos10 (T, S, HI, kd, mask_z, EOS) |
| Convert T&S to Absolute Salinity and Conservative Temperature if using TEOS10. More... | |
| logical function, public | eos_quadrature (EOS) |
| Return value of EOS_quadrature. 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. | |
| integer, parameter, public | eos_unesco = 2 |
| A named integer specifying an equation of state. | |
| integer, parameter, public | eos_wright = 3 |
| A named integer specifying an equation of state. | |
| integer, parameter, public | eos_teos10 = 4 |
| A named integer specifying an equation of state. | |
| integer, parameter, public | eos_nemo = 5 |
| A named integer specifying an equation of state. | |
| character *(10), parameter | eos_linear_string = "LINEAR" |
| A string for specifying the equation of state. | |
| character *(10), parameter | eos_unesco_string = "UNESCO" |
| A string for specifying the equation of state. | |
| character *(10), parameter | eos_wright_string = "WRIGHT" |
| A string for specifying the equation of state. | |
| character *(10), parameter | eos_teos10_string = "TEOS10" |
| A string for specifying the equation of state. | |
| character *(10), parameter | eos_nemo_string = "NEMO" |
| A string for specifying the equation of state. | |
| character *(10), parameter | eos_default = EOS_WRIGHT_STRING |
| The default equation of state. | |
| integer, parameter | tfreeze_linear = 1 |
| A named integer specifying a freezing point expression. | |
| integer, parameter | tfreeze_millero = 2 |
| A named integer specifying a freezing point expression. | |
| integer, parameter | tfreeze_teos10 = 3 |
| A named integer specifying a freezing point expression. | |
| character *(10), parameter | tfreeze_linear_string = "LINEAR" |
| A string for specifying the freezing point expression. | |
| character *(10), parameter | tfreeze_millero_string = "MILLERO_78" |
| A string for specifying freezing point expression. | |
| character *(10), parameter | tfreeze_teos10_string = "TEOS10" |
| A string for specifying the freezing point expression. | |
| character *(10), parameter | tfreeze_default = TFREEZE_LINEAR_STRING |
| The default freezing point expression. | |
| subroutine, public mom_eos::analytic_int_density_dz | ( | 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) | z_t, | ||
| real, dimension(hi%isd:hi%ied,hi%jsd:hi%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) | HI, | ||
| type(eos_type), pointer | EOS, | ||
| real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(inout) | dpa, | ||
| real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(inout), optional | intz_dpa, | ||
| real, dimension(hi%isdb:hi%iedb,hi%jsd:hi%jed), intent(inout), optional | intx_dpa, | ||
| real, dimension(hi%isd:hi%ied,hi%jsdb:hi%jedb), intent(inout), optional | inty_dpa, | ||
| real, dimension(hi%isd:hi%ied,hi%jsd:hi%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] | hi | Ocean horizontal index structure |
| [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 [R ~> kg m-3] or [kg m-3], that is subtracted out to reduce the magnitude of each of the integrals. |
| [in] | rho_0 | A density [R ~> kg m-3] or [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 [L2 Z-1 T-2 ~> m s-2] or [m2 Z-1 s-2 ~> m s-2] |
| eos | Equation of state structure | |
| [in,out] | dpa | The change in the pressure anomaly |
| [in,out] | intz_dpa | The integral through the thickness of the |
| [in,out] | intx_dpa | The integral in x of the difference between |
| [in,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 1257 of file MOM_EOS.F90.
| subroutine, public mom_eos::analytic_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(inout) | dza, | ||
| real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed), intent(inout), optional | intp_dza, | ||
| real, dimension(hi%isdb:hi%iedb,hi%jsd:hi%jed), intent(inout), optional | intx_dza, | ||
| real, dimension(hi%isd:hi%ied,hi%jsdb:hi%jedb), intent(inout), 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 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.
| [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 [R L2 T-2 ~> Pa] or [Pa] |
| [in] | p_b | Pressure at the bottom of the layer [R L2 T-2 ~> Pa] or [Pa] |
| [in] | alpha_ref | 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 | Equation of state structure | |
| [in,out] | dza | The change in the geopotential anomaly across |
| [in,out] | intp_dza | The integral in pressure through the layer of the |
| [in,out] | intx_dza | The integral in x of the difference between the |
| [in,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 [R L2 T-2 ~> Pa] or [Pa] |
| [in] | dp_tiny | A miniscule pressure change with the same units as p_t [R L2 T-2 ~> Pa] or [Pa] |
| [in] | usemasswghtinterp | If true, uses mass weighting to interpolate T/S for top and bottom integrals. |
Definition at line 1188 of file MOM_EOS.F90.
|
private |
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.
| [in] | t | Potential temperature referenced to the surface [degC] |
| [in] | s | Salinity [ppt] |
| [in] | pressure | Pressure [R L2 T-2 ~> Pa] |
| [in,out] | specvol | In situ specific volume [R-1 ~> m3 kg-1] |
| eos | Equation of state structure | |
| [in] | dom | The domain of indices to work on, taking into account that arrays start at 1. |
| [in] | spv_ref | A reference specific volume [R-1 ~> m3 kg-1] |
| [in] | scale | A multiplicative factor by which to scale output specific volume in combination with scaling given by US [various] |
Definition at line 571 of file MOM_EOS.F90.
|
private |
Calls the appropriate subroutine to calculate specific volume derivatives for 1-d array inputs, potentially limiting the domain of indices that are worked on.
| [in] | t | Potential temperature referenced to the surface [degC] |
| [in] | s | Salinity [ppt] |
| [in] | pressure | Pressure [R L2 T-2 ~> Pa] |
| [in,out] | dsv_dt | The partial derivative of specific volume with potential temperature [R-1 degC-1 ~> m3 kg-1 degC-1] |
| [in,out] | dsv_ds | The partial derivative of specific volume with salinity [R-1 ppt-1 ~> m3 kg-1 ppt-1] |
| eos | Equation of state structure | |
| [in] | dom | The domain of indices to work on, taking into account that arrays start at 1. |
| [in] | scale | A multiplicative factor by which to scale specific volume in combination with scaling given by US [various] |
Definition at line 1040 of file MOM_EOS.F90.
|
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] or [R L2 T-2 ~> 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] or [R-1 m3 kg-1] |
| [in] | scale | A multiplicative factor by which to scale specific volume in combination with scaling given by US [various] |
Definition at line 533 of file MOM_EOS.F90.
|
private |
Calls the appropriate subroutine to calculate the density and compressibility for 1-D array inputs. If US is present, the units of the inputs and outputs are rescaled.
| [in] | t | Potential temperature referenced to the surface [degC] |
| [in] | s | Salinity [PSU] |
| [in] | press | Pressure [Pa] or [R L2 T-2 ~> Pa] |
| [in,out] | rho | In situ density [kg m-3] or [R ~> kg m-3] |
| [in,out] | drho_dp | The partial derivative of density with pressure (also the inverse of the square of sound speed) [s2 m-2] or [T2 L-2] |
| [in] | start | Starting index within the array |
| [in] | npts | The number of values to calculate |
| eos | Equation of state structure |
Definition at line 1089 of file MOM_EOS.F90.
|
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. If US is present, the units of the inputs and outputs are rescaled.
| [in] | t | Potential temperature referenced to the surface [degC] |
| [in] | s | Salinity [ppt] |
| [in] | pressure | Pressure [Pa] or [R L2 T-2 ~> Pa] |
| [out] | rho | In situ density [kg m-3] or [R ~> 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] or [T2 L-2] |
| eos | Equation of state structure |
Definition at line 1139 of file MOM_EOS.F90.
|
private |
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.
| [in] | t | Potential temperature referenced to the surface [degC] |
| [in] | s | Salinity [ppt] |
| [in] | pressure | Pressure [R L2 T-2 ~> Pa] |
| [in,out] | rho | Density (in-situ if pressure is local) [R ~> kg m-3] |
| eos | Equation of state structure | |
| [in] | dom | The domain of indices to work on, taking into account that arrays start at 1. |
| [in] | rho_ref | A reference density [kg m-3] |
| [in] | scale | A multiplicative factor by which to scale density in combination with scaling given by US [various] |
Definition at line 360 of file MOM_EOS.F90.
|
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] or [R L2 T-2 ~> Pa] |
| [in,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 in combination with scaling given by US [various] |
Definition at line 263 of file MOM_EOS.F90.
|
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 [R L2 T-2 ~> Pa] |
| [in,out] | drho_dt | The partial derivative of density with potential temperature [R degC-1 ~> kg m-3 degC-1] |
| [in,out] | drho_ds | The partial derivative of density with salinity [R degC-1 ~> kg m-3 ppt-1] |
| eos | Equation of state structure | |
| [in] | dom | The domain of indices to work on, taking into account that arrays start at 1. |
| [in] | scale | A multiplicative factor by which to scale density in combination with scaling given by US [various] |
Definition at line 751 of file MOM_EOS.F90.
|
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] or [R L2 T-2 ~> Pa] |
| [in,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] |
| [in,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 in combination with scaling given by US [various] |
Definition at line 706 of file MOM_EOS.F90.
|
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] or [R L2 T-2 ~> 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 in combination with scaling given by US [various] |
Definition at line 800 of file MOM_EOS.F90.
|
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. The pressure and density can be rescaled with the US. If both the US and scale arguments are present the density scaling uses the product of the two scaling factors.
| [in] | t | Potential temperature referenced to the surface [degC] |
| [in] | s | Salinity [ppt] |
| [in] | pressure | Pressure [Pa] or [R L2 T-2 ~> 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 in combination with scaling given by US [various] |
Definition at line 166 of file MOM_EOS.F90.
|
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] or [R L2 T-2 ~> Pa] |
| [in,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] |
| [in,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] |
| [in,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] |
| [in,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] |
| [in,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 in combination with scaling given by US [various] |
Definition at line 844 of file MOM_EOS.F90.
|
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] or [R L2 T-2 ~> 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 in combination with scaling given by US [various] |
Definition at line 928 of file MOM_EOS.F90.
|
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] |
| [in,out] | specvol | in situ specific volume [kg m-3] |
| [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 in combination with scaling given by US [various] |
Definition at line 486 of file MOM_EOS.F90.
|
private |
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] |
| [in,out] | dsv_dt | The partial derivative of specific volume with potential temperature [m3 kg-1 degC-1] |
| [in,out] | dsv_ds | The partial derivative of specific volume with salinity [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 |
Definition at line 988 of file MOM_EOS.F90.
|
private |
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.
| [in] | t | Potential temperature referenced to the surface [degC] |
| [in] | s | Salinity [ppt] |
| [in] | pressure | Pressure [R L2 T-2 ~> Pa] |
| [in] | tvar | Variance of potential temperature [degC2] |
| [in] | tscov | Covariance of potential temperature and salinity [degC ppt] |
| [in] | svar | Variance of salinity [ppt2] |
| [in,out] | rho | Density (in-situ if pressure is local) [R ~> kg m-3] |
| eos | Equation of state structure | |
| [in] | dom | The domain of indices to work on, taking into account that arrays start at 1. |
| [in] | rho_ref | A reference density [kg m-3] |
| [in] | scale | A multiplicative factor by which to scale density in combination with scaling given by US [various] |
Definition at line 417 of file MOM_EOS.F90.
|
private |
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. 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.
| [in] | t | Potential temperature referenced to the surface [degC] |
| [in] | s | Salinity [ppt] |
| [in] | pressure | Pressure [Pa] |
| [in] | tvar | Variance of potential temperature referenced to the surface [degC2] |
| [in] | tscov | Covariance of potential temperature and salinity [degC ppt] |
| [in] | svar | Variance of salinity [ppt2] |
| [in,out] | rho | Density (in-situ if pressure is local) [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 306 of file MOM_EOS.F90.
|
private |
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.
| [in] | t | Potential temperature referenced to the surface [degC] |
| [in] | s | Salinity [ppt] |
| [in] | tvar | Variance of potential temperature referenced to the surface [degC2] |
| [in] | tscov | Covariance of potential temperature and salinity [degC ppt] |
| [in] | svar | Variance of salinity [ppt2] |
| [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 212 of file MOM_EOS.F90.
|
private |
Calls the appropriate subroutine to calculate the freezing point for a 1-D array.
| [in] | s | Salinity [ppt] |
| [in] | pressure | Pressure [Pa] or [other] |
| [in,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 | |
| [in] | pres_scale | A multiplicative factor to convert pressure into Pa. |
Definition at line 656 of file MOM_EOS.F90.
|
private |
Calls the appropriate subroutine to calculate the freezing point for scalar inputs.
| [in] | s | Salinity [ppt] |
| [in] | pressure | Pressure [Pa] or [other] |
| [out] | t_fr | Freezing point potential temperature referenced to the surface [degC] |
| eos | Equation of state structure | |
| [in] | pres_scale | A multiplicative factor to convert pressure into Pa |
Definition at line 625 of file MOM_EOS.F90.
| subroutine, public mom_eos::convert_temp_salt_for_teos10 | ( | real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed,kd), intent(inout) | T, |
| real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed,kd), intent(inout) | S, | ||
| type(hor_index_type), intent(in) | HI, | ||
| integer, intent(in) | kd, | ||
| real, dimension(hi%isd:hi%ied,hi%jsd:hi%jed,kd), intent(in) | mask_z, | ||
| type(eos_type), pointer | EOS | ||
| ) |
Convert T&S to Absolute Salinity and Conservative Temperature if using TEOS10.
| [in] | kd | The number of layers to work on |
| [in] | hi | The horizontal index structure |
| [in,out] | t | Potential temperature referenced to the surface [degC] |
| [in,out] | s | Salinity [ppt] |
| [in] | mask_z | 3d mask regulating which points to convert. |
| eos | Equation of state structure |
Definition at line 1532 of file MOM_EOS.F90.
| subroutine, public mom_eos::eos_allocate | ( | type(eos_type), pointer | EOS | ) |
Allocates EOS_type.
| eos | Equation of state structure |
Definition at line 1491 of file MOM_EOS.F90.
| integer function, dimension(2), public mom_eos::eos_domain | ( | type(hor_index_type), intent(in) | HI, |
| integer, intent(in), optional | halo | ||
| ) |
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.
| [in] | hi | The horizontal index structure |
| [in] | halo | The halo size to work on; missing is equivalent to 0. |
Definition at line 1163 of file MOM_EOS.F90.
| subroutine, public mom_eos::eos_end | ( | type(eos_type), pointer | EOS | ) |
Deallocates EOS_type.
| eos | Equation of state structure |
Definition at line 1498 of file MOM_EOS.F90.
| subroutine, public mom_eos::eos_init | ( | type(param_file_type), intent(in) | param_file, |
| type(eos_type), pointer | EOS, | ||
| type(unit_scale_type), intent(in), optional | US | ||
| ) |
Initializes EOS_type by allocating and reading parameters.
| [in] | param_file | Parameter file structure |
| eos | Equation of state structure | |
| [in] | us | A dimensional unit scaling type |
Definition at line 1349 of file MOM_EOS.F90.
| 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 1458 of file MOM_EOS.F90.
| logical function, public mom_eos::eos_quadrature | ( | type(eos_type), pointer | EOS | ) |
Return value of EOS_quadrature.
| eos | Equation of state structure |
Definition at line 1565 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 1509 of file MOM_EOS.F90.
| 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 1574 of file MOM_EOS.F90.
| 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 1339 of file MOM_EOS.F90.