Skip to content

Commit 0f13628

Browse files
Merge branch 'modflowpy:develop' into develop
2 parents 05e22e9 + 5aaa5ff commit 0f13628

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

examples/data/mf6/test001a_Tharmonic/flow15.tdis

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ BEGIN Dimensions
99
END Dimensions
1010

1111
BEGIN PERIODDATA
12-
1.00000000 1 1.00000000 Items: PERLEN NSTP TSMULT
12+
1.00000000,1,1.00000000 Items: PERLEN NSTP TSMULT
1313
END PERIODDATA

examples/data/mf6/test001a_Tharmonic/flow15_constant.chd

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ BEGIN Dimensions
1111
END Dimensions
1212

1313
BEGIN Period 1
14-
1 1 1 10.0000000
14+
1 1 1 1D1
1515
1 1 10 0.0000000
1616
END Period

flopy/mf6/data/mfdatautil.py

+1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ def convert_data(data, data_dimensions, data_type, data_item=None, sub_amt=1):
157157
if isinstance(data, str):
158158
# fix any scientific formatting that python can't handle
159159
data = data.replace("d", "e")
160+
data = data.replace("D", "e")
160161
return float(data)
161162
except (ValueError, TypeError):
162163
try:

flopy/utils/datautil.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -368,11 +368,21 @@ def split_data_line(line, external_file=False, delimiter_conf_length=15):
368368
max_split_type = delimiter
369369
max_split_list = alt_split
370370

371+
if max_split_type is None and max_split_size > 0:
372+
split_first = max_split_list[0].strip().split(",")
373+
if len(split_first) > 1:
374+
max_split_list = split_first + max_split_list[1:]
375+
max_split_size = len(max_split_list)
376+
max_split_type = "combo"
377+
371378
if max_split_type is not None and max_split_size > 1:
372379
clean_line = max_split_list
373380
if PyListUtil.line_num == 0:
374381
PyListUtil.delimiter_used = max_split_type
375-
elif PyListUtil.delimiter_used != max_split_type:
382+
elif (
383+
PyListUtil.delimiter_used != max_split_type
384+
or max_split_type == "combo"
385+
):
376386
PyListUtil.consistent_delim = False
377387
if max_split_size > 1:
378388
PyListUtil.line_num += 1

0 commit comments

Comments
 (0)