Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(MFFileAccessArray): read_text_data_from_file modified for non-layered #2183

Merged
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
2 changes: 2 additions & 0 deletions flopy/mf6/data/mfdatastorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
10 changes: 7 additions & 3 deletions flopy/mf6/data/mffileaccess.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -894,6 +897,7 @@ def _load_layer(
data_type,
storage.get_data_dimensions(layer),
layer,
storage.layered,
fd=file_handle,
)
except Exception as ex:
Expand Down
Loading