Close the SPICE ephemeris and unload all the kernels.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(spice_ephemeris), | intent(inout) | :: | me |
subroutine close_spice_ephemeris(me) implicit none class(spice_ephemeris),intent(inout) :: me integer :: i !! counter #ifdef HAS_SPICELIB !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() #else error stop 'this library was not built with SPICELIB support' #endif end subroutine close_spice_ephemeris