HTML automatically generated with rman
Table of Contents

Name

stou4 - convert snapshot to unit-4 for NBODYx

Synopsis

stou4 [parameter=value]

Description

stou4 converts a NEMO snapshot format to a fortran unformatted file, used in nbody1(1NEMO) and nbody2(1NEMO) to read initial conditions from an external file.

Note that some versions will now use ASCII, for which snapprint(1NEMO) will have to be used. nbody4(1NEMO) uses the ASCII version, controlled by setting KZ(22), and on unit-10 instead.

Parameters

The following parameters are recognized in any order if the keyword is also given:
in=
input file name, must be a snapshot(5NEMO) format. No default.
out=
output file name. [Default: fort.4]
header=|4|8
Fortran header size, **ignored now, fortran is used to write** By default the value determined to be the correct value for your compiler is used.

Fortran

The following type of fortran code will read from unformatted unit 4
  DO i=1,N
    READ (4)  BODY(I), (X(K,I),K=1,3), (XDOT(K,I),K=1,3)
  ENDDO
Note that another version of nbody2 used the READ (4,*) format, so a simple table using snapprint(1NEMO) can be made:
    % mkplummer out=p100 nbody=100
    % snapprint in=p100 options=m,x,y,z,vx,vy,vz > fort.4

See Also

u4tos(1NEMO) , nbody1(1NEMO) , nbody2(1NEMO) , snapshot(5NEMO)

Author

Peter Teuben

Update History


07-Apr-93    V0.0 Created    PJT
17-mar-04    better documented    PJT


Table of Contents