def get_ts(self, idx):
        kijlist = self._build_kijlist(idx)
        nstation = self._get_nstation(idx, kijlist)

        # Initialize result array and put times in first column
        result = self._init_result(nstation)

        istat = 1
        for k, i, j in kijlist:
            recordlist = []
            ioffset_col = (j * self._col_data_size)
            for irec, header in enumerate(self.recordarray):
                ilay = header['ilay'] - 1 # change ilay from header to zero-based
                if ilay != k:
                    continue
                ipos = self.iposarray[irec]

                # Calculate offset necessary to reach intended column
                self.file.seek(ipos + ioffset_col, 0)

                # Find the time index and then put value into result in the
                # correct location.
                itim = np.where(result[:, 0] == header['totim'])[0]
                result[itim, istat] = self._read_val(i)
            istat += 1
        return result
Get a time series from the formatted file.
dataset/ETHPy150Open modflowpy/flopy/flopy/utils/formattedfile.py/FormattedLayerFile.get_ts