SUEWS

Surface Urban Energy and Water Balance Scheme

https://github.com/UMEP-dev/SUEWS

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    9 of 30 committers (30.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.9%) to scientific vocabulary

Keywords

land-surface-model urban-analytics urban-climate-model

Keywords from Contributors

astronomy urban-planning
Last synced: 6 months ago · JSON representation

Repository

Surface Urban Energy and Water Balance Scheme

Basic Info
Statistics
  • Stars: 16
  • Watchers: 10
  • Forks: 10
  • Open Issues: 67
  • Releases: 1
Fork of Urban-Meteorology-Reading/SUEWS
Topics
land-surface-model urban-analytics urban-climate-model
Created about 5 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License

README.md

SUEWS - Surface Urban Energy and Water Balance Scheme

This is the SUEWS urban climate model repository.

Installation

bash pip install supy

Documentation

See the full documentation at: https://suews.readthedocs.io

Quick Start

For users who want to run SUEWS simulations:

  1. Install from PyPI (simplest): bash pip install supy

  2. Run a simulation: bash suews-run /path/to/config.yml

For developers, see the Developer Note section below.

Developer Note

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

CLAUDE.md Protection System

This repository includes automatic protection for the CLAUDE.md configuration file to prevent accidental content loss:

  • Automatic Features (no setup required):

    • GitHub Actions validation on all PRs/pushes affecting CLAUDE.md
    • Content reduction detection (alerts if >20% content removed)
    • Automatic snapshots on validation failures
  • Local Protection (one-time setup): ```bash

    Run once after cloning or pulling this feature

    bash .claude/scripts/setup-claude-protection.sh ``` This enables:

    • Git pre-commit validation
    • Local backup system
    • Manual validation: python3 .claude/scripts/validate-claude-md.py
  • 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 * Version Control: git * Package Manager: mamba (faster than conda) bash # 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
  1. Clone the repository: bash git clone https://github.com/UMEP-dev/SUEWS.git cd SUEWS

  2. Initialise submodules (required for SPARTACUS dependency): bash git submodule init git submodule update Note: If permission denied, configure SSH for GitHub

  3. Create development environment: bash mamba env create -f env.yml This creates suews-dev environment with all required packages.

  4. Activate environment: bash mamba activate suews-dev

  5. Build SUEWS: ```bash

    Quick development build (recommended)

    make dev

# Or full build with tests make ```

  1. Verify installation: bash pip show supy suews-run --help
Development Workflow
  • Build commands: bash 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: bash 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
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

Contributing

Code Style and Formatting

SUEWS maintains consistent code style through automated formatting:

  • Coding Standards: See CODING_GUIDELINES.md for detailed standards
  • Automated Formatting: The master branch is automatically formatted after merge
  • Zero Friction: Contributors can focus on functionality; formatting is handled by machines
  • Tools Used:
    • Python: ruff (configuration in .ruff.toml)
    • Fortran: fprettify (configuration in .fprettify.rc)

For Contributors: Just write working code! Formatting will be applied automatically after merge.

For Local Development (optional):

origin/master bash pip install -e . --no-build-isolation

Owner

  • Name: UMEP-dev
  • Login: UMEP-dev
  • Kind: organization

GitHub Events

Total
  • Create event: 217
  • Commit comment event: 6
  • Issues event: 198
  • Watch event: 2
  • Delete event: 37
  • Issue comment event: 380
  • Push event: 1,398
  • Pull request review comment event: 21
  • Pull request review event: 62
  • Pull request event: 246
  • Fork event: 2
Last Year
  • Create event: 217
  • Commit comment event: 6
  • Issues event: 198
  • Watch event: 2
  • Delete event: 37
  • Issue comment event: 380
  • Push event: 1,398
  • Pull request review comment event: 21
  • Pull request review event: 62
  • Pull request event: 246
  • Fork event: 2

Committers

Last synced: 6 months ago

All Time
  • Total Commits: 5,571
  • Total Committers: 30
  • Avg Commits per committer: 185.7
  • Development Distribution Score (DDS): 0.161
Past Year
  • Commits: 784
  • Committers: 4
  • Avg Commits per committer: 196.0
  • Development Distribution Score (DDS): 0.457
Top Committers
Name Email Commits
Ting Sun s****5@g****m 4,674
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

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 271
  • Total pull requests: 320
  • Average time to close issues: 9 months
  • Average time to close pull requests: 1 day
  • Total issue authors: 39
  • Total pull request authors: 8
  • Average comments per issue: 1.49
  • Average comments per pull request: 1.03
  • Merged pull requests: 221
  • Bot issues: 9
  • Bot pull requests: 5
Past Year
  • Issues: 136
  • Pull requests: 250
  • Average time to close issues: 21 days
  • Average time to close pull requests: 1 day
  • Issue authors: 19
  • Pull request authors: 5
  • Average comments per issue: 0.71
  • Average comments per pull request: 1.22
  • Merged pull requests: 153
  • Bot issues: 9
  • Bot pull requests: 5
Top Authors
Issue Authors
  • sunt05 (98)
  • MatthewPaskin (50)
  • ghost (27)
  • github-actions[bot] (9)
  • dayantur (6)
  • biglimp (6)
  • LllC-mmd (5)
  • Empanag (4)
  • megstretton (4)
  • utterances-bot (4)
  • Kangarooboxer (4)
  • bartpannemans (4)
  • ljarvi (3)
  • RussellGl (3)
  • vitorlavor (3)
Pull Request Authors
  • sunt05 (212)
  • MatthewPaskin (63)
  • ljarvi (15)
  • dayantur (10)
  • vitorlavor (6)
  • github-actions[bot] (5)
  • LllC-mmd (4)
  • yiqing1021 (2)
Top Labels
Issue Labels
enhancement (30) WIP (29) documentation (24) P0 (19) 1-feature (12) 4-ready (12) bug (12) P1 (11) SuPy (10) SPARTACUS (10) build-failure (9) 1-bug (9) P2 (7) 3-P2 (7) snow (6) 3-P1 (6) needs-test (6) 4-in-progress (5) pydantic (5) 2-infra:input (5) help wanted (5) 2-doc:user (5) 3-P0 (5) dev (5) 2-infra:data-model (4) P3 (4) Anthropogenic Emissions (4) post-processing (4) 2-P2 (4) CO2 (4)
Pull Request Labels
bug (1) 3-P0 (1) 1-bug (1) 2-infra:utility (1) module:rslprof (1) 4-needs-science (1) STEBBS (1)

Dependencies

.github/workflows/f-prettify.yml actions
  • actions/checkout v1 composite
  • actions/setup-python v2 composite
  • elstudio/actions-js-build/commit v2 composite
.github/workflows/archive/build-SUEWS.yml actions
  • 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
.github/workflows/archive/clean-artifact.yml actions
  • glassechidna/artifact-cleaner v2 composite
.github/workflows/archive/move.yml actions
.github/workflows/archive/stale.yml actions
  • actions/stale v5 composite
.github/workflows/build-publish_to_pypi.yml actions
  • 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
src/supy/pyproject.toml pypi
src/supy/requirements.txt pypi
  • auditwheel *
  • build *
  • pytest *
  • twine *
src/supy/setup.py pypi
  • 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 *