how to use the fix ave/spatial's output in other command ????

Lammps manual says "This fix computes a global array of values ". I am try to use this output in other command like this:

fix local_density material ave/spatial 50 1 50 z 0.0 0.0087 density/number norm sample units reduced file density.profile

thermo 50
thermo_style custom step etotal vol f_local_density[15][4] cpu

But it comes an error below:

thermo_style custom step etotal vol f_local_density[15][4] cpu
ERROR: Thermo fix array is accessed out-of-range

It says fix array exceed! But my bins is more than 100 (far more than 15!) and I want to get the particle number in the 15th bin. Where am I wrong??? Could someone checked for me???

Any suggest will be appreciated!

This was a bug with an internal variable set incorrectly. This used to
work, so it must have been accidentally changed at some point.
I’ll post a patch later today.

Note that there is no column 4 in the output of the fix, since you have just
one dimension and one variable to bin. Also using 0.0087 is an odd bin
width for reduced units - probably not what you want.