def _get_data_size(self, header):
        start_pos = self.file.tell()
        data_count = 0
        # Loop through data until at end of column
        while data_count < header['ncol']:
            column_data = self.file.readline()
            arr_column_data = column_data.split()
            data_count += len(arr_column_data)

        if data_count != header['ncol']:
            raise Exception('Unexpected data formatting in head file.  Expected %d columns, but found %d.' % header['ncol'], data_count)

        # Calculate seek distance based on data size
        stop_pos = self.file.tell()
        data_seek_distance = stop_pos - start_pos

        # Return to last file position
        self.file.seek(start_pos)

        return data_seek_distance
Calculate the size of the data set in terms of a seek distance
dataset/ETHPy150Open modflowpy/flopy/flopy/utils/formattedfile.py/FormattedHeadFile._get_data_size