diff --git a/flopy/mf6/data/mfdatastorage.py b/flopy/mf6/data/mfdatastorage.py index 5441936ffb..86fc50e246 100644 --- a/flopy/mf6/data/mfdatastorage.py +++ b/flopy/mf6/data/mfdatastorage.py @@ -2012,6 +2012,7 @@ def external_to_internal( self._data_type, self.get_data_dimensions(layer), layer, + self.layered, read_file, )[0] if apply_mult and self.layer_storage[layer].factor is not None: @@ -2470,6 +2471,7 @@ def _build_full_data(self, apply_multiplier=False): np_data_type, self.get_data_dimensions(layer), layer, + self.layered, read_file, )[0] * mult diff --git a/flopy/mf6/data/mffileaccess.py b/flopy/mf6/data/mffileaccess.py index 237a8cba00..73f19f92b3 100644 --- a/flopy/mf6/data/mffileaccess.py +++ b/flopy/mf6/data/mffileaccess.py @@ -577,14 +577,17 @@ def read_text_data_from_file( data_type, data_dim, layer, + layered, fname=None, fd=None, - data_item=None, ): # determine line size line_size = None - if isinstance(data_dim, list): - line_size = data_dim[-1] + if layered: + # if the array is layered (meaning a control record for + # each layer), then limit line size to number of columns + if isinstance(data_dim, list): + line_size = data_dim[-1] # load variable data from file current_size = 0 if layer is None: @@ -894,6 +897,7 @@ def _load_layer( data_type, storage.get_data_dimensions(layer), layer, + storage.layered, fd=file_handle, ) except Exception as ex: