tbl Function

private pure function tbl(jd) result(itbl)

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.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: jd

julian date (eg 2451545.0)

Return Value integer

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 3000bc3000ad julian date out of range for ephemeris.

Called by

proc~~tbl~~CalledByGraph proc~tbl standish_module::tbl proc~helio standish_module::helio proc~helio->proc~tbl proc~standish_module_test standish_module::standish_module_test proc~standish_module_test->proc~helio proc~standish_rv_func standish_module::standish_ephemeris%standish_rv_func proc~standish_module_test->proc~standish_rv_func proc~standish_rv_func->proc~helio

Source Code

    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