find_dvhbt_dv Function

public pure function find_dvhbt_dv(v, BTC) result(dvhbt_dv)

Meridional mirror of find_duhbt_du.

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)


Source Code

   pure function find_dvhbt_dv(v, BTC) result(dvhbt_dv)
      !! Meridional mirror of `find_duhbt_du`.
      !$acc routine seq
      real(wp), intent(in) :: v
      type(local_BT_cont_v_type), intent(in) :: BTC
      real(wp) :: dvhbt_dv

      if (v == 0.0_wp) then
         dvhbt_dv = 0.5_wp*(BTC%FA_v_N0 + BTC%FA_v_S0)
      else if (v < BTC%vBT_NN) then
         dvhbt_dv = BTC%FA_v_NN
      else if (v < 0.0_wp) then
         dvhbt_dv = BTC%FA_v_N0 + 3.0_wp*BTC%vh_crvN*v**2
      else if (v <= BTC%vBT_SS) then
         dvhbt_dv = BTC%FA_v_S0 + 3.0_wp*BTC%vh_crvS*v**2
      else
         dvhbt_dv = BTC%FA_v_SS
      end if
   end function find_dvhbt_dv