SUEWS
Surface Urban Energy and Water Balance Scheme.
https://github.com/UMEP-dev/SUEWS
Category: Climate Change
Sub Category: Earth and Climate Modeling
Keywords
land-surface-model urban-analytics urban-climate-model
Keywords from Contributors
land-surface-modeling suews climate-model wrf science-research urban-climate urban-planning sensors reporter particles
Last synced: about 15 hours ago
JSON representation
Repository metadata
Surface Urban Energy and Water Balance Scheme
- Host: GitHub
- URL: https://github.com/UMEP-dev/SUEWS
- Owner: UMEP-dev
- License: mpl-2.0
- Fork: true (Urban-Meteorology-Reading/SUEWS)
- Created: 2020-12-22T22:44:06.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-06-22T07:55:53.000Z (8 days ago)
- Last Synced: 2025-06-22T08:32:22.717Z (8 days ago)
- Topics: land-surface-model, urban-analytics, urban-climate-model
- Language: Fortran
- Homepage: https://suews.readthedocs.io/
- Size: 792 MB
- Stars: 15
- Watchers: 10
- Forks: 8
- Open Issues: 82
- Releases: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
README.md
SUEWS
This is a public repo for SUEWS source code and documentation.
Documentation
-
Documentation site: https://suews.readthedocs.io/
-
Documentation source:
docs
folder in this repo
Quick Start
For users who want to run SUEWS simulations:
-
Install from PyPI (simplest):
pip install supy
-
Run a simulation:
suews-run /path/to/config.yml
For developers, see the Developer Note section below.
Developer Note
[!NOTE]
the following is deprecated and will be updated
Development Environment
Claude Code Integration
For enhanced development productivity, SUEWS includes integration with Claude Code in a containerised environment:
- Setup Guide: See
claude-dev/README.md
for complete setup instructions - Quick Start:
- Workspace Manager (recommended):
./claude-dev/claude.sh start myproject
- Direct Setup:
./claude-dev/setup-claude-dev.sh
from repository root
- Workspace Manager (recommended):
- Features: Intelligent code assistance, automated testing, British academic standards, multi-workspace support
- Benefits: Isolated environment, reproducible development, AI-powered debugging, parallel project development
Traditional Development
For local development without containerisation, follow these steps:
Prerequisites
Essential Tools:
- Fortran Compiler: gfortran (≥ 9.3.0) or Intel ifort
- macOS:
brew install gcc
- Ubuntu/Debian:
sudo apt-get install gfortran
- Windows: Use WSL or MinGW-w64
- macOS:
- Version Control: git
- Package Manager: mamba (faster than conda)
# Install mambaforge (if not already installed) curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" bash Miniforge3-$(uname)-$(uname -m).sh
Recommended Tools:
- VS Code with extensions:
- Modern Fortran
- Python
- GitHub Copilot (free for academic use)
- WSL (Windows users)
Setup Steps
-
Clone the repository:
git clone https://github.com/UMEP-dev/SUEWS.git cd SUEWS
-
Initialise submodules (required for SPARTACUS dependency):
git submodule init git submodule update
Note: If permission denied, configure SSH for GitHub
-
Create development environment:
mamba env create -f env.yml
This creates
suews-dev
environment with all required packages. -
Activate environment:
mamba activate suews-dev
-
Build SUEWS:
# Quick development build (recommended) make dev # Or full build with tests make
-
Verify installation:
pip show supy suews-run --help
Development Workflow
-
Build commands:
make dev # Fast development build make # Full build with tests make test # Run test suite only make clean # Clean build artifacts make wheel # Build distribution wheels make docs # Build documentation make livehtml # Live documentation preview
-
Environment management:
make help # Show all available commands make deactivate # Show deactivation command
-
Common issues:
- Build conflicts: Run
make clean
before rebuilding - Import errors: Ensure you're in the
suews-dev
environment - Permission errors on Windows: Right-click project folder → Properties → Security → Edit → Everyone → Allow
- Build conflicts: Run
Project Structure
SUEWS/
├── src/
│ ├── suews/ # Fortran physics engine
│ ├── supy/ # Python interface
│ └── supy_driver/ # F2Py wrapper
├── test/ # Test suite
├── docs/ # Documentation source
├── env.yml # Development environment
└── Makefile # Build commands
Debugging with GDB
GDB is a generic debugging tool used along with gfortran.
Here are some tips to debug SUEWS code:
GDB on macOS
Recent macOS (since High Sierra) introduces extra security procedures for system level operations that makes installation GDB more tedious than before.
The best practice, in TS's opinion, to avoid hacking your macOS, is to use Linux docker images with gfortran & gdb installations: e.g., alpine-gfortran
(otherwise, this guide might be useful for installation of GDB on macOS; also run set startup-with-shell off
inside GDB before run
the debuggng process)
Once the docker image is installed, simply run this from the SUEWS root folder for debugging:
docker run --rm -it -v $(pwd):/source sunt05/alpine-gfortran /bin/bash
which will mount the current SUEWS
directory to docker's path /source
and enter the interactive mode for debugging.
debugging with GDB
- enable the debugging related flags in
Makefile
underSUEWS-SourceCode
by removing the#
after the equal sign=
:
FCNOOPT = -O0
FFLAGS = -O3 $(STATIC) $(FCDEBUG) -Wall -Wtabs -fbounds-check -cpp \
-Wno-unused-dummy-argument -Wno-unused-variable
- fully clean and recompile
SUEWS
:
make clean; make
- copy the recompiled
SUEWS
binary into your SUEWS testing folder (e.g.,Test/BaseRun/2019a
) and load it into GDB:
gdb SUEWS
run
then you should have stack info printed out by GDB if any runtime error occurs.
More detailed GDB tutorial can be found here.
Questions
- Please raise issues for questions in the development so our progress can be well managed.
Owner metadata
- Name: UMEP-dev
- Login: UMEP-dev
- Email:
- Kind: organization
- Description:
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/62675320?v=4
- Repositories: 5
- Last ynced at: 2023-03-06T16:59:29.327Z
- Profile URL: https://github.com/UMEP-dev
GitHub Events
Total
- Create event: 87
- Commit comment event: 6
- Issues event: 110
- Watch event: 2
- Delete event: 17
- Issue comment event: 160
- Push event: 756
- Pull request review comment event: 18
- Pull request review event: 45
- Pull request event: 110
- Fork event: 1
Last Year
- Create event: 87
- Commit comment event: 6
- Issues event: 110
- Watch event: 2
- Delete event: 17
- Issue comment event: 160
- Push event: 756
- Pull request review comment event: 18
- Pull request review event: 45
- Pull request event: 110
- Fork event: 1
Committers metadata
Last synced: about 2 months ago
Total Commits: 5,571
Total Committers: 30
Avg Commits per committer: 185.7
Development Distribution Score (DDS): 0.161
Commits in past year: 784
Committers in past year: 4
Avg Commits per committer in past year: 196.0
Development Distribution Score (DDS) in past year: 0.457
Name | Commits | |
---|---|---|
Ting Sun | s****5@g****m | 4674 |
matthew | m****n@p****k | 265 |
Järvi, Leena J | l****i@h****i | 93 |
Lewis Blunn | m****3@g****m | 77 |
Hamidreza Omidvar | o****a@g****m | 76 |
Silvia Rognone | r****a@g****m | 65 |
lyy | l****9@m****n | 50 |
natalieth | n****s@g****m | 42 |
HelenWard | h****d@r****k | 42 |
Fredrik Lindberg | f****l@g****e | 35 |
Vitor Lavor | v****r@h****m | 28 |
zhenkunl | l****k@y****t | 27 |
Sue Grimmond | 2****d | 15 |
unknown | x****r@N****e | 14 |
unknown | h****a@W****k | 13 |
yiqing1021 | d****4@s****k | 12 |
unknown | x****0@S****k | 10 |
azure-pipelines[bot] | a****] | 10 |
黄文娟 | h****n@h****l | 3 |
Shiho Onomura | s****a@g****e | 3 |
Jonas Kittner | j****r@r****e | 3 |
Xiaoxiong Xie | 3****e | 2 |
IzzyWillow | i****s@p****k | 2 |
dependabot-preview[bot] | 2****] | 2 |
Fredrik Lindberg | x****r@h****e | 2 |
pjay-PC\pjay | p****3@1****m | 2 |
Mat Lipson | m****n@u****u | 1 |
Csilla V Gal | c****g@g****m | 1 |
Ting Sun | s****5@w****k | 1 |
David Stansby | d****y@g****m | 1 |
Committer domains:
- pgr.reading.ac.uk: 2
- webvpn-30.rdg.ac.uk: 1
- unsw.edu.au: 1
- 163.com: 1
- hpc.magic.gvc.gu.se: 1
- rub.de: 1
- gu.se: 1
- swws101140.rdg.ac.uk: 1
- student.reading.ac.uk: 1
- wll-czv9nx1.ad.nerc.ac.uk: 1
- natgvc066.gukonto.gu.se: 1
- yeah.net: 1
- gvc.gu.se: 1
- reading.ac.uk: 1
- mails.tsinghua.edu.cn: 1
- helsinki.fi: 1
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 246
Total pull requests: 162
Average time to close issues: about 1 year
Average time to close pull requests: 1 day
Total issue authors: 35
Total pull request authors: 7
Average comments per issue: 2.23
Average comments per pull request: 0.64
Merged pull request: 135
Bot issues: 0
Bot pull requests: 0
Past year issues: 95
Past year pull requests: 110
Past year average time to close issues: about 2 months
Past year average time to close pull requests: about 15 hours
Past year issue authors: 13
Past year pull request authors: 4
Past year average comments per issue: 2.22
Past year average comments per pull request: 0.72
Past year merged pull request: 85
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- sunt05 (75)
- ghost (43)
- MatthewPaskin (43)
- biglimp (9)
- dayantur (6)
- utterances-bot (5)
- Empanag (5)
- ljarvi (5)
- LllC-mmd (5)
- megstretton (4)
- suegrimmond (4)
- Kangarooboxer (4)
- CsillaVG (3)
- RussellGl (3)
- vitorlavor (3)
Top Pull Request Authors
- sunt05 (96)
- MatthewPaskin (37)
- ljarvi (16)
- LllC-mmd (4)
- dayantur (4)
- vitorlavor (3)
- yiqing1021 (2)
Top Issue Labels
- enhancement (41)
- WIP (35)
- documentation (29)
- STEBBS (20)
- P1 (19)
- P0 (19)
- SPARTACUS (19)
- pydantic (14)
- P2 (10)
- SuPy (9)
- needs-test (8)
- bug (7)
- snow (7)
- P4 (6)
- RSL (6)
- P3 (6)
- pre-processing (5)
- help wanted (5)
- CO2 (5)
- post-processing (4)
- ESTM (4)
- OHM (4)
- Anthropogenic Emissions (4)
- dev (4)
- benchmark (3)
- no-issue-activity (3)
- BEERS (3)
- EHC (3)
- user question (3)
- DailyState (3)
Top Pull Request Labels
- bug (2)
Dependencies
- actions/checkout v1 composite
- actions/setup-python v2 composite
- elstudio/actions-js-build/commit v2 composite
- actions/checkout v3 composite
- actions/download-artifact v3 composite
- actions/upload-artifact v3 composite
- pypa/cibuildwheel v2.9.0 composite
- pypa/gh-action-pypi-publish release/v1.5 composite
- glassechidna/artifact-cleaner v2 composite
- actions/stale v5 composite
- actions/checkout v3 composite
- actions/download-artifact v3 composite
- actions/upload-artifact v3 composite
- pypa/cibuildwheel v2.9.0 composite
- pypa/gh-action-pypi-publish release/v1.5 composite
- auditwheel *
- build *
- pytest *
- twine *
- DRIVER_REQ ,
- atmosp *
- cdsapi *
- chardet *
- click *
- dask *
- f90nml *
- f90wrap ==0.2.12
- importlib_resources *
- lmfit *
- matplotlib *
- multiprocess *
- numdifftools *
- pandas <
- pandas *
- platypus-opt ==1.0.4
- pvlib *
- scipy *
- seaborn *
- xarray *
Score: 7.975908360165539