the ephemeris must be initialized before this is called
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(jpl_ephemeris_splined), | intent(inout) | :: | me | |||
character(len=*), | intent(in) | :: | filename |
ephemeris file name |
||
integer, | intent(in), | optional | :: | ksize |
corresponding |
|
logical, | intent(in), | optional | :: | km |
defining physical units of the output states.
|
|
logical, | intent(in), | optional | :: | bary |
logical flag defining output center.
only the 9 planets are affected.
|
|
logical, | intent(out) | :: | status_ok |
true if there were no problems. |
||
real(kind=wp), | intent(in) | :: | et0 |
initial ephemeris time [sec] |
||
real(kind=wp), | intent(in) | :: | dt |
ephemeris time step [sec] |
||
real(kind=wp), | intent(in) | :: | etf |
final ephemeris time [sec] |
subroutine initialize_splinded_ephemeris(me,filename,ksize,km,bary,status_ok,et0,dt,etf) !! the ephemeris must be initialized before this is called class(jpl_ephemeris_splined),intent(inout) :: me character(len=*),intent(in) :: filename !! ephemeris file name integer,intent(in),optional :: ksize !! corresponding `ksize` logical,intent(in),optional :: km !! defining physical units of the output states. !! `km = .true.` : km and km/sec [default], !! `km = .false.` : au and au/day. logical,intent(in),optional :: bary !! logical flag defining output center. !! only the 9 planets are affected. !! `bary = .true.` : center is solar-system barycenter, !! `bary = .false.` : center is sun [default]. logical,intent(out) :: status_ok !! true if there were no problems. real(wp),intent(in) :: et0 !! initial ephemeris time [sec] real(wp),intent(in) :: dt !! ephemeris time step [sec] real(wp),intent(in) :: etf !! final ephemeris time [sec] write(*,'(A)') ' * Using splined ephemeris' ! have to first initialize the base one: call me%jpl_ephemeris%initialize(filename,ksize,km,bary,status_ok) status_ok = (etf>et0 .and. dt>0.0_wp) if (.not. status_ok) return ! initialize the global spline coefficients call me%initialize_globals(et0, abs(dt), etf) ! now, the local variables in this class allocate(me%earth_eph_interface%w0(3*kx)) allocate(me%sun_eph_interface%w0(3*kx)) allocate(me%ssb_eph_interface%w0(3*kx)) me%earth_eph_interface%inbvx = 0 me%sun_eph_interface%inbvx = 0 me%ssb_eph_interface%inbvx = 0 ! point to the global ephemeris: me%earth_eph_interface%eph => earth_eph me%sun_eph_interface%eph => sun_eph me%ssb_eph_interface%eph => ssb_eph end subroutine initialize_splinded_ephemeris