openPMD-standard icon indicating copy to clipboard operation
openPMD-standard copied to clipboard

GridSpacing: Per-Component UnitSI & UnitDimension

Open ax3l opened this issue 9 years ago • 2 comments

The gridSpacing should get a unitSI and a unitDimension for each of its components.

This allows to describe grid such as x, ux or x,y,t (although the "time" definition per iteration would then be "for the first row").

ax3l avatar Apr 23 '16 05:04 ax3l

For gridUnitSI this seems quite simple: we just enter an array of floats (one element per dimension) instead of a single float. For gridDimension, it seems that the most natural thing would be to have a 2d array of dimension Nx7, where N is the number of dimensions. However, I am not sure that HDF5 (and others) support 2d arrays as attributes. Therefore, I guess that the best choice would be a flattened 2d array. @ax3l Any opinion?

RemiLehe avatar Apr 03 '18 14:04 RemiLehe

Sorry I missed the question. Yes, HDF5 does support 2D arrays as attributes, ADIOS afaik is limited to 1D arrays right now and as you found out: h5py does not expose that feature. So flattened to the same index order as the data (from fast varying index to slowest) is fine for me as well.

ax3l avatar Apr 24 '18 13:04 ax3l