Determine which data set to use for highest accuracy for the given julian date.
Note
There was a typo in the original routine.
Note
Assumes that eph_set has only two elements.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | jd |
julian date (eg 2451545.0) |
Which data set to use:
pure function tbl (jd) result(itbl) implicit none real(wp), intent (in) :: jd !! julian date (eg 2451545.0) integer :: itbl !! Which data set to use: !! !! * itbl=1 jd in range of table 1 !! (1800ad-2050ad) - highest accuracy !! * itbl=2 jd outside range of table 1 !! but in range of table 2 (3000bc-3000ad) !! * itbl=0 3000bc<jd or jd>3000ad julian !! date out of range for ephemeris. if ((jd > eph_set(1)%jd_range(1)) .and. (jd < eph_set(1)%jd_range(2))) then itbl = 1 else if ((jd > eph_set(2)%jd_range(1)) .and. (jd < eph_set(2)%jd_range(2))) then itbl = 2 else itbl = 0 end if end if end function tbl