flopy 3.2.1__zip → 3.2.2__zip

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. {flopy-3.2.1 → flopy-3.2.2}/PKG-INFO +47 -11
  2. {flopy-3.2.1 → flopy-3.2.2}/flopy/mbase.py +307 -17
  3. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mf.py +8 -6
  4. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfbcf.py +2 -2
  5. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfchd.py +1 -1
  6. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfde4.py +2 -2
  7. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfdis.py +11 -94
  8. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfdrn.py +1 -1
  9. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfevt.py +3 -3
  10. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfghb.py +2 -2
  11. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfgmg.py +60 -19
  12. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfhfb.py +7 -7
  13. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mflpf.py +13 -10
  14. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfmlt.py +3 -3
  15. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfnwt.py +1 -1
  16. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfoc.py +26 -20
  17. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfoc88.py +9 -9
  18. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfpar.py +15 -9
  19. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfparbc.py +7 -7
  20. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfpcg.py +2 -2
  21. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfpcgn.py +3 -3
  22. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfpks.py +1 -1
  23. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfrch.py +4 -4
  24. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfriv.py +6 -4
  25. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfsip.py +2 -2
  26. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfsor.py +3 -3
  27. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfswi2.py +34 -34
  28. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfswr1.py +4 -4
  29. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfupw.py +4 -4
  30. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfuzf1.py +5 -5
  31. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfwel.py +1 -2
  32. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfzon.py +2 -2
  33. {flopy-3.2.1 → flopy-3.2.2}/flopy/modpath/mp.py +7 -5
  34. {flopy-3.2.1 → flopy-3.2.2}/flopy/modpath/mpbas.py +1 -1
  35. {flopy-3.2.1 → flopy-3.2.2}/flopy/modpath/mpsim.py +18 -16
  36. {flopy-3.2.1 → flopy-3.2.2}/flopy/mt3d/mt.py +1 -1
  37. {flopy-3.2.1 → flopy-3.2.2}/flopy/mt3d/mtbtn.py +3 -3
  38. {flopy-3.2.1 → flopy-3.2.2}/flopy/mt3d/mtssm.py +7 -6
  39. {flopy-3.2.1 → flopy-3.2.2}/flopy/plot/__init__.py +1 -1
  40. {flopy-3.2.1 → flopy-3.2.2}/flopy/plot/crosssection.py +73 -103
  41. flopy-3.2.2/flopy/plot/map.py +647 -0
  42. flopy-3.2.2/flopy/plot/plotutil.py +1205 -0
  43. {flopy-3.2.1 → flopy-3.2.2}/flopy/utils/__init__.py +3 -1
  44. {flopy-3.2.1 → flopy-3.2.2}/flopy/utils/binaryfile.py +91 -364
  45. {flopy-3.2.1 → flopy-3.2.2}/flopy/utils/binaryhydmodfile.py +3 -3
  46. {flopy-3.2.1 → flopy-3.2.2}/flopy/utils/binaryswrfile.py +21 -21
  47. flopy-3.2.2/flopy/utils/datafile.py +476 -0
  48. flopy-3.2.2/flopy/utils/flopy_io.py +128 -0
  49. flopy-3.2.2/flopy/utils/formattedfile.py +366 -0
  50. flopy-3.2.2/flopy/utils/modpathfile.py +421 -0
  51. flopy-3.2.2/flopy/utils/reference.py +386 -0
  52. {flopy-3.2.1 → flopy-3.2.2}/flopy/utils/util_array.py +512 -83
  53. {flopy-3.2.1 → flopy-3.2.2}/flopy/utils/util_list.py +234 -13
  54. flopy-3.2.2/flopy/version.py +4 -0
  55. {flopy-3.2.1 → flopy-3.2.2}/flopy.egg-info/PKG-INFO +47 -11
  56. {flopy-3.2.1 → flopy-3.2.2}/flopy.egg-info/SOURCES.txt +5 -0
  57. {flopy-3.2.1 → flopy-3.2.2}/setup.py +2 -6
  58. flopy-3.2.1/flopy/plot/map.py +0 -592
  59. flopy-3.2.1/flopy/plot/plotutil.py +0 -512
  60. flopy-3.2.1/flopy/version.py +0 -4
  61. flopy-3.2.1/requirements.txt +0 -2
  62. {flopy-3.2.1 → flopy-3.2.2}/flopy/__init__.py +0 -0
  63. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/__init__.py +0 -0
  64. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfaddoutsidefile.py +0 -0
  65. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfbas.py +0 -0
  66. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfbct.py +0 -0
  67. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mflmt.py +0 -0
  68. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfmnw1.py +0 -0
  69. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfmnw2.py +0 -0
  70. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfmnwi.py +0 -0
  71. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfpbc.py +0 -0
  72. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfpval.py +0 -0
  73. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfsms.py +0 -0
  74. {flopy-3.2.1 → flopy-3.2.2}/flopy/modflow/mfswi.py +0 -0
  75. {flopy-3.2.1 → flopy-3.2.2}/flopy/modpath/__init__.py +0 -0
  76. {flopy-3.2.1 → flopy-3.2.2}/flopy/mt3d/__init__.py +0 -0
  77. {flopy-3.2.1 → flopy-3.2.2}/flopy/mt3d/mtadv.py +0 -0
  78. {flopy-3.2.1 → flopy-3.2.2}/flopy/mt3d/mtdsp.py +0 -0
  79. {flopy-3.2.1 → flopy-3.2.2}/flopy/mt3d/mtgcg.py +0 -0
  80. {flopy-3.2.1 → flopy-3.2.2}/flopy/mt3d/mtphc.py +0 -0
  81. {flopy-3.2.1 → flopy-3.2.2}/flopy/mt3d/mtrct.py +0 -0
  82. {flopy-3.2.1 → flopy-3.2.2}/flopy/mt3d/mttob.py +0 -0
  83. {flopy-3.2.1 → flopy-3.2.2}/flopy/seawat/__init__.py +0 -0
  84. {flopy-3.2.1 → flopy-3.2.2}/flopy/seawat/swt.py +0 -0
  85. {flopy-3.2.1 → flopy-3.2.2}/flopy/seawat/swtvdf.py +0 -0
  86. {flopy-3.2.1 → flopy-3.2.2}/flopy/utils/mfreadnam.py +0 -0
  87. {flopy-3.2.1 → flopy-3.2.2}/flopy.egg-info/dependency_links.txt +0 -0
  88. {flopy-3.2.1 → flopy-3.2.2}/flopy.egg-info/requires.txt +0 -0
  89. {flopy-3.2.1 → flopy-3.2.2}/flopy.egg-info/top_level.txt +0 -0
  90. {flopy-3.2.1 → flopy-3.2.2}/setup.cfg +0 -0
