Tip
Need help? Please let us know in the SUEWS Community.
Please report issues with the manual on GitHub Issues (or use Report Issue for This Page for page-specific feedback).
Please cite SUEWS with proper information from our Zenodo page.
6.3. Utility Functions#
SuPy provides a comprehensive set of utility functions for data processing, analysis, and visualisation.
6.3.1. ERA-5 Data Processing#
Functions for downloading and processing ERA-5 reanalysis data:
|
Generate SUEWS forcing files using ERA-5 timeseries data. |
6.3.2. Meteorological Data#
Functions for working with EPW weather files and meteorological data:
|
Generate an |
|
Read in EPW (EnergyPlus Weather) file as a DataFrame. |
|
Fill all gaps in a time series using data from neighbouring divisions of 'freq' |
6.3.3. Energy Balance Analysis#
Functions for analysing the Objective Hysteresis Model (OHM):
|
A function to linearly fit two independant variables to a dependent one. |
|
Calculate QS using OHM (Objective Hysteresis Model). |
6.3.4. Surface Conductance#
Functions for calculating and calibrating surface conductance:
|
Model surface conductance/resistance using phenology and atmospheric forcing conditions. |
|
Calculate surface conductance based on observations, notably turbulent fluxes. |
|
Calibrate parameters for modelling surface conductance over vegetated surfaces using |
6.3.5. Plotting and Visualisation#
Functions for visualising SUEWS results:
|
Produce a scatter plot with linear regression line to compare simulation results and observations. |
|
Produce a ensemble diurnal climatologies with uncertainties shown in inter-quartile ranges. |
|
Produce a quick plot of RSL results |
6.3.6. Roughness Calculations#
Functions for calculating roughness parameters:
|
Calculates surface roughness and zero plane displacement height. |
|
Calculates the rows associated with neutral condition (threshold=0.01) |
6.3.7. Attribution Analysis#
Functions for decomposing near-surface variable changes into physically attributable components using Shapley value analysis [Owen, 1972, Shapley, 1953]. See Temperature Attribution Analysis for a worked example.
|
Generic attribution function for near-surface variables. |
|
Generic diagnostic function for near-surface variables. |
|
Decompose T2 differences between two SUEWS scenarios. |
|
Decompose q2 (2m specific humidity) differences between two SUEWS scenarios. |
|
Decompose U10 (10m wind speed) differences between two SUEWS scenarios. |
|
Automatically identify anomalous T2 values and attribute the causes. |
|
Automatically identify anomalous q2 values and attribute the causes. |
|
Automatically identify anomalous U10 values and attribute the causes. |
|
Container for attribution analysis results. |