linear_in_z Function

private pure elemental function linear_in_z(v_ref, dv_dz, z_depth) result(v)

Affine profile v(z) = v_ref + dv_dz*z evaluated at geopotential height z = -z_depth, i.e. v = v_ref - dv_dz*z_depth.

z is positive UP with the origin at the z = 0 datum, which is the convention &ocean_ic_nml eady_dT_dz already uses. A STABLE thermal column therefore has dv_dz > 0 for temperature (warm on top) and dv_dz < 0 for salinity (salty at the bed).

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: v_ref
real(kind=wp), intent(in) :: dv_dz
real(kind=wp), intent(in) :: z_depth

Return Value real(kind=wp)


Called by

proc~~linear_in_z~~CalledByGraph proc~linear_in_z linear_in_z proc~seed_ts_linear_z seed_ts_linear_z proc~seed_ts_linear_z->proc~linear_in_z proc~seed_zinit_overlay seed_zinit_overlay proc~seed_zinit_overlay->proc~seed_ts_linear_z proc~ocean_state_seed_from_cfg ocean_state_seed_from_cfg proc~ocean_state_seed_from_cfg->proc~seed_zinit_overlay proc~engine_setup engine_setup proc~engine_setup->proc~ocean_state_seed_from_cfg proc~complete_ocean_create complete_ocean_create proc~complete_ocean_create->proc~engine_setup proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_setup proc~driver_validate driver_validate proc~driver_validate->proc~engine_setup

Source Code

   pure elemental function linear_in_z(v_ref, dv_dz, z_depth) result(v)
      !! Affine profile `v(z) = v_ref + dv_dz*z` evaluated at
      !! geopotential height `z = -z_depth`, i.e.
      !! `v = v_ref - dv_dz*z_depth`.
      !!
      !! `z` is positive UP with the origin at the `z = 0` datum, which
      !! is the convention `&ocean_ic_nml eady_dT_dz` already uses.  A
      !! STABLE thermal column therefore has `dv_dz > 0` for temperature
      !! (warm on top) and `dv_dz < 0` for salinity (salty at the bed).
      real(wp), intent(in) :: v_ref, dv_dz, z_depth
      real(wp) :: v

      v = v_ref - dv_dz*z_depth
   end function linear_in_z