setup observations of gw (and optionally sw) mass budgets from mt3dusgs list file.  writes
        an instruction file and also a _setup_.csv to use when constructing a pest
        control file

        Parameters
        ----------
        list_filename : str
                modflow list file
        gw_filename : str
            output filename that will contain the gw budget observations. Default is
            "mtlist_gw.dat"
        sw_filename : str
            output filename that will contain the sw budget observations. Default is
            "mtlist_sw.dat"
        start_datetime : str
            an str that can be parsed into a pandas.TimeStamp.  used to give budget
            observations meaningful names
        gw_prefix : str
            a prefix to add to the GW budget observations.  Useful if processing
            more than one list file as part of the forward run process. Default is 'gw'.
        sw_prefix : str
            a prefix to add to the SW budget observations.  Useful if processing
            more than one list file as part of the forward run process. Default is 'sw'.
        save_setup_file : (boolean)
            a flag to save _setup_<list_filename>.csv file that contains useful
            control file information

        Returns
        -------
        frun_line, ins_filenames, df :str, list(str), pandas.DataFrame
            the command to add to the forward run script, the names of the instruction
            files and a dataframe with information for constructing a control file.  If INSCHEK fails
            to run, df = None

        Note
        ----
        This function uses INSCHEK to get observation values; the observation values are
        the values of the list file list_filename.  If INSCHEK fails to run, the obseravtion
        values are set to 1.0E+10

        the instruction files are named <out_filename>.ins

        It is recommended to use the default value for gw_filename or sw_filename.

def setup_mtlist_budget_obs(list_filename,gw_filename="mtlist_gw.dat",sw_filename="mtlist_sw.dat",
                            start_datetime="1-1-1970",gw_prefix='gw',sw_prefix="sw",
                            save_setup_file=False):
    """ setup observations of gw (and optionally sw) mass budgets from mt3dusgs list file.  writes
        an instruction file and also a _setup_.csv to use when constructing a pest
        control file

        Parameters
        ----------
        list_filename : str
                modflow list file
        gw_filename : str
            output filename that will contain the gw budget observations. Default is
            "mtlist_gw.dat"
        sw_filename : str
            output filename that will contain the sw budget observations. Default is
            "mtlist_sw.dat"
        start_datetime : str
            an str that can be parsed into a pandas.TimeStamp.  used to give budget
            observations meaningful names
        gw_prefix : str
            a prefix to add to the GW budget observations.  Useful if processing
            more than one list file as part of the forward run process. Default is 'gw'.
        sw_prefix : str
            a prefix to add to the SW budget observations.  Useful if processing
            more than one list file as part of the forward run process. Default is 'sw'.
        save_setup_file : (boolean)
            a flag to save _setup_<list_filename>.csv file that contains useful
            control file information

        Returns
        -------
        frun_line, ins_filenames, df :str, list(str), pandas.DataFrame
            the command to add to the forward run script, the names of the instruction
            files and a dataframe with information for constructing a control file.  If INSCHEK fails
            to run, df = None

        Note
        ----
        This function uses INSCHEK to get observation values; the observation values are
        the values of the list file list_filename.  If INSCHEK fails to run, the obseravtion
        values are set to 1.0E+10

        the instruction files are named <out_filename>.ins

        It is recommended to use the default value for gw_filename or sw_filename.

        """
    gw,sw = apply_mtlist_budget_obs(list_filename, gw_filename, sw_filename, start_datetime)
    gw_ins = gw_filename + ".ins"
    _write_mtlist_ins(gw_ins, gw, gw_prefix)
    ins_files = [gw_ins]
    try:
        run("inschek {0}.ins {0}".format(gw_filename))
    except:
        print("error running inschek")
    if sw is not None:
        sw_ins = sw_filename + ".ins"
        _write_mtlist_ins(sw_ins, sw, sw_prefix)
        ins_files.append(sw_ins)
        try:
            run("inschek {0}.ins {0}".format(sw_filename))
        except:
            print("error running inschek")
    frun_line = "pyemu.gw_utils.apply_mtlist_budget_obs('{0}')".format(list_filename)
    gw_obf = gw_filename + ".obf"
    df_gw = None
    if os.path.exists(gw_obf):
        df_gw = pd.read_csv(gw_obf, delim_whitespace=True, header=None, names=["obsnme", "obsval"])
        df_gw.loc[:, "obgnme"] = df_gw.obsnme.apply(lambda x: x[:-9])
        sw_obf = sw_filename + ".obf"
        if os.path.exists(sw_obf):
            df_sw = pd.read_csv(sw_obf, delim_whitespace=True, header=None, names=["obsnme", "obsval"])
            df_sw.loc[:, "obgnme"] = df_sw.obsnme.apply(lambda x: x[:-9])
            df_gw = df_gw.append(df_sw)

        if save_setup_file:
            df_gw.to_csv("_setup_" + os.path.split(list_filename)[-1] + '.csv', index=False)
        df_gw.index = df_gw.obsnme
    return frun_line,ins_files,df_gw