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
3 changes: 2 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ on:
- cron: '0 9 * * 1' # run every Monday at 9 AM UTC (3 am PST)
push:
pull_request:

workflow_dispatch:

jobs:
build:
name: ${{ matrix.python-version }}, ${{ matrix.os }}
Expand Down
16 changes: 9 additions & 7 deletions mfexport/array_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,16 @@ def export_array_contours(filename, a, modelgrid,
level = []
for ctr in contours:
levels = ctr.levels
for i, c in enumerate(ctr.collections):
paths = c.get_paths()
for path in paths:
# break the paths up into their components
# (so that different instances of a contour level
# don't connect across other contour levels)
#for i, c in enumerate(ctr.collections):
# paths = c.get_paths()
paths = ctr.get_paths()
for i, path in enumerate(paths):
# break the paths up into their components
# (so that different instances of a contour level
# don't connect across other contour levels)
if len(path) > 0:
parts = np.split(path.vertices,
np.where(path.codes == 1)[0], axis=0)
np.where(path.codes == 1)[0], axis=0)
parts = [p for p in parts if len(p) > 0]
geoms += [LineString(p) if len(p) > 1 else LineString() for p in parts]
level += list(np.ones(len(parts)) * levels[i])
Expand Down
2 changes: 1 addition & 1 deletion mfexport/budget_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ def read_maw_output(maw_head_file, maw_budget_file,

data = pd.read_csv(f, names=names,
skiprows=skiprows, sep='\\s+')
data = data.loc[data['mawsetting'] != 'status']
data = data.loc[data[names[1]] != 'status']
data = data.pivot(index=data.columns[0], columns=data.columns[1],
values=data.columns[2])
data.reset_index(inplace=True)
Expand Down
19 changes: 19 additions & 0 deletions mfexport/tests/data/maw/packagedata.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#wellno radius bottom strt condeqn ngwfnodes boundname
1 0.1016 231.34 284.16 mean 3 B1
2 0.1016 204.22 279.36 mean 6 B3
3 0.1016 196.6 278.18 mean 7 B4
4 0.1016 210.01 278.7 mean 6 B5
5 0.1016 203.91 277.89 mean 5 B6
6 0.1651 171.91 277.63 mean 5 B8
7 0.1016 169.77 277.94 mean 4 B9
8 0.1016 239.88 287.05 mean 2 B13
9 0.1016 251.76 291.18 mean 2 SC1
10 0.1016 241.4 294.43 mean 2 SC2
11 0.1016 235.31 290.53 mean 3 SC5
12 0.1016 248.56 297.28 mean 2 SC6
13 0.1016 249.23 296.4 mean 2 SC7
14 0.1016 247.47 296.32 mean 2 SC8
15 0.1016 251.34 291.14 mean 1 SC9
16 0.1016 253.17 291.55 mean 2 SC10
17 0.1016 250.73 290.66 mean 1 SC11
18 0.1016 240.33 296.4 mean 3 SC12
Loading