Function that provides the next available file unit.
The returned value is not used for output for any other quantity.
function next_available_io_id () result(io_id)
!! Function that provides the next available file unit.
integer(ip) :: io_id
!! The returned value is not used for output for any other quantity.
!$OMP CRITICAL
io_id = next_id
next_id = next_id + 1
!$OMP END CRITICAL
end function next_available_io_id