find_vhbt Function

public pure function find_vhbt(v, BTC) result(vhbt)

Meridional mirror of find_uhbt.

Arguments

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

Return Value real(kind=wp)


Called by

proc~~find_vhbt~~CalledByGraph proc~find_vhbt find_vhbt proc~barotropic_substep_linear barotropic_substep_linear proc~barotropic_substep_linear->proc~find_vhbt proc~barotropic_substep_nonlinear barotropic_substep_nonlinear proc~barotropic_substep_nonlinear->proc~find_vhbt 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_vhbt(v, BTC) result(vhbt)
      !! Meridional mirror of `find_uhbt`.
      !$acc routine seq
      real(wp), intent(in) :: v
      type(local_BT_cont_v_type), intent(in) :: BTC
      real(wp) :: vhbt

      if (v == 0.0_wp) then
         vhbt = 0.0_wp
      else if (v < BTC%vBT_NN) then
         vhbt = (v - BTC%vBT_NN)*BTC%FA_v_NN + BTC%vh_NN
      else if (v < 0.0_wp) then
         vhbt = v*(BTC%FA_v_N0 + BTC%vh_crvN*v**2)
      else if (v <= BTC%vBT_SS) then
         vhbt = v*(BTC%FA_v_S0 + BTC%vh_crvS*v**2)
      else
         vhbt = (v - BTC%vBT_SS)*BTC%FA_v_SS + BTC%vh_SS
      end if
   end function find_vhbt