def get_model_meta(config, model, is_cordex=False):
    """Get the model metadata out of the config.

    Args:
        config (dict): Configuration dictionary.
        model (str): Model name
        is_cordex (bool, optional): Apply cordex overrides. Defaults to False.

    Returns:
        dict: Model metadata.
    """

    meta = config['models'][model]

    # Override with cordex alternatives
    if is_cordex and '_cordex' in meta.keys():
        meta.update(meta['_cordex'])
        meta.pop('_cordex', None)

    return meta