subroutine scan_2d_store_output(ifail, iscan_1, iscan_R, iscan, noutvars_, ipnscns_, outvar, &
sweep_1_vals, sweep_2_vals)
implicit none
integer, intent(in) :: ifail
integer, intent(in) :: iscan_1
integer, intent(in) :: iscan_R
integer, intent(in) :: iscan
integer, intent(in) :: noutvars_, ipnscns_
! Required for shape of intent(out) arrays
real(dp), dimension(noutvars_,ipnscns_), intent(out) :: outvar
real(dp), dimension(ipnscns_), intent(out) :: sweep_1_vals, sweep_2_vals
call scan_1d_store_output(iscan, ifail, noutvars_, ipnscns_, outvar)
sweep_1_vals(iscan) = sweep(iscan_1)
sweep_2_vals(iscan) = sweep_2(iscan_R)
end subroutine scan_2d_store_output