def det_cont_fct(pred, obs, scores="", axis=None, conditioning=None, thr=0.0):
    """
    Calculate simple and skill scores for deterministic continuous forecasts.

    Parameters
    ----------
    pred: array_like
        Array of predictions. NaNs are ignored.
    obs: array_like
        Array of verifying observations. NaNs are ignored.
    scores: {string, list of strings}, optional
        The name(s) of the scores. The default, scores="", will compute all
        available scores.
        The available score names are:

        .. tabularcolumns:: |p{2cm}|L|

        +------------+--------------------------------------------------------+
        | Name       | Description                                            |
        +============+========================================================+
        |  beta1     | linear regression slope (type 1 conditional bias)      |
        +------------+--------------------------------------------------------+
        |  beta2     | linear regression slope (type 2 conditional bias)      |
        +------------+--------------------------------------------------------+
        |  corr_p    | pearson's correleation coefficien (linear correlation) |
        +------------+--------------------------------------------------------+
        |  corr_s*   | spearman's correlation coefficient (rank correlation)  |
        +------------+--------------------------------------------------------+
        |  DRMSE     | debiased root mean squared error                       |
        +------------+--------------------------------------------------------+
        |  MAE       | mean absolute error                                    |
        +------------+--------------------------------------------------------+
        |  ME        | mean error or bias                                     |
        +------------+--------------------------------------------------------+
        |  MSE       | mean squared error                                     |
        +------------+--------------------------------------------------------+
        |  NMSE      | normalized mean squared error                          |
        +------------+--------------------------------------------------------+
        |  RMSE      | root mean squared error                                |
        +------------+--------------------------------------------------------+
        |  RV        | reduction of variance                                  |
        |            | (Brier Score, Nash-Sutcliffe Efficiency)               |
        +------------+--------------------------------------------------------+
        |  scatter*  | half the distance between the 16% and 84% percentiles  |
        |            | of the weighted cumulative error distribution,         |
        |            | where error = dB(pred/obs),                            |
        |            | as in Germann et al. (2006)                            |
        +------------+--------------------------------------------------------+

    axis: {int, tuple of int, None}, optional
        Axis or axes along which a score is integrated. The default, axis=None,
        will integrate all of the elements of the input arrays.\n
        If axis is -1 (or any negative integer),
        the integration is not performed
        and scores are computed on all of the elements in the input arrays.\n
        If axis is a tuple of ints, the integration is performed on all of the
        axes specified in the tuple.
    conditioning: {None, "single", "double"}, optional
        The type of conditioning used for the verification.
        The default, conditioning=None, includes all pairs. With
        conditioning="single", only pairs with either pred or obs > thr are
        included. With conditioning="double", only pairs with both pred and
        obs > thr are included.
    thr: float
        Optional threshold value for conditioning. Defaults to 0.

    Returns
    -------
    result: dict
        Dictionary containing the verification results.

    Notes
    -----
    Multiplicative scores can be computed by passing log-tranformed values.
    Note that "scatter" is the only score that will be computed in dB units of
    the multiplicative error, i.e.: 10*log10(pred/obs).

    beta1 measures the degree of conditional bias of the observations given the
    forecasts (type 1).

    beta2 measures the degree of conditional bias of the forecasts given the
    observations (type 2).

    The normalized MSE is computed as
    NMSE = E[(pred - obs)^2]/E[(pred + obs)^2].

    The debiased RMSE is computed as DRMSE = sqrt(MSE - ME^2).

    The reduction of variance score is computed as RV = 1 - MSE/Var(obs).

    Score names denoted by * can only be computed offline, meaning that the
    these cannot be computed using _init, _accum and _compute methods of this
    module.

    References
    ----------
    Germann, U. , Galli, G. , Boscacci, M. and Bolliger, M. (2006), Radar
    precipitation measurement in a mountainous region. Q.J.R. Meteorol. Soc.,
    132: 1669-1692. doi:10.1256/qj.05.190

    Potts, J. (2012), Chapter 2 - Basic concepts. Forecast verification: a
    practitioner’s guide in atmospheric sciences, I. T. Jolliffe, and D. B.
    Stephenson, Eds., Wiley-Blackwell, 11–29.

    See also
    --------
    pysteps.verification.detcatscores.det_cat_fct
    """

    # catch case of single score passed as string
    def get_iterable(x):
        if isinstance(x, collections.abc.Iterable) and not isinstance(x, str):
            return x
        else:
            return (x,)

    scores = get_iterable(scores)

    # split between online and offline scores
    loffline = ["scatter", "corr_s"]
    onscores = [
        score for score in scores if str(score).lower() not in loffline or score == ""
    ]
    offscores = [
        score for score in scores if str(score).lower() in loffline or score == ""
    ]

    # unique lists
    onscores = _uniquelist(onscores)
    offscores = _uniquelist(offscores)

    # online scores
    onresult = {}
    if onscores:
        err = det_cont_fct_init(axis=axis, conditioning=conditioning, thr=thr)
        det_cont_fct_accum(err, pred, obs)
        onresult = det_cont_fct_compute(err, onscores)

    # offline scores
    offresult = {}
    if offscores:
        pred = np.asarray(pred.copy())
        obs = np.asarray(obs.copy())

        if pred.shape != obs.shape:
            raise ValueError(
                "the shape of pred does not match the shape of obs %s!=%s"
                % (pred.shape, obs.shape)
            )

        # conditioning
        if conditioning is not None:
            if conditioning == "single":
                idx = np.logical_or(obs > thr, pred > thr)
            elif conditioning == "double":
                idx = np.logical_and(obs > thr, pred > thr)
            else:
                raise ValueError("unkown conditioning %s" % conditioning)
            obs[~idx] = np.nan
            pred[~idx] = np.nan

        for score in offscores:
            # catch None passed as score
            if score is None:
                continue

            score_ = score.lower()

            # spearman corr (rank correlation)
            if score_ in ["corr_s", "spearmanr", ""]:
                corr_s = _spearmanr(pred, obs, axis=axis)
                offresult["corr_s"] = corr_s

            # scatter
            if score_ in ["scatter", ""]:
                scatter = _scatter(pred, obs, axis=axis)
                offresult["scatter"] = scatter

    # pull all results together
    result = onresult
    result.update(offresult)

    return result
