Adaptive Time Stepping package error loading from toml
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
调研方向
故障出在 imod/mf6/simulation.py 的 Modflow6Simulation.from_file 中,其中 TOML 节键会在 classes 映射中查找,而 AdaptiveTimeStepping 缺失。通过转储一个包含 ats 包的模型并用 from_file 重新加载来复现,然后检查其他包是如何注册并从 TOML 重建的。完成意味着包含 [AdaptiveTimeStepping] 的 TOML 能成功加载,且相关的仿真测试仍然通过。
由索引模型根据 Issue 内容生成。
描述
Bug description
imod.mf6.Modflow6Simulation.from_file(model_toml) fails when an ats (adaptive time stepping) package is present in the model, that is written to netcdf files using model.dump('folder/to/dump')
Steps to reproduce
Error message:
KeyError Traceback (most recent call last)
Cell In[4], line 1
----> 1 model = imod.mf6.Modflow6Simulation.from_file(model_toml)
File c:\model_builder.pixi\envs\default\Lib\site-packages\imod\logging\logging_decorators.py:32, in standard_log_decorator..decorator..wrapper(*args, **kwargs)
29 logger.log(loglevel=start_level, message=start_message, additional_depth=2)
31 # run function
---> 32 return_value = fun(*args, **kwargs)
33 end_time = time()
35 # anounce end of function
File c:\model_builder.pixi\envs\default\Lib\site-packages\imod\mf6\simulation.py:1126, in Modflow6Simulation.from_file(toml_path)
1124 for key, entry in toml_content.items():
1125 if key not in ["gwtgwf_exchanges", "split_exchanges"]:
-> 1126 item_cls = classes[key]
1127 for name, filename in entry.items():
1128 path = toml_path.parent / filename
KeyError: 'AdaptiveTimeStepping'
Desktop (please complete the following information):
- iMOD Python Version '1.0.0.post1'
Additional context
In this case I want to load an existing model, use the spatial information and make additional changes for scenario development. This is now not automatically possible, as I can not simply load the data using the toml. The manual workaround is to remove the [AdaptiveTimeStepping] section from the toml manually, so i can at least load the other packages.
- 主要语言
- Python
- 星标
- 41
- 派生
- 10
- 平均合并
- 2 天 23 小时
- 30 天内合并 PR
- 15
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Deltares/imod-python 的其他 Issue
-
backwards_compatibility bug Deltares
难度 2/5 1-3 小时 新手友好度 68/100
Deltares/imod-python#1940 · 1 条评论 ·
维护者通常 2 天内回复
-
Deltares enhancement good first issue
难度 2/5 1-3 小时 新手友好度 74/100
Deltares/imod-python#1843 ·
维护者通常 2 天内回复
-
documentation
难度 1/5 1 小时以内 新手友好度 68/100
Deltares/imod-python#1684 ·
维护者通常 2 天内回复
-
[Bug] - resample_timeseries: output shifted by one period when well records exist before the first time可能已有人在做 @ClaireDons 于 1 天前认领。 未关闭bug
Deltares/imod-python#1952 · 1 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
backwards_compatibility bug Deltares
难度 3/5 半天 新手友好度 50/100
Deltares/imod-python#1939 · 1 条评论 ·
维护者通常 2 天内回复
查看 Deltares/imod-python 的全部 Issue
相似的 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 86/100
awslabs/visual-asset-management-system#937 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
-
follow-up
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 83/100
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 2 天内回复