Skip to content

Commit 34a9978

Browse files
committed
release: version 3.3.3
1 parent 56b57e0 commit 34a9978

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+13868
-4696
lines changed

docs/make_release.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ Instructions for making a FloPy release
99
```
1010
python -c 'import flopy; flopy.mf6.utils.generate_classes(branch="master", backup=False)'
1111
```
12+
3. Run `black` on the updated MODFLOW 6 package classes by running the following from the root directory:
13+
14+
```
15+
black -l 79 flopy/mf6
16+
```
1217
13-
Evaluate if there are any changes that seem to reduce MODFLOW 6 functionality before committing changes on the release branch.
1418
1519
1620
## Update the release version number

flopy/mf6/modflow/mfgnc.py

Lines changed: 103 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -93,46 +93,118 @@ class ModflowGnc(mfpackage.MFPackage):
9393
Package name for this package.
9494
parent_file : MFPackage
9595
Parent package file that references this package. Only needed for
96-
utility packages (mfutl*). For example, mfutllaktab package must have
96+
utility packages (mfutl*). For example, mfutllaktab package must have
9797
a mfgwflak package parent_file.
9898
9999
"""
100-
gncdata = ListTemplateGenerator(('gnc', 'gncdata', 'gncdata'))
100+
101+
gncdata = ListTemplateGenerator(("gnc", "gncdata", "gncdata"))
101102
package_abbr = "gnc"
102103
_package_type = "gnc"
103104
dfn_file_name = "gwf-gnc.dfn"
104105

105-
dfn = [["block options", "name print_input", "type keyword",
106-
"reader urword", "optional true"],
107-
["block options", "name print_flows", "type keyword",
108-
"reader urword", "optional true"],
109-
["block options", "name explicit", "type keyword", "tagged true",
110-
"reader urword", "optional true"],
111-
["block dimensions", "name numgnc", "type integer",
112-
"reader urword", "optional false"],
113-
["block dimensions", "name numalphaj", "type integer",
114-
"reader urword", "optional false"],
115-
["block gncdata", "name gncdata",
106+
dfn = [
107+
[
108+
"block options",
109+
"name print_input",
110+
"type keyword",
111+
"reader urword",
112+
"optional true",
113+
],
114+
[
115+
"block options",
116+
"name print_flows",
117+
"type keyword",
118+
"reader urword",
119+
"optional true",
120+
],
121+
[
122+
"block options",
123+
"name explicit",
124+
"type keyword",
125+
"tagged true",
126+
"reader urword",
127+
"optional true",
128+
],
129+
[
130+
"block dimensions",
131+
"name numgnc",
132+
"type integer",
133+
"reader urword",
134+
"optional false",
135+
],
136+
[
137+
"block dimensions",
138+
"name numalphaj",
139+
"type integer",
140+
"reader urword",
141+
"optional false",
142+
],
143+
[
144+
"block gncdata",
145+
"name gncdata",
116146
"type recarray cellidn cellidm cellidsj alphasj",
117-
"shape (maxbound)", "reader urword"],
118-
["block gncdata", "name cellidn", "type integer", "shape",
119-
"tagged false", "in_record true", "reader urword",
120-
"numeric_index true"],
121-
["block gncdata", "name cellidm", "type integer", "shape",
122-
"tagged false", "in_record true", "reader urword",
123-
"numeric_index true"],
124-
["block gncdata", "name cellidsj", "type integer",
125-
"shape (numalphaj)", "tagged false", "in_record true",
126-
"reader urword", "numeric_index true"],
127-
["block gncdata", "name alphasj", "type double precision",
128-
"shape (numalphaj)", "tagged false", "in_record true",
129-
"reader urword"]]
147+
"shape (maxbound)",
148+
"reader urword",
149+
],
150+
[
151+
"block gncdata",
152+
"name cellidn",
153+
"type integer",
154+
"shape",
155+
"tagged false",
156+
"in_record true",
157+
"reader urword",
158+
"numeric_index true",
159+
],
160+
[
161+
"block gncdata",
162+
"name cellidm",
163+
"type integer",
164+
"shape",
165+
"tagged false",
166+
"in_record true",
167+
"reader urword",
168+
"numeric_index true",
169+
],
170+
[
171+
"block gncdata",
172+
"name cellidsj",
173+
"type integer",
174+
"shape (numalphaj)",
175+
"tagged false",
176+
"in_record true",
177+
"reader urword",
178+
"numeric_index true",
179+
],
180+
[
181+
"block gncdata",
182+
"name alphasj",
183+
"type double precision",
184+
"shape (numalphaj)",
185+
"tagged false",
186+
"in_record true",
187+
"reader urword",
188+
],
189+
]
130190

131-
def __init__(self, simulation, loading_package=False, print_input=None,
132-
print_flows=None, explicit=None, numgnc=None, numalphaj=None,
133-
gncdata=None, filename=None, pname=None, parent_file=None):
134-
super(ModflowGnc, self).__init__(simulation, "gnc", filename, pname,
135-
loading_package, parent_file)
191+
def __init__(
192+
self,
193+
simulation,
194+
loading_package=False,
195+
print_input=None,
196+
print_flows=None,
197+
explicit=None,
198+
numgnc=None,
199+
numalphaj=None,
200+
gncdata=None,
201+
filename=None,
202+
pname=None,
203+
parent_file=None,
204+
):
205+
super(ModflowGnc, self).__init__(
206+
simulation, "gnc", filename, pname, loading_package, parent_file
207+
)
136208

137209
# set up variables
138210
self.print_input = self.build_mfdata("print_input", print_input)

flopy/mf6/modflow/mfgwf.py

Lines changed: 52 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,35 @@ class ModflowGwf(mfmodel.MFModel):
7474
model_ws : string, strict : boolean) : MFSimulation
7575
a class method that loads a model from files
7676
"""
77-
model_type = 'gwf'
7877

