WRPOOL ( Write the variables in pool to a specified unit )
ENTRY WRPOOL ( UNIT )
Write to a specified unit a set of "keyword = value" assignments
for all currently defined kernel variables. The assignments
constitute a text kernel from which the current state of the
kernel pool can be restored.
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
UNIT I Logical unit to which the variables in the pool
will be written.
UNIT is the logical unit to which the variables in the pool
will be written.
This routine writes to the specified logical unit the kernel
variables present in the kernel pool. Each variable consists of a
name and a set of associated values. The variables are written in
the form of a series of "keyword = value" assignments. The
assignments are preceded by a SPICE text kernel "\begindata"
The output of this routine, if written to a text file, is a SPICE
text kernel. The current contents of the kernel pool can be
restored by clearing the pool and then loading this text kernel.
If the values are to be written to an output kernel file, the
file should be opened with a logical unit determined by the
The following code fragment demonstrates how the data from
several kernel files can be loaded into a kernel pool. After the
pool is loaded, the values in the pool are written to a kernel
C Store in an array the names of the kernel files whose
C values will be loaded into the kernel pool.
KERNEL (1) = 'AXES.KER'
KERNEL (2) = 'GM.KER'
KERNEL (3) = 'LEAP_SECONDS.KER'
C Clear the kernel pool. (This is optional.)
C Load the variables from the three kernel files into the
C the kernel pool.
DO I = 1, 3
CALL LDPOOL ( KERNEL (I) )
C We can examine the values associated with any double
C precision variable in the kernel pool using GDPOOL.
CALL GDPOOL ( VARIABLE, 1, NMAX, NUMVAL, VALUES, FOUND )
C Open the new text file 'NEWKERNEL.KER'.
CALL TXTOPN ( 'NEWKERNEL.KER', UNIT )
C Write the values in the kernel pool to the file.
CALL WRPOOL ( UNIT )
N.J. Bachman (JPL)
H.A. Neilan (JPL)
I.M. Underwood (JPL)
SPICELIB Version 8.1.1, 30-JUN-2014 (NJB)
Updated header to more accurately describe the output
of this routine.
SPICELIB Version 8.1.0, 19-MAR-2009 (NJB)
Updated code example to use TXTOPN.
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
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. Both types are supported
SPICELIB Version 5.0.0, 22-AUG-1990 (NJB)
Increased value of parameter MAXVAL to 5000 to accommodate
storage of SCLK coefficients in the kernel pool.
SPICELIB Version 4.0.0, 12-JUN-1990 (IMU)
All entry points except POOL and CLPOOL now initialize the
pool if it has not been done yet.
SPICELIB Version 3.0.0, 23-OCT-1989 (HAN)
Added declaration of FAILED. FAILED is checked in the
DO-loops in LDPOOL and WRPOOL to prevent infinite looping.
SPICELIB Version 1.2.0, 9-MAR-1989 (HAN)
Parameters BEGDAT and BEGTXT have been moved into the
SPICELIB Version 1.1.0, 16-FEB-1989 (IMU) (NJB)
Parameters MAXVAR, MAXVAL, MAXLEN moved into Declarations.
(Actually, MAXLEN was implicitly 32 characters, and has only
now been made an explicit---and changeable---limit.)
Declaration of unused function FAILED removed.
SPICELIB Version 1.0.0, 8-JAN-1989 (IMU)