Density grid processing

Add the correction to the density output file processing.