Skip to content

Outputs

Actionbot edited this page Oct 22, 2024 · 21 revisions

This page describes various data formats and options for storing simulation snapshots. For simulation logs recording, for example, performance, load balancing, and memory consumption, see Simulation Logs.

Compilation Options

Related options: SUPPORT_HDF5  

Runtime Parameters

Parameters described on this page: OPT__OUTPUT_TOTAL,   OPT__OUTPUT_PART,   OPT__OUTPUT_TEXT_FORMAT_FLT,   OPT__OUTPUT_USER,   OPT__OUTPUT_PAR_MODE,   OPT__OUTPUT_PAR_MESH,   OPT__OUTPUT_BASEPS,   OPT__OUTPUT_BASE,   OPT__OUTPUT_POT,   OPT__OUTPUT_PAR_DENS,   OPT__OUTPUT_CC_MAG,   OPT__OUTPUT_PRES,   OPT__OUTPUT_TEMP,   OPT__OUTPUT_ENTR,   OPT__OUTPUT_CS,   OPT__OUTPUT_DIVVEL,   OPT__OUTPUT_MACH,   OPT__OUTPUT_DIVMAG,   OPT__OUTPUT_LORENTZ,   OPT__OUTPUT_3VELOCITY,   OPT__OUTPUT_ENTHALPY,   OPT__OUTPUT_USER_FIELD,   OPT__OUTPUT_MODE,   OPT__OUTPUT_RESTART,   OUTPUT_STEP,   OUTPUT_DT,   OUTPUT_WALLTIME,   OUTPUT_WALLTIME_UNIT,   OUTPUT_PART_X,   OUTPUT_PART_Y,   OUTPUT_PART_Z,   INIT_DUMPID,  

Other related parameters: none

