interpolation_index Function

private pure function interpolation_index(Z) result(i)

Arguments

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

Return Value integer


Calls

proc~~interpolation_index~~CallsGraph proc~interpolation_index interpolation_index proc~find find proc~interpolation_index->proc~find

Called by

proc~~interpolation_index~~CalledByGraph proc~interpolation_index interpolation_index proc~pressure_upper pressure_upper proc~pressure_upper->proc~interpolation_index proc~mean_molecular_weight_upper mean_molecular_weight_upper proc~mean_molecular_weight_upper->proc~interpolation_index proc~coesa_atmosphere COESA_atmosphere proc~coesa_atmosphere->proc~pressure_upper proc~coesa_atmosphere->proc~mean_molecular_weight_upper proc~coesa_density COESA_density proc~coesa_density->proc~pressure_upper proc~coesa_density->proc~mean_molecular_weight_upper

Contents

Source Code


Source Code

pure integer function interpolation_index(Z) result(i)
    real(wp),intent(in) :: Z
    ! Find the index for the lower side of the altitude interval
    i = find(Z, Ztableupper)
    ! We are going to reference all elements from i - 1 to i + 1, so we need to
    ! adjust the index away from the boundaries
    if (i==1) i = 2
end function interpolation_index