Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/examples/image/quickstart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/examples/quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@
head.plot.imshow(ax=ax)
head.plot.contour(ax=ax, levels=[0.2, 0.4, 0.6, 0.8], linewidths=3.0)
budget.plot.quiver(x="x", y="y", u="npf-qx", v="npf-qy", ax=ax, color="white")
fig.savefig(workspace / f"{name}.png")
fig.savefig(workspace / ".." / "image" / "quickstart.png")
6 changes: 2 additions & 4 deletions flopy4/mf6/gwf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from typing import Optional

import attrs
import imod
import xarray as xr
from attrs import define
from flopy.discretization.grid import Grid
Expand All @@ -15,7 +14,7 @@
from flopy4.mf6.gwf.npf import Npf
from flopy4.mf6.gwf.oc import Oc
from flopy4.mf6.model import Model
from flopy4.mf6.utils import open_hds
from flopy4.mf6.utils import open_cbc, open_hds

__all__ = ["Gwf", "Chd", "Dis", "Ic", "Npf", "Oc"]

Expand Down Expand Up @@ -45,10 +44,9 @@ def head(self) -> xr.DataArray:
@property
def budget(self):
# TODO support other extensions than .bud (e.g. .cbc)
return imod.mf6.open_cbc(
return open_cbc(
self.parent.parent.path / f"{self.parent.name}.bud",
self.parent.parent.path / f"{self.parent.name}.dis.grb",
merge_to_dataset=True,
)

dis: Dis = field(converter=convert_grid)
Expand Down
3 changes: 2 additions & 1 deletion flopy4/mf6/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from .cbc_reader import open_cbc
from .heads_reader import open_hds

__all__ = ["open_hds"]
__all__ = ["open_hds", "open_cbc"]
Loading
Loading