@@ -152,7 +152,7 @@ class ModflowOc88(Package):
152
152
  self.chedfm = chedfm
153
153
  self.cddnfm = cddnfm
154
154
 
155
- #--using words
155
+ # using words
156
156
  if words is not None:
157
157
 
158
158
  hflag,dflag = False,False
@@ -164,12 +164,12 @@ class ModflowOc88(Package):
164
164
  self.words = []
165
165
  self.compact = compact
166
166
 
167
- #--first try for simple 1-d list
167
+ # first try for simple 1-d list
168
168
  try:
169
169
  for w in words:
170
170
  self.words.append(w.upper())
171
171
 
172
- #--build a list of word output options
172
+ # build a list of word output options
173
173
  word_list = []
174
174
 
175
175
  if save_head_every is None:
@@ -197,7 +197,7 @@ class ModflowOc88(Package):
197
197
 
198
198
 
199
199
 
200
- #--try for a 2-d list
200
+ # try for a 2-d list
201
201
  except:
202
202
  word_list = []
203
203
  self.words = []
@@ -222,7 +222,7 @@ class ModflowOc88(Package):
222
222
  word_list.append('\n')
223
223
  self.word_list = (word_list)
224
224
 
225
- #--numeric codes
225
+ # numeric codes
226
226
  else:
227
227
  self.words = None
228
228
  #dummy, self.item2 = self.assign_layer_row_column_data(item2, 4, zerobase=False) # misuse of this function - zerobase needs to be False
@@ -265,7 +265,7 @@ class ModflowOc88(Package):
265
265
  f_oc.write('%s\n' % self.heading)
266
266
  nstp = self.parent.get_package('DIS').nstp
267
267
 
268
- #--words option
268
+ # words option
269
269
  if self.words is not None:
270
270
 
