gm_block_below_bed Function

private pure function gm_block_below_bed(sfn, e_top_l, e_bot_l, bed_r, e_top_r, e_bot_r, bed_l) result(sfn_b)

MOM6 bottom-blocking (“Avoid moving dense water upslope from below the level of the bottom on the receiving side”). sfn is the unlimited streamfunction at an interface: the transport of everything BELOW it, > 0 from L to R. Its donor layer is the one just below the interface on the donor side ([e_bot, e_top]).

  • donor layer entirely below the RECEIVING column’s bed (e_top < bed): zero — GM may not push water into the rock (on an open z-level step, into the fillers below the shallow column’s bed, which the remap then hands to its bottom live layer: a transport THROUGH the step);
  • donor layer straddling that bed: scaled by the fraction of the donor layer above it.

Bottom-up heights (m, +up): e_top_*/e_bot_* the top/bottom of the donor layer on each side, bed_* each column’s bed −D.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: sfn
real(kind=wp), intent(in) :: e_top_l
real(kind=wp), intent(in) :: e_bot_l
real(kind=wp), intent(in) :: bed_r
real(kind=wp), intent(in) :: e_top_r
real(kind=wp), intent(in) :: e_bot_r
real(kind=wp), intent(in) :: bed_l

Return Value real(kind=wp)


Called by

proc~~gm_block_below_bed~~CalledByGraph proc~gm_block_below_bed gm_block_below_bed proc~gm_column_x gm_column_x proc~gm_column_x->proc~gm_block_below_bed proc~gm_column_y gm_column_y proc~gm_column_y->proc~gm_block_below_bed proc~gm_compute_impl gm_compute_impl proc~gm_compute_impl->proc~gm_column_x proc~gm_compute_impl->proc~gm_column_y proc~gm_compute_transports gm_compute_transports proc~gm_compute_transports->proc~gm_compute_impl proc~run_gm_step run_gm_step proc~run_gm_step->proc~gm_compute_transports proc~ocean_dyn_step_split ocean_dyn_step_split proc~ocean_dyn_step_split->proc~run_gm_step

Source Code

   pure function gm_block_below_bed(sfn, e_top_l, e_bot_l, bed_r, e_top_r, e_bot_r, bed_l) &
      result(sfn_b)
      !$acc routine seq
      !! MOM6 bottom-blocking ("Avoid moving dense water upslope from below the
      !! level of the bottom on the receiving side").  `sfn` is the unlimited
      !! streamfunction at an interface: the transport of everything BELOW
      !! it, `> 0` from L to R.  Its donor layer is the one just below the
      !! interface on the donor side (`[e_bot, e_top]`).
      !!
      !!   * donor layer entirely below the RECEIVING column's bed
      !!     (`e_top < bed`): zero — GM may not push water into the rock (on
      !!     an open z-level step, into the fillers below the shallow column's
      !!     bed, which the remap then hands to its bottom live layer: a
      !!     transport THROUGH the step);
      !!   * donor layer straddling that bed: scaled by the fraction of the
      !!     donor layer above it.
      !!
      !! Bottom-up heights (m, +up): `e_top_*`/`e_bot_*` the top/bottom of the
      !! donor layer on each side, `bed_*` each column's bed `−D`.
      real(wp), intent(in) :: sfn, e_top_l, e_bot_l, bed_r, e_top_r, e_bot_r, bed_l
      real(wp) :: sfn_b
      sfn_b = sfn
      if (sfn > 0.0_wp) then
         if (e_top_l < bed_r) then
            sfn_b = 0.0_wp
         else if (bed_r > e_bot_l) then
            sfn_b = sfn*((e_top_l - bed_r)/((e_top_l - e_bot_l) + H_DIV_EPS))
         end if
      else
         if (e_top_r < bed_l) then
            sfn_b = 0.0_wp
         else if (bed_l > e_bot_r) then
            sfn_b = sfn*((e_top_r - bed_l)/((e_top_r - e_bot_r) + H_DIV_EPS))
         end if
      end if
   end function gm_block_below_bed