Add HDF5 output, keep track of beam min/max for 2D beam.