Index Page
cspice_dvpool
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_DVPOOL deletes a variable from the kernel pool.

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

I/O


   Given:

      name   a scalar string name of a pool variable to delete from the
             kernel pool. The name and associated values are removed from
             the kernel pool, freeing the occupied space.

             If watches are set on the variable designated by 'name',
             the corresponding agents are placed on the list of agents
             to notify of a kernel variable update.

   the call:

      cspice_dvpool, name

   performs the delete operation.

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.

      ;;
      ;; Load a kernel set.
      ;;
      cspice_furnsh, 'standard.tm'

      ;;
      ;; A template for the leapseconds kernel variables.
      ;;
      VAR = 'DELTET*'

      ;;
      ;; Query for the variable name, return 10 or less matches from
      ;; index 0.
      ;;
      INDEX  = 0
      ROOM   = 10
      STRLEN = 81

      cspice_gnpool, VAR, INDEX, ROOM, STRLEN, kervar, found

      print, 'Kernel pool state after load.'

      if (found) then begin

         ;;
         ;; Output the returned variable names.
         ;;
         for i=0, n_elements(kervar)-1 do begin
            print, 'Variable ' + string(i) + ' matching ' + VAR $
                 + ' : ', kervar[i]
         endfor

      endif else begin
         print, 'Failed to find  ' + VAR + ' in the kernel pool'
      endelse

      ;;
      ;; Delete the kernel pool variables returned from cspice_gnpool.
      ;;
      for i=0, n_elements(kervar)-1 do begin
         cspice_dvpool, kervar[i]
      endfor

      cspice_gnpool, VAR, INDEX, ROOM, STRLEN, kervar, found

      print, ' '
      print, 'Kernel pool state after load.'

      if (found) then begin

         ;;
         ;; Output the returned variable names.
         ;;
         for i=0, n_elements(kervar)-1 do begin
            print, '   Variable ' + string(i) + ' matching ' + VAR $
                 + ' : ', kervar[i]
         endfor

      endif else begin
         print, 'Failed to find  ' + VAR + ' in the kernel pool'
      endelse

      ;;
      ;; It's always good form to unload kernels after use,
      ;; particularly in IDL due to data persistence.
      ;;
      cspice_kclear

   IDL outputs:

      Kernel pool state after load.
      Variable        0 matching DELTET* : DELTET/DELTA_T_A
      Variable        1 matching DELTET* : DELTET/DELTA_AT
      Variable        2 matching DELTET* : DELTET/K
      Variable        3 matching DELTET* : DELTET/M
      Variable        4 matching DELTET* : DELTET/EB

      Kernel pool state after load.
      Failed to find  DELTET* in the kernel pool

Particulars


   This routine enables users to programmatically remove variables
   from the kernel pool, as opposed to having to clear the pool and
   reload it.

   Note that it is not necessary to remove kernel variables in order
   to simply update them; this routine should be used only when
   variables are to be removed.

Required Reading


   ICY.REQ
   KERNEL.REQ

Version


   -Icy Version 1.0.1, 29-APR-2011, EDW (JPL)

      Edits to I/O and Particulars section so as to parallel Mice version.

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

Index_Entries


   delete a kernel pool variable




Wed Apr  5 17:58:00 2017