Works with any chunksize. Move soil depth calculation out of x loop. New parameters