| dtpool |
|
Table of contents
Procedure
DTPOOL (Data for a kernel pool variable)
ENTRY DTPOOL ( NAME, FOUND, N, TYPE )
Abstract
Return the data about a kernel pool variable.
Required_Reading
KERNEL
Keywords
CONSTANTS
FILES
Declarations
CHARACTER*(*) NAME
LOGICAL FOUND
INTEGER N
CHARACTER*(*) TYPE
Brief_I/O
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
NAME I Name of the variable whose value is to be returned.
FOUND O .TRUE. if variable is in pool.
N O Number of values returned for NAME.
TYPE O Type of the variable 'C', 'N', 'X'
Detailed_Input
NAME is the name of the variable whose values are to be
returned.
Detailed_Output
FOUND is .TRUE. if the variable is in the pool .FALSE. if it
is not.
N is the number of values associated with NAME.
If NAME is not present in the pool N will be returned
with the value 0.
TYPE is the type of the variable associated with NAME.
'C' if the data is character data
'N' if the data is numeric.
'X' if there is no variable NAME in the pool.
Parameters
None.
Exceptions
Error free.
1) If the name requested is not in the kernel pool, FOUND
will be set to .FALSE., N to zero and TYPE to 'X'.
Files
None.
Particulars
This routine allows you to determine whether or not a kernel
pool variable is present and to determine its size and type
if it is.
Examples
The numerical results shown for this example may differ across
platforms. The results depend on the SPICE kernels used as
input, the compiler and supporting libraries, and the machine
specific arithmetic implementation.
1) The following program demonstrates how to determine the
properties of a stored kernel variable. The program prompts
for text kernel name and for the name of a kernel variable.
If the variable is present in the kernel pool, the dimension
and type of the variable are displayed.
Example code begins here.
PROGRAM DTPOOL_EX1
IMPLICIT NONE
C
C SPICELIB functions
C
INTEGER RTRIM
C
C Local constants
C
INTEGER FILSIZ
PARAMETER ( FILSIZ = 256 )
INTEGER KVNMLN
PARAMETER ( KVNMLN = 33 )
C
C Local variables
C
CHARACTER*(FILSIZ) FNAME
CHARACTER*(KVNMLN) VARNAM
CHARACTER*(1) VTYPE
INTEGER N
LOGICAL FOUND
C
C Prompt for the name of a text-kernel file.
C
CALL PROMPT ( 'Enter text-kernel name > ', FNAME )
C
C Load the kernel.
C
CALL FURNSH ( FNAME )
CALL PROMPT ( 'Enter name of kernel variable > ',
. VARNAM )
CALL DTPOOL ( VARNAM, FOUND, N, VTYPE )
IF ( FOUND ) THEN
WRITE(*,*) ' '
WRITE(*,*) 'Properties of variable ',
. VARNAM(:RTRIM(VARNAM)), ':'
WRITE(*,*) ' '
WRITE(*,*) ' Size: ', N
IF ( VTYPE .EQ. 'C' ) THEN
WRITE(*,*) ' Type: Character'
ELSE
WRITE(*,*) ' Type: Numeric'
END IF
ELSE
WRITE(*,*) VARNAM,
. ' is not present in the kernel pool.'
END IF
END
When this program was executed on a Mac/Intel/gfortran/64-bit
platform, using the FK file named cas_v40.tf to ask for the
variable 'FRAME_-82104_NAME', the output was:
Enter text-kernel name > cas_v40.tf
Enter name of kernel variable > FRAME_-82104_NAME
Properties of variable FRAME_-82104_NAME:
Size: 1
Type: Character
Restrictions
None.
Literature_References
None.
Author_and_Institution
N.J. Bachman (JPL)
J. Diaz del Rio (ODC Space)
W.L. Taber (JPL)
Version
SPICELIB Version 8.1.1, 17-AUG-2021 (JDR)
Edited the header to comply with NAIF standard.
Added complete code example.
SPICELIB Version 8.1.0, 19-MAR-2009 (NJB)
ZZPINI call was updated for compatibility
with new watcher system implementation.
SPICELIB Version 8.0.1, 22-DEC-2004 (NJB)
Corrected an in-line comment relating to finding the
head node of the conflict resolution list for NAME.
SPICELIB Version 8.0.0, 04-JUN-1999 (WLT)
Added the entry points PCPOOL, PDPOOL and PIPOOL to allow
direct insertion of data into the kernel pool without having
to read an external file.
Added the interface LMPOOL that allows SPICE
programs to load text kernels directly from memory
instead of requiring a text file.
Added the entry point SZPOOL to return kernel pool definition
parameters.
Added the entry point DVPOOL to allow the removal of a variable
from the kernel pool.
Added the entry point GNPOOL to allow users to determine
variables that are present in the kernel pool
SPICELIB Version 7.0.0, 20-SEP-1995 (WLT)
The implementation of the kernel pool was completely redone
to improve performance in loading and fetching data. In
addition the pool was upgraded so that variables may be
either string or numeric valued.
The entry points GCPOOL, GDPOOL, GIPOOL and DTPOOL were added
to the routine.
|
Fri Dec 31 18:36:16 2021