Hello,
Nature of the problem
I'm having problems with the ssplash to grid functionality in SPLASH 2.9.1. When I specify SPLASH_TO_GRID_NPIX the output grid files contain arrays of the requested dimensions but are filled with zeros.
Goal and problem workflow
Using the attached ssplash 2.9.1 options file (cartesian.units, cartesian.limits, cartesian.defaults) and the Phantom dump file “dump” export to a cartesian grid for the specified variables:
setenv SPLASH_TO_GRID 6,10,11,12,13,16
ssplash -p cartesian.dump
In this case ssplash does produce non-empty gridded output files, but as I did not specify the NPIX resolution ssplash chooses 503x503x503.
However, if I explicitly set SPLASH_TO_GRID_NPIX and run ssplash to grid I get an error and empty grid (i.e. the entries are all zero) files:
setenv SPLASH_TO_GRID 6,10,11,12,13,16
setenv SPLASH_TO_GRID_NPIX 64,128,73
ssplash -p cartesian.dump
Excerpt from SSPLASH log file (errors marked in italics)
using NON-PERIODIC boundaries
(set SPLASH_TO_GRID_PERIODIC=yes for periodic
or SPLASH_TO_GRID_PERIODIC=yes,no,yes for mixed)
Using npixels = 64 128 73 from SPLASH_TO_GRID_NPIX
[doing velocity field components separately (low memory mode)]
allocating memory for 64 x 128 x 73 grid ... OK
-----> WRITING TO ASCII OUTPUT FILES
interpolating density to 3D grid...
density [g/cm\u3\d] min max mean
on parts: 2.05E-19 2.00E-12 3.97E-14
interpolating from particles to 3D grid (non-normalised) ...
interpolate3D: error: pixel width <= 0
density [g/cm\u3\d] min max mean
on grid : 0.00E+00 0.00E+00 0.00E+00
Note the error: “interpolate3D: error: pixel width <= 0”
Data necessary to reproduce this error
I've attached the splash options files (cartesian.units, cartesian.limits, cartesian.defaults), the Phantom dump file used is available on the thumb drive I've given Daniel Price.using NON-PERIODIC boundaries
(set SPLASH_TO_GRID_PERIODIC=yes for periodic
or SPLASH_TO_GRID_PERIODIC=yes,no,yes for mixed)
Using npixels = 64 128 73 from SPLASH_TO_GRID_NPIX
[doing velocity field components separately (low memory mode)]
allocating memory for 64 x 128 x 73 grid ... OK
-----> WRITING TO ASCII OUTPUT FILES
interpolating density to 3D grid...
density [g/cm\u3\d] min max mean
on parts: 2.05E-19 2.00E-12 3.97E-14
interpolating from particles to 3D grid (non-normalised) ...
interpolate3D: error: pixel width <= 0
density [g/cm\u3\d] min max mean
on grid : 0.00E+00 0.00E+00 0.00E+00
Note the error: “interpolate3D: error: pixel width <= 0”
Phantom simulation used + Software versions
I'm using splash 2.9.1 on Ozstar at Swinburne and on my MacMini running OSX Mojave (downloaded using Macports). Both produce the same error. The dump Phantom dump file being used comes from running Price and Bates collapsing proto-stellar core "Jet" simulation at the 137 timestep (~27,000 yrs)
Zipped splash option files
[cartesian.defaults.gz]
(https://github.com/danieljprice/splash/files/3929743/cartesian.defaults.gz)
cartesian.limits.gz
cartesian.units.gz