denisbertini / mpi-sdf2opmd

SDF to openPMD compliant format via openpmd-api interface
GNU General Public License v3.0
7 stars 0 forks source link

Convert derived properties #2

Open jhornung-gh opened 1 year ago

jhornung-gh commented 1 year ago

Hi Denis,

it would be very nice if we could convert derived properties like "temperature", "number_density" for specific particle types.

Since these properties are also just fields I tried to convert some of them using e.g. -m temperature/Carbon (lower case property is important! Species has to match the input.deck definition). It is possible to find these fields, however, it seems like writing it to the HDF5 file causes an error.

HDF5-DIAG: Error detected in HDF5 (1.10.7) MPI-process 0:
#000: /tmp/kresan/spack-stage/spack-stage-hdf5-1.10.7-yin6fo5fdgwhfjadyn25sbwq
ffo3j2h4/spack-src/src/H5D.c line 152 in H5Dcreate2(): unable to create dataset
    major: Dataset
    minor: Unable to initialize object

I am also a little bit curious why the blockname (block_id) seems to be different for Fortran than for Python. From the description of the SDF format one had to access the fields via "Electric Field/Ex" and derived properties via "Derived/Temperature/Species", however it seems like the first part is being dropped.

Cheers,

Johannes

denisbertini commented 1 year ago

I did not for now implement such derived properties blocks within the converter. We will have to add it.