@@ -76,6 +76,9 @@ def firm( # pylint: disable=too-many-arguments
76
76
threshold_assignment: Specifies whether the intervals defining the categories are
77
77
left or right closed. That is whether the decision threshold is included in
78
78
the upper (left closed) or lower (right closed) category. Defaults to "lower".
79
+ include_components: If True, then the function returns the FIRM score
80
+ along with the overforecast and underforecast penalties as a new dimension
81
+ called "components". If False (default), then only the FIRM score is returned.
79
82
80
83
Returns:
81
84
An xarray object with the FIRM score. If `include_components` is true, then
@@ -293,14 +296,14 @@ def seeps( # pylint: disable=too-many-arguments, too-many-locals
293
296
performance of a forecast across three categories:
294
297
295
298
- Dry weather (e.g., less than or equal to 0.2mm),
296
- - Light precipitation (the climatological lower two-thirds of
299
+ - Light precipitation (the climatological lower two-thirds of
297
300
rainfall conditioned on it raining),
298
- - Heavy precipitation (the climatological upper one-third of rainfall
301
+ - Heavy precipitation (the climatological upper one-third of rainfall
299
302
conditioned on it raining).
300
303
301
304
The SEEPS penalty matrix is defined as
302
305
303
-
306
+
304
307
.. math::
305
308
s = \frac{1}{2} \left(
306
309
\begin{matrix}
@@ -310,45 +313,45 @@ def seeps( # pylint: disable=too-many-arguments, too-many-locals
310
313
\end{matrix}
311
314
\right)
312
315
313
-
314
- where
316
+
317
+ where
315
318
- :math:`p_1` is the climatological probability of the dry weather category,
316
319
- :math:`p_3` is the climatological probability of the heavy precipitation category,
317
320
- The rows correspond to the forecast category (dry, light, heavy),
318
321
- The columns correspond to the observation category (dry, light, heavy),
319
-
322
+
320
323
as defined in Eq 15 in Rodwell et al. (2010).
321
324
322
325
Let :math:`p_2` denote the climatological probability of light precipitation occuring.
323
326
Note that since :math:`p_2 = 2p_3` and :math:`p_1 + p_2 + p_3 = 1`, then :math:`p_3 = (1 - p_1) / 3`
324
327
can be substituted into the penalty matrix. In this implementation, the user only provides
325
- :math:`p_1` with the ``prob_dry`` arg and the function calculates :math:`p_3` internally.
326
- Additionally, this implementation of the score is negatively oriented, meaning that
327
- lower scores are better.
328
-
328
+ :math:`p_1` with the ``prob_dry`` arg and the function calculates :math:`p_3` internally.
329
+ Additionally, this implementation of the score is negatively oriented, meaning that
330
+ lower scores are better.
331
+
329
332
Sometimes in the literature, a positively oriented version of SEEPS is used,
330
333
which is defined as :math:`1 - \mathrm{SEEPS}`.
331
334
332
- By default, the scores are only calculated for points where :math:`p_1 \in [0.1, 0.85]`
335
+ By default, the scores are only calculated for points where :math:`p_1 \in [0.1, 0.85]`
333
336
as per Rodwell et al. (2010). This can be changed by setting ``mask_clim_extremes`` to ``False`` or
334
337
by changing the ``lower_masked_value`` and ``upper_masked_value`` parameters.
335
338
336
339
Args:
337
340
fcst: An array of real-valued forecasts (e.g., precipitation forecasts in mm).
338
341
obs: An array of real-valued observations (e.g., precipitation forecasts in mm).
339
- prob_dry: The climatological probability of the dry weather category. This is
342
+ prob_dry: The climatological probability of the dry weather category. This is
340
343
called :math:`p_1` in the SEEPS penalty matrix. Must be in the range [0, 1].
341
- light_heavy_threshold: An array of the rainfall thresholds (e.g., in mm) that separates
344
+ light_heavy_threshold: An array of the rainfall thresholds (e.g., in mm) that separates
342
345
light and heavy precipitation. The threshold itself is included in the light
343
346
precipitation category.
344
347
dry_light_threshold: The threshold (e.g., in mm) that separates dry weather from light precipitation.
345
348
Defaults to 0.2. Dry weather is defined as less than or equal to this threshold.
346
349
mask_clim_extremes: If True, mask out the score at points where
347
350
:math:`p_1` is less than ``lower_masked_value`` or greater than ``upper_masked_value``.
348
351
Instead a NaN is returned at these points. Defaults to True.
349
- lower_masked_value: The SEEPS score is masked at points where ``prob_dry`` is
352
+ lower_masked_value: The SEEPS score is masked at points where ``prob_dry`` is
350
353
less than this value. Defaults to 0.1.
351
- upper_masked_value: The SEEPS score is masked at points where ``prob_dry`` is
354
+ upper_masked_value: The SEEPS score is masked at points where ``prob_dry`` is
352
355
greater than this value. Defaults to 0.85.
353
356
reduce_dims: Optionally specify which dimensions to reduce when
354
357
calculating the SEEPS score. All other dimensions will be preserved. As a
@@ -374,11 +377,11 @@ def seeps( # pylint: disable=too-many-arguments, too-many-locals
374
377
375
378
Warning:
376
379
This function raises a warning if any values in `prob_dry` are exactly equal to 0 or 1.
377
-
380
+
378
381
References:
379
- Rodwell, M. J., Richardson, D. S., Hewson, T. D., & Haiden, T. (2010).
380
- A new equitable score suitable for verifying precipitation in numerical
381
- weather prediction. Quarterly Journal of the Royal Meteorological Society,
382
+ Rodwell, M. J., Richardson, D. S., Hewson, T. D., & Haiden, T. (2010).
383
+ A new equitable score suitable for verifying precipitation in numerical
384
+ weather prediction. Quarterly Journal of the Royal Meteorological Society,
382
385
136(650), 1344–1363. https://doi.org/10.1002/qj.656
383
386
384
387
Examples:
0 commit comments