Open franzpoeschel opened 3 years ago
Thank you for raising this. We introduced the clarification in openPMD 1.1 to ease readers, but the choice should indeed be considered a defect.
It's easier to check for existence at read time than the problem it introduces at write time. I am still thinking if we should also mak the attribute optional, which is clearer for purely mesh- or particle-containing series. This then means we need at read time two checks: attribute exists (y/n) - no means no meshes/particles in the series - and then value points to something existing (y/n).
This then means we need at read time two checks: attribute exists (y/n) - no means no meshes/particles in the series - and then value points to something existing (y/n).
So, a one-sided implication? Current rule: mesh group exists <-> meshesPath is set Your suggestion: mesh group exists -> meshesPath is set
If yes, sounds good with me.
Issue first noticed while working on this PR for the openPMD API. Quoting the technical files on
meshesPath
andparticlesPath
:Since both these attributes live at the root level of the hierarchy and cannot be defined specifically per iteration, this makes it impossible to have a Series where only some, but not all iterations contain meshes/particles. If I'm not mistaken, this holds true for file-based as well as group-based iteration layout. So, I suggest replacing
with
Reading software would then need to check for group existence.