mean_molecular_weight_ratio_lower Function

private pure function mean_molecular_weight_ratio_lower(Z)

Arguments

TypeIntentOptionalAttributesName
real(kind=wp), intent(in) :: Z

Return Value real(kind=wp)


Calls

proc~~mean_molecular_weight_ratio_lower~~CallsGraph proc~mean_molecular_weight_ratio_lower mean_molecular_weight_ratio_lower proc~find find proc~mean_molecular_weight_ratio_lower->proc~find

Called by

proc~~mean_molecular_weight_ratio_lower~~CalledByGraph proc~mean_molecular_weight_ratio_lower mean_molecular_weight_ratio_lower proc~mean_molecular_weight_lower mean_molecular_weight_lower proc~mean_molecular_weight_lower->proc~mean_molecular_weight_ratio_lower proc~coesa_atmosphere COESA_atmosphere proc~coesa_atmosphere->proc~mean_molecular_weight_lower proc~speed_of_sound_86km speed_of_sound_86km proc~coesa_atmosphere->proc~speed_of_sound_86km proc~coesa_density COESA_density proc~coesa_density->proc~mean_molecular_weight_lower proc~speed_of_sound_86km->proc~mean_molecular_weight_lower

Contents


Source Code

pure real(wp) function mean_molecular_weight_ratio_lower(Z)
    real(wp),intent(in) :: Z
    integer :: i
    if (Z < Ztable(1)) then
        mean_molecular_weight_ratio_lower = 1.0_wp
    else if (Z > Ztable(size(Ztable))) then
        error stop "altitude above maximum value in table"
    else
        i = find(Z, Ztable)
        mean_molecular_weight_ratio_lower = &
            Mratiotable(i) + (Mratiotable(i + 1) - Mratiotable(i)) / &
            (Ztable(i + 1) - Ztable(i)) * (Z - Ztable(i))
    end if
end function mean_molecular_weight_ratio_lower