Open pwolfram opened 5 years ago
cc @bradyrx @maltrud
Addressed by #14
Closed by #14
@pwolfram,
A (maybe) bug found in the global cell ID. Currently, the default particle to globalCellID returns a 1-based index of nCell
that the particle is in. I imagine this is due to you pulling from the Fortran code.
Thus, a Python user has to adjust the globalID output to get at the actual cell the particle is within. Not doing so causes drastically different answers, since cells aren't ordered in an "orange peel" fashion to my knowledge.
Perhaps this isn't a bug and rather a design decision. Is the average user analyzing in, e.g. MATLAB and Fortran, or in something 0-based like Python? Something to consider.
@bradyrx, all indices in MPAS are 1-index and do need the index -= 1
approach in python prior to their use. This was a pre-existing, across the board design decision that was made. Good catch on this -- it will cause quite a difference if the -1
is not included!
@pwolfram , this and https://github.com/pwolfram/MPAS-Model/issues/4 should be incorporated into the make_particle_file.py
file so that this information is included in the init file.
The global Eulerian cell ID corresponding to the particle location should be output to facilitate easy analysis for postprocessing.