Skip to content

Commit 3f202a7

Browse files
authored
Merge pull request #1 from franzpoeschel/topic-variableBasedEncoding
Updates to variable-based encoding
2 parents cee7330 + d7f3d59 commit 3f202a7

File tree

2 files changed

+25
-17
lines changed

2 files changed

+25
-17
lines changed

FORMAT_ADIOS.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,27 @@ Output from `bpls -A` for a boolean attribute `pybool` stored in the location of
3333
There is no convention yet for a unique representation of ADIOS2 variables with boolean type.
3434
Thus, implementations should cast the data to and from `unsigned char` instead.
3535

36-
## `stepBased` Encoding of Iterations
36+
## `variableBased` Encoding of Iterations
3737

38-
The `iterationEncoding` mode `stepBased` must be implemented via ADIOS steps.
38+
The `iterationEncoding` mode `variableBased` must be implemented via ADIOS steps.
3939

4040
## Datasets
4141

42-
An openPMD **data set** is represented by an group prefix that contains an ADIOS variable `__data__`.
42+
An openPMD **data set** is represented by an ADIOS `Variable` at the location where it would usually be stored.
4343

4444
**attributes** are defined further below and can also appear at the dataset's **group** prefix level.
4545

4646
## Attributes
4747

48-
openPMD **attributes** stored as ADIOS `Variables` at the location where they would usually be stored.
48+
openPMD **attributes** stored as ADIOS `Attributes` at the location where they would usually be stored.
4949

5050
Example for a mesh record `E` with record component `x` and attributes `unitDimension` and `unitSI`:
5151
```
52-
double /data/meshes/E/unitDimension 10*{7}
53-
double /data/meshes/E/x/__data__ 10*{1000}
54-
double /data/meshes/E/x/position 10*{1}
55-
double /data/meshes/E/x/unitSI 10*scalar
52+
double /data/meshes/E/unitDimension attr = {1, 1, -3, -1, 0, 0, 0}
53+
double /data/meshes/E/x {128, 2048, 128}
54+
double /data/meshes/E/x/position attr = {0.5, 0.5, 0.5}
55+
double /data/meshes/E/x/unitSI attr = 1.22627e+13
5656
```
5757

58-
This example uses `stepBased` iteration encoding, but other iteration encodings would work similarly with their respective `basePath` prefix.
58+
This example uses `variableBased` iteration encoding, but other iteration encodings would work similarly with their respective `basePath` prefix.
5959

STANDARD.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Each file's *root* group (path `/`) must at least contain the attributes:
9090
- allowed values:
9191
- see *Iterations and Time Series* below
9292
- for `fileBased` and `groupBased`, this is fixed to `/data/%T/`
93-
- for `stepBased` this is fixed to `/data/`
93+
- for `variableBased` this is fixed to `/data/`
9494
- note: all the data that is formatted according to the present
9595
standard (i.e. both the meshes and the particles) is to be
9696
stored within a path of the form given by `basePath` (e.g. in
@@ -214,9 +214,9 @@ Each file's *root* group (path `/`) must further define the attributes:
214214
is an other `open/close` call necessary to access other
215215
iterations
216216
- allowed values:
217-
- `fileBased` (multiple files)
218-
- `groupBased` (one file)
219-
- `stepBased` (one file with internal encoding for iterations, if supported by the data format)
217+
- `fileBased` (multiple files; one iteration per file)
218+
- `groupBased` (one file; iterations use groups in that file)
219+
- `variableBased` (one file; if the data format supports to store multiple iterations in the same variables and attributes)
220220

221221
- `iterationFormat`
222222
- type: *(string)*
@@ -233,13 +233,13 @@ Each file's *root* group (path `/`) must further define the attributes:
233233
- `filename_%T.h5` (without file system directories)
234234
- for `groupBased`: (fixed value)
235235
- `/data/%T/` (must be equal to and encoded in the `basePath`)
236-
- for `stepBased`: (fixed value)
236+
- for `variableBased`: (fixed value)
237237
- data-format internal convention
238238
- *slowest varying index* of data
239239

240-
### `stepBased` Encoding of Iterations
240+
### `variableBased` Encoding of Iterations
241241

242-
In order to correlate openPMD iterations with an index of data-format internal updates/steps or an index in the slowest varying dimension of an array, the *root* group (path `/`) must contain an additional variable once `stepBased` is chosen for `iterationEncoding`:
242+
In order to correlate openPMD iterations with an index of data-format internal updates/steps or an index in the slowest varying dimension of an array, the iteration base path (default: path `/data`) must contain an additional variable once `variableBased` is chosen for `iterationEncoding`:
243243

244244
- `snapshot`
245245
- type: 1-dimensional array containing N *(int)* elements, where N is the number of updates/steps in the data format
@@ -248,11 +248,19 @@ In order to correlate openPMD iterations with an index of data-format internal u
248248
- advice to implementers: an openPMD iteration might be spread over multiple updates/steps, but not vice versa.
249249
In such a scenario, an individual openPMD record's update/step must appear exactly once per iteration.
250250

251+
Notes:
252+
253+
* In implementations without support for storing multiple versions of datasets/attributes, the variable-based encoding of iterations may still be used for storage of a single iteration.
254+
In that case, the `snapshot` attribute is optional and defaults to zero (0).
255+
* In implementations with support for storing multiple versions of datasets/attributes, the `snapshot` attribute may optionally be used in group-based encoding to associate openPMD iterations with IO steps.
256+
In group-based encoding, there is still only one instance of this attribute globally (`/data/snapshot`).
257+
In consequence, the attribute shall only be written if modifiable attributes are supported by the implementation.
258+
251259

252260
Required Attributes for the `basePath`
253261
--------------------------------------
254262

255-
In addition to holding information about the iteration, each series of files (`fileBased`), series of groups (`groupBased`) or internally encoded iterations (`stepBased`) should have attributes that describe the current time and the last time step.
263+
In addition to holding information about the iteration, each series of files (`fileBased`), series of groups (`groupBased`) or internally encoded iterations (`variableBased`) should have attributes that describe the current time and the last step.
256264

257265
- `time`
258266
- type: *(floatX)*

0 commit comments

Comments
 (0)