Compare results from simulations with observations.
Project description
ModelSkill: Flexible Model skill evaluation.
ModelSkill is a python package for scoring MIKE models (other models can be evaluated as well).
Contribute with new ideas in the discussion, report an issue or browse the documentation. Access observational data (e.g. altimetry data) from the sister library WatObs.
Use cases
ModelSkill would like to be your companion during the different phases of a MIKE modelling workflow.
- Model setup - exploratory phase
- Model calibration
- Model validation and reporting - communicate your final results
Installation
From pypi:
> pip install modelskill
Or the development version:
> pip install https://github.com/DHI/modelskill/archive/main.zip
Example notebooks
- Hydrology_Vistula_Catchment.ipynb
- Metocean_multi_model_comparison.ipynb
- Multi_variable_comparison.ipynb
- Metocean_track_comparison_global.ipynb
- Gridded_NetCDF_ModelResult.ipynb
- Directional_data_comparison.ipynb
- Combine_comparers.ipynb
Workflow
- Define ModelResults
- Define Observations
- Match Observations and ModelResults
- Do plotting, statistics, reporting using the Comparer
Read more about the workflow in the getting started guide.
Example of use
Start by defining 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")
Then, connect observations and model results, and extract data at observation points:
>>> cc = ms.match([HKNA, EPL, c2], mr)
With the comparer object, cc, all sorts of skill assessments and plots can be made:
>>> cc.skill().round(2)
n bias rmse urmse mae cc si r2
observation
HKNA 385 -0.20 0.35 0.29 0.25 0.97 0.09 0.99
EPL 66 -0.08 0.22 0.20 0.18 0.97 0.07 0.99
c2 113 -0.00 0.35 0.35 0.29 0.97 0.12 0.99
Overview of observation locations
ms.plotting.spatial_overview([HKNA, EPL, c2], mr, figsize=(7,7))
Scatter plot
cc.plot.scatter()
Timeseries plot
Timeseries plots can either be static and report-friendly (matplotlib) or interactive with zoom functionality (plotly).
cc["HKNA"].plot.timeseries(width=1000, backend="plotly")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file modelskill-1.3.0.tar.gz.
File metadata
- Download URL: modelskill-1.3.0.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4fdbbb831b1f37e4f16be850075c70721dcb8884da9faf38cd221390d7c8513
|
|
| MD5 |
ee92e14f495c83a97da19099aec16bab
|
|
| BLAKE2b-256 |
1314f261f96868d5b4fe89bfaabe12e0507ee14661bf6fb412d07e542e35534b
|
Provenance
The following attestation bundles were made for modelskill-1.3.0.tar.gz:
Publisher:
python-publish.yml on DHI/modelskill
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
modelskill-1.3.0.tar.gz -
Subject digest:
d4fdbbb831b1f37e4f16be850075c70721dcb8884da9faf38cd221390d7c8513 - Sigstore transparency entry: 676080338
- Sigstore integration time:
-
Permalink:
DHI/modelskill@4bae7d1d3b46b3b5efb193fac4b5585524609e88 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/DHI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@4bae7d1d3b46b3b5efb193fac4b5585524609e88 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file modelskill-1.3.0-py3-none-any.whl.
File metadata
- Download URL: modelskill-1.3.0-py3-none-any.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
258049695bbda48163a1be20caeb35de61b0277d91c7edaec02accd8d0fe5892
|
|
| MD5 |
e8760dbca7782b762c6a927eed34d72b
|
|
| BLAKE2b-256 |
28c472722e9ec85a0bfbe4f5b79dd8d2d47af58a38dedc234ff95928dc1f827d
|
Provenance
The following attestation bundles were made for modelskill-1.3.0-py3-none-any.whl:
Publisher:
python-publish.yml on DHI/modelskill
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
modelskill-1.3.0-py3-none-any.whl -
Subject digest:
258049695bbda48163a1be20caeb35de61b0277d91c7edaec02accd8d0fe5892 - Sigstore transparency entry: 676080387
- Sigstore integration time:
-
Permalink:
DHI/modelskill@4bae7d1d3b46b3b5efb193fac4b5585524609e88 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/DHI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@4bae7d1d3b46b3b5efb193fac4b5585524609e88 -
Trigger Event:
workflow_dispatch
-
Statement type: