close_spice_ephemeris Subroutine

private subroutine close_spice_ephemeris(me)

Close the SPICE ephemeris and unload all the kernels.

Type Bound

spice_ephemeris

Arguments

Type IntentOptional Attributes Name
class(spice_ephemeris), intent(inout) :: me

Calls

proc~~close_spice_ephemeris~~CallsGraph proc~close_spice_ephemeris spice_ephemeris_module::spice_ephemeris%close_spice_ephemeris interface~kclear spice_ephemeris_module::kclear proc~close_spice_ephemeris->interface~kclear interface~unload spice_ephemeris_module::unload proc~close_spice_ephemeris->interface~unload

Source Code

    subroutine close_spice_ephemeris(me)

    implicit none

    class(spice_ephemeris),intent(inout) :: me

    integer :: i  !! counter

    !unload all the kernels:
    if (allocated(me%kernels)) then
        do i=1,size(me%kernels)
            call unload(trim(me%kernels(i)))
        end do
        deallocate(me%kernels)
    end if

    !clear the system:
    call kclear()

    end subroutine close_spice_ephemeris