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
Is your feature request related to a problem? Please describe.
I am not sure what the best way to have data from different meshes is.
My simulations use logical Cartesian meshes, but they can be of different sizes (number of points).
They describe 2D surfaces in 3D and aren't necessarily connected.
Describe the solution you'd like
I would like to store the different meshes in the same dataset with a nice interface.
Describe alternatives you've considered
I have considered several options:
I could use a list of datasets. That would be easy to implement, but it feels wrong, as this is really one dataset.
Add another dimension some index for the mesh number. That would require to expand all meshes to the largest one (in each spatial dimension). Then the coordinates (x,y,z) would also be required to be 3D, a 2D slice for each index.
That has some overhead, as all structures are expanded, and it is not easy to see what shape each slice has. This might also cause issues with plotting, as the data seems to be 3D rather then 2D.
merge all data, e.g. merging all data in x direction, with an index-offset in x, that different meshes have different indices. Then only the y-dimension would need to be alligned, thus it would involve less storage cost.
Plotting would work somewhat - only ensuring that non-connected meshes are not plotted connected might be a bit tricky.
suffix all data and coordinates with an index. Would allow to e.g. plot by iterating over the index - a variation of 1) but allows to store as one file
use unstructured grids. That would avoid the additional storage cost, as the full grid info is anyway stored, but then plotting or searching in the data will be (much) more expensive.
Additional context
The data is not point-centered, but area/volume based (see #1475) - thus recovering whether data needs to be plotted together or not in 3) would be doable, but transforming from the xarray format to the
format for plt.pcolormesh becomes much harder if not connected meshes are merged.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I am not sure what the best way to have data from different meshes is.
My simulations use logical Cartesian meshes, but they can be of different sizes (number of points).
They describe 2D surfaces in 3D and aren't necessarily connected.
Describe the solution you'd like
I would like to store the different meshes in the same dataset with a nice interface.
Describe alternatives you've considered
I have considered several options:
That has some overhead, as all structures are expanded, and it is not easy to see what shape each slice has. This might also cause issues with plotting, as the data seems to be 3D rather then 2D.
Plotting would work somewhat - only ensuring that non-connected meshes are not plotted connected might be a bit tricky.
Additional context
The data is not point-centered, but area/volume based (see #1475) - thus recovering whether data needs to be plotted together or not in 3) would be doable, but transforming from the xarray format to the
format for
plt.pcolormesh
becomes much harder if not connected meshes are merged.The text was updated successfully, but these errors were encountered: