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

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_LDPOOL loads the variable assignments in an ASCII
   text kernel to the kernel pool.

   For important details concerning this module's function, please refer to
   the CSPICE routine ldpool_c.

I/O

   
   Given:
   
      filename   the scalar string name of a text kernel
   
   the call:
   
      cspice_ldpool, filename
   
   loads the assignments listed in 'filename' to the kernel pool.
   
   Note: This routine, has been superseded by cspice_furnsh. 
   NAIF recommends users load all kernel files for read-only data 
   access with cspice_furnsh.
   

Examples


   Any numerical results shown for this example may differ between
   platforms as the results depend on the SPICE kernels used as input
   and the machine specific arithmetic implementation.

   
      ;;
      ;; Create a leapseconds kernel, load it, then check
      ;; the pool for the data. 
      ;;
      ;; Start with the needed variable assignments.
      ;;
      LMPOOL_NVARS =  5
      LSK          = "ldpool.tls"
      NLINES       =  27
      textbuf      =                                                $
                   [                                                $
                   "DELTET/DELTA_T_A = 32.184",                     $
                   "DELTET/K         = 1.657D-3",                   $
                   "DELTET/EB        = 1.671D-2",                   $
                   "DELTET/M         = ( 6.239996 1.99096871D-7 )", $
                   "DELTET/DELTA_AT  = ( 10, @1972-JAN-1",          $
                   "                     11, @1972-JUL-1",          $
                   "                     12, @1973-JAN-1",          $
                   "                     13, @1974-JAN-1",          $
                   "                     14, @1975-JAN-1",          $
                   "                     15, @1976-JAN-1",          $
                   "                     16, @1977-JAN-1",          $
                   "                     17, @1978-JAN-1",          $
                   "                     18, @1979-JAN-1",          $
                   "                     19, @1980-JAN-1",          $
                   "                     20, @1981-JUL-1",          $
                   "                     21, @1982-JUL-1",          $
                   "                     22, @1983-JUL-1",          $
                   "                     23, @1985-JUL-1",          $
                   "                     24, @1988-JAN-1",          $
                   "                     25, @1990-JAN-1",          $
                   "                     26, @1991-JAN-1",          $
                   "                     27, @1992-JUL-1",          $
                   "                     28, @1993-JUL-1",          $
                   "                     29, @1994-JUL-1",          $
                   "                     30, @1996-JAN-1",          $
                   "                     31, @1997-JUL-1",          $
                   "                     32, @1999-JAN-1 )"         $
                   ]
   
   
      lmpoolNames  = [                    $
                     "DELTET/DELTA_T_A",  $
                     "DELTET/K",          $
                     "DELTET/EB",         $
                     "DELTET/M",          $
                     "DELTET/DELTA_AT"    $
                     ]
   
      ;;
      ;; Create a kernel file.  We must prepend a "\begindata" control
      ;; word before the kernel variable assignments.
      ;;   
      openw, LUN, LSK, /Get_Lun
   
      printf, LUN, "\begindata"
      
      for i = 0, (NLINES-1) do begin
        printf, LUN, textbuf[i]
      endfor
   
      ;;
      ;; Place a "\begintext" marker after the data assignments, 
      ;; just in case...
      ;;   
      printf, LUN, "\begintext"
      
      ;;
      ;; Close the new LSK.
      ;;
      close, LUN
      
      ;;
      ;; Load the LSK into the kernel pool.
      ;;
      cspice_ldpool, LSK
     
      ;;
      ;; Check the variable assignments now exist in the
      ;; pool.
      ;;
      for i = 0, (LMPOOL_NVARS-1) do begin
   
         ;;
         ;; Retrieve name, type, and array size for each
         ;; variable name.
         ;;
         cspice_dtpool, lmpoolNames[i], found, n, dtype
   
         if (found) then begin
            print, "Variable name : " + lmpoolNames[i]
            print, "Variable size : " + string(n)
            print, "Variable type : " + dtype
            print
         endif
   
      endfor
   
   IDL outputs:
   
      Variable name : DELTET/DELTA_T_A
      Variable size :            1
      Variable type : N
   
      Variable name : DELTET/K
      Variable size :            1
      Variable type : N
   
      Variable name : DELTET/EB
      Variable size :            1
      Variable type : N
   
      Variable name : DELTET/M
      Variable size :            2
      Variable type : N
   
      Variable name : DELTET/DELTA_AT
      Variable size :           46
      Variable type : N
   
   All five variable assignment found in the pool. A size 1 indicates 
   a scalar, type N indicates a numeric value.

Particulars


   Text kernels input to this routine need not have native line
   terminators for the platform. Lower level CSPICE routines can
   read and process non-native text files. This functionality does
   not exist in the Fortran SPICELIB.

Required Reading


   ICY.REQ
   KERNEL.REQ
   PCK.REQ

Version


   -Icy Version 1.0.0, 16-JUN-2003, EDW (JPL)

Index_Entries

 
   LOAD variables from a text kernel file into the pool 
 



Wed Apr  5 17:58:02 2017