Calculate simple and skill scores for deterministic continuous forecasts.

Parameters
----------
pred: array_like
Array of predictions. NaNs are ignored.
obs: array_like
Array of verifying observations. NaNs are ignored.
scores: {string, list of strings}, optional
The name(s) of the scores. The default, scores="", will compute all
available scores.
The available score names are:

.. tabularcolumns:: |p{2cm}|L|

+------------+--------------------------------------------------------+
| Name       | Description                                            |
+============+========================================================+
|  beta1     | linear regression slope (type 1 conditional bias)      |
+------------+--------------------------------------------------------+
|  beta2     | linear regression slope (type 2 conditional bias)      |
+------------+--------------------------------------------------------+
|  corr_p    | pearson's correleation coefficien (linear correlation) |
+------------+--------------------------------------------------------+
|  corr_s*   | spearman's correlation coefficient (rank correlation)  |
+------------+--------------------------------------------------------+
|  DRMSE     | debiased root mean squared error                       |
+------------+--------------------------------------------------------+
|  MAE       | mean absolute error                                    |
+------------+--------------------------------------------------------+
|  ME        | mean error or bias                                     |
+------------+--------------------------------------------------------+
|  MSE       | mean squared error                                     |
+------------+--------------------------------------------------------+
|  NMSE      | normalized mean squared error                          |
+------------+--------------------------------------------------------+
|  RMSE      | root mean squared error                                |
+------------+--------------------------------------------------------+
|  RV        | reduction of variance                                  |
|            | (Brier Score, Nash-Sutcliffe Efficiency)               |
+------------+--------------------------------------------------------+
|  scatter*  | half the distance between the 16% and 84% percentiles  |
|            | of the weighted cumulative error distribution,         |
|            | where error = dB(pred/obs),                            |
|            | as in Germann et al. (2006)                            |
+------------+--------------------------------------------------------+

axis: {int, tuple of int, None}, optional
Axis or axes along which a score is integrated. The default, axis=None,
will integrate all of the elements of the input arrays.\n
If axis is -1 (or any negative integer),
the integration is not performed
and scores are computed on all of the elements in the input arrays.\n
If axis is a tuple of ints, the integration is performed on all of the
axes specified in the tuple.
conditioning: {None, "single", "double"}, optional
The type of conditioning used for the verification.
The default, conditioning=None, includes all pairs. With
conditioning="single", only pairs with either pred or obs > thr are
included. With conditioning="double", only pairs with both pred and
obs > thr are included.
thr: float
Optional threshold value for conditioning. Defaults to 0.

Returns
-------
result: dict
Dictionary containing the verification results.

Notes
-----
Multiplicative scores can be computed by passing log-tranformed values.
Note that "scatter" is the only score that will be computed in dB units of
the multiplicative error, i.e.: 10*log10(pred/obs).

beta1 measures the degree of conditional bias of the observations given the
forecasts (type 1).

beta2 measures the degree of conditional bias of the forecasts given the
observations (type 2).

The normalized MSE is computed as
NMSE = E[(pred - obs)^2]/E[(pred + obs)^2].

The debiased RMSE is computed as DRMSE = sqrt(MSE - ME^2).

The reduction of variance score is computed as RV = 1 - MSE/Var(obs).

Score names denoted by * can only be computed offline, meaning that the
these cannot be computed using _init, _accum and _compute methods of this
module.

References
----------
Germann, U. , Galli, G. , Boscacci, M. and Bolliger, M. (2006), Radar
precipitation measurement in a mountainous region. Q.J.R. Meteorol. Soc.,
132: 1669-1692. doi:10.1256/qj.05.190

Potts, J. (2012), Chapter 2 - Basic concepts. Forecast verification: a
practitioner’s guide in atmospheric sciences, I. T. Jolliffe, and D. B.
Stephenson, Eds., Wiley-Blackwell, 11–29.

See also
--------
pysteps.verification.detcatscores.det_cat_fct
pysteps/verification/detcontscores.py