From 39e2e1da746012e2a834f06584d1716b417375f8 Mon Sep 17 00:00:00 2001 From: luitjan Date: Wed, 21 Aug 2024 10:45:06 +0200 Subject: [PATCH 1/8] work started --- .vscode/settings.json | 2 +- pixi.lock | 288 ++++++++++++++++++ pixi.toml | 1 + pyproject.toml | 3 + tests/test_imod_coupler/test_metamod.py | 4 +- .../test_imod_coupler/test_metamod_regrid.py | 42 +++ .../test_metamod_regrid_cases.py | 20 ++ 7 files changed, 357 insertions(+), 3 deletions(-) create mode 100644 tests/test_imod_coupler/test_metamod_regrid.py create mode 100644 tests/test_imod_coupler/test_metamod_regrid_cases.py diff --git a/.vscode/settings.json b/.vscode/settings.json index c7038646..9ed1f3c5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { "python.testing.pytestArgs": [ - "tests" + "." ], "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true, diff --git a/pixi.lock b/pixi.lock index 202d3d6c..84efb102 100644 --- a/pixi.lock +++ b/pixi.lock @@ -257,6 +257,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/minizip-4.0.7-h401b404_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/msgpack-python-1.0.8-py312h2492b07_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/multidict-6.0.5-py312h98912ed_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/multimethod-1.9.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/munkres-1.1.4-pyh9f0ad1d_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/mypy_extensions-1.0.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/mysql-common-8.3.0-h70512c7_5.conda @@ -280,6 +281,8 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/p11-kit-0.24.1-hc5aa10d_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/packaging-24.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/pandas-2.2.2-py312h1d6d2e6_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pandera-0.20.3-hd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pandera-base-0.20.3-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/pango-1.54.0-h4c5309f_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/partd-1.4.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pathspec-0.12.1-pyhd8ed1ab_0.conda @@ -323,6 +326,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/re2-2023.09.01-h7f4b329_2.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/readline-8.2-h8228510_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/requests-2.32.3-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/ribasim-2024.10.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/s2n-1.4.17-he19d79f_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/scikit-learn-1.5.1-py312h775a589_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/scipy-1.14.0-py312hc2bc53b_1.conda @@ -347,8 +351,10 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/toolz-0.12.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/tornado-6.4.1-py312h9a8786e_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/tqdm-4.66.5-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typeguard-4.3.0-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.12.2-hd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.12.2-pyha770c72_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typing_inspect-0.9.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/tzcode-2024a-h3f72095_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2024a-h0c530f3_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/uriparser-0.9.8-hac33072_0.conda @@ -360,6 +366,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/wayland-1.23.0-h5291e77_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/wayland-protocols-1.36-hd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/wheel-0.44.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/wrapt-1.16.0-py312h98912ed_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/wslink-2.1.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/x264-1!164.3095-h166bdaf_2.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/x265-3.5-h924138e_3.tar.bz2 @@ -598,6 +605,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/win-64/msgpack-python-1.0.8-py312hd5eb7cc_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/msys2-conda-epoch-20160418-1.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/multidict-6.0.5-py312he70551f_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/multimethod-1.9.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/munkres-1.1.4-pyh9f0ad1d_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/mypy_extensions-1.0.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/netcdf4-1.7.1-nompi_py312h39e0dc6_101.conda @@ -613,6 +621,8 @@ environments: - conda: https://conda.anaconda.org/conda-forge/win-64/orc-2.0.1-h7e885a9_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/packaging-24.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/pandas-2.2.2-py312h72972c8_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pandera-0.20.3-hd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pandera-base-0.20.3-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/pango-1.54.0-hbb871f6_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/partd-1.4.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pathspec-0.12.1-pyhd8ed1ab_0.conda @@ -659,6 +669,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/win-64/rasterio-1.3.10-py312he4a2ebf_5.conda - conda: https://conda.anaconda.org/conda-forge/win-64/re2-2023.09.01-hd3b24a8_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/requests-2.32.3-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/ribasim-2024.10.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/scikit-learn-1.5.1-py312h816cc57_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/scipy-1.14.0-py312h1f4e10d_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/scooby-0.10.0-pyhd8ed1ab_0.conda @@ -682,8 +693,10 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/toolz-0.12.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/tornado-6.4.1-py312h4389bb4_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/tqdm-4.66.5-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typeguard-4.3.0-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.12.2-hd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.12.2-pyha770c72_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typing_inspect-0.9.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2024a-h0c530f3_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/ucrt-10.0.22621.0-h57928b3_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/uriparser-0.9.8-h5a68840_0.conda @@ -697,6 +710,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/wheel-0.44.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/win32_setctime-1.1.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/win_inet_pton-1.1.0-pyhd8ed1ab_6.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/win-64/wrapt-1.16.0-py312he70551f_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/wslink-2.1.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/x264-1!164.3095-h8ffe710_2.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/x265-3.5-h2d74725_3.tar.bz2 @@ -1044,6 +1058,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/more-itertools-10.4.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/msgpack-python-1.0.8-py312h2492b07_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/multidict-6.0.5-py312h98912ed_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/multimethod-1.9.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/munkres-1.1.4-pyh9f0ad1d_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/mypy-1.11.1-py312h41a817b_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/mypy_extensions-1.0.0-pyha770c72_0.conda @@ -1075,6 +1090,8 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/p11-kit-0.24.1-hc5aa10d_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/packaging-24.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/pandas-2.2.2-py312h1d6d2e6_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pandera-0.20.3-hd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pandera-base-0.20.3-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pandocfilters-1.5.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/pango-1.54.0-h4c5309f_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/parso-0.8.4-pyhd8ed1ab_0.conda @@ -1145,6 +1162,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3339-validator-0.1.4-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3986-2.0.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3986-validator-0.1.1-pyh9f0ad1d_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/ribasim-2024.10.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/rich-13.7.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/rpds-py-0.20.0-py312hf008fa9_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/ruff-0.5.6-py312hbe4c86d_0.conda @@ -1181,9 +1199,11 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/tqdm-4.66.5-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/traitlets-5.14.3-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/twine-5.1.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typeguard-4.3.0-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/types-python-dateutil-2.9.0.20240316-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.12.2-hd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.12.2-pyha770c72_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typing_inspect-0.9.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing_utils-0.1.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/tzcode-2024a-h3f72095_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2024a-h0c530f3_0.conda @@ -1201,6 +1221,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/webencodings-0.5.1-pyhd8ed1ab_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/websocket-client-1.8.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/wheel-0.44.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/wrapt-1.16.0-py312h98912ed_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/wslink-2.1.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/x264-1!164.3095-h166bdaf_2.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/x265-3.5-h924138e_3.tar.bz2 @@ -1500,6 +1521,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/win-64/msgpack-python-1.0.8-py312hd5eb7cc_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/msys2-conda-epoch-20160418-1.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/multidict-6.0.5-py312he70551f_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/multimethod-1.9.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/munkres-1.1.4-pyh9f0ad1d_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/mypy-1.11.1-py312h4389bb4_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/mypy_extensions-1.0.0-pyha770c72_0.conda @@ -1523,6 +1545,8 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/overrides-7.7.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/packaging-24.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/pandas-2.2.2-py312h72972c8_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pandera-0.20.3-hd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pandera-base-0.20.3-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pandocfilters-1.5.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/pango-1.54.0-hbb871f6_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/parso-0.8.4-pyhd8ed1ab_0.conda @@ -1595,6 +1619,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3339-validator-0.1.4-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3986-2.0.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3986-validator-0.1.1-pyh9f0ad1d_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/ribasim-2024.10.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/rich-13.7.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/rpds-py-0.20.0-py312h2615798_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/ruff-0.5.6-py312h7a6832a_0.conda @@ -1629,9 +1654,11 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/tqdm-4.66.5-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/traitlets-5.14.3-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/twine-5.1.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typeguard-4.3.0-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/types-python-dateutil-2.9.0.20240316-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.12.2-hd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.12.2-pyha770c72_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typing_inspect-0.9.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing_utils-0.1.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2024a-h0c530f3_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/ucrt-10.0.22621.0-h57928b3_0.tar.bz2 @@ -1652,6 +1679,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/win32_setctime-1.1.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/win_inet_pton-1.1.0-pyhd8ed1ab_6.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/winpty-0.4.3-4.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/win-64/wrapt-1.16.0-py312he70551f_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/wslink-2.1.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/x264-1!164.3095-h8ffe710_2.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/x265-3.5-h2d74725_3.tar.bz2 @@ -2001,6 +2029,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/more-itertools-10.4.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/msgpack-python-1.0.8-py310h25c7140_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/multidict-6.0.5-py310h2372a71_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/multimethod-1.9.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/munkres-1.1.4-pyh9f0ad1d_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/mypy-1.11.1-py310h5b4e0ec_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/mypy_extensions-1.0.0-pyha770c72_0.conda @@ -2032,6 +2061,8 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/p11-kit-0.24.1-hc5aa10d_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/packaging-24.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/pandas-2.2.2-py310hf9f9076_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pandera-0.20.3-hd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pandera-base-0.20.3-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pandocfilters-1.5.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/pango-1.54.0-h4c5309f_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/parso-0.8.4-pyhd8ed1ab_0.conda @@ -2102,6 +2133,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3339-validator-0.1.4-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3986-2.0.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3986-validator-0.1.1-pyh9f0ad1d_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/ribasim-2024.10.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/rich-13.7.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/rpds-py-0.20.0-py310h42e942d_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/ruff-0.5.6-py310hea9781c_0.conda @@ -2138,9 +2170,11 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/tqdm-4.66.5-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/traitlets-5.14.3-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/twine-5.1.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typeguard-4.3.0-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/types-python-dateutil-2.9.0.20240316-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.12.2-hd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.12.2-pyha770c72_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typing_inspect-0.9.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing_utils-0.1.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/tzcode-2024a-h3f72095_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2024a-h0c530f3_0.conda @@ -2159,6 +2193,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/webencodings-0.5.1-pyhd8ed1ab_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/websocket-client-1.8.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/wheel-0.44.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/wrapt-1.16.0-py310h2372a71_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/wslink-2.1.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/x264-1!164.3095-h166bdaf_2.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/x265-3.5-h924138e_3.tar.bz2 @@ -2459,6 +2494,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/win-64/msgpack-python-1.0.8-py310hc19bc0b_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/msys2-conda-epoch-20160418-1.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/multidict-6.0.5-py310h8d17308_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/multimethod-1.9.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/munkres-1.1.4-pyh9f0ad1d_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/mypy-1.11.1-py310ha8f682b_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/mypy_extensions-1.0.0-pyha770c72_0.conda @@ -2482,6 +2518,8 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/overrides-7.7.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/packaging-24.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/pandas-2.2.2-py310hb4db72f_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pandera-0.20.3-hd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pandera-base-0.20.3-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pandocfilters-1.5.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/pango-1.54.0-hbb871f6_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/parso-0.8.4-pyhd8ed1ab_0.conda @@ -2554,6 +2592,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3339-validator-0.1.4-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3986-2.0.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3986-validator-0.1.1-pyh9f0ad1d_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/ribasim-2024.10.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/rich-13.7.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/rpds-py-0.20.0-py310hc226416_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/ruff-0.5.6-py310h7f1804c_0.conda @@ -2588,9 +2627,11 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/tqdm-4.66.5-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/traitlets-5.14.3-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/twine-5.1.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typeguard-4.3.0-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/types-python-dateutil-2.9.0.20240316-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.12.2-hd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.12.2-pyha770c72_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typing_inspect-0.9.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing_utils-0.1.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2024a-h0c530f3_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/ucrt-10.0.22621.0-h57928b3_0.tar.bz2 @@ -2612,6 +2653,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/win32_setctime-1.1.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/win_inet_pton-1.1.0-pyhd8ed1ab_6.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/winpty-0.4.3-4.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/win-64/wrapt-1.16.0-py310h8d17308_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/wslink-2.1.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/x264-1!164.3095-h8ffe710_2.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/x265-3.5-h2d74725_3.tar.bz2 @@ -2960,6 +3002,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/more-itertools-10.4.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/msgpack-python-1.0.8-py311h52f7536_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/multidict-6.0.5-py311h459d7ec_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/multimethod-1.9.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/munkres-1.1.4-pyh9f0ad1d_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/mypy-1.11.1-py311h61187de_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/mypy_extensions-1.0.0-pyha770c72_0.conda @@ -2991,6 +3034,8 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/p11-kit-0.24.1-hc5aa10d_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/packaging-24.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/pandas-2.2.2-py311h14de704_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pandera-0.20.3-hd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pandera-base-0.20.3-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pandocfilters-1.5.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/pango-1.54.0-h4c5309f_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/parso-0.8.4-pyhd8ed1ab_0.conda @@ -3061,6 +3106,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3339-validator-0.1.4-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3986-2.0.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3986-validator-0.1.1-pyh9f0ad1d_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/ribasim-2024.10.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/rich-13.7.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/rpds-py-0.20.0-py311hb3a8bbb_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/ruff-0.5.6-py311hce3a109_0.conda @@ -3097,9 +3143,11 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/tqdm-4.66.5-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/traitlets-5.14.3-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/twine-5.1.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typeguard-4.3.0-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/types-python-dateutil-2.9.0.20240316-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.12.2-hd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.12.2-pyha770c72_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typing_inspect-0.9.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing_utils-0.1.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/tzcode-2024a-h3f72095_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2024a-h0c530f3_0.conda @@ -3117,6 +3165,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/webencodings-0.5.1-pyhd8ed1ab_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/websocket-client-1.8.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/wheel-0.44.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/wrapt-1.16.0-py311h459d7ec_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/wslink-2.1.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/x264-1!164.3095-h166bdaf_2.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/x265-3.5-h924138e_3.tar.bz2 @@ -3416,6 +3465,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/win-64/msgpack-python-1.0.8-py311h3257749_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/msys2-conda-epoch-20160418-1.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/multidict-6.0.5-py311ha68e1ae_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/multimethod-1.9.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/munkres-1.1.4-pyh9f0ad1d_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/mypy-1.11.1-py311he736701_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/mypy_extensions-1.0.0-pyha770c72_0.conda @@ -3439,6 +3489,8 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/overrides-7.7.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/packaging-24.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/pandas-2.2.2-py311hcf9f919_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pandera-0.20.3-hd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pandera-base-0.20.3-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pandocfilters-1.5.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/pango-1.54.0-hbb871f6_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/parso-0.8.4-pyhd8ed1ab_0.conda @@ -3511,6 +3563,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3339-validator-0.1.4-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3986-2.0.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3986-validator-0.1.1-pyh9f0ad1d_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/ribasim-2024.10.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/rich-13.7.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/rpds-py-0.20.0-py311h533ab2d_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/ruff-0.5.6-py311ha637bb9_0.conda @@ -3545,9 +3598,11 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/tqdm-4.66.5-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/traitlets-5.14.3-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/twine-5.1.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typeguard-4.3.0-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/types-python-dateutil-2.9.0.20240316-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.12.2-hd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.12.2-pyha770c72_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typing_inspect-0.9.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing_utils-0.1.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2024a-h0c530f3_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/ucrt-10.0.22621.0-h57928b3_0.tar.bz2 @@ -3568,6 +3623,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/win32_setctime-1.1.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/win_inet_pton-1.1.0-pyhd8ed1ab_6.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/winpty-0.4.3-4.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/win-64/wrapt-1.16.0-py311ha68e1ae_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/wslink-2.1.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/x264-1!164.3095-h8ffe710_2.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/x265-3.5-h2d74725_3.tar.bz2 @@ -3916,6 +3972,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/more-itertools-10.4.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/msgpack-python-1.0.8-py312h2492b07_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/multidict-6.0.5-py312h98912ed_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/multimethod-1.9.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/munkres-1.1.4-pyh9f0ad1d_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/mypy-1.11.1-py312h41a817b_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/mypy_extensions-1.0.0-pyha770c72_0.conda @@ -3947,6 +4004,8 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/p11-kit-0.24.1-hc5aa10d_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/packaging-24.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/pandas-2.2.2-py312h1d6d2e6_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pandera-0.20.3-hd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pandera-base-0.20.3-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pandocfilters-1.5.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/pango-1.54.0-h4c5309f_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/parso-0.8.4-pyhd8ed1ab_0.conda @@ -4017,6 +4076,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3339-validator-0.1.4-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3986-2.0.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3986-validator-0.1.1-pyh9f0ad1d_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/ribasim-2024.10.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/rich-13.7.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/rpds-py-0.20.0-py312hf008fa9_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/ruff-0.5.6-py312hbe4c86d_0.conda @@ -4053,9 +4113,11 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/tqdm-4.66.5-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/traitlets-5.14.3-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/twine-5.1.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typeguard-4.3.0-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/types-python-dateutil-2.9.0.20240316-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.12.2-hd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.12.2-pyha770c72_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typing_inspect-0.9.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing_utils-0.1.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/tzcode-2024a-h3f72095_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2024a-h0c530f3_0.conda @@ -4073,6 +4135,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/webencodings-0.5.1-pyhd8ed1ab_2.conda - conda: https://conda.anaconda.org/conda-forge/noarch/websocket-client-1.8.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/wheel-0.44.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/wrapt-1.16.0-py312h98912ed_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/wslink-2.1.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/x264-1!164.3095-h166bdaf_2.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/x265-3.5-h924138e_3.tar.bz2 @@ -4372,6 +4435,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/win-64/msgpack-python-1.0.8-py312hd5eb7cc_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/msys2-conda-epoch-20160418-1.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/multidict-6.0.5-py312he70551f_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/multimethod-1.9.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/munkres-1.1.4-pyh9f0ad1d_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/mypy-1.11.1-py312h4389bb4_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/mypy_extensions-1.0.0-pyha770c72_0.conda @@ -4395,6 +4459,8 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/overrides-7.7.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/packaging-24.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/pandas-2.2.2-py312h72972c8_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pandera-0.20.3-hd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pandera-base-0.20.3-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pandocfilters-1.5.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/pango-1.54.0-hbb871f6_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/parso-0.8.4-pyhd8ed1ab_0.conda @@ -4467,6 +4533,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3339-validator-0.1.4-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3986-2.0.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/rfc3986-validator-0.1.1-pyh9f0ad1d_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/ribasim-2024.10.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/rich-13.7.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/rpds-py-0.20.0-py312h2615798_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/ruff-0.5.6-py312h7a6832a_0.conda @@ -4501,9 +4568,11 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/tqdm-4.66.5-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/traitlets-5.14.3-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/twine-5.1.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typeguard-4.3.0-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/types-python-dateutil-2.9.0.20240316-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.12.2-hd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.12.2-pyha770c72_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typing_inspect-0.9.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/typing_utils-0.1.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2024a-h0c530f3_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/ucrt-10.0.22621.0-h57928b3_0.tar.bz2 @@ -4524,6 +4593,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/win32_setctime-1.1.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/win_inet_pton-1.1.0-pyhd8ed1ab_6.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/winpty-0.4.3-4.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/win-64/wrapt-1.16.0-py312he70551f_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/wslink-2.1.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/x264-1!164.3095-h8ffe710_2.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/x265-3.5-h2d74725_3.tar.bz2 @@ -15276,6 +15346,21 @@ packages: license_family: APACHE size: 55956 timestamp: 1707041448541 +- kind: conda + name: multimethod + version: 1.9.1 + build: pyhd8ed1ab_0 + subdir: noarch + noarch: python + url: https://conda.anaconda.org/conda-forge/noarch/multimethod-1.9.1-pyhd8ed1ab_0.conda + sha256: 7fcfda7b4a1d74205fcfdefd93804226a6eaffc74a319414c7d8d88f9249db3b + md5: 48223af3f697ccd9b114adb6a66e0f11 + depends: + - python >=3.6 + license: Apache-2.0 + license_family: APACHE + size: 14782 + timestamp: 1677278842704 - kind: conda name: munkres version: 1.1.4 @@ -16736,6 +16821,44 @@ packages: license_family: BSD size: 14181121 timestamp: 1715899159343 +- kind: conda + name: pandera + version: 0.20.3 + build: hd8ed1ab_0 + subdir: noarch + noarch: python + url: https://conda.anaconda.org/conda-forge/noarch/pandera-0.20.3-hd8ed1ab_0.conda + sha256: d8f6c4b2e82ea9f3a0ee24080e38cae8c46fccf9c1751b005a10d31b7dcc7873 + md5: c5dccdafb966b0a4a156cba0168379c7 + depends: + - pandera-base >=0.20.3,<0.20.4.0a0 + license: MIT + license_family: MIT + size: 6805 + timestamp: 1721327041967 +- kind: conda + name: pandera-base + version: 0.20.3 + build: pyhd8ed1ab_0 + subdir: noarch + noarch: python + url: https://conda.anaconda.org/conda-forge/noarch/pandera-base-0.20.3-pyhd8ed1ab_0.conda + sha256: 319948578d3c73411ce3dd63b3b497a38b2e8c0e5559ac6cf75db0ac5a24ee4e + md5: 736acd845c4fe83600fc44358e62100b + depends: + - multimethod <=1.10.0 + - numpy >=1.19.0 + - packaging >=20.0 + - pandas >=1.2.0 + - pydantic + - python >=3.8 + - typeguard >=3.0.2 + - typing_inspect >=0.6.0 + - wrapt + license: MIT + license_family: MIT + size: 148324 + timestamp: 1721327037113 - kind: conda name: pandocfilters version: 1.5.0 @@ -19984,6 +20107,32 @@ packages: license_family: MIT size: 7818 timestamp: 1598024297745 +- kind: conda + name: ribasim + version: 2024.10.0 + build: pyhd8ed1ab_0 + subdir: noarch + noarch: python + url: https://conda.anaconda.org/conda-forge/noarch/ribasim-2024.10.0-pyhd8ed1ab_0.conda + sha256: 8763fe14e25ce12407e2b56e3ec3019dc93416a3fae838c6c5c5c39e4a2ea61e + md5: 6764d892db65d2b0f2ac8a072d61d2f0 + depends: + - geopandas + - matplotlib-base + - numpy + - pandas + - pandera >=0.20 + - pyarrow + - pydantic ~=2.0 + - pyogrio + - python >=3.10 + - shapely >=2.0 + - tomli + - tomli-w + license: MIT + license_family: MIT + size: 38500 + timestamp: 1721804986901 - kind: conda name: rich version: 13.7.1 @@ -21446,6 +21595,26 @@ packages: license_family: Apache size: 33938 timestamp: 1719431080574 +- kind: conda + name: typeguard + version: 4.3.0 + build: pyhd8ed1ab_1 + build_number: 1 + subdir: noarch + noarch: python + url: https://conda.anaconda.org/conda-forge/noarch/typeguard-4.3.0-pyhd8ed1ab_1.conda + sha256: 1bbf56b43b7a4f696e6d4027404865519bc676760129580ba558555dedfdcfa9 + md5: 10f49ee1beb82947170c5a5e1a8c0ef3 + depends: + - importlib-metadata >=3.6 + - python >=3.8 + - typing-extensions >=4.10.0 + constrains: + - pytest >=7 + license: MIT + license_family: MIT + size: 34547 + timestamp: 1721540525136 - kind: conda name: types-python-dateutil version: 2.9.0.20240316 @@ -21490,6 +21659,23 @@ packages: license_family: PSF size: 39888 timestamp: 1717802653893 +- kind: conda + name: typing_inspect + version: 0.9.0 + build: pyhd8ed1ab_0 + subdir: noarch + noarch: python + url: https://conda.anaconda.org/conda-forge/noarch/typing_inspect-0.9.0-pyhd8ed1ab_0.conda + sha256: 16e0b825c138e14ebc84623248d91d93a8cff29bb93595cc4aa46ca32f24f1de + md5: 9e924b76b91908a17e28a19a0ab88687 + depends: + - mypy_extensions >=0.3.0 + - python >=3.5 + - typing_extensions >=3.7.4 + license: MIT + license_family: MIT + size: 14906 + timestamp: 1685820229594 - kind: conda name: typing_utils version: 0.1.0 @@ -22353,6 +22539,108 @@ packages: license: MIT license_family: MIT size: 1176306 +- kind: conda + name: wrapt + version: 1.16.0 + build: py310h2372a71_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/wrapt-1.16.0-py310h2372a71_0.conda + sha256: 2adc15cd1e66845c1ab498735e2f828003e2d5fe20eed1febddb712f58793c31 + md5: d9dc9c45bdc2b38403e6b388581e92f0 + depends: + - libgcc-ng >=12 + - python >=3.10,<3.11.0a0 + - python_abi 3.10.* *_cp310 + license: BSD-2-Clause + license_family: BSD + size: 55415 + timestamp: 1699533000763 +- kind: conda + name: wrapt + version: 1.16.0 + build: py310h8d17308_0 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/wrapt-1.16.0-py310h8d17308_0.conda + sha256: 2de005b8199cf5cc19a4547b9aa3ebd7b756c7e8c898dfea9d96283dc2b6745d + md5: 80326d84a304f866ddc5c49caf7ab3ae + depends: + - python >=3.10,<3.11.0a0 + - python_abi 3.10.* *_cp310 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: BSD-2-Clause + license_family: BSD + size: 54038 + timestamp: 1699533408150 +- kind: conda + name: wrapt + version: 1.16.0 + build: py311h459d7ec_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/wrapt-1.16.0-py311h459d7ec_0.conda + sha256: 6587e0b7d42368f767172b239a755fcf6363d91348faf9b7ab5743585369fc58 + md5: 6669b5529d206c1f880b642cdd17ae05 + depends: + - libgcc-ng >=12 + - python >=3.11,<3.12.0a0 + - python_abi 3.11.* *_cp311 + license: BSD-2-Clause + license_family: BSD + size: 63465 + timestamp: 1699532930817 +- kind: conda + name: wrapt + version: 1.16.0 + build: py311ha68e1ae_0 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/wrapt-1.16.0-py311ha68e1ae_0.conda + sha256: e8209b3ebdde15834b59101fd14a7f293d868d2fbad2dcd634357cc3406f1052 + md5: b96598823313b647148417455f2fa659 + depends: + - python >=3.11,<3.12.0a0 + - python_abi 3.11.* *_cp311 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: BSD-2-Clause + license_family: BSD + size: 62017 + timestamp: 1699533574835 +- kind: conda + name: wrapt + version: 1.16.0 + build: py312h98912ed_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/wrapt-1.16.0-py312h98912ed_0.conda + sha256: dc8431b343961347ad93b33d2d8270e8c15d8825382f4f2540835c94aba2de05 + md5: fa957a1c7bee7e47ad44633caf7be8bc + depends: + - libgcc-ng >=12 + - python >=3.12,<3.13.0a0 + - python_abi 3.12.* *_cp312 + license: BSD-2-Clause + license_family: BSD + size: 62482 + timestamp: 1699532968076 +- kind: conda + name: wrapt + version: 1.16.0 + build: py312he70551f_0 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/wrapt-1.16.0-py312he70551f_0.conda + sha256: e4b5ac6c897e68a798dfe13a1499dc9b555c48b468aa477d456807f2a7366c30 + md5: cea7b1aa961de6a8ac90584b5968a01d + depends: + - python >=3.12,<3.13.0a0 + - python_abi 3.12.* *_cp312 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: BSD-2-Clause + license_family: BSD + size: 61358 + timestamp: 1699533495284 - kind: conda name: wslink version: 2.1.2 diff --git a/pixi.toml b/pixi.toml index 8b43ccd0..f9d95e57 100644 --- a/pixi.toml +++ b/pixi.toml @@ -29,6 +29,7 @@ scipy = "*" tomli = "*" tomli-w = "*" xmipy = "*" +ribasim = ">=2024.10.0,<2024.11" #[pypi-dependencies] #ribasim = {git = "https://github.com/Deltares/Ribasim.git/#subdirectory=python/ribasim"} diff --git a/pyproject.toml b/pyproject.toml index 0890abbd..ddf4f28d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,3 +49,6 @@ lint.fixable = ["I"] [tool.mypy] plugins = ["pydantic.mypy", "numpy.typing.mypy_plugin"] + +[tool.pixi.pypi-dependencies] +imod-0.17.1-pyhd8ed1ab = { path = "D:/dev/imod_suite/imod-python", editable = true } \ No newline at end of file diff --git a/tests/test_imod_coupler/test_metamod.py b/tests/test_imod_coupler/test_metamod.py index ac7d343b..3289c41f 100644 --- a/tests/test_imod_coupler/test_metamod.py +++ b/tests/test_imod_coupler/test_metamod.py @@ -7,12 +7,12 @@ import pytest import tomli import tomli_w -from common_scripts.mf6_water_balance.combine import create_modflow_waterbalance_file +from tests.common_scripts.mf6_water_balance.combine import create_modflow_waterbalance_file from imod.mf6 import open_cbc, open_hds from numpy.testing import assert_array_almost_equal from primod.metamod import MetaMod from pytest_cases import parametrize_with_cases -from test_utilities import numeric_csvfiles_equal +from tests.test_imod_coupler.test_utilities import numeric_csvfiles_equal def mf6_output_files(path: Path) -> tuple[Path, Path, Path, Path]: diff --git a/tests/test_imod_coupler/test_metamod_regrid.py b/tests/test_imod_coupler/test_metamod_regrid.py new file mode 100644 index 00000000..bd44f6d4 --- /dev/null +++ b/tests/test_imod_coupler/test_metamod_regrid.py @@ -0,0 +1,42 @@ + +from collections.abc import Callable +from pathlib import Path + +from primod.metamod import MetaMod +from pytest_cases import parametrize_with_cases +from tests.test_imod_coupler.test_metamod import mf6_output_files + + +@parametrize_with_cases("metamod_regrid") +def test_metamod_regrid( + tmp_path_dev: Path, + metamod_regrid: MetaMod, + metaswap_dll_devel: Path, + metaswap_dll_dep_dir_devel: Path, + modflow_dll_devel: Path, + run_coupler_function: Callable[[Path], None], +) -> None: + """ + Test if coupled models run with the iMOD Coupler development version. + """ + metamod_regrid.write( + tmp_path_dev, + modflow6_dll=modflow_dll_devel, + metaswap_dll=metaswap_dll_devel, + metaswap_dll_dependency=metaswap_dll_dep_dir_devel, + ) + + run_coupler_function(tmp_path_dev / metamod_regrid._toml_name) + + # Test if MetaSWAP output written + assert len(list((tmp_path_dev / "MetaSWAP").glob("*/*.idf"))) == 1704 + + # Test if Modflow6 output written + headfile, cbcfile, _, _ = mf6_output_files(tmp_path_dev) + + assert headfile.exists() + assert cbcfile.exists() + # If computation failed, Modflow6 usually writes a headfile and cbcfile of 0 + # bytes. + assert headfile.stat().st_size > 0 + assert cbcfile.stat().st_size > 0 \ No newline at end of file diff --git a/tests/test_imod_coupler/test_metamod_regrid_cases.py b/tests/test_imod_coupler/test_metamod_regrid_cases.py new file mode 100644 index 00000000..f1138e02 --- /dev/null +++ b/tests/test_imod_coupler/test_metamod_regrid_cases.py @@ -0,0 +1,20 @@ +from imod.mf6 import Modflow6Simulation +from imod.msw import MetaSwapModel +from primod import MetaMod, MetaModDriverCoupling + + +def case_regrid_no_sprinkling( + coupled_mf6_model: Modflow6Simulation, + prepared_msw_model: MetaSwapModel, +) -> MetaMod: + prepared_msw_model.pop("sprinkling") + + driver_coupling = MetaModDriverCoupling( + mf6_model="GWF_1", mf6_recharge_package="rch_msw" + ) + return MetaMod( + prepared_msw_model, + coupled_mf6_model, + coupling_list=[driver_coupling], + ) + From d59668a8fc7024281cdc51cafd82a7432451df60 Mon Sep 17 00:00:00 2001 From: luitjan Date: Wed, 21 Aug 2024 17:03:52 +0200 Subject: [PATCH 2/8] coupled test now runs after regridding --- pre-processing/primod/metamod.py | 18 +++++- .../test_imod_coupler/test_metamod_regrid.py | 55 ++++++++++++++----- .../test_metamod_regrid_cases.py | 1 + 3 files changed, 59 insertions(+), 15 deletions(-) diff --git a/pre-processing/primod/metamod.py b/pre-processing/primod/metamod.py index 07783e94..7f962018 100644 --- a/pre-processing/primod/metamod.py +++ b/pre-processing/primod/metamod.py @@ -8,7 +8,8 @@ from primod.coupled_model import CoupledModel from primod.driver_coupling.metamod import MetaModDriverCoupling - +from imod.typing.grid import GridDataArray +from imod.mf6.utilities.regrid import RegridderWeightsCache class MetaMod(CoupledModel): """Couple MetaSWAP and MODFLOW 6. @@ -159,3 +160,18 @@ def write_toml( tomli_w.dump(coupler_toml, f) return + + def regrid_like(self, new_grid: GridDataArray): + + regridded_mf6_simulation = self.mf6_simulation.regrid_like("regridded", new_grid, True) + models = regridded_mf6_simulation.get_models() + dis = list( models.values())[0]["dis"] + regrid_context = RegridderWeightsCache() + regridded_msw = self.msw_model.regrid_like(dis, True, regrid_context) + + regridded_metamod = MetaMod(msw_model=regridded_msw, mf6_simulation=regridded_mf6_simulation, coupling_list=self.coupling_list) + + return regridded_metamod + + + diff --git a/tests/test_imod_coupler/test_metamod_regrid.py b/tests/test_imod_coupler/test_metamod_regrid.py index bd44f6d4..ab5d3d3c 100644 --- a/tests/test_imod_coupler/test_metamod_regrid.py +++ b/tests/test_imod_coupler/test_metamod_regrid.py @@ -5,10 +5,9 @@ from primod.metamod import MetaMod from pytest_cases import parametrize_with_cases from tests.test_imod_coupler.test_metamod import mf6_output_files - - +import xarray as xr @parametrize_with_cases("metamod_regrid") -def test_metamod_regrid( +def test_metamod_original( tmp_path_dev: Path, metamod_regrid: MetaMod, metaswap_dll_devel: Path, @@ -26,17 +25,45 @@ def test_metamod_regrid( metaswap_dll_dependency=metaswap_dll_dep_dir_devel, ) - run_coupler_function(tmp_path_dev / metamod_regrid._toml_name) + run_coupler_function(tmp_path_dev / metamod_regrid._toml_name) + - # Test if MetaSWAP output written - assert len(list((tmp_path_dev / "MetaSWAP").glob("*/*.idf"))) == 1704 +@parametrize_with_cases("metamod_regrid") +def test_metamod_regrid( + tmp_path_dev: Path, + metamod_regrid: MetaMod, + metaswap_dll_devel: Path, + metaswap_dll_dep_dir_devel: Path, + modflow_dll_devel: Path, + run_coupler_function: Callable[[Path], None], +) -> None: + """ + Test if coupled models run with the iMOD Coupler development version. + """ + + x = [100.0, 150., 200., 250., 300.] + y = [300., 250., 200., 150., 100.] + dx = 50. + dy = -50. + layer = [1, 2, 3] + + new_grid = xr.DataArray( + 1, + dims=("layer", "y", "x"), + coords={"layer": layer, "y": y, "x": x, "dx": dx, "dy": dy}, + ) + + regridded_metamod = metamod_regrid.regrid_like(new_grid) + + regridded_metamod.msw_model.simulation_settings["unsa_svat_path"] = metamod_regrid.msw_model.simulation_settings["unsa_svat_path"] + regridded_metamod.write( + tmp_path_dev , + modflow6_dll=modflow_dll_devel, + metaswap_dll=metaswap_dll_devel, + metaswap_dll_dependency=metaswap_dll_dep_dir_devel, + ) + + run_coupler_function(tmp_path_dev/ regridded_metamod._toml_name) - # Test if Modflow6 output written - headfile, cbcfile, _, _ = mf6_output_files(tmp_path_dev) + pass - assert headfile.exists() - assert cbcfile.exists() - # If computation failed, Modflow6 usually writes a headfile and cbcfile of 0 - # bytes. - assert headfile.stat().st_size > 0 - assert cbcfile.stat().st_size > 0 \ No newline at end of file diff --git a/tests/test_imod_coupler/test_metamod_regrid_cases.py b/tests/test_imod_coupler/test_metamod_regrid_cases.py index f1138e02..4cc874d7 100644 --- a/tests/test_imod_coupler/test_metamod_regrid_cases.py +++ b/tests/test_imod_coupler/test_metamod_regrid_cases.py @@ -8,6 +8,7 @@ def case_regrid_no_sprinkling( prepared_msw_model: MetaSwapModel, ) -> MetaMod: prepared_msw_model.pop("sprinkling") + coupled_mf6_model["GWF_1"].pop("wells_msw") driver_coupling = MetaModDriverCoupling( mf6_model="GWF_1", mf6_recharge_package="rch_msw" From 4747124fde47d75293b2f54a10c70f60866b2c87 Mon Sep 17 00:00:00 2001 From: luitjan Date: Wed, 21 Aug 2024 17:08:01 +0200 Subject: [PATCH 3/8] formatting --- pre-processing/primod/metamod.py | 5 +++-- tests/test_imod_coupler/test_metamod.py | 5 ++++- tests/test_imod_coupler/test_metamod_regrid.py | 5 +++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/pre-processing/primod/metamod.py b/pre-processing/primod/metamod.py index 7f962018..b22dd0a5 100644 --- a/pre-processing/primod/metamod.py +++ b/pre-processing/primod/metamod.py @@ -4,12 +4,13 @@ import tomli_w from imod.mf6 import Modflow6Simulation +from imod.mf6.utilities.regrid import RegridderWeightsCache from imod.msw import MetaSwapModel +from imod.typing.grid import GridDataArray from primod.coupled_model import CoupledModel from primod.driver_coupling.metamod import MetaModDriverCoupling -from imod.typing.grid import GridDataArray -from imod.mf6.utilities.regrid import RegridderWeightsCache + class MetaMod(CoupledModel): """Couple MetaSWAP and MODFLOW 6. diff --git a/tests/test_imod_coupler/test_metamod.py b/tests/test_imod_coupler/test_metamod.py index 3289c41f..21ce667f 100644 --- a/tests/test_imod_coupler/test_metamod.py +++ b/tests/test_imod_coupler/test_metamod.py @@ -7,11 +7,14 @@ import pytest import tomli import tomli_w -from tests.common_scripts.mf6_water_balance.combine import create_modflow_waterbalance_file from imod.mf6 import open_cbc, open_hds from numpy.testing import assert_array_almost_equal from primod.metamod import MetaMod from pytest_cases import parametrize_with_cases + +from tests.common_scripts.mf6_water_balance.combine import ( + create_modflow_waterbalance_file, +) from tests.test_imod_coupler.test_utilities import numeric_csvfiles_equal diff --git a/tests/test_imod_coupler/test_metamod_regrid.py b/tests/test_imod_coupler/test_metamod_regrid.py index ab5d3d3c..5a41572a 100644 --- a/tests/test_imod_coupler/test_metamod_regrid.py +++ b/tests/test_imod_coupler/test_metamod_regrid.py @@ -2,10 +2,11 @@ from collections.abc import Callable from pathlib import Path +import xarray as xr from primod.metamod import MetaMod from pytest_cases import parametrize_with_cases -from tests.test_imod_coupler.test_metamod import mf6_output_files -import xarray as xr + + @parametrize_with_cases("metamod_regrid") def test_metamod_original( tmp_path_dev: Path, From cc7904db5b55f4fac3f60b93344df1a00ffbd837 Mon Sep 17 00:00:00 2001 From: luitjan Date: Mon, 26 Aug 2024 14:22:59 +0200 Subject: [PATCH 4/8] formatting --- pixi.lock | 14 ++++++++++++ pixi.toml | 2 ++ pre-processing/primod/metamod.py | 16 ++++++++------ .../test_imod_coupler/test_metamod_regrid.py | 22 +++++++++---------- .../test_metamod_regrid_cases.py | 1 - 5 files changed, 36 insertions(+), 19 deletions(-) diff --git a/pixi.lock b/pixi.lock index 84efb102..1ecb3ed3 100644 --- a/pixi.lock +++ b/pixi.lock @@ -68,9 +68,11 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/dask-expr-1.1.10-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/dav1d-1.2.1-hd590300_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/dbus-1.13.6-h5008d03_3.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/decopatch-1.4.10-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/distributed-2024.8.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/double-conversion-3.3.0-h59595ed_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/eigen-3.4.0-h00ab1b0_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/exceptiongroup-1.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/expat-2.6.2-h59595ed_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/fastcore-1.6.3-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/fasteners-0.17.3-pyhd8ed1ab_0.tar.bz2 @@ -122,6 +124,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/imod-0.17.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/importlib-metadata-8.2.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/importlib_metadata-8.2.0-hd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/iniconfig-2.0.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/jinja2-3.1.4-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/joblib-1.4.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/json-c-0.17-h1220068_1.conda @@ -249,6 +252,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/lz4-4.3.3-py312h03f37cb_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/lz4-c-1.9.4-hcb278e6_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/lzo-2.10-hd590300_1001.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/makefun-1.15.4-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/mapclassify-2.7.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/markupsafe-2.1.5-py312h98912ed_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/matplotlib-base-3.9.1-py312h854627b_2.conda @@ -291,6 +295,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pip-24.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/pixman-0.43.2-h59595ed_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pooch-1.8.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/poppler-24.07.0-hb0d391f_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/poppler-data-0.4.12-hd8ed1ab_0.conda @@ -312,6 +317,8 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pyparsing-3.1.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/pyproj-3.6.1-py312h01329cd_8.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pysocks-1.7.1-pyha2e5f31_6.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/pytest-8.3.2-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pytest-cases-3.8.5-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.12.4-h194c7f8_0_cpython.conda - conda: https://conda.anaconda.org/conda-forge/noarch/python-dateutil-2.9.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/python-graphviz-0.20.3-pyh717bed2_0.conda @@ -463,9 +470,11 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/dask-core-2024.8.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/dask-expr-1.1.10-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/dav1d-1.2.1-hcfcfb64_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/decopatch-1.4.10-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/distributed-2024.8.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/double-conversion-3.3.0-h63175ca_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/eigen-3.4.0-h91493d7_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/exceptiongroup-1.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/expat-2.6.2-h63175ca_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/fastcore-1.6.3-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/fasteners-0.17.3-pyhd8ed1ab_0.tar.bz2 @@ -510,6 +519,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/imod-0.17.1-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/importlib-metadata-8.2.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/importlib_metadata-8.2.0-hd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/iniconfig-2.0.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/intel-openmp-2024.2.0-h57928b3_980.conda - conda: https://conda.anaconda.org/conda-forge/noarch/jinja2-3.1.4-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/joblib-1.4.2-pyhd8ed1ab_0.conda @@ -595,6 +605,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/win-64/m2w64-gcc-libs-core-5.3.0-7.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/m2w64-gmp-6.1.0-2.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/m2w64-libwinpthread-git-5.0.0.4634.697f757-2.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/makefun-1.15.4-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/mapclassify-2.7.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/markupsafe-2.1.5-py312he70551f_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/matplotlib-base-3.9.1-py312h90004f6_2.conda @@ -632,6 +643,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pip-24.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/pixman-0.43.4-h63175ca_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pooch-1.8.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/poppler-24.07.0-h686f694_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/poppler-data-0.4.12-hd8ed1ab_0.conda @@ -654,6 +666,8 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pyparsing-3.1.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/pyproj-3.6.1-py312h6f27134_8.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pysocks-1.7.1-pyh0701188_6.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/pytest-8.3.2-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pytest-cases-3.8.5-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/python-3.12.4-h889d299_0_cpython.conda - conda: https://conda.anaconda.org/conda-forge/noarch/python-dateutil-2.9.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/python-graphviz-0.20.3-pyh717bed2_0.conda diff --git a/pixi.toml b/pixi.toml index f9d95e57..aa5194dc 100644 --- a/pixi.toml +++ b/pixi.toml @@ -30,6 +30,8 @@ tomli = "*" tomli-w = "*" xmipy = "*" ribasim = ">=2024.10.0,<2024.11" +pytest = ">=8.3.2,<8.4" +pytest-cases = ">=3.8.5,<3.9" #[pypi-dependencies] #ribasim = {git = "https://github.com/Deltares/Ribasim.git/#subdirectory=python/ribasim"} diff --git a/pre-processing/primod/metamod.py b/pre-processing/primod/metamod.py index b22dd0a5..83a8e7eb 100644 --- a/pre-processing/primod/metamod.py +++ b/pre-processing/primod/metamod.py @@ -163,16 +163,18 @@ def write_toml( return def regrid_like(self, new_grid: GridDataArray): - - regridded_mf6_simulation = self.mf6_simulation.regrid_like("regridded", new_grid, True) + regridded_mf6_simulation = self.mf6_simulation.regrid_like( + "regridded", new_grid, True + ) models = regridded_mf6_simulation.get_models() - dis = list( models.values())[0]["dis"] + dis = list(models.values())[0]["dis"] regrid_context = RegridderWeightsCache() regridded_msw = self.msw_model.regrid_like(dis, True, regrid_context) - regridded_metamod = MetaMod(msw_model=regridded_msw, mf6_simulation=regridded_mf6_simulation, coupling_list=self.coupling_list) + regridded_metamod = MetaMod( + msw_model=regridded_msw, + mf6_simulation=regridded_mf6_simulation, + coupling_list=self.coupling_list, + ) return regridded_metamod - - - diff --git a/tests/test_imod_coupler/test_metamod_regrid.py b/tests/test_imod_coupler/test_metamod_regrid.py index 5a41572a..38b33cb5 100644 --- a/tests/test_imod_coupler/test_metamod_regrid.py +++ b/tests/test_imod_coupler/test_metamod_regrid.py @@ -1,4 +1,3 @@ - from collections.abc import Callable from pathlib import Path @@ -26,7 +25,7 @@ def test_metamod_original( metaswap_dll_dependency=metaswap_dll_dep_dir_devel, ) - run_coupler_function(tmp_path_dev / metamod_regrid._toml_name) + run_coupler_function(tmp_path_dev / metamod_regrid._toml_name) @parametrize_with_cases("metamod_regrid") @@ -42,10 +41,10 @@ def test_metamod_regrid( Test if coupled models run with the iMOD Coupler development version. """ - x = [100.0, 150., 200., 250., 300.] - y = [300., 250., 200., 150., 100.] - dx = 50. - dy = -50. + x = [100.0, 150.0, 200.0, 250.0, 300.0] + y = [300.0, 250.0, 200.0, 150.0, 100.0] + dx = 50.0 + dy = -50.0 layer = [1, 2, 3] new_grid = xr.DataArray( @@ -56,15 +55,16 @@ def test_metamod_regrid( regridded_metamod = metamod_regrid.regrid_like(new_grid) - regridded_metamod.msw_model.simulation_settings["unsa_svat_path"] = metamod_regrid.msw_model.simulation_settings["unsa_svat_path"] + regridded_metamod.msw_model.simulation_settings["unsa_svat_path"] = ( + metamod_regrid.msw_model.simulation_settings["unsa_svat_path"] + ) regridded_metamod.write( - tmp_path_dev , + tmp_path_dev, modflow6_dll=modflow_dll_devel, metaswap_dll=metaswap_dll_devel, metaswap_dll_dependency=metaswap_dll_dep_dir_devel, ) - - run_coupler_function(tmp_path_dev/ regridded_metamod._toml_name) - pass + run_coupler_function(tmp_path_dev / regridded_metamod._toml_name) + pass diff --git a/tests/test_imod_coupler/test_metamod_regrid_cases.py b/tests/test_imod_coupler/test_metamod_regrid_cases.py index 4cc874d7..c5bb8823 100644 --- a/tests/test_imod_coupler/test_metamod_regrid_cases.py +++ b/tests/test_imod_coupler/test_metamod_regrid_cases.py @@ -18,4 +18,3 @@ def case_regrid_no_sprinkling( coupled_mf6_model, coupling_list=[driver_coupling], ) - From 51ecd5a9df146ba2090db3b7fbad767477a3761c Mon Sep 17 00:00:00 2001 From: luitjan Date: Mon, 26 Aug 2024 17:06:13 +0200 Subject: [PATCH 5/8] added output --- tests/test_imod_coupler/test_metamod_regrid.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/test_imod_coupler/test_metamod_regrid.py b/tests/test_imod_coupler/test_metamod_regrid.py index 38b33cb5..8cd58c9d 100644 --- a/tests/test_imod_coupler/test_metamod_regrid.py +++ b/tests/test_imod_coupler/test_metamod_regrid.py @@ -27,6 +27,10 @@ def test_metamod_original( run_coupler_function(tmp_path_dev / metamod_regrid._toml_name) + hds = metamod_regrid.mf6_simulation.open_head() + print(hds.sel(layer=2).isel(time=126).values) + pass + @parametrize_with_cases("metamod_regrid") def test_metamod_regrid( @@ -41,7 +45,7 @@ def test_metamod_regrid( Test if coupled models run with the iMOD Coupler development version. """ - x = [100.0, 150.0, 200.0, 250.0, 300.0] + x = [100.0, 200.0, 300.0, 400.0, 500.0] y = [300.0, 250.0, 200.0, 150.0, 100.0] dx = 50.0 dy = -50.0 @@ -67,4 +71,6 @@ def test_metamod_regrid( run_coupler_function(tmp_path_dev / regridded_metamod._toml_name) + hds = regridded_metamod.mf6_simulation.open_head() + print(hds.sel(layer=2).isel(time=126).values) pass From 14879e109172c56129c9516111a4b003d846b793 Mon Sep 17 00:00:00 2001 From: luitjan Date: Mon, 26 Aug 2024 17:06:27 +0200 Subject: [PATCH 6/8] added return type --- pre-processing/primod/metamod.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pre-processing/primod/metamod.py b/pre-processing/primod/metamod.py index 83a8e7eb..388f98ae 100644 --- a/pre-processing/primod/metamod.py +++ b/pre-processing/primod/metamod.py @@ -162,7 +162,7 @@ def write_toml( return - def regrid_like(self, new_grid: GridDataArray): + def regrid_like(self, new_grid: GridDataArray) -> "MetaMod": regridded_mf6_simulation = self.mf6_simulation.regrid_like( "regridded", new_grid, True ) From 8e2889b7a6576081c6380405a1711aa146645e4c Mon Sep 17 00:00:00 2001 From: luitjan Date: Mon, 26 Aug 2024 17:22:05 +0200 Subject: [PATCH 7/8] documentation about regridding --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 087c586c..31e8f272 100644 --- a/README.md +++ b/README.md @@ -81,3 +81,25 @@ Try running: ```sh pixi run update-git-dependencies ``` + + +##coupling imod-coupler and imod python metsawap regridding branch: + + +1) create imod_suite directory +2) in it, create a subdirectory imod_coupler and a subdirectory imod-python. +3) check out both projects in their own directory. For imod-python, make sure to +check out the metaswap_regridding_feature branch or a development branch forked from it. +for imod_coupler check out "coupler_regrid_feature_branch" or a development branch forked from it. + +4) in the imod suite directory, create a batch file that will overwrite the coupler's +pixi install of imod with the branch we have checked out in the imod-python directory. +This is done for each pixi environment. Assuming we have 2, the batch file looks like this. + + +xcopy /e /k /h /i imod-python\imod imod_coupler\.pixi\envs\default\Lib\site-packages\imod +xcopy /e /k /h /i imod-python\imod imod_coupler\.pixi\envs\dev\Lib\site-packages\imod + + +The batch file will overwrite the pixi install( in .pixi\envs\default\Lib\site-packages\imod) with whatever +is checked out locally in the imod-python folder. \ No newline at end of file From 75bcdcdbfc383347280ef62a16724572b7af7f11 Mon Sep 17 00:00:00 2001 From: Joeri van Engelen Date: Tue, 27 Aug 2024 14:09:27 +0200 Subject: [PATCH 8/8] Undo adding dev install --- pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ddf4f28d..0890abbd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,6 +49,3 @@ lint.fixable = ["I"] [tool.mypy] plugins = ["pydantic.mypy", "numpy.typing.mypy_plugin"] - -[tool.pixi.pypi-dependencies] -imod-0.17.1-pyhd8ed1ab = { path = "D:/dev/imod_suite/imod-python", editable = true } \ No newline at end of file