supy.util.diagnose_u10

Contents

Tip

  1. Need help? Please let us know in the SUEWS Community.

  2. Please report issues with the manual on GitHub Issues (or use Report Issue for This Page for page-specific feedback).

  3. Please cite SUEWS with proper information from our Zenodo page.

6.3.7.8. supy.util.diagnose_u10#

supy.util.diagnose_u10(df_output: DataFrame, method: Literal['anomaly', 'extreme', 'diurnal'] = 'anomaly', threshold: float = 2.0, z_ref: float = 10.0, min_ustar: float = 0.01) AttributionResult[source]#

Automatically identify anomalous U10 values and attribute the causes.

This convenience function identifies unusual U10 (10m wind speed) behaviour within a single simulation run and diagnoses the driving factors by comparing aggregate statistics between reference (normal) and target (anomaly) periods.

Parameters:
  • df_output (pd.DataFrame) – SUEWS output DataFrame

  • method (str, optional) – Detection method: - ‘anomaly’: Compare timesteps > threshold sigma from daily mean - ‘extreme’: Compare top/bottom 5% of U10 vs. middle 50% - ‘diurnal’: Compare afternoon (12:00-15:00) vs. morning (06:00-10:00) Default ‘anomaly’.

  • threshold (float, optional) – Standard deviation threshold for anomaly detection. Default 2.0.

  • z_ref (float, optional) – Reference height for wind speed (m). Default 10.0 m.

  • min_ustar (float, optional) – Minimum friction velocity threshold (m/s). Default 0.01.

Returns:

Attribution decomposition with diagnostic interpretation.

Return type:

AttributionResult

Examples

Quick anomaly diagnosis:

>>> result = diagnose_u10(df_output, method="anomaly")
>>> print(result)
U10 Attribution Results
========================================
Mean delta_U10: +1.85 m/s

6.3.7.8. Component Breakdown:#

forcing : +0.92 m/s (49.7%) roughness : +0.65 m/s (35.1%) stability : +0.28 m/s (15.1%)

Closure residual: 1.23e-15 m/s

>>> result.plot()  # Visualise decomposition