@classmethod<EOL><INDENT>def copy_from_model(cls, model_name, reference, **kwargs):<DEDENT>
if isinstance(reference, cls):<EOL><INDENT>settings = reference.__dict__.copy()<EOL>settings.pop('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>settings = _get_model_info(reference)<EOL>settings.pop('<STR_LIT>')<EOL><DEDENT>settings.update(kwargs)<EOL>settings['<STR_LIT>'] = reference<EOL>return cls(model_name, **settings)<EOL>
Set-up a user-defined grid using specifications of a reference
grid model.

Parameters
----------
model_name : string
    name of the user-defined grid model.
reference : string or :class:`CTMGrid` instance
    Name of the reference model (see :func:`get_supported_models`),
    or a :class:`CTMGrid` object from which grid set-up is copied.
**kwargs
    Any set-up parameter which will override the settings of the
    reference model (see :class:`CTMGrid` parameters).

Returns
-------
A :class:`CTMGrid` object.