Skip to main content

ModelSkill: compare model results with observations in Python

Python version Full test PyPI version OS Downloads License: MIT

Match observations with model results, calculate skill metrics, and make plots and reports.

ModelSkill is primarily used for MIKE models, but other models can be evaluated as well. It is meant to be your companion during model setup, calibration, and validation and reporting.

Requirements

  • Windows or Linux operating system
  • Python x64 3.12 - 3.14

Installation

pip install modelskill

Or the development version:

pip install https://github.com/DHI/modelskill/archive/main.zip

Getting started

Define model results and observations:

>>> import modelskill as ms
>>> mr = ms.DfsuModelResult("HKZN_local_2017_DutchCoast.dfsu", name="HKZN_local", item=0)
>>> HKNA = ms.PointObservation("HKNA_Hm0.dfs0", item=0, x=4.2420, y=52.6887, name="HKNA")
>>> EPL = ms.PointObservation("eur_Hm0.dfs0", item=0, x=3.2760, y=51.9990, name="EPL")
>>> c2 = ms.TrackObservation("Alti_c2_Dutch.dfs0", item=3, name="c2")

Match them in space and time, extracting model data at the observation positions:

>>> cc = ms.match([HKNA, EPL, c2], mr)

The resulting ComparerCollection, cc, is the starting point for skill assessment and plotting:

>>> cc.skill().round(2)
               n  bias  rmse  urmse   mae    cc    si    r2
observation
HKNA         386 -0.20  0.36   0.29  0.26  0.97  0.09  0.90
EPL           67 -0.07  0.22   0.21  0.19  0.97  0.08  0.93
c2           113 -0.00  0.35   0.35  0.29  0.98  0.13  0.90
>>> cc.plot.scatter()
>>> cc["HKNA"].plot.timeseries(backend="plotly")

See the user guide for more.

Where can I get help?

Testing

ModelSkill is tested extensively, with an overall statement coverage of ~90%. The test suite runs on every pull request against Python 3.12 and 3.14, and on a schedule on both Linux and Windows.

uv run pytest --cov=modelskill

Contributing

Contributions are welcome — see CONTRIBUTING.md. Key architectural decisions are documented as ADRs.

License

MIT

Metadata

Release files for modelskill 1.4.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 modelskill 1.4.0
File Size Uploaded
modelskill-1.4.0.tar.gz 1.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for modelskill 1.4.0
File Interpreter ABI Platform
modelskill-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.5 MB

Release files / modelskill-1.4.0.tar.gz

Download URL modelskill-1.4.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
77fffb99facbf727668088110ca2f4bbccd45fb0cdda78a727b67f41a26ac25f
BLAKE2b-256 checksum
How to use checksums
ca5ac8b83e60743b105a538f6238aab5a909c91937d19d034969d2b7ecd96b5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release files / modelskill-1.4.0-py3-none-any.whl

Download URL modelskill-1.4.0-py3-none-any.whl
Size 1.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c34b74584e5538e910c90bf47b1619c5c2e84e780452ff27a6aca3718c6fc58a
BLAKE2b-256 checksum
How to use checksums
5ad70c693a8da07684169c70d6b52ca6632f93c710e259076a562661abb649d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log
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