Implemented a routine to calculate the potential energy budget
Incorporate nonequidistant grids into the potential energy calculation