There's a slightly better way you can expand the array on each call using the `move_alloc` intrinsic subroutine. For an example, look at the `add_map_elements` subroutine in tally_initialize.F90.