Parameters below are shown in the format:   Name   (Valid Values)   [Default Value]

  • OPT__OUTPUT_TOTAL   (0=off, 1=HDF5, 2=C-binary)   [1]

    • Description: Output the simulation snapshots in the specified binary format (HDF5 or simple C-binary), which will store all simulation information such as grid data, particle data, tree structure, runtime parameters, and compilation options. These snapshots can be used for restarting simulations. The snapshot filename is currently fixed to Data_%06d. See also OPT__OUTPUT_MODE for specifying the data dump frequency.
    • Restriction: OPT__OUTPUT_TOTAL=1 is only applicable when enabling the compilation option SUPPORT_HDF5. Data analysis with yt is currently only supported for the HDF5 snapshots of GAMER.

  • OPT__OUTPUT_PART   (0=off, 1=xy, 2=yz, 3=xz, 4=x, 5=y, 6=z, 7=diagonal)   [0]

  • OPT__OUTPUT_TEXT_FORMAT_FLT   (%XX.YYe)   [%24.16e]

  • OPT__OUTPUT_USER   (0=off, 1=on)   [0]

  • OPT__OUTPUT_PAR_MODE   (0=off, 1=text files, 2=C-binary files)   [0]

    • Description: Output particle data in either the text or binary format. This option is mainly for debugging purposes since the simulation snapshots (with the option OPT__OUTPUT_TOTAL) already store particle data.
    • Restriction:

  • OPT__OUTPUT_PAR_MESH   (0=off, 1=on)   [1]

    • Description: Map mesh attributes to tracer particles and output them in the HDF5 snapshots. Edit Input__Par_Mesh to specify the desired mesh attributes. An example file can be found at example/input/Input__Par_Mesh.
    • Restriction: Only applicable when enabling TRACER and setting OPT__OUTPUT_TOTAL to 1.

  • OPT__OUTPUT_BASEPS   (0=off, 1=on)   [0]

    • Description: Output the mass density power spectrum on the root level.
    • Restriction:

  • OPT__OUTPUT_BASE   (0=off, 1=on)   [0]

    • Description: Only output the base-level (i.e., root level) data for OPT__OUTPUT_PART.
    • Restriction:

  • OPT__OUTPUT_POT   (0=off, 1=on)   [1]

    • Description: Output the gravitational potential data on grids.
    • Restriction:

  • OPT__OUTPUT_PAR_DENS   (0=off, 1=particle mass density, 2=total mass density)   [0]

    • Description: Store the particle or total mass density on grids in the simulation snapshots. The particle interpolation scheme is set by PAR_INTERP.
    • Restriction: Only applicable when enabling OPT__OUTPUT_TOTAL.

  • OPT__OUTPUT_CC_MAG   (0=off, 1=on)   [1]

    • Description: Output the cell-centered magnetic field (mandatory for yt analysis).
    • Restriction: For MHD only.

  • OPT__OUTPUT_PRES   (0=off, 1=on)   [0]

    • Description: Output the gas pressure (or gas + cosmic-ray pressure when enabling COSMIC_RAY) on grids. Magnetic pressure is always excluded.
    • Restriction:

  • OPT__OUTPUT_TEMP   (0=off, 1=on)   [0 for HD, 1 for SRHD]

    • Description: Output the gas temperature on grids.
    • Restriction:

  • OPT__OUTPUT_ENTR   (0=off, 1=on)   [0]

    • Description: Output the gas entropy on grids.
    • Restriction: Mainly used by the gamma-law EoS.

  • OPT__OUTPUT_CS   (0=off, 1=on)   [0]

    • Description: Output the sound speed on grids.
    • Restriction:

  • OPT__OUTPUT_DIVVEL   (0=off, 1=on)   [0]

    • Description: Output the divergence of gas velocity on grids.
    • Restriction:

  • OPT__OUTPUT_MACH   (0=off, 1=on)   [0]

    • Description: Output the Mach number on grids.
    • Restriction:

  • OPT__OUTPUT_DIVMAG   (0=off, 1=on)   [0]

    • Description: Output $|\nabla \cdot B| \Delta h / |B|$, where $B$ is the magnetic field and $\Delta h$ is cell width.
    • Restriction: For MHD only.

  • OPT__OUTPUT_LORENTZ   (0=off, 1=on)   [0]

    • Description: Output the SRHD Lorentz factor on grids.
    • Restriction: For SRHD only.

  • OPT__OUTPUT_3VELOCITY   (0=off, 1=on)   [0]

    • Description: Output the SRHD three-velocity on grids.
    • Restriction: For SRHD only.

  • OPT__OUTPUT_ENTHALPY   (0=off, 1=on)   [1]

    • Description: Output the SRHD reduced enthalpy on grids.
    • Restriction: For SRHD only.

  • OPT__OUTPUT_RESTART   (0=off, 1=on)   [0]

    • Description: Output a snapshot immediately after restarting a simulation. It can be useful if some physical quantities change during restart (e.g., new particles are added).
    • Restriction:

  • OUTPUT_STEP   (>0)   [none]

  • OUTPUT_DT   (>0.0)   [none]

  • OUTPUT_WALLTIME_UNIT   (0=second, 1=minute, 2=hour, 3=day)   [0]

  • OUTPUT_PART_X   (within the simulation domain)   [-1.0]

  • OUTPUT_PART_Y   (within the simulation domain)   [-1.0]

  • OUTPUT_PART_Z   (within the simulation domain)   [-1.0]

  • INIT_DUMPID   (≥0; <0 → set to default)   [-1]

    • Description: Set the first data dump ID. Note that it is unnecessary to set this value in most cases, even when restarting simulations, unless you want to overwrite the default value.
    • Restriction:

Remarks

Enforcing Outputs

Typically, the simulation output interval is controlled by OUTPUT_STEP, OUTPUT_DT, or the timetable Input__DumpTable depending on OPT__OUTPUT_MODE. One can also enforce output by creating a file named DUMP_GAMER_DUMP (e.g., using touch DUMP_GAMER_DUMP) in the same directory as the executable gamer. The program will check the existence of this file after every root-level update. If it is detected, the program will output data (assuming at least one of the output options described on this page is enabled) and delete the file DUMP_GAMER_DUMP. Note that this functionality is supported only when the runtime parameter OPT__MANUAL_CONTROL is on.


Links

Clone this wiki locally