monet.util.stats
Functions
|
Calculate Anomaly Correlation. |
|
Critical Success Index (1 is perfect - Range 0 -> 1) |
|
Modified Coefficient of Efficiency, E1 |
|
Equitable Threat Score (1 is perfect - Range -1/3 -> 1) |
|
Fractional Bias (%) |
|
Fractional Error (%) |
|
Calculate Heidke Skill Score. |
|
Calculate the Index of Agreement (IOA). |
|
Index of Agreement, IOA (avoid single block error in np.ma) |
|
Mean absolute error. |
|
Mean absolute percentage error. |
|
Mean Bias |
|
Mean Gross Error (model and obs unit) |
|
Mean Normalized Bias (%) |
|
Mean Normalized Gross Error (%) |
|
Mean Normalized Peak Bias (%) |
|
Mean Normalized Peak Error (%) |
|
Mean Observations (obs unit) |
|
Mean Predictions (model unit) |
|
Mean squared error. |
|
Median Bias |
|
Median Gross Error (model and obs unit) |
|
Median Normalized Bias (%) |
|
Median Normalized Gross Error (%) |
|
Median Normalized Peak Bias (%) |
|
Median Normalized Peak Bias (%) |
|
Median Observations (obs unit) |
|
Median Predictions (model unit) |
|
Normalized Mean Bias (%) |
|
Normalized Mean Bias - Absolute of the denominator (%) |
|
Normalized Mean Error (%) |
|
Normalized Mean Error (%) (avoid single block error in np.ma) |
|
Normalized Mean Error (%) - Absolute of the denominator (avoid single block error in np.ma) |
|
Normalized Mean Peak Bias (%) |
|
Normalized Mean Peak Error (%) |
|
Normalized Median Bias (%) |
|
Normalized Median Error (%) |
|
Normalized Median Gross Error (%) |
|
Normalized Median Peak Bias (%) |
|
Normalized Median Peak Bias (%) |
|
N Observations (#) |
|
N Observations/Prediction Pairs (#) |
|
N Predictions (#) |
|
Paired Space/Unpaired Time Mean Normalized Peak Bias (%) |
|
Paired Space/Unpaired Time Mean Normalized Peak Error (%) |
|
Paired Space/Unpaired Time Median Normalized Peak Bias (%) |
|
Paired Space/Unpaired Time Median Normalized Peak Error (%) |
|
Paired Space/Unpaired Time Normalized Mean Peak Bias (%) |
|
Paired Space/Unpaired Time Normalized Mean Peak Error (%) |
|
Paired Space/Unpaired Time Normalized Median Peak Bias (%) |
|
Paired Space/Unpaired Time Normalized Median Peak Error (%) |
|
Calculate the coefficient of determination (R-squared). |
|
Mean Ratio Observations/Predictions (none) |
|
Root Mean Square Error (model unit) |
|
Root Mean Squared Error (obs, mod_hat) |
|
Root Mean Squared Error (mod_hat, mod) |
|
Median Ratio Observations/Predictions (none) |
|
Symmetric mean absolute percentage error. |
|
Standard deviation of Observations |
|
Standard deviation of Predictions |
|
Unpaired Space/Unpaired Time Peak Bias (%) |
|
Unpaired Space/Unpaired Time Peak Error (%) |
|
Wind Direction Anomaly Correlation |
|
Calculate Wind Direction Index of Agreement. |
|
Calculate wind direction Index of Agreement. |
|
Wind Direction Mean Bias |
|
Wind Direction Mean Bias (avoid single block error in np.ma) |
|
Wind Direction Mean Gross Error (model and obs unit) |
|
Wind Direction Mean Gross Error (model and obs unit) (avoid single block error in np.ma) |
|
Wind Direction Median Bias |
|
Wind Direction Median Gross Error (model and obs unit) |
|
Wind Direction Normalized Mean Bias (%) (avoid single block error in np.ma) |
|
Wind Direction Root Mean Square Error (model unit) |
|
Wind Direction Root Mean Square Error (model unit) (avoid single block error in np.ma) |
|
Calculate circular bias. |
|
Calculate circular bias avoiding single block error. |
|
Modified Index of Agreement, d1 |
|
Match masks and compress arrays to 1D. |
|
Match masks between two arrays. |
|
Calculate multiple verification scores between obs and model. |
|
Short summary. |
- monet.util.stats.AC(obs, mod, axis=None)
Calculate Anomaly Correlation.
- Parameters:
obs (numpy.ndarray) – Observed values
mod (numpy.ndarray) – Modeled values
axis (int, optional) – Axis along which to compute. Default is None (flatten array)
- Returns:
Anomaly correlation coefficient
- Return type:
- monet.util.stats.CSI(obs, mod, minval, maxval)
Critical Success Index (1 is perfect - Range 0 -> 1)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
minval (type) – Description of parameter minval.
maxval (type) – Description of parameter maxval.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.E1(obs, mod, axis=None)
Modified Coefficient of Efficiency, E1
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.ETS(obs, mod, minval, maxval)
Equitable Threat Score (1 is perfect - Range -1/3 -> 1)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
minval (type) – Description of parameter minval.
maxval (type) – Description of parameter maxval.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.FB(obs, mod, axis=None)
Fractional Bias (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.FE(obs, mod, axis=None)
Fractional Error (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.HSS(obs, mod, minval, maxval)
Calculate Heidke Skill Score.
- Parameters:
obs (numpy.ndarray) – Observed values
mod (numpy.ndarray) – Modeled values
minval (float) – Minimum threshold value for contingency table
maxval (float) – Maximum threshold value for contingency table
- Returns:
Heidke Skill Score value
- Return type:
- monet.util.stats.IOA(obs, mod, axis=None)
Calculate the Index of Agreement (IOA).
- Parameters:
obs (numpy.ndarray) – Observed values
mod (numpy.ndarray) – Modeled values
axis (int, optional) – Axis along which to calculate IOA. Default is None (flatten array)
- Returns:
Index of Agreement value between 0 and 1, where 1 indicates perfect agreement
- Return type:
- monet.util.stats.IOA_m(obs, mod, axis=None)
Index of Agreement, IOA (avoid single block error in np.ma)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.MAE(obs, mod, axis=None)
Mean absolute error.
- Parameters:
obs (array_like) – Observed values.
mod (array_like) – Modeled values.
axis (int, optional) – Axis along which to compute. Default is None (all axes).
- Returns:
Mean absolute error value(s), in the same units as
obsandmod.- Return type:
- monet.util.stats.MAPE(obs, mod, axis=None)
Mean absolute percentage error.
- Parameters:
obs (array_like) – Observed values.
mod (array_like) – Modeled values.
axis (int, optional) – Axis along which to compute. Default is None (all axes).
- Returns:
Mean absolute percentage error value(s), expressed as percent.
- Return type:
Notes
Elements where
obs == 0are masked and excluded from the mean.
- monet.util.stats.MB(obs, mod, axis=None)
Mean Bias
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.ME(obs, mod, axis=None)
Mean Gross Error (model and obs unit)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.MNB(obs, mod, axis=None)
Mean Normalized Bias (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.MNE(obs, mod, axis=None)
Mean Normalized Gross Error (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.MNPB(obs, mod, paxis, axis=None)
Mean Normalized Peak Bias (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
paxis (type) – Description of parameter paxis.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.MNPE(obs, mod, paxis, axis=None)
Mean Normalized Peak Error (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
paxis (type) – Description of parameter paxis.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.MO(obs, mod, axis=None)
Mean Observations (obs unit)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.MP(obs, mod, axis=None)
Mean Predictions (model unit)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.MSE(obs, mod, axis=None)
Mean squared error.
- Parameters:
obs (array_like) – Observed values.
mod (array_like) – Modeled values.
axis (int, optional) – Axis along which to compute. Default is None (all axes).
- Returns:
Mean squared error value(s), in squared units of
obsandmod.- Return type:
- monet.util.stats.MdnB(obs, mod, axis=None)
Median Bias
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.MdnE(obs, mod, axis=None)
Median Gross Error (model and obs unit)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.MdnNB(obs, mod, axis=None)
Median Normalized Bias (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.MdnNE(obs, mod, axis=None)
Median Normalized Gross Error (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.MdnNPB(obs, mod, paxis, axis=None)
Median Normalized Peak Bias (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
paxis (type) – Description of parameter paxis.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.MdnNPE(obs, mod, paxis, axis=None)
Median Normalized Peak Bias (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
paxis (type) – Description of parameter paxis.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.MdnO(obs, mod, axis=None)
Median Observations (obs unit)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.MdnP(obs, mod, axis=None)
Median Predictions (model unit)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.NMB(obs, mod, axis=None)
Normalized Mean Bias (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.NMB_ABS(obs, mod, axis=None)
Normalized Mean Bias - Absolute of the denominator (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.NME(obs, mod, axis=None)
Normalized Mean Error (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.NME_m(obs, mod, axis=None)
Normalized Mean Error (%) (avoid single block error in np.ma)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.NME_m_ABS(obs, mod, axis=None)
Normalized Mean Error (%) - Absolute of the denominator (avoid single block error in np.ma)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.NMPB(obs, mod, paxis, axis=None)
Normalized Mean Peak Bias (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
paxis (type) – Description of parameter paxis.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.NMPE(obs, mod, paxis, axis=None)
Normalized Mean Peak Error (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
paxis (type) – Description of parameter paxis.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.NMdnB(obs, mod, axis=None)
Normalized Median Bias (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.NMdnE(obs, mod, axis=None)
Normalized Median Error (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.NMdnGE(obs, mod, axis=None)
Normalized Median Gross Error (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.NMdnPB(obs, mod, paxis, axis=None)
Normalized Median Peak Bias (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
paxis (type) – Description of parameter paxis.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.NMdnPE(obs, mod, paxis, axis=None)
Normalized Median Peak Bias (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
paxis (type) – Description of parameter paxis.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.NO(obs, mod, axis=None)
N Observations (#)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.NOP(obs, mod, axis=None)
N Observations/Prediction Pairs (#)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.NP(obs, mod, axis=None)
N Predictions (#)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.PSUTMNPB(obs, mod, axis=None)
Paired Space/Unpaired Time Mean Normalized Peak Bias (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.PSUTMNPE(obs, mod, axis=None)
Paired Space/Unpaired Time Mean Normalized Peak Error (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.PSUTMdnNPB(obs, mod, axis=None)
Paired Space/Unpaired Time Median Normalized Peak Bias (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.PSUTMdnNPE(obs, mod, axis=None)
Paired Space/Unpaired Time Median Normalized Peak Error (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.PSUTNMPB(obs, mod, axis=None)
Paired Space/Unpaired Time Normalized Mean Peak Bias (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.PSUTNMPE(obs, mod, axis=None)
Paired Space/Unpaired Time Normalized Mean Peak Error (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.PSUTNMdnPB(obs, mod, axis=None)
Paired Space/Unpaired Time Normalized Median Peak Bias (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.PSUTNMdnPE(obs, mod, axis=None)
Paired Space/Unpaired Time Normalized Median Peak Error (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.R2(obs, mod, axis=None)
Calculate the coefficient of determination (R-squared).
Computes R-squared statistic between observed and modeled values.
- Parameters:
obs (numpy.ndarray) – Observed values
mod (numpy.ndarray) – Modeled values
axis (int, optional) – Axis along which to compute R-squared. Default is None (whole array).
- Returns:
R-squared value(s). If axis=None, returns a float. Otherwise returns array of R-squared values along specified axis.
- Return type:
- monet.util.stats.RM(obs, mod, axis=None)
Mean Ratio Observations/Predictions (none)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.RMSE(obs, mod, axis=None)
Root Mean Square Error (model unit)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.RMSEs(obs, mod, axis=None)
Root Mean Squared Error (obs, mod_hat)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.RMSEu(obs, mod, axis=None)
Root Mean Squared Error (mod_hat, mod)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.RMdn(obs, mod, axis=None)
Median Ratio Observations/Predictions (none)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.SMAPE(obs, mod, axis=None)
Symmetric mean absolute percentage error.
- Parameters:
obs (array_like) – Observed values.
mod (array_like) – Modeled values.
axis (int, optional) – Axis along which to compute. Default is None (all axes).
- Returns:
Symmetric mean absolute percentage error value(s), expressed as percent.
- Return type:
Notes
Elements where
abs(obs)andabs(mod)are both zero are masked and excluded from the mean.
- monet.util.stats.STDO(obs, mod, axis=None)
Standard deviation of Observations
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.STDP(obs, mod, axis=None)
Standard deviation of Predictions
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.USUTPB(obs, mod, axis=None)
Unpaired Space/Unpaired Time Peak Bias (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.USUTPE(obs, mod, axis=None)
Unpaired Space/Unpaired Time Peak Error (%)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.WDAC(obs, mod, axis=None)
Wind Direction Anomaly Correlation
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.WDIOA(obs, mod, axis=None)
Calculate Wind Direction Index of Agreement.
- Parameters:
obs (numpy.ndarray) – Observed wind direction values (degrees)
mod (numpy.ndarray) – Modeled wind direction values (degrees)
axis (int, optional) – Axis along which to compute. Default is None (flatten array)
- Returns:
Wind Direction Index of Agreement value
- Return type:
- monet.util.stats.WDIOA_m(obs, mod, axis=None)
Calculate wind direction Index of Agreement.
Modified version that handles circular nature of wind direction.
- Parameters:
obs (numpy.ndarray) – Observed wind directions
mod (numpy.ndarray) – Modeled wind directions
axis (int, optional) – Axis along which to compute
- Returns:
Wind direction IOA value(s)
- Return type:
- monet.util.stats.WDMB(obs, mod, axis=None)
Wind Direction Mean Bias
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.WDMB_m(obs, mod, axis=None)
Wind Direction Mean Bias (avoid single block error in np.ma)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.WDME(obs, mod, axis=None)
Wind Direction Mean Gross Error (model and obs unit)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.WDME_m(obs, mod, axis=None)
Wind Direction Mean Gross Error (model and obs unit) (avoid single block error in np.ma)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.WDMdnB(obs, mod, axis=None)
Wind Direction Median Bias
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.WDMdnE(obs, mod, axis=None)
Wind Direction Median Gross Error (model and obs unit)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.WDNMB_m(obs, mod, axis=None)
Wind Direction Normalized Mean Bias (%) (avoid single block error in np.ma)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.WDRMSE(obs, mod, axis=None)
Wind Direction Root Mean Square Error (model unit)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.WDRMSE_m(obs, mod, axis=None)
Wind Direction Root Mean Square Error (model unit) (avoid single block error in np.ma)
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.circlebias(b)
Calculate circular bias.
For circular quantities like wind direction where the values wrap around.
- Parameters:
b (numpy.ndarray) – Array of differences between values (e.g. model - obs)
- Returns:
Bias values adjusted for circular nature of data
- Return type:
- monet.util.stats.circlebias_m(b)
Calculate circular bias avoiding single block error.
For circular quantities like wind direction where the values wrap around.
- Parameters:
b (numpy.ndarray) – Array of differences between values (e.g. model - obs)
- Returns:
Bias values adjusted for circular nature of data
- Return type:
- monet.util.stats.d1(obs, mod, axis=None)
Modified Index of Agreement, d1
- Parameters:
obs (type) – Description of parameter obs.
mod (type) – Description of parameter mod.
axis (type) – Description of parameter axis.
- Returns:
Description of returned object.
- Return type:
- monet.util.stats.matchedcompressed(a1, a2)
Match masks and compress arrays to 1D.
First matches masks between arrays then compresses them to 1D by removing masked values.
- Parameters:
a1 (numpy.ndarray or numpy.ma.MaskedArray) – First array to process
a2 (numpy.ndarray or numpy.ma.MaskedArray) – Second array to process
- Returns:
(compressed_a1, compressed_a2) containing flattened 1D arrays with masked values removed
- Return type:
- monet.util.stats.matchmasks(a1, a2)
Match masks between two arrays.
Creates a combined mask from two arrays, ensuring they have compatible masking for operations.
- Parameters:
a1 (numpy.ndarray or numpy.ma.MaskedArray) – First array to match masks
a2 (numpy.ndarray or numpy.ma.MaskedArray) – Second array to match masks
- Returns:
(masked_a1, masked_a2) containing both arrays with matched masks
- Return type:
- monet.util.stats.scores(obs, mod, minval, maxval=100000.0)
Calculate multiple verification scores between obs and model.
- Parameters:
obs (numpy.ndarray) – Observed values
mod (numpy.ndarray) – Modeled values
minval (float) – Minimum threshold value for categorical scores
maxval (float, optional) – Maximum threshold value for categorical scores. Default is 1.0e5
- Returns:
Dictionary containing various statistical scores
- Return type: