supy.util.diagnose

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.2. supy.util.diagnose#

supy.util.diagnose(df_output: DataFrame, variable: Literal['T2', 'q2', 'U10'] = 'T2', **kwargs) AttributionResult[source]#

Generic diagnostic function for near-surface variables.

Automatically identifies anomalous values and attributes the causes.

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

  • variable (str, optional) – Variable to diagnose: ‘T2’ (temperature), ‘q2’ (humidity), or ‘U10’ (10m wind speed). Default ‘T2’.

  • **kwargs – Additional keyword arguments passed to the specific function. - method: ‘anomaly’, ‘extreme’, or ‘diurnal’ - threshold: float for anomaly detection - df_forcing: forcing DataFrame (T2, q2 only) - hierarchical: bool (T2 only) - z_ref: float (U10 only)

Returns:

Attribution decomposition with diagnostic interpretation.

Return type:

AttributionResult

Examples

>>> result = diagnose(df_output, variable="T2", method="anomaly")
>>> print(result)
>>> result = diagnose(df_output, variable="q2", method="diurnal")
>>> print(result)
>>> result = diagnose(df_output, variable="U10", method="extreme")
>>> print(result)