openPMD / openPMD-standard

:notebook: Open Standard for Particle-Mesh Data
http://www.openPMD.org
Creative Commons Attribution 4.0 International
78 stars 27 forks source link

Consistency across a series? #197

Open C0nsultant opened 6 years ago

C0nsultant commented 6 years ago

Nowhere in the standard is it specified that attributes, groups and datasets must be consistent (at least their presence, name and position) across all files in a fileBased series.

The concrete undefined behaviour I ran into is this: Starting with #171, meshesPath and particlesPath are optional in the sense that their presence indicates the presence of the contained group. It is possible to have multiple iterations (and thus files) in a fileBased series where either of the attributes is present or not. This may vary across files (i.e. one iteration may suddenly contain no particles or meshes could suddenly pop out of the void).

ax3l commented 6 years ago

Yes, that's true. In openPMD-viewer we have an (optional) user flag checking and enforcing consistency during open.

It probably makes sense to ask for consistency in a series for those very practical reasons. And if varying structure (other records, etc.) need to be written to put it separate series. But I can also see how this leads to unnecessary many files, e.g. if one wants to dump a certain quantity often (in high temporal resolution) and another less often, because they evolve on different time scales (think: electrons vs. ions).

The same issue also affects groupBased series.