Changes
Page history
version 4.2
authored
Sep 26, 2025
by
Udo Ziegler
Hide whitespace changes
Inline
Side-by-side
4-CAIVS-user-guide/4.1-Purpose.md
View page @
66239644

`4.1`
CAIVS is a converter for NIRVANA snapshot files (
`NIR#.#`
; cf.
[
NIRVANA: snapshot files
](
https://gitlab.aip.de/ziegler/NIRVANA/-/wikis/3-NIRVANA-user-guide/3.3-Output-data#snapshot-files
)
) into data
formats that are more suitable for visualization and postprocessing.
Various output formats are supported for data readers of visualization
tools like
## Purpose
The purpose of CAIVS is to convert NIRVANA output data, i.e. snapshot
files
`NIR#.#`
(cf.
[
NIRVANA: snapshot
files
](
https://gitlab.aip.de/ziegler/NIRVANA/-/wikis/3-NIRVANA-user-guide/3.3-Output-data#snapshot-files
)
),
into a data format which is more suitable for visualization and
postprocessing. Various output formats are possible supporting data
reading in visualization tools like
[
IDL
](
https://www.l3harrisgeospatial.com/Software-Technology/IDL
)
,
[
VisIt
](
https://wci.llnl.gov/simulation/computer-codes/visit
)
or
[
ParaView
](
https://www.paraview.org/
)
.
Physical variables contained in a NIRVANA
snapshot can be individually selected for output in the CAIVS user interface. A user can also define own variables derived from
the imported snapshot variables. Different options exist to operate on
the input mesh before ouput data is produced. For instance, data
conversion can be restricted to a user-defined subdomain or, to name a
second example, an adaptive mesh can be transformed onto a unigrid with
resolution equivalent to some refinement level of the original mesh.
Output files produced by CAIVS get names
`#.format`
where
`#`
is a
user-specified number, and the suffix
`format`
∈{
`nir`
,
`silo`
,
`csv`
,
`h5`
,
`raw`
}
stands for one of the possible output formats. If variables are
requested to be written out in separate files (cf.
[
Specification of parameters
](
4.2-User-interfaces#specification-of-parameters
)
)
the output file name reads
`#.variable_name.format`
where
`variable_name`
represents the name of the selected variable.
[
ParaView
](
https://www.paraview.org/
)
.
Physical variables contained in a NIRVANA snapshot file can be
individually selected for processing. A user can, in addition, define
own variables derivable from the imported variables and add it to the
output. Moreover, different options exist to operate on the input mesh
before ouput data is produced. For instance, data conversion can be
restricted to a user-defined spatial subdomain, or an adaptive mesh can
be transformed onto a uniform mesh with resolution equivalent to a
specified refinement level of the original mesh (if the resulting grid
size fits memory).
Output files produced by CAIVS are named
`#.format`
where
`#`
is a
user-specified number (usually chosen to be identical with the timestep
number of the input snapshot file), and the suffix
`format`
$
\i
n${
`nir`
,
`silo`
,
`csv`
,
`h5`
,
`raw`
} stands for one of the
possible output formats described below. Variables can also be requested
to be written out in separate files named
`#.variable_name.format`
where
the additional attribute
`variable_name`
marks the variable.
CAIVS currently supports the following output formats:
#### CAIVS native format (`#.nir`)
#### CAIVS native format (`#.nir`
files
)
The CAIVS native file format is a proprietary, self-describing data
format with a textual header containing metadata about the mesh
structure followed by physical data in binary form.
structure followed by physical data in binary form. This format is the
authors preferred format for importing data in IDL.
The NIRVANA software provides an IDL reader for the native data format
called
`readNIR.pro`
. The IDL procedure
`readNIR.pro`
is located in the
subdirectory
`/caivs/idl`
.
`readNIR.pro`
is able to import multi-block
data resulting from an AMR simulation. However, visualization of AMR
data in IDL is non-trivial. NIRVANA provides a few prototype procedures
in
`/caivs/idl`
to show how AMR data imported by
`readNIR.pro`
could be
handled including a wrapper for a multi-block contour plot.
CAIVS provides an IDL reader called
`readNIR.pro`
which is located in
the subdirectory
`/caivs/idl`
.
`readNIR.pro`
is able to import
multi-block data from an AMR simulation. However, visualization of AMR
data in IDL is non-trivial. CAIVS provides a few prototype routines,
located in
`/caivs/idl`
, to show how AMR data could be dealed with,
e.g., a wrapper for a multi-block contour plot.
#### Silo (`#.silo`)
#### Silo (`#.silo`
files
)
The
[
Silo
](
https://wci.llnl.gov/simulation/computer-codes/silo
)
data
format is a self-describing format developed at the Lawrence Livermore
National Laboratory. The CAIVS Silo export module was developed on basis
of version 4.8 of the Silo library using the low-level storage driver
PDB. Silo is
th
e favorit import format
in
VisIt.
PDB. Silo is
on
e favorit import format
for
VisIt.
*
Note: The
Silo output
option
requires the installation of the Silo
library and the
configuration of the CAIVS makefile
`Makefile_CAIVS`
located
in directory
`/caivs/bin`
(cf.
[
Quick
tutorial
](
2-Getting-started#quick-tutorial
)
)
.
*
Using
Silo output requires the installation of the Silo
library and the
configuration of the CAIVS makefile
`Makefile_CAIVS`
, the latter located
in directory
`/caivs/bin`
(cf.
[
Quick
tutorial
](
https://gitlab.aip.de/ziegler/NIRVANA/-/wikis/
2-Getting-started#quick-tutorial
)
)
#### CSV-like (`#.csv`)
#### CSV-like (`#.csv`
files
)
The Comma-Separated-Variables-like format is a text file in form of a
table. The produced file is not strictly CSV because the first two rows
do not store datapoints.
Also
entries are not separated by
commas but by
blanks. The first row contains information in the order:
timestep cycle
number, physical time, problem dimension,
coord geometry, geometry of
vector variables, number of columns
and, finally, number of datapoints.
The second row contains column labels. Physical data
actually starts
with the third row. Data rows are of the form
do not store datapoints.
Furthermore,
entries are not separated by
commas but by
blanks. The first row contains information in the order:
timestep
number, physical time, problem dimension,
type of coordinate
system, geometry of
vector variables, number of columns
, number of
datapoints.
The second row contains column labels. Physical data
actually starts
with the third row. Data rows are of the form
x y [z] variable1 variable2 ....
Data from 2D simulations store only the
*x*
- and
*y*
-coordinate. The
Data from 2D simulations store only the
$x$
- and
$y$
-coordinate. The
number of data rows equals the number of cells (or cell nodes) in the
output mesh.
The NIRVANA software provides an IDL reader for the CSV-like data format
called
`readCSV.pro`
. The IDL procedure
`readCSV.pro`
is located in the
subdirectory
`/caivs/idl`
.
CAIVS provides an IDL reader for the CSV-like data format called
`readCSV.pro`
which is located in the subdirectory
`/caivs/idl`
.
*
Note: CSV-like files are usually larger in size and slower to read than
native format files.
*
CSV-like files are usually larger in size and slower to read in IDL than
CAIVS native format files. CSV outout is only useful for smaller data
sets.
#### HDF5 (`#.h5`)
#### HDF5 (`#.h5`
files
)
Output files of this type are formatted according to the
[
HDF5
](
https://www.hdfgroup.org/solutions/hdf5/
)
standard. Like the
CAIVS native and Silo formats HDF5 is a self-describing file format. In
contrast to the
se
formats, however, HDF5 does not adhere to a fixed
contrast to the
former
formats, however, HDF5 does not adhere to a fixed
layout by definition. This means that CAIVS produces its own flavoured
HDF5 format. Therefore, the HDF5 data file
`#.h5`
is accompanied by a
[
XDMF2
](
https://www.xdmf.org/index.php/Xdmf2
\
_Model
\
_and
\
_Format
\
_Archive
)
[
XDMF2
](
https://www.xdmf.org/index.php/Xdmf2_Model_and_Format_Archive
)
file named
`#.h5.xmf`
. The XDMF2 file is a XML-like descriptor which
determines that the output data file is a HDF5 file and deposits the
applied HDF5 layout. Visualization tools like VisIt or ParaView usually
provide an XDMF reader in order to import associated HDF5 data.
*
Note: The HDF5 output option requires the installation of the HDF5
library and the configuration of the CAIVS makefile
`Makefile_CAIVS`
located in directory
`/caivs/bin`
(cf.
[
Quick tutorial
](
2-Getting-started#quick-tutorial
)
).
*
#### RAW (`#.raw`)
In the RAW output file format data arrays of variables are written out in binary
form without any metadata and without grid structure information. This output
format may be only useful for data from uniform grid simulations
using a visualization tool which allows to separately specify grid information
by hand
(e.g.
[
Vapor
](
https://www.vapor.ucar.edu
)
).
PREV:
[
3.6 Code limitations
](
https://gitlab.aip.de/ziegler/NIRVANA/-/wikis/3-NIRVANA-user-guide/3.6-Code-limitations
)
NEXT:
[
4.2 User interfaces
](
https://gitlab.aip.de/ziegler/NIRVANA/-/wikis/4-CAIVS-user-guide/4.2-User-interfaces
)
deposits the applied HDF5 layout. Visualization tools like VisIt or
ParaView usually provide an XDMF reader in order to import associated
HDF5 data.
The HDF5 output option requires the installation of the HDF5 library and
the configuration of the CAIVS makefile
`Makefile_CAIVS`
located in
directory
`/caivs/bin`
(cf.
[
Quick
tutorial
](
https://gitlab.aip.de/ziegler/NIRVANA/-/wikis/2-Getting-started#quick-tutorial
)
)
#### RAW (`#.raw` files)
In the RAW output file format data arrays of variables are written out
in binary form without any metadata and without grid structure
information. This output format may be only useful for data from uniform
grid simulations using a visualization tool which allows to specify grid
information by hand (e.g.
[
Vapor
](
https://www.vapor.ucar.edu
)
).