revised hydrostatic pressure distribution function to use prescribed value in the top cells