ektnam |
Table of contents
ProcedureEKTNAM ( EK, return name of loaded table ) ENTRY EKTNAM ( N, TABLE ) AbstractReturn the name of a specified, loaded table. Required_ReadingEK KeywordsEK FILES DeclarationsINTEGER N CHARACTER*(*) TABLE Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- N I Index of table. TABLE O Name of table. Detailed_InputN is the index of the table whose name is desired. The value of N ranges from 1 to the number of loaded tables, which count may be obtained from EKNTAB. Detailed_OutputTABLE is the name of the N'th loaded table. If TABLE is too small to accommodate the name, the name will be truncated on the right. ParametersTNAMSZ is the maximum allowed table name length. See the include file ektnamsz.inc for the actual value of this parameter. Exceptions1) If this routine is called when no files are loaded, the error SPICE(NOLOADEDFILES) is signaled. 2) If the input N is out of range, the error SPICE(INVALDINDEX) is signaled. FilesThe returned name is based on the currently loaded EK files. ParticularsThis routine is a utility that provides the caller with the name of a specified loaded table. The index of a table with a given name depends on the kernels loaded and possibly on the order in which the files have been loaded. ExamplesThe 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) Dump the names of all the loaded tables. Use the meta-kernel shown below to load the required SPICE kernels. KPL/MK File name: ektnam_ex1.tm This meta-kernel is intended to support operation of SPICE example programs. The kernels shown here should not be assumed to contain adequate or correct versions of data required by SPICE-based user applications. In order for an application to use this meta-kernel, the kernels referenced here must be present in the user's current working directory. The names and contents of the kernels referenced by this meta-kernel are as follows: File name Contents --------- -------- S78_CIMSSSUPa.bep Cassini Science Plan #78 S79_CIMSSSUPa.bep Cassini Science Plan #79 S79_status_pf.bes Cassini Spacecraft Sequence Status #79 \begindata KERNELS_TO_LOAD = ( 'S78_CIMSSSUPa.bep', 'S79_CIMSSSUPa.bep', 'S79_status_pf.bes' ) \begintext End of meta-kernel Example code begins here. PROGRAM EKTNAM_EX1 IMPLICIT NONE C C Include EK parameter declarations: C C EK Table Name Size C INCLUDE 'ektnamsz.inc' C C Local parameters. C CHARACTER*(*) META PARAMETER ( META = 'ektnam_ex1.tm' ) C C Local variables. C CHARACTER*(TNAMSZ) TABNAM INTEGER NTAB INTEGER TAB C C Load the EK files. Use a meta-kernel for convenience. C CALL FURNSH ( META ) C C Get the number of loaded tables. The count refers to the C number of logical tables; if multiple EKs contain data C for the same table, these EKs collectively contribute C only one table to the count. C CALL EKNTAB ( NTAB ) WRITE(*,'(A,I3)') 'Number of tables in EK subsystem:', . NTAB DO TAB = 1, NTAB C C Get the name of the current table, and display it. C CALL EKTNAM ( TAB, TABNAM ) WRITE(*,'(2A)') ' TABLE = ', TABNAM END DO END When this program was executed on a Mac/Intel/gfortran/64-bit platform, the output was: Number of tables in EK subsystem: 4 TABLE = CASSINI_SP_REQUEST TABLE = CASSINI_SP_OBSERVATION TABLE = CASSINI_SP_REQ_OBS TABLE = CASSINI_STATUS RestrictionsNone. Literature_ReferencesNone. Author_and_InstitutionN.J. Bachman (JPL) J. Diaz del Rio (ODC Space) VersionSPICELIB Version 2.1.0, 06-JUL-2021 (JDR) Added IMPLICIT NONE statement. Edited the header to comply with NAIF standard. Added complete code example. Added description of TNAMSZ parameter. SPICELIB Version 2.0.0, 16-NOV-2001 (NJB) Bug fix: When an already loaded kernel is opened with EKOPR, it now has its link count reset to 1 via a call to EKCLS. SPICELIB Version 1.0.1, 07-JUL-1996 (NJB) Previous version line was changed from "Beta" to "SPICELIB." SPICELIB Version 1.0.0, 23-OCT-1995 (NJB) |
Fri Dec 31 18:36:19 2021