This HTML automatically generated with rman for NEMO
Table of Contents

Name

atos, atos_sp atosph, atosph_sp - convert ascii N-body file to structured binary format

Synopsis

atos in=ascii_file out=snap_file [parameter=value] ...

Description

atos converts an ascii file containing one or more N-body frames into structured binary format. Most commonly, atos is used to convert output files produced on remote supercomputers. atos_sp is similar, but uses single precision. Finally, atosph and atosph_sp convert ascii Smoothed Particle Hydrodynamics data files to binary format.

The NEMO convention is to store the SPH particles first in arrays where SPH and pure N-body particles are stored.

For a more general ASCII conversion program, see tabtos(1NEMO)

Parameters

The following parameters are recognized.
in=ascii_file
Input data is read from ascii_file, which must be in the format described below. Default: none.
out=snap_file
Converted output data is appended to snap_file in snapshot(5NEMO) format. If snap_file does not exist, it is created. Default: none.
options=option_list
Specifies data expected in input file; one or more of mass, pos, vel, phase, phi, and acc. Also, atosph recognizes rho, temp, and hsph. Note that if pos or vel is specified, phase may not be, and vise versa. Default: mass,phase (for atos), mass,phase,rho,temp,hsph,phi (for atosph).
hexpack=flag
If true, read particle data in packed hexadecimal format as output by treecode(1NEMO) . Default: false.
headline=string
Random verbiage written before first snapshot. Only if a headline is given will a headline and history be written to the output file. Default: none.

Input File Formats

The standard ascii N-body file format is as follows:


NOBJ                        number of bodies [integer]
NDIM                        number of dimensions [integer]
TIME                        time of snapshot [real]
MASS(i)                     particle masses, i = 1...NOBJ [real]
  . . . . .
X(i) Y(i) Z(i)              particle positions, i = 1...NOBJ [real]
  . . . . .
VX(i) VY(i) VZ(i)           particle velocities, i = 1...NOBJ [real]
  . . . . .
PSI(i)                      particle potentials, i = 1...NOBJ [real]
  . . . . .
AX(i) AY(i) AZ(i)           particle accelerations, i = 1..NOBJ [real]
  . . . . .

The SPH file format is as follows:


NOBJ NGAS                   number of bodies, gas particles [integer]
NDIM                        number of dimensions [integer]
TIME                        time of snapshot [real]
MASS(i)                     particle masses, i = 1...NOBJ [real]
  . . . . .                        (the first NGAS particles are the SPH particles)
X(i) Y(i) Z(i)              particle positions, i = 1...NOBJ [real]
  . . . . .
VX(i) VY(i) VZ(i)           particle velocities, i = 1...NOBJ [real]
  . . . . .
RHO(i)                      gas densities, i = 1...NGAS [real]
  . . . . .
TEMP(i)                     gas temperatures, i = 1...NGAS [real]
  . . . . .
HSPH(i)                     gas smoothings, i = 1...NGAS [real]
  . . . . .
PSI(i)                      particle potentials, i = 1...NOBJ [real]
  . . . . .
AX(i) AY(i) AZ(i)           particle accelerations, i = 1..NOBJ [real]
  . . . . .

Subsets of these full data files may be read by setting the right combination of options. However, all data arrays present in the input must be specified, and the ordering is fixed as shown here. These formats may be repeated until end-of-file.

For upward compatibility the header elements (NOBJ [NGAS] NDIM and TIME) can now appear in the order,

See Also

stoa(1NEMO) , rsf(1NEMO) , tsf(1NEMO) , tabtos(1NEMO) , filestruct(3NEMO) , snapshot(5NEMO) .

Author

Joshua E. Barnes, Peter Teuben

Update History


23-Mar-87    V 1.0: created        PJT
11-May-88    V 2.0: created        JEB
01-July-88    V 2.1: hexpack flag    JEB
27-Sep-88    V 2.2: options phi, acc    PJT
01-Dec-88    V 2.3: SPH options    JEB
28-Mar-89    V 2.4: error checking    JEB
17-sep-90    V 2.6: header logic improved    PJT
15-may-97    V3.0: added binary= keywords    PJT


Table of Contents