def __init__(self, filename, mode='<STR_LIT:rb>', endian='<STR_LIT:>>',<EOL>diaginfo_file='<STR_LIT>', tracerinfo_file='<STR_LIT>', eager=False,<EOL>use_mmap=False, dask_delayed=False):
self.mode = mode<EOL>if not mode.startswith('<STR_LIT:r>'):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>self.filename = filename<EOL>self.fsize = os.path.getsize(self.filename)<EOL>self.endian = endian<EOL>self.fp = FortranFile(self.filename, self.mode, self.endian)<EOL>dir_path = os.path.abspath(os.path.dirname(filename))<EOL>if not dir_path:<EOL><INDENT>dir_path = os.getcwd()<EOL><DEDENT>if not tracerinfo_file:<EOL><INDENT>tracerinfo_file = os.path.join(dir_path, "<STR_LIT>")<EOL>if not os.path.exists(tracerinfo_file):<EOL><INDENT>tracerinfo_file = '<STR_LIT>'<EOL><DEDENT><DEDENT>self.tracerinfo_file = tracerinfo_file<EOL>if not diaginfo_file:<EOL><INDENT>diaginfo_file = os.path.join(dir_path, "<STR_LIT>")<EOL>if not os.path.exists(diaginfo_file):<EOL><INDENT>diaginfo_file = '<STR_LIT>'<EOL><DEDENT><DEDENT>self.diaginfo_file = diaginfo_file<EOL>self._attributes = OrderedDict()<EOL>self.diaginfo_df, _ = get_diaginfo(self.diaginfo_file)<EOL>self.tracerinfo_df, _ = get_tracerinfo(self.tracerinfo_file)<EOL>self.var_data = {}<EOL>self.var_attrs = {}<EOL>self._header_pos = None<EOL>self.use_mmap = use_mmap<EOL>self.dask_delayed = dask_delayed<EOL>self.eager = eager<EOL>if (mode.startswith('<STR_LIT:r>') and self.eager):<EOL><INDENT>self._read()<EOL><DEDENT>
Load a BPCHFile

        Parameters
        ----------
        filename : str
            Path to the bpch file on disk
        mode : str
            Mode string to pass to the file opener; this is currently fixed to
            "rb" and all other values will be rejected
        endian : str {">", "<", ":"}
            Endian-ness of the Fortran output file
        {tracerinfo, diaginfo}_file : str
            Path to the tracerinfo.dat and diaginfo.dat files containing
            metadata pertaining to the output in the bpch file being read.
        eager : bool
            Flag to immediately read variable data; if "False", then nothing
            will be read from the file and you'll need to do so manually
        use_mmap : bool
            Use memory-mapping to read data from file
        dask_delayed : bool
            Use dask to create delayed references to the data-reading functions