Index of Functions: A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 
Index Page
rdkvar

Table of contents
Procedure
Abstract
Required_Reading
Keywords
Declarations
Brief_I/O
Detailed_Input
Detailed_Output
Parameters
Exceptions
Files
Particulars
Examples
Restrictions
Literature_References
Author_and_Institution
Version

Procedure

     RDKVAR ( Read the next variable from a kernel file )

     SUBROUTINE RDKVAR ( TABSYM, TABPTR, TABVAL, NAME, EOF )

Abstract

     Read the next variable from a SPICE ASCII kernel file into a
     double precision symbol table.

Required_Reading

     KERNEL
     SYMBOLS

Keywords

     FILES

Declarations

     IMPLICIT NONE

     INTEGER               LBCELL
     PARAMETER           ( LBCELL = -5 )

     CHARACTER*(*)         TABSYM     ( LBCELL:* )
     INTEGER               TABPTR     ( LBCELL:* )
     DOUBLE PRECISION      TABVAL     ( LBCELL:* )
     CHARACTER*(*)         NAME
     LOGICAL               EOF

     INTEGER               LINLEN
     PARAMETER           ( LINLEN = 80 )

Brief_I/O

     VARIABLE  I/O  DESCRIPTION
     --------  ---  --------------------------------------------------
     TABSYM,
     TABPTR,
     TABVAL    I-O  Symbol table.
     NAME       O   Name of the variable.
     EOF        O   End of file indicator.
     LINLEN     P   Maximum line length.

Detailed_Input

     TABSYM,
     TABPTR,
     TABVAL   are the components of a double precision symbol table. On
              input, the table may or may not contain any variables.

Detailed_Output

     TABSYM,
     TABPTR,
     TABVAL   on output, contains the name and values of the next
              variable in kernel file. Depending on the assignment
              directive, the values in the file may replace or augment
              any existing values.

      NAME    is the name of the variable. NAME is blank if no variable
              is read.

      EOF     is .TRUE. when the end of the kernel file has been
              reached, and is .FALSE. otherwise. The kernel file is
              closed automatically when the end of the file is reached.

Parameters

     LINLEN   is the maximum length of a line in the kernel file.

Exceptions

     1)  If an error occurs parsing a date from the kernel file, the
         error SPICE(DATEEXPECTED) is signaled.

     2)  If an error occurs parsing a numeric value from the kernel
         file, the error SPICE(NUMBEREXPECTED) is signaled.

Files

     RDKVAR reads from the file most recently opened by RDKNEW.

Particulars

     None.

Examples

     In the following example, RDKNEW and RDKVAR are used to read
     the contents of two kernel files into a single symbol table.
     First, the table is cleared.

         CALL SCARDC ( 0, TABSYM )
         CALL SCARDI ( 0, TABPTR )
         CALL SCARDD ( 0, TABVAL )

     Next, the files are opened and read individually.

         DO I = 1, 2
            CALL RDKNEW ( KERNEL(I), EOF )

            DO WHILE ( .NOT. EOF )
               CALL RDKVAR ( TABSYM, TABPTR, TABVAL, NAME, EOF )
            END DO
         END DO

     Let the files KERNEL(1) and KERNEL(2) contain

         ===========================================================

         \begindata
         DELTA_T_A       =   32.184
         K               =    1.657D-3
         ORBIT_ECC       =    1.671D-2
         MEAN_ANOM       = (  6.239996D0,  1.99096871D-7 )

         ===========================================================

     and

         ===========================================================
         \begindata
          K               =    0.0D0
         ===========================================================

     respectively. Then the contents of the symbol table are

          DELTA_T_A  -->   32.184
          K          -->    0.0D0
          MEAN_ANOM  -->    6.239996D0
                            1.99096871D-7
          ORBIT_ECC  -->    1.671D-2

     In particular, the value of K read from the second file replaces
     the value read from the first file.

Restrictions

     1)  The input file must be opened and initialized by RDKNEW prior
         to the first call to RDKVAR.

Literature_References

     None.

Author_and_Institution

     J. Diaz del Rio    (ODC Space)
     W.L. Taber         (JPL)
     I.M. Underwood     (JPL)

Version

    SPICELIB Version 1.2.0, 17-JUN-2021 (JDR)

        Added IMPLICIT NONE statement.

        Edited the header to comply with NAIF standard.

    SPICELIB Version 1.1.0, 10-MAR-1992 (WLT)

        Changed the length of the local character variable ERROR so
        that it would always have a length greater than the lengths of
        the character string values placed into it.

    SPICELIB Version 1.0.1, 10-MAR-1992 (WLT)

        Comment section for permuted index source lines was added
        following the header.

    SPICELIB Version 1.0.0, 31-JAN-1990 (IMU)
Fri Dec 31 18:36:41 2021