def run(scenario, magicc_version=<NUM_LIT:6>, **kwargs):
if magicc_version == <NUM_LIT:6>:<EOL><INDENT>magicc_cls = MAGICC6<EOL><DEDENT>elif magicc_version == <NUM_LIT:7>:<EOL><INDENT>magicc_cls = MAGICC7<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>".format(magicc_version))<EOL><DEDENT>with magicc_cls() as magicc:<EOL><INDENT>results = magicc.run(scenario=scenario, **kwargs)<EOL><DEDENT>return results<EOL>
Run a MAGICC scenario and return output data and (optionally) config parameters.

As a reminder, putting ``out_parameters=1`` will cause MAGICC to write out its
parameters into ``out/PARAMETERS.OUT`` and they will then be read into
``output.metadata["parameters"]`` where ``output`` is the returned object.

Parameters
----------
scenario : :obj:`pymagicc.io.MAGICCData`
    Scenario to run

magicc_version : int
    MAGICC version to use for the run

**kwargs
    Parameters overwriting default parameters

Raises
------
ValueError
    If the magicc_version is not available

Returns
-------
output : :obj:`pymagicc.io.MAGICCData`
    Output of the run with the data in the ``df`` attribute and parameters and
    other metadata in the ``metadata attribute``