Calculate the derivatives of density with temperature and salinity from T, S, and P.
Definition at line 70 of file MOM_EOS.F90.
|
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_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...
|
|
◆ calculate_density_derivs_array()
subroutine mom_eos::calculate_density_derivs::calculate_density_derivs_array |
( |
real, dimension(:), intent(in) |
T, |
|
|
real, dimension(:), intent(in) |
S, |
|
|
real, dimension(:), intent(in) |
pressure, |
|
|
real, dimension(:), intent(out) |
drho_dT, |
|
|
real, dimension(:), intent(out) |
drho_dS, |
|
|
integer, intent(in) |
start, |
|
|
integer, intent(in) |
npts, |
|
|
type(eos_type), pointer |
EOS, |
|
|
real, intent(in), optional |
scale |
|
) |
| |
|
private |
Calls the appropriate subroutine to calculate density derivatives for 1-D array inputs.
- Parameters
-
[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.
367 real,
dimension(:),
intent(in) :: T
368 real,
dimension(:),
intent(in) :: S
369 real,
dimension(:),
intent(in) :: pressure
370 real,
dimension(:),
intent(out) :: drho_dT
372 real,
dimension(:),
intent(out) :: drho_dS
374 integer,
intent(in) :: start
375 integer,
intent(in) :: npts
376 type(EOS_type),
pointer :: EOS
377 real,
optional,
intent(in) :: scale
381 if (.not.
associated(eos))
call mom_error(fatal, &
382 "calculate_density_derivs called with an unassociated EOS_type EOS.")
384 select case (eos%form_of_EOS)
386 call calculate_density_derivs_linear(t, s, pressure, drho_dt, drho_ds, eos%Rho_T0_S0, &
387 eos%dRho_dT, eos%dRho_dS, start, npts)
389 call calculate_density_derivs_unesco(t, s, pressure, drho_dt, drho_ds, start, npts)
391 call calculate_density_derivs_wright(t, s, pressure, drho_dt, drho_ds, start, npts)
393 call calculate_density_derivs_teos10(t, s, pressure, drho_dt, drho_ds, start, npts)
395 call calculate_density_derivs_nemo(t, s, pressure, drho_dt, drho_ds, start, npts)
397 call mom_error(fatal, &
398 "calculate_density_derivs_array: EOS%form_of_EOS is not valid.")
401 if (
present(scale))
then ;
if (scale /= 1.0)
then ;
do j=start,start+npts-1
402 drho_dt(j) = scale * drho_dt(j)
403 drho_ds(j) = scale * drho_ds(j)
404 enddo ;
endif ;
endif
◆ calculate_density_derivs_scalar()
subroutine mom_eos::calculate_density_derivs::calculate_density_derivs_scalar |
( |
real, intent(in) |
T, |
|
|
real, intent(in) |
S, |
|
|
real, intent(in) |
pressure, |
|
|
real, intent(out) |
drho_dT, |
|
|
real, intent(out) |
drho_dS, |
|
|
type(eos_type), pointer |
EOS, |
|
|
real, intent(in), optional |
scale |
|
) |
| |
|
private |
Calls the appropriate subroutines to calculate density derivatives by promoting a scalar to a one-element array.
- Parameters
-
[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.
411 real,
intent(in) :: T
412 real,
intent(in) :: S
413 real,
intent(in) :: pressure
414 real,
intent(out) :: drho_dT
416 real,
intent(out) :: drho_dS
418 type(EOS_type),
pointer :: EOS
419 real,
optional,
intent(in) :: scale
422 if (.not.
associated(eos))
call mom_error(fatal, &
423 "calculate_density_derivs called with an unassociated EOS_type EOS.")
425 select case (eos%form_of_EOS)
427 call calculate_density_derivs_linear(t, s, pressure, drho_dt, drho_ds, &
428 eos%Rho_T0_S0, eos%dRho_dT, eos%dRho_dS)
430 call calculate_density_derivs_wright(t, s, pressure, drho_dt, drho_ds)
432 call calculate_density_derivs_teos10(t, s, pressure, drho_dt, drho_ds)
434 call mom_error(fatal, &
435 "calculate_density_derivs_scalar: EOS%form_of_EOS is not valid.")
438 if (
present(scale))
then ;
if (scale /= 1.0)
then
439 drho_dt = scale * drho_dt
440 drho_ds = scale * drho_ds
The documentation for this interface was generated from the following file:
- /glade/work/altuntas/cesm.sandboxes/cesm2_2_alpha_X_mom/components/mom/MOM6/src/equation_of_state/MOM_EOS.F90