def fss(X_f, X_o, thr, scale):
    """
    Compute the fractions skill score (FSS) for a deterministic forecast field
    and the corresponding observation field.

    Parameters
    ----------
    X_f: array_like
        Array of shape (m, n) containing the forecast field.
    X_o: array_like
        Array of shape (m, n) containing the observation field.
    thr: float
        The intensity threshold.
    scale: int
        The spatial scale in pixels. In practice, the scale represents the size
        of the moving window that it is used to compute the fraction of pixels
        above the threshold.

    Returns
    -------
    out: float
        The fractions skill score between 0 and 1.

    References
    ----------
    :cite:`RL2008`, :cite:`EWWM2013`
    """

    fss = fss_init(thr, scale)
    fss_accum(fss, X_f, X_o)
    return fss_compute(fss)
Compute the fractions skill score (FSS) for a deterministic forecast field
and the corresponding observation field.

Parameters
----------
X_f: array_like
Array of shape (m, n) containing the forecast field.
X_o: array_like
Array of shape (m, n) containing the observation field.
thr: float
The intensity threshold.
scale: int
The spatial scale in pixels. In practice, the scale represents the size
of the moving window that it is used to compute the fraction of pixels
above the threshold.

Returns
-------
out: float
The fractions skill score between 0 and 1.

References
----------
:cite:`RL2008`, :cite:`EWWM2013`
pysteps/verification/spatialscores.py