temperature_upper Function

private pure function temperature_upper(Z)

Arguments

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

Return Value real(kind=wp)


Called by

proc~~temperature_upper~~CalledByGraph proc~temperature_upper temperature_upper proc~coesa_atmosphere COESA_atmosphere proc~coesa_atmosphere->proc~temperature_upper proc~coesa_density COESA_density proc~coesa_density->proc~temperature_upper

Contents

Source Code


Source Code

pure real(wp) function temperature_upper(Z)
    real(wp),intent(in) :: Z
    real(wp) :: Tc,A,aa,T9,LK9,Z9,T10,Z10,Tinf,lambda,xi
    if (Z <= 91000.0_wp) then
        temperature_upper = 186.8673_wp ! (K)
    elseif (Z <= 110000.0_wp) then
        Tc = 263.1905_wp ! (K)
        A = -76.3232_wp ! (K)
        aa = -19.9429_wp * 1000.0_wp ! (m)
        temperature_upper = Tc + A * sqrt(1.0_wp - ((Z - 91000.0_wp) / aa) ** 2)
    elseif (Z <= 120000.0_wp) then
        T9 = 240.0_wp ! (K)
        LK9 = 12.0_wp / 1000.0_wp ! (K / m)
        Z9 = 110000.0_wp ! (m)
        temperature_upper = T9 + LK9 * (Z - Z9)
    elseif (Z <= 1000000.0_wp) then
        T10 = 360.0_wp ! (K)
        Z10 = 120000.0_wp ! (m)
        Tinf = 1000.0_wp ! (K)
        lambda = 0.01875_wp / 1000.0_wp ! (1 / m)
        xi = (Z - Z10) * (r0 + Z10) / (r0 + Z)
        temperature_upper = Tinf - (Tinf - T10) * exp(-lambda * xi)
    end if
end function temperature_upper