Close the ephemeris.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(jpl_ephemeris), | intent(inout) | :: | me |
subroutine close_ephemeris(me) implicit none class(jpl_ephemeris),intent(inout) :: me logical :: is_open integer :: istat if (me%initialized) then !close the file: inquire(unit=me%nrfile,opened=is_open,iostat=istat) if (is_open) close(unit=me%nrfile,iostat=istat) !initialize all class variables to defaults: call clear(me) end if contains subroutine clear(eph) !! clear all the variables in the [[jpl_ephemeris]] class. implicit none class(jpl_ephemeris),intent(out) :: eph end subroutine clear end subroutine close_ephemeris