fix issues with 2D runs and write integrals when time stepping is done