Skip to content
SUEWS that speaks Python
Branch: master
Clone or download
sunt05 Merge pull request #52 from sunt05/dev-test
UMEP compatibility tweaks.
Latest commit 04dddda Apr 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE updated docs Jan 1, 2019
docs
src UMEP compatibility tweaks. Apr 18, 2019
.gitignore
LICENSE initial commit Aug 30, 2018
Makefile
README.md
azure-pipelines.yml
readthedocs.yml
requirements.txt minor fix Apr 12, 2019
sample_plot.png

README.md

SuPy

Python Version Support Status Latest Version Status Downloads Launch Binder

Build Status Documentation Status DOI

SUEWS that speaks Python

Installation

SuPy requires python 3.6+ and can be installed with pip in command line prompt:

python3 -m pip install supy --upgrade

Quick Demo

Once installed, supy can be quickly started to get SUEWS simulations done:

import supy as sp
import matplotlib.pyplot as plt

#load sample data
df_state_init, df_forcing = sp.load_SampleData()
grid = df_state_init.index[0]

#run supy/SUEWS simulation
df_output, df_state_end = sp.run_supy(df_forcing, df_state_init)

#plot results and save figure
res_plot = df_output.SUEWS.loc[grid, ['QN', 'QF', 'QS', 'QE', 'QH']]
ax=res_plot.loc['2012 6 4':'2012 6 6'].resample('30T').mean().plot()
plt.show()
ax.figure.savefig('sample_plot.png')

The above code will produce a plot of surface energy balance components as follows:

sample plot

Tutorial

Please check out more SuPy tutorials here!

You can’t perform that action at this time.