Table of Contents
u3tos - Convert NBODY unit 3 output data to snapshot
u3tos in=OUT3
out=snapshot_file [parameter=value]
u3tos converts the output
of one of the Aarseth NBODY integrators (see e.g. nbody1(1NEMO)
) to a snapshot
file for further manipulation wihtin NEMO.
The binary output file (normally
called OUT3) normally has to be converted on the host machine where the
simulations have been run, although some support exists for cross-platform
usage, in particular when only endianism is the issue.
It is strongly recommended
to use unfio(1NEMO)
and check if a dataset looks ok. You may also need
to set swap=t in this program, as well as a mode= and header= choice.
The
following parameters are recognized in any order if the keyword is also
given:
- in=
- Input file (in NBODY’s OUT3 binary format). Is known to work with
OUT3 files from NBODY1, NBODY2 and NBODY5. No default.
- out=
- Output file (snapshot(5NEMO)
format). No default.
- frame=
- Frames to read (0=all). Currently only 1 frame,
or all, can be selected for output. Default: 0.
- alen=
- Use this if you need
to override the length of the A array that is present in the data dumps.
Normally the header I/O routine will figure this out for you. There are
some older format dumps that do not contain this variable. Use 0 to process
old datafiles that do not have an A array. By default this variable is not
set (autodetection via header).
- swap=t|f
- Should bytes be swapped upon reading?
This allows reading data that were created on a machine that had the opposite
endianism from the one you’re using this program one. By default no byte
swapping is performed.
- mode=1|2|4
- Which of the nbodyX style of output to support.
Allowed are 1 and 2 (identical actually) and 4 (which also outputs rho
and phi,and an addition key for each particle). Default: 1
- header=|4|8
- Header
size of the fortran unformatted data. This is 4 (old fortran) or 8 (modern
compilers, such as gfortran). By default the value determined to be the
correct value for your compiler is used.
- integer=2|4
- Signal the reader what
kind of INTEGERs were used in the output dataset. Older data may have used
INTEGER*2, which limits the number of particles to 32767, patched programs
(and presumably later official versions from Sverre) will always write
INTEGER*4 (or having the same size as a REAL), [Default: 4].
At the
current time the mode= and header= must be known in order for the conversion
to succeed. There is no runtime autodetection of formats yet.
Peter
Teuben
nbody1(NEMO), runbody4(1NEMO)
, unfio(1NEMO)
, u4tos(1NEMO)
stou4(1NEMO)
, snapshot(5NEMO)
07-Apr-93 V1.0 Created PJT
29-mar-94 V1.1 added optional override alen=, deleted mode= PJT
10-jun-95 V1.1c bug in alen implementation fixed PJT
1-mar-06 V1.2 nbody4 support PJT
4-mar-06 V1.4 header= has now a blank default PJT
Table of Contents