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.6. Data Structures#

SUEWS uses pandas DataFrames as the primary data structure for all inputs and outputs, enabling powerful data analysis and manipulation.

6.6.1. Core Data Objects#

6.6.1.1. State DataFrame#

The state DataFrame contains model state variables and parameters for each grid cell.

df_state variables - Complete reference

6.6.1.2. Forcing DataFrame#

The forcing DataFrame contains meteorological forcing data (temperature, radiation, wind, etc.).

df_forcing variables - Complete reference

6.6.1.3. Output DataFrame#

The output DataFrame contains simulation results and diagnostics.

df_output variables - Complete reference

6.6.2. Integration with pandas#

All SUEWS data uses pandas DataFrames with proper indexing, allowing powerful data analysis:

from supy import SUEWSSimulation

# Load sample data and run simulation
sim = SUEWSSimulation.from_sample_data()
sim.run()

# Analyse results using pandas
monthly_temp = sim.results['T2'].resample('M').mean()
energy_balance = sim.results[['QE', 'QH', 'QS', 'QF']].describe()

6.6.3. Benefits of DataFrame Structure#

  • Familiar interface: Leverage pandas’ powerful data manipulation capabilities

  • Time series analysis: Built-in resampling, rolling windows, and time-based operations

  • Easy visualisation: Direct integration with matplotlib and seaborn

  • Data export: Simple conversion to CSV, Excel, HDF5, and other formats

  • Memory efficient: Sparse data structures and chunked processing support