converting output arrays to fortran indexing