This HTML automatically generated with rman for NEMO
Table of Contents

Name

uns2uns - a universal converting tool for UNS snapshots.

Synopsis

uns2uns in=uns_input out=uns_output select=selection type=uns_type [parameter=value] ...

Description

uns2uns reads an UNS N-body systems and outputs another UNS N-body systems. It can convert an uns input file to an uns output file. It can also copy out some components and/or physical quantities from an uns file to another one.

In and Out can be in a different type (ex conversion from Nemo to Gadget OR Gadget to Nemo).

In and Out can also be in the same format and the user can select a subset of the components and/or a subset of physical quantities to save.

There are two kinds of nbody file structure:

- range file structure (RFS), like NEMO, where data are identified
by range of indexes (ex 0:999 for the disk and 1000:9999 for the halo).
- component file structure (CFS), like GADGET or RAMSES where data are identified by
component name (disk, gas, halo, stars, bulge, bndry).

Parameters

The following parameters are recognized.
in=uns input file
Currently, the following input files are supported: Nemo, Gadget3, Gadget2, Gadget1, RAMSES, list of files, sqlite3 uns data base
out=uns output file
Output data will be written to out_file in the format type specified from the parameter type=
select=input/output particles selection
this parameter select the input particles which will be saved in the output file. There are several possible syntax. It can be a range of index (RFS input, ex: select=0:999,3000:4000 ) or a list of components (CFS input, ex: select=disk,stars), separated by coma.

There are a special syntax when in=RFS and out=CFS (ex Nemo to Gadget conversion), which is : select=comp1@range+comp2@range (ex: select=gas@0:1000+disk@300:400). For more details, see EXAMPLES below.

type=uns type format
we specify here the type of the output file. Currently, the following output files are supported: nemo, gadget2, gadget3
bits=physical quantities to saved
If this parameter is left blank, then all physical quantities will be saved, this is the default behaviour. Here is the list of differents values: ’m’ mass
’x’ position
’v’ velolcity
’p’ potential
’a’ acceleration
’e’ softening
’k’ keys array (from nemo)
’X’ aux array (from nemo)
’R’ density
’I’ particles’s Id
’U’ Internal energy
’M’ metallicity
’A’ stars’s age
’H’ hsml
’T’ temperature

ex: bits=xRH will save positions, densities and hsml

(see also :
https://projets.lam.fr/projects/unsio/wiki/UnsioVariablesUtilisation#How-to-select-data-at-loading)

Examples

In the following examples, we assume that fileg2 is a GADGET2 file, filenemo is a NEMO file, filelist is a list of file and simname is a simulation’s name stored in an uns sqlite3 database.
- Gadget to Nemo conversion:
1) uns2uns in=fileg2 out=filenemo select=disk,stars type=nemo bits=mx

Convert a gadget file to nemo file, by selecting the mass and the positions of disk and stars components.

2) uns2uns in=filelist out=filenemo select=disk,stars

type=nemo bits=mx first=t

Do exactly the same conversion as 1) but from a list of file. Each output files will have a trailing number.

- Nemo to Gadget conversion:
uns2uns in=filenemo out=fileg2 select=gas@0:100+halo@200:300

type=gadget2

Convert a Nemo file to Gadget2 by setting nemo particles from range [0:100] to gadget2 gas component, and nemo particles from range [200:300] to gadget2 halo component.

- Physical quantities selection:
1)

uns2uns in=fileg2 out=fileg22 select=gas type=gadget2 bits=xRH

Create a gadget2 file from another gadget2 file, by keeping only positions, densities and hsml of gas component.

2) uns2uns in=simname out=fileg22 select=gas

type=gadget2 bits=xRH first=t

Do exactly the same thing as 1) but on all files stored in the uns sqlite3 database which match to entry ’simname’. Each output files will have a trailing number.

See Also

snapmask(1NEMO) , snapcopy(1NEMO) , snapshot(5NEMO) , uns_info(1NEMO)
https://projets.lam.fr/projects/unsio/wiki

Author

Jean-Charles LAMBERT

History


05-Jul-11    V1.0 created    JCL
17-Mar-20    V2.0 bugs fixed    JCL


Table of Contents