- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑
Description:
This routine
reads co-ordinate information and from a text free-format file and converts it to floating-point values.
The file is like a relational catalogue with one record per related set of co-ordinates, however, exact
column alignment is not necessary. The converted input data are copied to an array. The array uses a
new line for each record of the file, its columns storing the given positional data in the order x, y, z etc.
If the end of file is not reached a flag is returned.
Invocation
CALL KPG1_RFCOx( FD,
DIM1, DIM2, POSCOD, COUNT, CODATA, LBND, : UBND, CMPLET, STATUS )
Arguments
FD = INTEGER (Given)
Fortran file identifier.
DIM1 = INTEGER (Given)
The first
dimension of the output array.
DIM2 = INTEGER (Given)
The second dimension of
the output array.
POSCOD( DIM1 ) = INTEGER (Given)
The column numbers of the
co-ordinate information in order x, y, z, etc. These must be positive.
COUNT = INTEGER
(Given and Returned)
The number of the line in the output array to be written first. If the
file has been completely read this becomes the number of data sets stored in the array
(i.e. one less). It should be initialised externally the first time this routine is called, but not
subsequently.
CODATA( DIM1, DIM2 ) = ? (Given and Returned)
The array to store the
co-ordinates read from the text file. It should be initialised externally the first time this routine
is called, but not subsequently.
LBND( DIM1 ) = ? (Given and Returned)
The lower
bounds of the input data, i.e. the minimum value for each co-ordinate. It should be initialised
externally the first time this routine is called, but not subsequently.
UBND( DIM1 ) = ?
(Given and Returned)
The upper bounds of the input data, i.e. the maximum value for
each co-ordinate. It should be initialised externally the first time this routine is called, but
not subsequently.
CMPLET = LOGICAL (Returned)
If .TRUE., the text file has been
completely read.
STATUS = INTEGER (Given and Returned)
The global status.
Notes:
-
There is a routine for real and double-precision data types: replace "
x"
in the routine name by R or D
respectively. The routine arguments CODATA, LBND and UBND must have the data type specified. _
The maximum permitted line length in the file is 256 characters. A line with a hash or shriek in
column one is treated as a comment.
-
The file is not closed on exit.
-
The record number is not initialised and so this routine reads from the current line in the file. Hence
this routine can be called repeatedly as the the output array is expanded to accommodate the input
data.
-
The numerical values can include embedded spaces following a
, -, D, or
E. See SLALIB (SUN/67) routines SLA_DFLTIN and SLA_FLOTIN for details of the conversion from
free-format to floating-point value. Missing columns that are not numeric cannot have these
embedded spaces.
Prior Requirements
- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