You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The projectfile had a single datetime record 1900-01-01 for the CHD package.
times = [np.datetime64("2018-01-01"), np.datetime64("2020-01-01")] was provided to Modflow6Simulation.from_imod5_data(...)
The simulation returned a model with the CHD package at 1900-01-01, in spite of the times provided
He resorted to calling simulation.clip_box(time_min = times[0]), which clipped the CHD package away entirely.
Confused user, where did the CHD package go?
iMOD5 would forward fill these packages. iMOD Python currently forward fills well timeseries, but doesn't forward fill grid packages. I think clip_box did the right thing here, but from_imod5_data could forward fill these packages.
Quite a common usecase is a CHD package defined every 14 days in the projectfile, and then starting a model somewhere in between those 14 days. In that case the last CHD before the simulation start should be taken.
The text was updated successfully, but these errors were encountered:
I investigated this further: it turns out Package.clip_box should forward fill the time coordinate, so I don't know what happened there. We could make a call to Package.clip_box in this case.
Fixes#1439
# Description
- Refactor: Move duplicate set_repeat_stress logic to separate utility
function
- Refactor: Move CHD cells from imod5 data logic to separate utility
function
- Add call to clip_box with time_min and time_max in boundary condition
packages from_imod5_data method to properly forward time.
- Change signatures of Recharge.from_imod5_data and
ConstantHead.from_imod5_data to also allow a call to clip_box
- Type annotate return type ``Self`` of clip_box, as this is the way
since python 3.11 to avoid having to cast or overload the return type
when ``clip_box`` is called in a method in a child class.
# Checklist
<!---
Before requesting review, please go through this checklist:
-->
- [x] Links to correct issue
- [ ] Update changelog, if changes affect users
- [x] PR title starts with ``Issue #nr``, e.g. ``Issue #737``
- [x] Unit tests were added
- [ ] **If feature added**: Added/extended example
We just ran into the following:
times = [np.datetime64("2018-01-01"), np.datetime64("2020-01-01")]
was provided toModflow6Simulation.from_imod5_data(...)
times
providediMOD5 would forward fill these packages. iMOD Python currently forward fills well timeseries, but doesn't forward fill grid packages. I think
clip_box
did the right thing here, butfrom_imod5_data
could forward fill these packages.Quite a common usecase is a CHD package defined every 14 days in the projectfile, and then starting a model somewhere in between those 14 days. In that case the last CHD before the simulation start should be taken.
The text was updated successfully, but these errors were encountered: