def det_cont_fct_compute(err, scores=""):
    """
    Compute simple and skill scores for deterministic continuous forecasts
    from a verification error object.

    Parameters
    ----------
    err: dict
        A verification error object initialized with
        :py:func:`pysteps.verification.detcontscores.det_cont_fct_init` and
        populated with
        :py:func:`pysteps.verification.detcontscores.det_cont_fct_accum`.
    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) |
        +------------+--------------------------------------------------------+
        |  DRMSE     | debiased root mean squared error, i.e.                 |
        |            | :math:`DRMSE = \\sqrt{RMSE - ME^2}`                     |
        +------------+--------------------------------------------------------+
        |  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), i.e.         |
        |            | :math:`RV = 1 - \\frac{MSE}{s^2_o}`                     |
        +------------+--------------------------------------------------------+

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

    # 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)

    result = {}
    for score in scores:
        # catch None passed as score
        if score is None:
            continue

        score_ = score.lower()

        # bias (mean error, systematic error)
        if score_ in ["bias", "me", ""]:
            bias = err["me"]
            result["ME"] = bias

        # mean absolute error
        if score_ in ["mae", ""]:
            MAE = err["mae"]
            result["MAE"] = MAE

        # mean squared error
        if score_ in ["mse", ""]:
            MSE = err["mse"]
            result["MSE"] = MSE

        # normalized mean squared error
        if score_ in ["nmse", ""]:
            NMSE = err["mse"] / err["mss"]
            result["NMSE"] = NMSE

        # root mean squared error
        if score_ in ["rmse", ""]:
            RMSE = np.sqrt(err["mse"])
            result["RMSE"] = RMSE

        # linear correlation coeff (pearson corr)
        if score_ in ["corr_p", "pearsonr", ""]:
            corr_p = err["cov"] / np.sqrt(err["vobs"]) / np.sqrt(err["vpred"])
            result["corr_p"] = corr_p

        # beta1 (linear regression slope)
        if score_ in ["beta", "beta1", ""]:
            beta1 = err["cov"] / err["vpred"]
            result["beta1"] = beta1

        # beta2 (linear regression slope)
        if score_ in ["beta2", ""]:
            beta2 = err["cov"] / err["vobs"]
            result["beta2"] = beta2

        # debiased RMSE
        if score_ in ["drmse", ""]:
            RMSE_d = np.sqrt(err["mse"] - err["me"] ** 2)
            result["DRMSE"] = RMSE_d

        # reduction of variance
        # (Brier Score, Nash-Sutcliffe efficiency coefficient,
        # MSE skill score)
        if score_ in ["rv", "brier_score", "nse", ""]:
            RV = 1.0 - err["mse"] / err["vobs"]
            result["RV"] = RV

    return result
Compute simple and skill scores for deterministic continuous forecasts
from a verification error object.

Parameters
----------
err: dict
A verification error object initialized with
:py:func:`pysteps.verification.detcontscores.det_cont_fct_init` and
populated with
:py:func:`pysteps.verification.detcontscores.det_cont_fct_accum`.
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) |
+------------+--------------------------------------------------------+
|  DRMSE     | debiased root mean squared error, i.e.                 |
|            | :math:`DRMSE = \\sqrt{RMSE - ME^2}`                     |
+------------+--------------------------------------------------------+
|  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), i.e.         |
|            | :math:`RV = 1 - \\frac{MSE}{s^2_o}`                     |
+------------+--------------------------------------------------------+

Returns
-------
result: dict
Dictionary containing the verification results.
pysteps/verification/detcontscores.py