get_constants Subroutine

private subroutine get_constants(me, nam, val, sss, n)

Obtain the constants from the ephemeris file.

Type Bound

jpl_ephemeris

Arguments

Type IntentOptional Attributes Name
class(jpl_ephemeris), intent(inout) :: me
character(len=6), intent(out), dimension(:) :: nam

array of constant names

real(kind=wp), intent(out), dimension(:) :: val

array of values of constants

real(kind=wp), intent(out), dimension(3) :: sss

jd start, jd stop, step of ephemeris

integer, intent(out) :: n

number of entries in nam and val arrays


Called by

proc~~get_constants~~CalledByGraph proc~get_constants jpl_ephemeris_module::jpl_ephemeris%get_constants proc~ephemeris_test jpl_ephemeris_module::ephemeris_test proc~ephemeris_test->proc~get_constants

Source Code

    subroutine get_constants(me,nam,val,sss,n)

    implicit none

    class(jpl_ephemeris),intent(inout)        :: me
    character(len=6),dimension(:),intent(out) :: nam  !! array of constant names
    real(wp),dimension(:),intent(out)         :: val  !! array of values of constants
    real(wp),dimension(3),intent(out)         :: sss  !! jd start, jd stop, step of ephemeris
    integer,intent(out)                       :: n    !! number of entries in `nam` and `val` arrays

    integer :: i

    if (me%initialized) then

        n   = me%ncon
        sss = me%ss

        do i=1,n
            nam(i) = me%cnam(i)
            val(i) = me%cval(i)
        enddo

    else
        write(error_unit,'(A)') 'error in get_constants: the ephemeris is not initialized.'
    end if

    end subroutine get_constants