You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/details/backendconfig.rst
+28-1
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,18 @@ The fundamental structure of this JSON configuration string is given as follows:
14
14
15
15
This structure allows keeping one configuration string for several backends at once, with the concrete backend configuration being chosen upon choosing the backend itself.
16
16
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.
18
29
Generally, keys of the configuration are *lower case*.
19
30
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.
20
31
@@ -36,6 +47,11 @@ For a consistent user interface, backends shall follow the following rules:
36
47
Backend-independent JSON configuration
37
48
--------------------------------------
38
49
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
+
39
55
The key ``defer_iteration_parsing`` can be used to optimize the process of opening an openPMD Series.
40
56
By default, a Series is parsed eagerly, i.e. opening a Series implies reading all available iterations.
41
57
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:
99
115
``"none"`` can be used to disable chunking.
100
116
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.
101
117
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.
0 commit comments