-
Notifications
You must be signed in to change notification settings - Fork 9
Issue #863 transport regridding #907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a92d13d
db8b807
0496f12
a212296
d50ee0d
be8feda
603b638
0f5e868
0669740
a87d751
6c08cab
536ef88
b7ae4ce
466ed8f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,9 +71,15 @@ def create_transport_model(flow_model, species_name, dispersivity, retardation, | |
|
|
||
|
|
||
| # %% | ||
| # Create the spatial discretization. | ||
| @pytest.fixture(scope="function") | ||
| def flow_transport_simulation(): | ||
| """ | ||
| This fixture is a variation on the model also present in | ||
| examples/mf6/example_1d_transport.py. To make that model more useful for | ||
| testing eg partitioning or regridding, some boundary conditions were added | ||
| (2 wells, one extractor and one injector which injects with a nonzero | ||
| concentration) as well as a recharge zone with a nonzero concentration. | ||
| """ | ||
| nlay = 1 | ||
| nrow = 2 | ||
| ncol = 101 | ||
|
|
@@ -85,7 +91,7 @@ def flow_transport_simulation(): | |
| x = np.arange(xmin, xmax, dx) + 0.5 * dx | ||
|
|
||
| grid_dims = ("layer", "y", "x") | ||
| grid_coords = {"layer": layer, "y": y, "x": x} | ||
| grid_coords = {"layer": layer, "y": y, "x": x, "dx": dx, "dy": 1.} | ||
| grid_shape = (nlay, nrow, ncol) | ||
| grid = xr.DataArray( | ||
| np.ones(grid_shape, dtype=int), coords=grid_coords, dims=grid_dims | ||
|
|
@@ -116,9 +122,6 @@ def flow_transport_simulation(): | |
| gwf_model["npf"] = imod.mf6.NodePropertyFlow( | ||
| icelltype=1, | ||
| k=xr.full_like(grid, 1.0, dtype=float), | ||
| variable_vertical_conductance=True, | ||
| dewatered=True, | ||
| perched=True, | ||
| ) | ||
| gwf_model["dis"] = imod.mf6.StructuredDiscretization( | ||
| top=0.0, | ||
|
|
@@ -138,7 +141,7 @@ def flow_transport_simulation(): | |
| species=["species_a", "species_b", "species_c", "species_d"] | ||
| ) | ||
| recharge_rate = xr.full_like(grid, np.nan, dtype=float) | ||
| recharge_rate[..., 20:60] = 0.001 | ||
| recharge_rate[..., 20:60] = 0.0001 | ||
| gwf_model["rch"] = imod.mf6.Recharge(recharge_rate, recharge_conc, "AUX") | ||
| # %% | ||
| # Create the simulation. | ||
|
|
@@ -157,7 +160,7 @@ def flow_transport_simulation(): | |
| concentration_boundary_type="Aux", | ||
| screen_top=[0.0, 0.0], | ||
| screen_bottom=[-1.0, -1.0], | ||
| rate=[1.0, -2.0], | ||
| rate=[0.1, -0.2], | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add a comment how and why we departed from the original mf6 example
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done. note that the fixture did not mention the original mf6 example, so nothing was promised wrt that. |
||
| minimum_k=0.0001, | ||
| concentration=injection_concentration, | ||
| ) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just an idea:
We could create a decorator to encapsulate functions/methods, where necessary, for removing aux vars and expanding them again. As this is also done in _skip_masking_variable, and maybe should be done for regridding/clipping as well? This is probably best done after we have done all tasks in this milestone. If you agree, we can make an issue for this and add it to the refactoring milestone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice idea, created issue #909 for that.