find_uhbt Function

public pure function find_uhbt(u, BTC) result(uhbt)

Zonal mass transport through a u-face given face velocity u. C¹ continuous in u (cubic near zero, linear saturation beyond).

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: u
type(local_BT_cont_u_type), intent(in) :: BTC

Return Value real(kind=wp)


Called by

proc~~find_uhbt~~CalledByGraph proc~find_uhbt find_uhbt proc~barotropic_substep_linear barotropic_substep_linear proc~barotropic_substep_linear->proc~find_uhbt proc~barotropic_substep_nonlinear barotropic_substep_nonlinear proc~barotropic_substep_nonlinear->proc~find_uhbt proc~barotropic_substep_nonlinear_interior barotropic_substep_nonlinear_interior proc~barotropic_substep_nonlinear_interior->proc~barotropic_substep_nonlinear proc~bt_wide_substep bt_wide_substep proc~bt_wide_substep->proc~barotropic_substep_nonlinear proc~run_stage_split run_stage_split proc~run_stage_split->proc~barotropic_substep_nonlinear_interior proc~run_stage_split->proc~bt_wide_substep proc~ocean_dyn_step_split ocean_dyn_step_split proc~ocean_dyn_step_split->proc~run_stage_split proc~engine_step engine_step proc~engine_step->proc~ocean_dyn_step_split

Source Code

   pure function find_uhbt(u, BTC) result(uhbt)
      !! Zonal mass transport through a u-face given face velocity `u`.
      !! C¹ continuous in `u` (cubic near zero, linear saturation beyond).
      !$acc routine seq
      real(wp), intent(in) :: u
      type(local_BT_cont_u_type), intent(in) :: BTC
      real(wp) :: uhbt

      if (u == 0.0_wp) then
         uhbt = 0.0_wp
      else if (u < BTC%uBT_EE) then
         uhbt = (u - BTC%uBT_EE)*BTC%FA_u_EE + BTC%uh_EE
      else if (u < 0.0_wp) then
         uhbt = u*(BTC%FA_u_E0 + BTC%uh_crvE*u**2)
      else if (u <= BTC%uBT_WW) then
         uhbt = u*(BTC%FA_u_W0 + BTC%uh_crvW*u**2)
      else
         uhbt = (u - BTC%uBT_WW)*BTC%FA_u_WW + BTC%uh_WW
      end if
   end function find_uhbt