Skip to main content

ewatercycle-summa

SUMMA (Structure for Unifying Multiple Modeling Alternatives) plugin for eWaterCycle.

Runs the standard SUMMA executable from CH-Earth/summa inside a Docker container via a subprocess BMI wrapper served by grpc4bmi. Works with any existing SUMMA domain setup (e.g. from SYMFLUENCE).

Installation

pip install ewatercycle-summa

Usage

from ewatercycle.models import SUMMA
from ewatercycle.parameter_sets import ParameterSet

from ewatercycle_summa.forcing import SUMMAForcing

# Point to pre-prepared SUMMA forcing
forcing = SUMMAForcing(
    directory="/path/to/forcing",
    forcing_file="forcing.nc",
    start_time="2000-01-01T00:00:00Z",
    end_time="2001-01-01T00:00:00Z",
)

# Point to SUMMA parameter set (settings, attributes, cold state, etc.)
parameter_set = ParameterSet(
    name="summa_test",
    directory="/path/to/parameter_set",
    config="settings/SUMMA/fileManager.txt",
    target_model="SUMMA",
)

# Create and run the model
model = SUMMA(forcing=forcing, parameter_set=parameter_set)
cfg_file, cfg_dir = model.setup()
model.initialize(cfg_file)

while model.time < model.end_time:
    model.update()

model.finalize()

Parameter Set Structure

A SUMMA parameter set for eWaterCycle should contain:

parameter_set_dir/
  settings/SUMMA/
    fileManager.txt        # SUMMA file manager (paths are remapped at runtime)
    modelDecisions.txt     # Process-model decisions
    outputControl.txt      # Output variable selection
    basinParamInfo.txt     # GRU-level parameter metadata
    localParamInfo.txt     # HRU-level parameter metadata
    TBL_GENPARM.TBL        # General parameter lookup table
    TBL_MPTABLE.TBL        # Noah-MP parameter table
    TBL_SOILPARM.TBL       # Soil parameter table
    TBL_VEGPARM.TBL        # Vegetation parameter table
    coldState.nc           # Initial conditions
    attributes.nc          # Spatial attributes (HRU/GRU)
    trialParams.nc         # Calibration parameters
  forcing/SUMMA_input/     # (optional) default forcing if not provided separately
    *.nc

Default template files for the settings are included in this package and can be used as a starting point.

Container

The Docker image builds standard SUMMA (with iterative solver) and wraps it via a Python subprocess BMI + grpc4bmi:

cd container
docker build -t ghcr.io/ewatercycle/summa-grpc4bmi:v0.1.0 .

The first update() call runs the full SUMMA simulation as a subprocess. Subsequent update() calls step through the output timesteps. All standard SUMMA output variables are available via get_value().

License

Apache-2.0

Metadata

Release files for ewatercycle-summa 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ewatercycle-summa 0.1.0
File Size Uploaded Provenance Actions
ewatercycle_summa-0.1.0.tar.gz 42.5 kB Without provenance Details for ewatercycle_summa-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ewatercycle-summa 0.1.0
File Interpreter ABI Platform Actions
ewatercycle_summa-0.1.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for ewatercycle_summa-0.1.0-py2.py3-none-any.whl

Total release size: 80.3 kB

Release files / ewatercycle_summa-0.1.0.tar.gz

Download URL ewatercycle_summa-0.1.0.tar.gz
Size 42.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e9fe2df90fdb589c5f8eb4cd03679a7000533b577a1964b7e14615a4873dd5de
BLAKE2b-256 checksum
How to use checksums
c141be778bf8e6a17dcd54caec854ff7a7fc6d35aa09c06006dc9adb3af0cee8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / ewatercycle_summa-0.1.0-py2.py3-none-any.whl

Download URL ewatercycle_summa-0.1.0-py2.py3-none-any.whl
Size 37.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
2d5f79c21eb718a5511e19f71281a7d5795b1db9a5d36789c26b7cc409460086
BLAKE2b-256 checksum
How to use checksums
51576b068da8b40ff6b4238e4d3cf22954e2189ea43c1949c76cfdcbe414e66e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Security for ewatercycle-summa 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page