def determine_set_y_logscale(cfg, metadata):
    """
    Determine whether to use a log scale y axis.

    Parameters
    ----------
    cfg: dict
        the opened global config dictionairy, passed by ESMValTool.
    metadata: dict
        The metadata dictionairy for a specific model.

    Returns
    ----------
    bool:
        Boolean to flag whether to plot as a log scale.
    """
    set_y_logscale = True

    if 'set_y_logscale' in cfg:
        set_y_logscale = cfg['set_y_logscale']

    if 'set_y_logscale' in metadata:
        set_y_logscale = metadata['set_y_logscale']

    return set_y_logscale