HTML automatically generated with rman
Table of Contents

Name

u3tos - Convert NBODY unit 3 output data to snapshot

Synopsis

u3tos in=OUT3 out=snapshot_file [parameter=value]

Description

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.

A tricky part of the format is the inclusion of (for lack of a better name) virtual particles, which describe a KS object. Normally these are the result of close binaries (or higher order chain) being regularized. The nbody= can be used to exlude such particles. The result is now that each snapshot in an integration will have the same number of particles.

Parameters

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|6
Which of the nbodyX style of output to support. Allowed are 1 and 2 (identical actually), 4 (which also outputs rho and phi,and an addition key for each particle), and 6. Default: 1
key=name|key
Which of the NBODY6 arrays to put in the Key snapshot tag.
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].
nbody=
Limit the body number ("NAME" in NBODY6, and Key if key=name) written. This will effectly remove the virtual KS particles in case binaries were regularized. Default: not used.

Caveats

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.

Potentials are stored as positive values, scaled by the wrong mass still.

Author

Peter Teuben

See Also

nbody1(1NEMO) , runbody4(1NEMO) , unfio(1NEMO) , u4tos(1NEMO) stou4(1NEMO) , snapshot(5NEMO)

Update History


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
19-feb-19    V1.6 added support for nbody6++ (mode=6)    PJT
5-apr-19    V1.7 nbody= to limit particle output for nbody6    PJT


Table of Contents