Skip to content

Commit b783973

Browse files
committed
Documentation
1 parent 8b13ce0 commit b783973

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

docs/source/details/backendconfig.rst

+28-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,18 @@ The fundamental structure of this JSON configuration string is given as follows:
1414

1515
This structure allows keeping one configuration string for several backends at once, with the concrete backend configuration being chosen upon choosing the backend itself.
1616

17-
The configuration is read in a case-sensitive manner.
17+
Options that can be configured via JSON are often also accessible via other means, e.g. environment variables.
18+
The following list specifies the priority of these means, beginning with the lowest priority:
19+
20+
1. Default values
21+
2. Automatically detected options, e.g. the backend being detected by inspection of the file extension
22+
3. Environment variables
23+
4. JSON configuration. For JSON, a dataset-specific configuration overwrites a global, Series-wide configuration.
24+
5. Explicit API calls such as ``setIterationEncoding()``
25+
26+
The configuration is read in a case-insensitive manner, keys as well as values.
27+
An exception to this are string values which are forwarded to other libraries such as ADIOS1 and ADIOS2.
28+
Those are read "as-is" and interpreted by the backend library.
1829
Generally, keys of the configuration are *lower case*.
1930
Parameters that are directly passed through to an external library and not interpreted within openPMD API (e.g. ``adios2.engine.parameters``) are unaffected by this and follow the respective library's conventions.
2031

@@ -36,6 +47,11 @@ For a consistent user interface, backends shall follow the following rules:
3647
Backend-independent JSON configuration
3748
--------------------------------------
3849

50+
The openPMD backend can be chosen via the JSON key ``backend`` which recognizes the alternatives ``["hdf5", "adios1", "adios2", "json"]``.
51+
52+
The iteration encoding can be chosen via the JSON key ``iteration_encoding`` which recognizes the alternatives ``["file_based", "group_based", "variable_based"]``.
53+
Note that for file-based iteration encoding, specification of the expansion pattern in the file name (e.g. ``data_%T.json``) remains mandatory.
54+
3955
The key ``defer_iteration_parsing`` can be used to optimize the process of opening an openPMD Series.
4056
By default, a Series is parsed eagerly, i.e. opening a Series implies reading all available iterations.
4157
Especially when a Series has many iterations, this can be a costly operation and users may wish to defer parsing of iterations to a later point adding ``{"defer_iteration_parsing": true}`` to their JSON configuration.
@@ -99,6 +115,17 @@ Explanation of the single keys:
99115
``"none"`` can be used to disable chunking.
100116
Chunking generally improves performance and only needs to be disabled in corner-cases, e.g. when heavily relying on independent, parallel I/O that non-collectively declares data records.
101117

118+
ADIOS1
119+
^^^^^^
120+
121+
ADIOS1 allows configuring custom dataset transforms via JSON:
122+
123+
.. literalinclude:: adios1.json
124+
:language: json
125+
126+
This configuration can be passed globally (i.e. for the ``Series`` object) to apply for all datasets.
127+
Alternatively, it can also be passed for single ``Dataset`` objects to only apply for single datasets.
128+
102129

103130
Other backends
104131
^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)