diff --git a/examples/data/mf6/test001a_Tharmonic/flow15.tdis b/examples/data/mf6/test001a_Tharmonic/flow15.tdis index bccfdc368b..b259bf9ced 100644 --- a/examples/data/mf6/test001a_Tharmonic/flow15.tdis +++ b/examples/data/mf6/test001a_Tharmonic/flow15.tdis @@ -9,5 +9,5 @@ BEGIN Dimensions END Dimensions BEGIN PERIODDATA - 1.00000000 1 1.00000000 Items: PERLEN NSTP TSMULT + 1.00000000,1,1.00000000 Items: PERLEN NSTP TSMULT END PERIODDATA diff --git a/examples/data/mf6/test001a_Tharmonic/flow15_constant.chd b/examples/data/mf6/test001a_Tharmonic/flow15_constant.chd index 68bce24d54..56c4b56aa4 100644 --- a/examples/data/mf6/test001a_Tharmonic/flow15_constant.chd +++ b/examples/data/mf6/test001a_Tharmonic/flow15_constant.chd @@ -11,6 +11,6 @@ BEGIN Dimensions END Dimensions BEGIN Period 1 - 1 1 1 10.0000000 + 1 1 1 1D1 1 1 10 0.0000000 END Period diff --git a/flopy/mf6/data/mfdatautil.py b/flopy/mf6/data/mfdatautil.py index a1e00ad97c..ab716b6435 100644 --- a/flopy/mf6/data/mfdatautil.py +++ b/flopy/mf6/data/mfdatautil.py @@ -78,6 +78,7 @@ def convert_data(data, data_dimensions, data_type, data_item=None, sub_amt=1): if isinstance(data, str): # fix any scientific formatting that python can't handle data = data.replace("d", "e") + data = data.replace("D", "e") return float(data) except (ValueError, TypeError): try: diff --git a/flopy/utils/datautil.py b/flopy/utils/datautil.py index 8575d7e792..4e594befe1 100644 --- a/flopy/utils/datautil.py +++ b/flopy/utils/datautil.py @@ -368,11 +368,21 @@ def split_data_line(line, external_file=False, delimiter_conf_length=15): max_split_type = delimiter max_split_list = alt_split + if max_split_type is None and max_split_size > 0: + split_first = max_split_list[0].strip().split(",") + if len(split_first) > 1: + max_split_list = split_first + max_split_list[1:] + max_split_size = len(max_split_list) + max_split_type = "combo" + if max_split_type is not None and max_split_size > 1: clean_line = max_split_list if PyListUtil.line_num == 0: PyListUtil.delimiter_used = max_split_type - elif PyListUtil.delimiter_used != max_split_type: + elif ( + PyListUtil.delimiter_used != max_split_type + or max_split_type == "combo" + ): PyListUtil.consistent_delim = False if max_split_size > 1: PyListUtil.line_num += 1