calculate_wrf_dvgch_Derivative Module Function

module function calculate_wrf_dvgch_Derivative(self, h) result(dqw_dh)

Arguments

Type IntentOptional Attributes Name
class(type_wrf_dvgch), intent(in) :: self
real(kind=real64), intent(in) :: h

Return Value real(kind=real64)


Source Code

    module function calculate_wrf_dvgch_Derivative(self, h) result(dqw_dh)
        implicit none
        class(type_wrf_dvgch), intent(in) :: self
        real(real64), intent(in) :: h
        real(real64) :: dqw_dh

        if (h < 0.0d0) then
            dqw_dh = (self%theta_s - self%theta_r) * &
                     (self%w1 * self%alpha1**self%n1 * self%m1 * self%n1 * (-h)**(self%n1 - 1.0d0) * &
                      (1.0d0 + (-self%alpha1 * h)**self%n1)**(-self%m1 - 1.0d0) &
                      + self%w2 * self%alpha1**self%n2 * self%m2 * self%n2 * (-h)**(self%n2 - 1.0d0) * &
                      (1.0d0 + (-self%alpha1 * h)**self%n2)**(-self%m2 - 1.0d0))
        else
            dqw_dh = 0.0d0
        end if
    end function calculate_wrf_dvgch_Derivative