Skip to content

Commit

Permalink
move algorithm documentation out and instead include links
Browse files Browse the repository at this point in the history
  • Loading branch information
Tracy committed Oct 26, 2023
1 parent a70d078 commit 58cb282
Showing 1 changed file with 4 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
# error, which adds uncertainty in a similar way to ensemble spread.) The challenge is combining
# these factors into a continuous function that allows the user to assess relative risk.
#
# Additional details on the computation of the Difficulty Index can be found in the Python
# Embedding section.
# Additional details on the computation of the Difficulty Index can be found in the `METcalcpy
# documentation<https://metcalcpy.readthedocs.io/en/latest/Users_Guide/difficulty_index.html>`_
# and more information on plotting difficulty index can be found in the `METplotpy documentation
# <https://metplotpy.readthedocs.io/en/latest/Users_Guide/difficulty_index.html>`_.

##############################################################################
# Datasets
Expand Down Expand Up @@ -115,32 +117,6 @@
# .. highlight:: python
# .. literalinclude:: ../../../../parm/use_cases/model_applications/medium_range/UserScript_fcstGEFS_Difficulty_Index/wind_difficulty_index.py
#
# Consider the following formulation of a forecast decision difficulty index:
#
# .. math :: \text{d_{i,j}} = \frac{A(\bar{x}_{i,j})}{2}(\frac{(sigma/\bar{x})_{i,j}{(sigma/\bar{x})_{ref}}}+[1-\frac{1}{2}|P(x_{i,j}\geq\text{thresh})-P(x_{i,j}<thresh)|])
#
# where :math:`\sigma` is the ensemble standard deviation, :math:`\bar{x}` is the ensemble mean,
# :math:`P(x_{i,j}\geq thresh)` is the ensemble (sample) probability of being greater than or equal
# to the threshold, and :math:`P(x_{i,j}<thresh)` is the ensemble probability of being less than
# the threshold. The :math:`(\sigma/\bar{x})` expression is a measure of spread normalized by the
# mean, and it allows one to identify situations of truly significant uncertainty. Because the
# difficulty index is defined only for positive definite quantities such as significant wave height,
# division by zero is avoided. :math:`(\sigma/\bar{x})_{ref}` is a (scalar) reference value, for
# example the maximum value of :math:`(\sigma/\bar{x})` obtained over the last 5 days as a function
# of geographic region.
#
# The first term in the outer brackets is large when the uncertainty in the current forecast is
# large relative to a reference. The second term is minimum when all the probability is either
# above or below the threshold, and maximum when the probability is evenly distributed about the
# threshold. So it penalizes the split case, where the ensemble members are close to evenly split on
# either side of the threshold. The A term outside the brackets is a weighting to account for
# heuristic forecast difficulty situations. Its values for winds are given below.
#
# .. math :: A = 0 if \bar{x} is above 50kt
# .. math :: A = 0 if \bar{x} is below 5kt
# .. math :: A = 1.5 if \bar{x} is between 28kt and 34kt
# .. math :: \text{A} = 1.5 - 1.5[\frac{\bar{x}(kt)-34kt}{16kt}] for 34kt\leq\bar{x}\leq 50kt
# .. math :: \text{A} = 1.5[\frac{\bar{x}(kt)-5kt}{23kt}] for 5kt\leq\bar{x}\leq 28kt

##############################################################################
# Running METplus
Expand Down

0 comments on commit 58cb282

Please sign in to comment.