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
8 changes: 4 additions & 4 deletions flopy/modflow/mfsfr2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2829,9 +2829,9 @@ def _fmt_string(array, float_format='{!s}'):
elif vtype == 'o':
fmt_string += '{} '
elif vtype == 's':
raise Exception("MfList error: '\str\' type found it dtype." + \
raise Exception("MfList error: 'str' type found in dtype." + \
" This gives unpredictable results when " + \
"recarray to file - change to \'object\' type")
"recarray to file - change to 'object' type")
else:
raise Exception("MfList.fmt_string error: unknown vtype " + \
"in dtype:" + vtype)
Expand All @@ -2851,9 +2851,9 @@ def _fmt_string_list(array, float_format='{!s}'):
elif (vtype == 'o'):
fmt_string += ['{}']
elif (vtype == 's'):
raise Exception("MfList error: '\str\' type found it dtype." + \
raise Exception("MfList error: 'str' type found in dtype." + \
" This gives unpredictable results when " + \
"recarray to file - change to \'object\' type")
"recarray to file - change to 'object' type")
else:
raise Exception("MfList.fmt_string error: unknown vtype " + \
"in dtype:" + vtype)
Expand Down
8 changes: 4 additions & 4 deletions flopy/mt3d/mtlkt.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,10 @@ def load(f, model, nlak=None, nper=None, ncomp=None, ext_unit_dict=None):
--------

>>> import flopy
>>> import os
>>> os.chdir(r'C:\temp\LKT')
>>> mt = flopy.mt3d.Mt3dms.load('lkt_mt.nam', exe_name = 'mt3d-usgs_1.0.00.exe',
>>> load_only='btn')
>>> datadir = 'examples/data/mt3d_test/mfnwt_mt3dusgs/lkt'
>>> mt = flopy.mt3d.Mt3dms.load(
... 'lkt_mt.nam', exe_name='mt3d-usgs_1.0.00.exe',
... model_ws=datadir, load_only='btn')
>>> lkt = flopy.mt3d.Mt3dLkt.load('test.lkt', mt)

"""
Expand Down
25 changes: 12 additions & 13 deletions flopy/mt3d/mtsft.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,19 +167,18 @@ class Mt3dSft(Package):
Examples
--------

>>> mf = flopy.modflow.Modflow.load('CrnkNic_mf.nam',
>>> load_only=['dis', 'bas6'])
>>> import flopy
>>> datadir = 'examples/data/mt3d_test/mfnwt_mt3dusgs/sft_crnkNic'
>>> mf = flopy.modflow.Modflow.load(
... 'CrnkNic.nam', model_ws=datadir, load_only=['dis', 'bas6'])
>>> sfr = flopy.modflow.ModflowSfr2.load('CrnkNic.sfr2', mf)
>>> chk = sfr.check()

>>> # initialize an MT3D-USGS model
>>> mt = flopy.mt3d.Mt3dms.load('CrnkNic_mt.nam',
>>> exe_name = 'mt3d-usgs_1.0.00.exe',
>>> model_ws = r'.\CrnkNic',
>>> load_only='btn')
>>> mt = flopy.mt3d.Mt3dms.load(
... 'CrnkNic.mtnam', exe_name='mt3d-usgs_1.0.00.exe',
>>> model_ws=datadir, load_only='btn')
>>> sft = flopy.mt3d.Mt3dSft.load(mt, 'CrnkNic.sft')


"""

def __init__(self, model, nsfinit=0, mxsfbc=0, icbcsf=0, ioutobs=0,
Expand Down Expand Up @@ -327,12 +326,12 @@ def write_file(self):

Examples
--------
>>> mt = flopy.mt3d.Mt3dms.load('CrnkNic_mt.nam',
>>> exe_name = 'mt3d-usgs_1.0.00.exe',
>>> model_ws = r'C:\EDM_LT\GitHub\mt3d-usgs\autotest\temp\CrnkNic',
>>> verbose=True)
>>> import flopy
>>> datadir = .examples/data/mt3d_test/mfnwt_mt3dusgs/sft_crnkNic
>>> mt = flopy.mt3d.Mt3dms.load(
... 'CrnkNic.mtnam', exe_name='mt3d-usgs_1.0.00.exe',
... model_ws=datadir, verbose=True)
>>> mt.name = 'CrnkNic_rewrite'
>>>
>>> mt.sft.dispsf.fmtin = '(10F12.2)'
>>> mt.write_input()

Expand Down
8 changes: 4 additions & 4 deletions flopy/mt3d/mtuzt.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ class Mt3dUzt(Package):
--------

>>> import flopy
>>> import os
>>> mt = flopy.mt3d.Mt3dms.load('Keat_UZF_mt.nam',
... exe_name = 'mt3d-usgs_1.0.00.exe',
... model_ws = r'C:\temp\Keating_UZF', load_only='btn')
>>> datadir = 'examples/data/mt3d_test/mfnwt_mt3dusgs/keat_uzf'
>>> mt = flopy.mt3d.Mt3dms.load(
... 'Keat_UZF_mt.nam', exe_name='mt3d-usgs_1.0.00.exe',
... model_ws=datadir, load_only='btn')
>>> uzt = flopy.mt3d.Mt3dUzt('Keat_UZF.uzt', mt)

"""
Expand Down
4 changes: 2 additions & 2 deletions flopy/utils/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,9 +569,9 @@ def _fmt_string_list(array, float_format='{}'):
elif (vtype == 'o'):
fmt_string += ['{}']
elif (vtype == 's'):
raise Exception("MfList error: '\str\' type found it dtype." + \
raise Exception("MfList error: 'str' type found in dtype." + \
" This gives unpredictable results when " + \
"recarray to file - change to \'object\' type")
"recarray to file - change to 'object' type")
else:
raise Exception("MfList.fmt_string error: unknown vtype " + \
"in dtype:" + vtype)
Expand Down
4 changes: 2 additions & 2 deletions flopy/utils/flopy_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ def _fmt_string(array, float_format='{}'):
elif vtype == 'o':
fmt_string += '{} '
elif vtype == 's':
raise Exception("MfList error: '\str\' type found it dtype." + \
raise Exception("MfList error: 'str' type found in dtype." + \
" This gives unpredictable results when " + \
"recarray to file - change to \'object\' type")
"recarray to file - change to 'object' type")
else:
raise Exception("MfList.fmt_string error: unknown vtype " + \
"in dtype:" + vtype)
Expand Down
4 changes: 2 additions & 2 deletions flopy/utils/mtlistfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def _parse_gw(self, f, line):
break
def _parse_gw_line(self, line):
raw = line.lower().split(':')
item = raw[0].strip().strip('[\|]').replace(' ', '_')
item = raw[0].strip().strip(r'[\|]').replace(' ', '_')
idx_ival = 0
idx_oval = 1
if self.imm:
Expand Down Expand Up @@ -445,7 +445,7 @@ def _parse_sw(self, f, line):
def _parse_sw_line(self, line):
# print(line)
raw = line.strip().split('=')
citem = raw[0].strip().strip('[\|]').replace(" ", "_")
citem = raw[0].strip().strip(r'[\|]').replace(" ", "_")
cval = float(raw[1].split()[0])
if len(raw) < 3: # deal with flow error if written
fval = None
Expand Down