def set_output_attribute(self, fname=None, unit=None, attr=None):
    '\n        Set a variable in an output file from the model by specifying either\n        the file name or the unit number and a dictionary with attributes\n        to change.\n\n        Parameters\n        ----------\n        fname : str\n            filename of output array\n        unit : int\n            unit number of output array\n\n        '
    idx = None
    if (fname is not None):
        for (i, e) in enumerate(self.output_fnames):
            if (fname in e):
                idx = i
                break
        return None
    elif (unit is not None):
        for (i, u) in enumerate(self.output_units):
            if (u == unit):
                idx = i
                break
    else:
        msg = ' either fname or unit must be passed to set_output_attribute()'
        raise Exception(msg)
    if (attr is not None):
        if (idx is not None):
            for (key, value) in attr.items:
                if (key == 'binflag'):
                    self.output_binflag[idx] = value
                elif (key == 'fname'):
                    self.output_fnames[idx] = value
                elif (key == 'unit'):
                    self.output_units[idx] = value
    return
Set a variable in an output file from the model by specifying either
the file name or the unit number and a dictionary with attributes
to change.

Parameters
----------
fname : str
    filename of output array
unit : int
    unit number of output array
def set_output_attribute(self, fname=None, unit=None, attr=None):
    '\n        Set a variable in an output file from the model by specifying either\n        the file name or the unit number and a dictionary with attributes\n        to change.\n\n        Parameters\n        ----------\n        fname : str\n            filename of output array\n        unit : int\n            unit number of output array\n\n        '
    idx = None
    if (fname is not None):
        for (i, e) in enumerate(self.output_fnames):
            if (fname in e):
                idx = i
                break
        return None
    elif (unit is not None):
        for (i, u) in enumerate(self.output_units):
            if (u == unit):
                idx = i
                break
    else:
        msg = ' either fname or unit must be passed to set_output_attribute()'
        raise Exception(msg)
    if (attr is not None):
        if (idx is not None):
            for (key, value) in attr.items:
                if (key == 'binflag'):
                    self.output_binflag[idx] = value
                elif (key == 'fname'):
                    self.output_fnames[idx] = value
                elif (key == 'unit'):
                    self.output_units[idx] = value
    return