xvpread(model,filename,header,x,y,z,vx,vy,vz,pmass,ppot,ierr) xvpwrite(model,filename,header,x,y,z,vx,vy,vz,pmass,ppot,ierr)
In the original xmv (Quinn) version (3-dimensional) positions, velocities, and masses were stored, including a header, which describes the size of the upcoming data.
In the xvp Balcells-extension the masses are stored in the header (assuming the masses come in up to 13 groups) and the column which used to store the masses now contain the potentials.
Since this extension is annotated in the header, the xvp format is upward compatible with the xvm format.
header(1)=number of particles in this (and all subsequent) snapshot(s) header(2)=iteration number header(3)=time header(4)=total energy header(5)=total angular momentum header(6)=total mass header(8)=G (Newton’s constant) header(9)=epsilon (the gravitational softening length) header(18)=1 if a satellite is present , 0 if not. | ??? header(19)=ndim (only 3 is supported) header(20)=1 if two-galaxies model, 0 otherwise header(21)=ngal1+1 | gal2 comes after gal1 header(22)=mtot1 header(23)=r0 galaxy 1 (half mass radius) header(24)=rmax galaxy 1 (initial rmax) header(25,26,27)= am(x,y,z) galaxy 1 header(28)=mtot2 header(29)=r0 galaxy 2 (half mass radius) header(30)=rmax galaxy 2 (initial rmax) header(31,32,33)= am(x,y,z) galaxy 2 header(100) = 1 file contains xvp, not xvm, 0 otherwise header(101) = nmasses number of body mass groups header(102) = n1 bodies 1:n1 have mass m1 header(103) = m1 the body mass m1 header(104) = n2 bodies n1+1:n2 have mass m2 header(105) = m2 header(106) = n3 header(107) = m3 etc. max 13 mass groups ... header(126) = n13 header(127) = m13 header(128) | currently unused header(129) | remainder unused ... header(896) | last header elementNote that formally up to 7*128 are available, but the last 6*128 are currently not in use.
data(1,2,3) positions (NDIM=3 assumed here) data(4,5,6) velocities data(7) auxilliary (mass/potential) data(8,9,10) positions ... etc.
The header has no record of NOBYTES (4 or 8) or a version number (sic).
VMS may not be supported in NEMO.
~/src/nbody/io/xvpsnap.c sample conversion code ~/usr/balcells/nora/{xvpread.f,xvpwrite.f} sample I/O routines
25-may-94 documentation written PJT