https://github.com/sunt05/SuPy
SUEWS that speaks Python
https://github.com/sunt05/SuPy
climate-model land-surface-modeling science-research urban-climate-model
Last synced: 11 days ago
JSON representation
SUEWS that speaks Python
- Host: GitHub
- URL: https://github.com/sunt05/SuPy
- Owner: sunt05
- License: gpl-3.0
- Archived: true
- Created: 2018-12-20T23:32:57.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-01-27T13:47:56.000Z (over 3 years ago)
- Last Synced: 2024-08-03T15:05:17.789Z (9 months ago)
- Topics: climate-model, land-surface-modeling, science-research, urban-climate-model
- Language: Python
- Homepage: https://supy.readthedocs.io/
- Size: 31 MB
- Stars: 8
- Watchers: 6
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-atmos - SuPy - enhanced urban climate model with [SUEWS](https://github.com/Urban-Meteorology-Reading/SUEWS) as its computation core. (Numerical Model)
README
# SuPy
**THIS PROJECT IS ARCHIVED AND NOW MAINTAINED [HERE](https://github.com/UMEP-dev/SuPy) BY [@UMEP-dev](https://github.com/UMEP-dev).**
[](https://pypi.org/project/supy)
[](https://pypi.org/project/supy)
[](https://pepy.tech/project/supy)
[](https://mybinder.org/v2/gh/sunt05/SuPy/master)[](https://dev.azure.com/sunt05/SuPy/_build/latest?definitionId=11?branchName=master)
[](https://supy.readthedocs.io/en/latest/?badge=latest)
[](https://doi.org/10.5281/zenodo.2574404)[**SU**EWS](https://suews-docs.readthedocs.io) that speaks **Py**thon
## Installation
SuPy requires 64-bit `python` 3.6+ and can be installed with `pip` in command line prompt:
```shell
python3 -m pip install supy --upgrade
```## Quick Demo
Once installed, `supy` can be quickly started to get [SUEWS](https://suews-docs.readthedocs.io) simulations done:
```python {cmd}
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:

## Tutorial
Please check out [more SuPy tutorials here!](https://supy.readthedocs.io/en/latest/tutorial/tutorial.html)