Skip to content

Commit

Permalink
confusing typo in coupling name: dmf versus dfm referring to dflowfm
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Leander authored and Robert Leander committed Oct 24, 2023
1 parent 061c858 commit ec8ee18
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 21 deletions.
4 changes: 2 additions & 2 deletions imod_coupler/drivers/dfm_metamod/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Coupling(BaseModel):

mf6_river_to_dfm_1d_q_dmm: Optional[FilePath]
dfm_1d_waterlevel_to_mf6_river_stage_dmm: Optional[FilePath]
mf6_river2_to_dmf_1d_q_dmm: Optional[FilePath]
mf6_river2_to_dfm_1d_q_dmm: Optional[FilePath]
mf6_drainage_to_dfm_1d_q_dmm: Optional[FilePath]
msw_runoff_to_dfm_1d_q_dmm: Optional[FilePath]

Expand Down Expand Up @@ -82,7 +82,7 @@ def resolve_mf6_msw_node_map(cls, mf6_msw_node_map: FilePath) -> FilePath:
@validator(
"mf6_river_to_dfm_1d_q_dmm",
"dfm_1d_waterlevel_to_mf6_river_stage_dmm",
"mf6_river2_to_dmf_1d_q_dmm",
"mf6_river2_to_dfm_1d_q_dmm",
"mf6_drainage_to_dfm_1d_q_dmm",
"msw_runoff_to_dfm_1d_q_dmm",
"dfm_2d_waterlevels_to_msw_h_dmm",
Expand Down
6 changes: 3 additions & 3 deletions imod_coupler/drivers/dfm_metamod/dfm_metamod_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(
mf6_wel_pkgkey: str,
mf6_river_to_dfm_1d_q_dmm_path: Path,
dfm_1d_waterlevel_to_mf6_river_stage_dmm_path: Path,
mf6_river2_to_dmf_1d_q_dmm_path: Path,
mf6_river2_to_dfm_1d_q_dmm_path: Path,
mf6_drainage_to_dfm_1d_q_dmm_path: Path,
msw_runoff_to_dfm_1d_q_dmm_path: Path,
msw_sprinkling_to_dfm_1d_q_dmm_path: Path,
Expand All @@ -74,8 +74,8 @@ def __init__(
"dfm_1d_waterlevel_to_mf6_river_stage_dmm"
] = dfm_1d_waterlevel_to_mf6_river_stage_dmm_path
self.mapping_files[
"mf6_river2_to_dmf_1d_q_dmm"
] = mf6_river2_to_dmf_1d_q_dmm_path
"mf6_river2_to_dfm_1d_q_dmm"
] = mf6_river2_to_dfm_1d_q_dmm_path
self.mapping_files[
"mf6_drainage_to_dfm_1d_q_dmm"
] = mf6_drainage_to_dfm_1d_q_dmm_path
Expand Down
4 changes: 2 additions & 2 deletions imod_coupler/drivers/dfm_metamod/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,9 @@ def mapping_passive_mf_dflow1d(
# MF RIV 2 -> DFLOW 1D (flux)
map_passive_mod_dflow1d["mf-riv2dflow1d_passive_flux"] = None
mask_passive_mod_dflow1d["mf-riv2dflow1d_passive_flux"] = np.array([])
if self.coupling.mf6_river2_to_dmf_1d_q_dmm is not None:
if self.coupling.mf6_river2_to_dfm_1d_q_dmm is not None:
table_passive_mfriv2dflow1d: NDArray[np.single] = np.loadtxt(
self.coupling.mf6_river2_to_dmf_1d_q_dmm,
self.coupling.mf6_river2_to_dfm_1d_q_dmm,
dtype=np.single,
ndmin=2,
skiprows=1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ MAXBOUND 3
END DIMENSIONS

BEGIN PERIOD 1
1 9 5 1000.00000 200.0000 1000.00000
1 9 6 1000.00000 200.0000 1000.00000
1 9 7 1000.00000 200.0000 1000.00000
1 9 5 8.5 200.0000 7.50000
1 9 6 8.5 200.0000 7.50000
1 9 7 8.5 200.0000 7.50000
END PERIOD
4 changes: 3 additions & 1 deletion tests/data/t_model_f/imod_coupler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,7 @@ output_config_file = "./output_config.toml"

dfm_2d_waterlevels_to_msw_h_dmm = "./exchanges/DFM2DWATLEVTOMSW_H.DMM"
msw_ponding_to_dfm_2d_dv_dmm = "./exchanges/MSWPONDINGTODFM2D_DV.DMM"

dfm_1d_waterlevel_to_mf6_river_stage_dmm = "./exchanges/DFM1DWATLEVTOMFRIV_H.DMM"
mf6_river2_to_dfm_1d_q_dmm = "./exchanges/MFRIV2TODFM1D_Q.DMM"
mf6_river_to_dfm_1d_q_dmm = "./exchanges/MFRIVTODFM1D_Q.DMM"

Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ output_config_file = "./output_config.toml"
msw_runoff_to_dfm_1d_q_dmm = "./exchanges/MSWRUNOFFTODFM1D_Q.DMM"
dfm_1d_waterlevel_to_mf6_river_stage_dmm = "./exchanges/DFM1DWATLEVTOMFRIV_H.DMM"
mf6_river_to_dfm_1d_q_dmm = "./exchanges/MFRIVTODFM1D_Q.DMM"
mf6_river2_to_dmf_1d_q_dmm = "./exchanges/MFRIV2TODFM1D_Q.DMM"
mf6_river2_to_dfm_1d_q_dmm = "./exchanges/MFRIV2TODFM1D_Q.DMM"
mf6_drainage_to_dfm_1d_q_dmm = "./exchanges/MFDRNTODFM1D_Q.DMM"

Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ msw_runoff_to_dfm_1d_q_dmm = "./exchanges/MSWRUNOFFTODFM1D_Q.DMM"
dfm_1d_waterlevel_to_mf6_river_stage_dmm = "./exchanges/DFM1DWATLEVTOMFRIV_H.DMM"
mf6_river_to_dfm_1d_q_dmm = "./exchanges/MFRIVTODFM1D_Q.DMM"
mf6_drainage_to_dfm_1d_q_dmm = "./exchanges/MFDRNTODFM1D_Q.DMM"
mf6_river2_to_dmf_1d_q_dmm = "./exchanges/MFRIV2TODFM1D_Q.DMM"
mf6_river2_to_dfm_1d_q_dmm = "./exchanges/MFRIV2TODFM1D_Q.DMM"

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ output_config_file = "./output_config.toml"
msw_runoff_to_dfm_1d_q_dmm = "./exchanges/MSWRUNOFFTODFM1D_Q.DMM"
dfm_1d_waterlevel_to_mf6_river_stage_dmm = "./exchanges/DFM1DWATLEVTOMFRIV_H.DMM"
mf6_river_to_dfm_1d_q_dmm = "./exchanges/MFRIVTODFM1D_Q.DMM"
mf6_river2_to_dmf_1d_q_dmm = "./exchanges/MFRIV2TODFM1D_Q.DMM"
mf6_river2_to_dfm_1d_q_dmm = "./exchanges/MFRIV2TODFM1D_Q.DMM"
mf6_drainage_to_dfm_1d_q_dmm = "./exchanges/MFDRNTODFM1D_Q.DMM"
msw_sprinkling_to_dfm_1d_q_dmm = "./exchanges/MSWSPRINKTODFM1D_Q.DMM"

2 changes: 1 addition & 1 deletion tests/data/t_model_short/imod_coupler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ mf6_wel_correction_pkg = "RIV_CORR"
mf6_msw_recharge_map = "./exchanges/RCHINDEX2SVAT.DXC"
mf6_river_to_dfm_1d_q_dmm = "./exchanges/MFRIVTODFM1D_Q.DMM"
dfm_1d_waterlevel_to_mf6_river_stage_dmm = "./exchanges/DFM1DWATLEVTOMFRIV_H.DMM"
mf6_river2_to_dmf_1d_q_dmm = "./exchanges/MFRIV2TODFM1D_Q.DMM"
mf6_river2_to_dfm_1d_q_dmm = "./exchanges/MFRIV2TODFM1D_Q.DMM"
mf6_drainage_to_dfm_1d_q_dmm = "./exchanges/MFDRNTODFM1D_Q.DMM"
msw_runoff_to_dfm_1d_q_dmm = "./exchanges/MSWRUNOFFTODFM1D_Q.DMM"
msw_sprinkling_to_dfm_1d_q_dmm = "./exchanges/MSWSPRINKTODFM1D_Q.DMM"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_dfm_metamod_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def case_with_river(
mf6_wel_pkgkey="wells_msw",
mf6_river_to_dfm_1d_q_dmm_path=Path("sample.xyz"),
dfm_1d_waterlevel_to_mf6_river_stage_dmm_path=Path("sample.xyz"),
mf6_river2_to_dmf_1d_q_dmm_path=Path("sample.xyz"),
mf6_river2_to_dfm_1d_q_dmm_path=Path("sample.xyz"),
mf6_drainage_to_dfm_1d_q_dmm_path=Path("sample.xyz"),
msw_runoff_to_dfm_1d_q_dmm_path=Path("sample.xyz"),
msw_ponding_to_dfm_2d_dv_dmm_path=Path("sample.xyz"),
Expand Down
4 changes: 2 additions & 2 deletions tests/test_dfm_metamod_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_write_toml_file(
"wells_msw", # mf6_wel_correction_pkg
Path("mf6_river_to_dfm_1d_q_dmm_path"),
Path("dfm_1d_waterlevel_to_mf6_river_stage_dmm_path"),
Path("mf6_river2_to_dmf_1d_q_dmm_path"),
Path("mf6_river2_to_dfm_1d_q_dmm_path"),
Path("mf6_drainage_to_dfm_1d_q_dmm_path"),
Path("msw_runoff_to_dfm_1d_q_dmm_path"),
Path("msw_sprinkling_to_dfm_1d_q_dmm_path"),
Expand Down Expand Up @@ -71,7 +71,7 @@ def test_write_toml_file(
mf6_msw_sprinkling_map = "./exchanges/wellindex2svat.dxc"
mf6_river_to_dfm_1d_q_dmm = "mf6_river_to_dfm_1d_q_dmm_path"
dfm_1d_waterlevel_to_mf6_river_stage_dmm = "dfm_1d_waterlevel_to_mf6_river_stage_dmm_path"
mf6_river2_to_dmf_1d_q_dmm = "mf6_river2_to_dmf_1d_q_dmm_path"
mf6_river2_to_dfm_1d_q_dmm = "mf6_river2_to_dfm_1d_q_dmm_path"
mf6_drainage_to_dfm_1d_q_dmm = "mf6_drainage_to_dfm_1d_q_dmm_path"
msw_runoff_to_dfm_1d_q_dmm = "msw_runoff_to_dfm_1d_q_dmm_path"
msw_sprinkling_to_dfm_1d_q_dmm = "msw_sprinkling_to_dfm_1d_q_dmm_path"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_run_tmodel_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def case_tmodel_f_without_dflow(
files_to_skip = {
"msw_ponding_to_dfm_2d_dv_dmm",
"dfm_2d_waterlevels_to_msw_h_dmm",
"mf6_river2_to_dmf_1d_q_dmm",
"mf6_river2_to_dfm_1d_q_dmm",
"mf6_drainage_to_dfm_1d_q_dmm",
"msw_sprinkling_to_dfm_1d_q_dmm",
"msw_runoff_to_dfm_1d_q_dmm",
Expand Down
4 changes: 2 additions & 2 deletions tests/test_run_tmodel_short_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def case_skiptest_skip_2d_coupling() -> Set[str]:


def case_skiptest_skip_river2_drain() -> Set[str]:
return {"mf6_river2_to_dmf_1d_q_dmm", "mf6_drainage_to_dfm_1d_q_dmm"}
return {"mf6_river2_to_dfm_1d_q_dmm", "mf6_drainage_to_dfm_1d_q_dmm"}


def case_skiptest_skip_sprinkling_and_drain() -> Set[str]:
Expand All @@ -17,7 +17,7 @@ def case_skiptest_skip_all_dflow() -> Set[str]:
return {
"msw_ponding_to_dfm_2d_dv_dmm",
"dfm_2d_waterlevels_to_msw_h_dmm",
"mf6_river2_to_dmf_1d_q_dmm",
"mf6_river2_to_dfm_1d_q_dmm",
"mf6_drainage_to_dfm_1d_q_dmm",
"msw_sprinkling_to_dfm_1d_q_dmm",
"msw_runoff_to_dfm_1d_q_dmm",
Expand Down

0 comments on commit ec8ee18

Please sign in to comment.