subroutine output_close integer fi ! Close files do fi = 1, output_nfiles close(output_files(fi)%file_id) end do ! TODO are deallocate arrays really necessary? end subroutine output_close