271
271
  f_oc.write('HEAD PRINT FORMAT {0:3.0f}\n'\
@@ -289,7 +289,7 @@ class ModflowOc88(Package):
289
289
  for i in self.word_list:
290
290
  f_oc.write(i)
291
291
 
292
- #--numeric codes option
292
+ # numeric codes option
293
293
  else:
294
294
  f_oc.write('%3i%3i%5i%5i\n' % \
295
295
  (self.ihedfm, self.iddnfm, self.unit_number[1],\
@@ -469,7 +469,7 @@ class ModflowOc88(Package):
469
469
  if len(wordrec) > 3:
470
470
  words.append(wordrec)
471
471
 
472
- #--reset unit numbers
472
+ # reset unit numbers
473
473
  unitnumber=[14, 51, 52, 53]
474
474
  if ihedun > 0:
475
475
  model.add_pop_key_list(ihedun)
@@ -478,7 +478,7 @@ class ModflowOc88(Package):
478
478
  model.add_pop_key_list(iddnun)
479
479
  #unitnumber[2] = iddnun
480
480
 
481
- #--create instance of oc class
481
+ # create instance of oc class
482
482
  oc = ModflowOc88(model, ihedfm=ihedfm, iddnfm=iddnfm,
483
483
  extension=['oc','hds','ddn','cbc'],
484
484
  unitnumber=unitnumber, words=words, compact=compact,
@@ -72,7 +72,9 @@ class ModflowPar(object):
72
72
  try:
73
73
  self.zone = ModflowZon.load(zone.filename, model,
74
74
  ext_unit_dict=ext_unit_dict)
75
- sys.stdout.write(' {} package load...success\n'.format(self.zone.name[0]))
75
+ if model.verbose:
76
+ sys.stdout.write(' {} package load...success\n'\
77
+ .format(self.zone.name[0]))
76
78
  ext_unit_dict.pop(zone_key)
77
79
  model.remove_package("ZONE")
78
80
  except BaseException as o:
@@ -115,7 +117,9 @@ class ModflowPar(object):
115
117
  try:
116
118
  self.mult = ModflowMlt.load(mult.filename, model,
117
119
  ext_unit_dict=ext_unit_dict)
118
- sys.stdout.write(' {} package load...success\n'.format(self.mult.name[0]))
120
+ if model.verbose:
121
+ sys.stdout.write(' {} package load...success\n'\
122
+ .format(self.mult.name[0]))
119
123
  ext_unit_dict.pop(mult_key)
120
124
  model.remove_package("MULT")
121
125
  except BaseException as o:
@@ -160,7 +164,9 @@ class ModflowPar(object):
160
164
  try:
161
165
  self.pval = ModflowPval.load(pval.filename, model,
162
166
  ext_unit_dict=ext_unit_dict)
163
- sys.stdout.write(' {} package load...success\n'.format(self.pval.name[0]))
167
+ if model.verbose:
168
+ sys.stdout.write(' {} package load...success\n'\
169
+ .format(self.pval.name[0]))
164
170
  ext_unit_dict.pop(pval_key)
165
171
  model.remove_package("PVAL")
166
172
  except BaseException as o:
@@ -196,7 +202,7 @@ class ModflowPar(object):
196
202
 
197
203
 
198
204
  """
199
- #--read parameter data
205
+ # read parameter data
200
206
  if npar > 0:
201
207
  parm_dict = {}
202
208
  par_types = []
@@ -222,13 +228,13 @@ class ModflowPar(object):
222
228
  for iv in t[3:]:
223
229
  try:
224
230
  iz = int(np.int(iv))
225
- if iz > 0:
231
+ if iz != 0:
226
232
  iarr.append(iz)
227
233
  except:
228
234
  break
229
235
 
230
236
  clusters.append([lay, mltarr, zonarr, iarr])
231
- #--add parnam to parm_dict
237
+ # add parnam to parm_dict
232
238
  parm_dict[parnam] = {'partyp':partyp, 'parval':parval, 'nclu':nclu, 'clusters':clusters}
233
239
 
234
240
  return par_types, parm_dict
@@ -306,14 +312,14 @@ class ModflowPar(object):
306
312
  else:
307
313
  mult_save = np.copy(mult)
308
314
  za = model.mfpar.zone.zone_dict[zonarr.lower()][:, :]
309
- #--build a multiplier for all of the izones
315
+ # build a multiplier for all of the izones
310
316
  mult = np.zeros(shape, dtype=dtype)
311
317
  for iz in izones:
312
318
  filtarr = za == iz
313
319
  mult[filtarr] += np.copy(mult_save[filtarr])
314
- #--calculate parameter value for this cluster
320
+ # calculate parameter value for this cluster
315
321
  cluster_data = pv * mult
316
- #--add data
322
+ # add data
317
323
  data += cluster_data
318
324
 
319
325
  return data
@@ -73,7 +73,7 @@ class ModflowParBc(object):
73
73
 
74
74
  """
75
75
  nitems = len(dt.names)
76
- #--read parameter data
76
+ # read parameter data
77
77
  if npar > 0:
78
78
  bc_parms = {}
79
79
  for idx in range(npar):
@@ -97,7 +97,7 @@ class ModflowParBc(object):
97
97
  timeVarying = True
98
98
  pinst = {}
99
99
  for inst in range(numinst):
100
- #--read instance name
100
+ # read instance name
101
101
  if timeVarying:
102
102
  line = f.readline()
103
103
  t = line.strip().split()
@@ -112,7 +112,7 @@ class ModflowParBc(object):
112
112
  for jdx in range(nitems):
113
113
  #if jdx < 3:
114
114
  if issubclass(dt[jdx].type, np.integer):
115
- #--conversion to zero-based occurs in package load method in mbase.
115
+ # conversion to zero-based occurs in package load method in mbase.
116
116
  bnd.append(int(t[jdx]))
117
117
  else:
118
118
  bnd.append(float(t[jdx]))
@@ -149,7 +149,7 @@ class ModflowParBc(object):
149
149
 
150
150
 
151
151
  """
152
- #--read parameter data
152
+ # read parameter data
153
153
  if npar > 0:
154
154
  bc_parms = {}
155
155
  for idx in range(npar):
@@ -169,7 +169,7 @@ class ModflowParBc(object):
169
169
  timeVarying = True
170
170
  pinst = {}
171
171
  for inst in range(numinst):
172
- #--read instance name
172
+ # read instance name
173
173
  if timeVarying:
174
174
  line = f.readline()
175
175
  t = line.strip().split()
@@ -261,12 +261,12 @@ class ModflowParBc(object):
261
261
  else:
262
262
  mult_save = np.copy(mult)
263
263
  za = model.mfpar.zone.zone_dict[zonarr.lower()][:, :]
264
- #--build a multiplier for all of the izones
264
+ # build a multiplier for all of the izones
265
265
  mult = np.zeros(shape, dtype=dtype)
266
266
  for iz in izones:
267
267
  filtarr = za == iz
268
268
  mult[filtarr] += np.copy(mult_save[filtarr])
269
- #--calculate parameter value for this instance
269
+ # calculate parameter value for this instance
270
270
  t = pv * mult
271
271
  data += t
272
272
 
@@ -242,10 +242,10 @@ class ModflowPcg(Package):
242
242
  if damp < 0.:
243
243
  dampt = float(line[70:80].strip())
244
244
 
245
- #--close the open file
245
+ # close the open file
246
246
  f.close()
247
247
 
248
- #--create instance of pcg class
248
+ # create instance of pcg class
249
249
  pcg = ModflowPcg(model, mxiter=mxiter, iter1=iter1, npcond=npcond, ihcofadd=ihcofadd,\
250
250
  hclose=hclose, rclose=rclose, relax=relax, nbpol=nbpol,\
251
251
  iprpcg=iprpcg, mutpcg=mutpcg, damp=damp, dampt=dampt)
@@ -45,10 +45,10 @@ class ModflowPcgn(Package):
45
45
  self.mcnvg = mcnvg
46
46
  self.rate_c = rate_c
47
47
  self.ipunit = ipunit
48
- #--error trapping
48
+ # error trapping
49
49
  if self.ifill < 0 or self.ifill > 1:
50
50
  raise TypeError('PCGN: ifill must be 0 or 1 - an ifill value of {0} was specified'.format( self.ifill ))
51
- #--add package
51
+ # add package
52
52
  self.parent.add_package(self)
53
53
 
54
54
 
@@ -111,7 +111,7 @@ class ModflowPcgn(Package):
111
111
 
112
112
  print(' Warning: load method not completed. default pcgn object created.')
113
113
 
114
- #--close the open file
114
+ # close the open file
115
115
  f.close()
116
116
 
117
117
  pcgn = ModflowPcgn(model)
@@ -201,7 +201,7 @@ class ModflowPks(Package):
201
201
 
202
202
  print(' Warning: load method not completed. default pks object created.')
203
203
 
204
- #--close the open file
204
+ # close the open file
205
205
  f.close()
206
206
 
207
207
  pks = ModflowPks(model)
@@ -78,10 +78,10 @@ class ModflowRch(Package):
78
78
  self.nrchop = nrchop
79
79
  self.ipakcb = ipakcb
80
80
  self.rech = transient_2d(model, (nrow, ncol), np.float32,
81
- rech, name = "rech_")
81
+ rech, name = 'rech_')
82
82
  if self.nrchop == 2:
83
83
  self.irch = transient_2d(model, (nrow, ncol), np.int,
84
- irch+1, name = "irch_") # irch+1, as irch is zero based
84
+ irch+1, name = 'irch_') # irch+1, as irch is zero based
85
85
  else:
86
86
  self.irch = None
87
87
  self.np = 0
@@ -111,7 +111,7 @@ class ModflowRch(Package):
111
111
  inirch, file_entry_irch = self.irch.get_kper_entry(kper)
112
112
  else:
113
113
  inirch = -1
114
- f_rch.write('{0:10d}{1:10d} # {2:s}\n'.format(inrech,
114
+ f_rch.write('{0:10d}{1:10d} # {2:s}\n'.format(inrech,
115
115
  inirch, "Stress period " + str(kper + 1)))
116
116
  if (inrech >= 0):
117
117
  f_rch.write(file_entry_rech)
@@ -185,7 +185,7 @@ class ModflowRch(Package):
185
185
  except:
186
186
  pass
187
187
 
188
- #--dataset 3 and 4 - parameters data
188
+ # dataset 3 and 4 - parameters data
189
189
  pak_parms = None
190
190
  if npar > 0:
191
191
  pak_parms = mfparbc.loadarray(f, npar, model.verbose)
@@ -80,9 +80,10 @@ class ModflowRiv(Package):
80
80
 
81
81
  >>> import flopy
82
82
  >>> m = flopy.modflow.Modflow()
83
- >>> lrcd = [[[2, 3, 4, 15.6, 1050., -4]]] #this river boundary will be
84
- >>> #applied to all stress periods
85
- >>> riv = flopy.modflow.ModflowRiv(m, layer_row_column_data=lrcd)
83
+ >>> lrcd = {}
84
+ >>> lrcd[0] = [[2, 3, 4, 15.6, 1050., -4]] #this river boundary will be
85
+ >>> #applied to all stress periods
86
+ >>> riv = flopy.modflow.ModflowRiv(m, stress_period_data=lrcd)
86
87
 
87
88
  """
88
89
 
@@ -106,7 +107,8 @@ class ModflowRiv(Package):
106
107
  self.dtype = dtype
107
108
  else:
108
109
  self.dtype = self.get_default_dtype(structured=self.parent.structured)
109
- self.stress_period_data = mflist(model, self.dtype, stress_period_data)
110
+ #self.stress_period_data = mflist(model, self.dtype, stress_period_data)
111
+ self.stress_period_data = mflist(self, stress_period_data)
110
112
  self.parent.add_package(self)
111
113
 
112
114
  def __repr__(self):
@@ -84,7 +84,7 @@ class ModflowSip(Package):
84
84
  Write the package input file.
85
85
 
86
86
  """
87
- #--Open file for writing
87
+ # Open file for writing
88
88
  f = open(self.fn_path, 'w')
89
89
  f.write('{:10d}{:10d}\n'.format(self.mxiter, self.nparm))
90
90
  f.write('{:10.3f}{:10.3f}{:10d}{:10.3f}{:10d}\n'.format(self.accl, self.hclose, self.ipcalc, self.wseed, self.iprsip))
@@ -132,7 +132,7 @@ class ModflowSip(Package):
132
132
 
133
133
  print(' Warning: load method not completed. default sip object created.')
134
134
 
135
- #--close the open file
135
+ # close the open file
136
136
  f.close()
137
137
 
138
138
  sip = ModflowSip(model)
@@ -72,11 +72,11 @@ class ModflowSor(Package):
72
72
 
73
73
  print(' Warning: load method not completed. default sor object created.')
74
74
 
75
- #--close the open file
75
+ # close the open file
76
76
  f.close()
77
77
 
78
- #--create sor object
78
+ # create sor object
79
79
  sor = ModflowSor(model)
80
80
 
81
- #--return sor object
81
+ # return sor object
82
82
  return sor
@@ -190,7 +190,7 @@ class ModflowSwi2(Package):
190
190
  nrow, ncol, nlay, nper = self.parent.nrow_ncol_nlay_nper
191
191
  self.heading = '# Salt Water Intrusion (SWI2) package file for MODFLOW-2005, generated by Flopy.'
192
192
 
193
- #--options
193
+ # options
194
194
  self.fsssopt, self.adaptive = False, False
195
195
  if isinstance(options, list):
196
196
  if len(options) < 1:
@@ -249,22 +249,22 @@ class ModflowSwi2(Package):
249
249
  f = open(self.fn_path, 'w')
250
250
  # First line: heading
251
251
  f.write('{}\n'.format(self.heading)) # Writing heading not allowed in SWI???
252
- #--write dataset 1
253
- f.write('#--Dataset 1\n')
252
+ # write dataset 1
253
+ f.write('# Dataset 1\n')
254
254
  f.write(
255
255
  '{:10d}{:10d}{:10d}{:10d}{:10d}{:10d}'.format(self.nsrf, self.istrat, self.nobs, self.iswizt, self.iswibd,
256
256
  self.iswiobs))
257
- #--write SWI2 options
257
+ # write SWI2 options
258
258
  if self.options != None:
259
259
  for o in self.options:
260
260
  f.write(' {}'.format(o))
261
261
  f.write('\n')
262
- #--write dataset 2a
263
- f.write('#--Dataset 2a\n')
262
+ # write dataset 2a
263
+ f.write('# Dataset 2a\n')
264
264
  f.write('{:10d}{:10d}{:10d}\n'.format(self.nsolver, self.iprsol, self.mutsol))
265
- #--write dataset 2b
265
+ # write dataset 2b
266
266
  if self.nsolver == 2:
267
- f.write('#--Dataset 2b\n')
267
+ f.write('# Dataset 2b\n')
268
268
  f.write('{:10d}'.format(self.solver2params['mxiter']))
269
269
  f.write('{:10d}'.format(self.solver2params['iter1']))
270
270
  f.write('{:10d}'.format(self.solver2params['npcond']))
@@ -274,33 +274,33 @@ class ModflowSwi2(Package):
274
274
  f.write('{:10d}'.format(self.solver2params['nbpol']))
275
275
  f.write('{:14.6g}'.format(self.solver2params['damp']))
276
276
  f.write('{:14.6g}\n'.format(self.solver2params['dampt']))
277
- #--write dataset 3a
278
- f.write('#--Dataset 3a\n')
277
+ # write dataset 3a
278
+ f.write('# Dataset 3a\n')
279
279
  f.write('{:14.6g}{:14.6g}'.format(self.toeslope, self.tipslope))
280
280
  if self.alpha is not None:
281
281
  f.write('{:14.6g}{:14.6g}'.format(self.alpha, self.beta))
282
282
  f.write('\n')
283
- #--write dataset 3b
283
+ # write dataset 3b
284
284
  if self.adaptive is True:
285
- f.write('#--Dataset 3b\n')
285
+ f.write('# Dataset 3b\n')
286
286
  f.write('{:10d}{:10d}{:14.6g}\n'.format(self.nadptmx, self.nadptmn, self.adptfct))
287
- #--write dataset 4
288
- f.write('#--Dataset 4\n')
287
+ # write dataset 4
288
+ f.write('# Dataset 4\n')
289
289
  f.write(self.nu.get_file_entry())
290
- #--write dataset 5
291
- f.write('#--Dataset 5\n')
290
+ # write dataset 5
291
+ f.write('# Dataset 5\n')
292
292
  for isur in range(self.nsrf):
293
293
  for ilay in range(nlay):
294
294
  f.write(self.zeta[isur][ilay].get_file_entry())
295
- #--write dataset 6
296
- f.write('#--Dataset 6\n')
295
+ # write dataset 6
296
+ f.write('# Dataset 6\n')
297
297
  f.write(self.ssz.get_file_entry())
298
- #--write dataset 7
299
- f.write('#--Dataset 7\n')
298
+ # write dataset 7
299
+ f.write('# Dataset 7\n')
300
300
  f.write(self.isource.get_file_entry())
301
- #--write dataset 8
301
+ # write dataset 8
302
302
  if self.nobs > 0:
303
- f.write('#--Dataset 8\n')
303
+ f.write('# Dataset 8\n')
304
304
  for i in range(self.nobs):
305
305
  #f.write(self.obsnam[i] + 3 * '%10i' % self.obslrc + '\n')
306
306
  f.write('{} '.format(self.obsnam[i]))
@@ -308,7 +308,7 @@ class ModflowSwi2(Package):
308
308
  f.write('{:10d}'.format(v))
309
309
  f.write('\n')
310
310
 
311
- #--close swi2 file
311
+ # close swi2 file
312
312
  f.close()
313
313
 
314
314
 
@@ -386,7 +386,7 @@ class ModflowSwi2(Package):
386
386
  if 'adaptive' in t[idx].lower():
387
387
  adaptive = True
388
388
 
389
- #--read dataset 2a
389
+ # read dataset 2a
390
390
  if model.verbose:
391
391
  sys.stdout.write(' loading swi2 dataset 2a\n')
392
392
  while True:
@@ -398,7 +398,7 @@ class ModflowSwi2(Package):
398
398
  iprsol = int(t[1])
399
399
  mutsol = int(t[2])
400
400
 
401
- #--read dataset 2b
401
+ # read dataset 2b
402
402
  solver2params = {}
403
403
  if nsolver == 2:
404
404
  if model.verbose:
@@ -418,7 +418,7 @@ class ModflowSwi2(Package):
418
418
  solver2params['damp'] = float(t[7])
419
419
  solver2params['dampt'] = float(t[8])
420
420
 
421
- #--read dataset 3a
421
+ # read dataset 3a
422
422
  if model.verbose:
423
423
  sys.stdout.write(' loading swi2 dataset 3a\n')
424
424
  while True:
@@ -437,7 +437,7 @@ class ModflowSwi2(Package):
437
437
  except:
438
438
  pass
439
439
 
440
- #--read dataset 3b
440
+ # read dataset 3b
441
441
  nadptmx, nadptmn, adptfct = None, None, None
442
442
  if adaptive:
443
443
  if model.verbose:
@@ -451,7 +451,7 @@ class ModflowSwi2(Package):
451
451
  nadptmn = int(t[1])
452
452
  adptfct = float(t[2])
453
453
 
454
- #--read dataset 4
454
+ # read dataset 4
455
455
  if model.verbose:
456
456
  print(' loading nu...')
457
457
  if istrat == 1:
@@ -468,7 +468,7 @@ class ModflowSwi2(Package):
468
468
  ext_unit_dict)
469
469
  nu = nu.array.reshape((nnu))
470
470
 
471
- #--read dataset 5
471
+ # read dataset 5
472
472
  if model.verbose:
473
473
  print(' loading initial zeta surfaces...')
474
474
  while True:
@@ -483,7 +483,7 @@ class ModflowSwi2(Package):
483
483
  zeta.append(util_3d.load(f, model, (nlay, nrow, ncol),
484
484
  np.float32, ctxt, ext_unit_dict))
485
485
 
486
- #--read dataset 6
486
+ # read dataset 6
487
487
  if model.verbose:
488
488
  print(' loading initial ssz...')
489
489
  while True:
@@ -495,7 +495,7 @@ class ModflowSwi2(Package):
495
495
  ssz = util_3d.load(f, model, (nlay, nrow, ncol), np.float32,
496
496
  'ssz', ext_unit_dict)
497
497
 
498
- #--read dataset 7
498
+ # read dataset 7
499
499
  if model.verbose:
500
500
  print(' loading initial isource...')
501
501
  while True:
@@ -507,7 +507,7 @@ class ModflowSwi2(Package):
507
507
  isource = util_3d.load(f, model, (nlay, nrow, ncol), np.int,
508
508
  'isource', ext_unit_dict)
509
509
 
510
- #--read dataset 8
510
+ # read dataset 8
511
511
  obsname = []
512
512
  obslrc = []
513
513
  if nobs > 0:
@@ -531,7 +531,7 @@ class ModflowSwi2(Package):
531
531
  obslrc.append([kk, ii, jj])
532
532
  nobs = len(obsname)
533
533
 
534
- #--create swi2 instance
534
+ # create swi2 instance
535
535
  swi2 = ModflowSwi2(model, nsrf=nsrf, istrat=istrat, nobs=nobs, iswizt=iswizt, iswibd=iswibd,
536
536
  iswiobs=iswiobs,options=options,
537
537
  nsolver=nsolver, iprsol=iprsol, mutsol=mutsol, solver2params=solver2params,
@@ -540,5 +540,5 @@ class ModflowSwi2(Package):
540
540
  nu=nu, zeta=zeta, ssz=ssz, isource=isource,
541
541
  obsnam=obsname, obslrc=obslrc)
542
542
 
543
- #--return swi2 instance
543
+ # return swi2 instance
544
544
  return swi2
@@ -119,18 +119,18 @@ class ModflowSwr1(Package):
119
119
  if model.verbose:
120
120
  sys.stdout.write('loading swr1 process file...\n')
121
121
 
122
- #--todo: everything
122
+ # todo: everything
123
123
  if not hasattr(f, 'read'):
124
124
  filename = f
125
125
  f = open(filename, 'r')
126
126
 
127
127
  print(' Warning: load method not completed. default swr1 object created.')
128
128
 
129
- #--close open file
129
+ # close open file
130
130
  f.close()
131
131
 
132
- #--create swr1 object instance
132
+ # create swr1 object instance
133
133
  swr1 = ModflowSwr1(model)
134
134
 
135
- #--return swr object
135
+ # return swr object
136
136
  return swr1
@@ -170,12 +170,12 @@ class ModflowUpw(Package):
170
170
  if iwetdry > 0:
171
171
  raise Exception('LAYWET should be 0 for UPW')
172
172
 
173
- #--get parameters
173
+ # get parameters
174
174
  par_types = []
175
175
  if npupw > 0:
176
176
  par_types, parm_dict = mfpar.load(f, nplpf, model.verbose)
177
177
 
178
- #--get arrays
178
+ # get arrays
179
179
  transient = not model.get_package('DIS').steady.all()
180
180
  hk = [0] * nlay
181
181
  hani = [0] * nlay
@@ -243,14 +243,14 @@ class ModflowUpw(Package):
243
243
  t = mfpar.parameter_fill(model, (nrow, ncol), 'vkcb', parm_dict, findlayer=k)
244
244
  vkcb[k] = t
245
245
 
246
- #--create upw object
246
+ # create upw object
247
247
  upw = ModflowUpw(model, iupwcb=iupwcb, iphdry=iphdry, hdry=hdry,
248
248
  noparcheck=noparcheck,
249
249
  laytyp=laytyp, layavg=layavg, chani=chani,
250
250
  layvka=layvka, laywet=laywet,
251
251
  hk=hk, hani=hani, vka=vka, ss=ss, sy=sy, vkcb=vkcb)
252
252
 
253
- #--return upw object
253
+ # return upw object
254
254
  return upw
255
255
 
256
256
  def plot(self):
@@ -460,16 +460,16 @@ class ModflowUzf1(Package):
460
460
  line = f.readline()
461
461
  if line[0] != '#':
462
462
  break
463
- #--dataset 1
463
+ # dataset 1
464
464
 
465
- #--todo: everything
465
+ # todo: everything
466
466
  print(' Warning: load method not completed. default uzf object created.')
467
467
 
468
- #--close the file
468
+ # close the file
469
469
  f.close()
470
470
 
471
- #--create uzf object
471
+ # create uzf object
472
472
  uzf = ModflowUzf1(model)
473
473
 
474
- #--return default uzf object
474
+ # return default uzf object
475
475
  return uzf
@@ -88,7 +88,6 @@ class ModflowWel(Package):
88
88
  >>> import flopy
89
89
  >>> m = flopy.modflow.Modflow()
90
90
  >>> lrcq = {0:[[2, 3, 4, -100.]], 1:[[2, 3, 4, -100.]]}
91
- >>> #periods
92
91
  >>> wel = flopy.modflow.ModflowWel(m, stress_period_data=lrcq)
93
92
 
94
93
  """
@@ -122,7 +121,7 @@ class ModflowWel(Package):
122
121
  self.dtype = dtype
123
122
  else:
124
123
  self.dtype = self.get_default_dtype(structured=self.parent.structured)
125
- self.stress_period_data = mflist(model, self.dtype, stress_period_data)
124
+ self.stress_period_data = mflist(self, stress_period_data)
126
125
 
127
126
  def __repr__(self):
128
127
  return 'Well package class'
@@ -151,10 +151,10 @@ class ModflowZon(Package):
151
151
  zonnam = t[0].lower()
152
152
  if model.verbose:
153
153
  sys.stdout.write(' reading data for "{:<10s}" zone\n'.format(zonnam))
154
- #--load data
154
+ # load data
155
155
  t = util_2d.load(f, model, (nrow, ncol), np.int, zonnam,
156
156
  ext_unit_dict)
157
- #--add unit number to list of external files in ext_unit_dict to remove.
157
+ # add unit number to list of external files in ext_unit_dict to remove.
158
158
  if t.locat is not None:
159
159
  model.add_pop_key_list(t.locat)
160
160
  zone_dict[zonnam] = t