79-
def __init__(self, simulation, modelname='model', model_nam_file=None,
80-
version='mf6', exe_name='mf6.exe', model_rel_path='.',
81-
list=None, print_input=None, print_flows=None,
82-
save_flows=None, newtonoptions=None, packages=None, **kwargs):
83-
super(ModflowGwf, self).__init__(simulation, model_type='gwf6',
84-
modelname=modelname,
85-
model_nam_file=model_nam_file,
86-
version=version, exe_name=exe_name,
87-
model_rel_path=model_rel_path,
88-
**kwargs)
78+
model_type = "gwf"
79+
80+
def __init__(
81+
self,
82+
simulation,
83+
modelname="model",
84+
model_nam_file=None,
85+
version="mf6",
86+
exe_name="mf6.exe",
87+
model_rel_path=".",
88+
list=None,
89+
print_input=None,
90+
print_flows=None,
91+
save_flows=None,
92+
newtonoptions=None,
93+
packages=None,
94+
**kwargs
95+
):
96+
super(ModflowGwf, self).__init__(
97+
simulation,
98+
model_type="gwf6",
99+
modelname=modelname,
100+
model_nam_file=model_nam_file,
101+
version=version,
102+
exe_name=exe_name,
103+
model_rel_path=model_rel_path,
104+
**kwargs
105+
)
89106

90107
self.name_file.list.set_data(list)
91108
self.name_file.print_input.set_data(print_input)
@@ -95,11 +112,27 @@ def __init__(self, simulation, modelname='model', model_nam_file=None,
95112
self.name_file.packages.set_data(packages)
96113

97114
@classmethod
98-
def load(cls, simulation, structure, modelname='NewModel',
99-
model_nam_file='modflowtest.nam', version='mf6',
100-
exe_name='mf6.exe', strict=True, model_rel_path='.',
101-
load_only=None):
102-
return mfmodel.MFModel.load_base(simulation, structure, modelname,
103-
model_nam_file, 'gwf', version,
104-
exe_name, strict, model_rel_path,
105-
load_only)
115+
def load(
116+
cls,
117+
simulation,
118+
structure,
119+
modelname="NewModel",
120+
model_nam_file="modflowtest.nam",
121+
version="mf6",
122+
exe_name="mf6.exe",
123+
strict=True,
124+
model_rel_path=".",
125+
load_only=None,
126+
):
127+
return mfmodel.MFModel.load_base(
128+
simulation,
129+
structure,
130+
modelname,
131+
model_nam_file,
132+
"gwf",
133+
version,
134+
exe_name,
135+
strict,
136+
model_rel_path,
137+
load_only,
138+
)

0 commit comments

Comments
 (0)