Skip to content

Commit c8f1587

Browse files
mjrenomjreno
authored andcommitted
check crs attr
1 parent 9af21d3 commit c8f1587

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

flopy/mf6/mfmodel.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1358,7 +1358,10 @@ def write(
13581358
if write_netcdf:
13591359
# set data storage to write ascii for netcdf
13601360
pp._set_netcdf_storage()
1361-
if pp.package_type.startswith("dis"):
1361+
if (
1362+
pp.package_type.startswith("dis")
1363+
and hasattr(pp, "crs")
1364+
):
13621365
crs = pp.crs.get_data()
13631366
if crs is not None and self.modelgrid.crs is None:
13641367
self.modelgrid.crs = crs[0][1]

flopy/utils/datautil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def reset_delimiter_used():
305305

306306
@staticmethod
307307
def split_data_line(line, external_file=False, delimiter_conf_length=15):
308-
no_split_keys = ['crs', 'wkt']
308+
no_split_keys = ["crs", "wkt"]
309309
if PyListUtil.line_num > delimiter_conf_length and PyListUtil.consistent_delim:
310310
# consistent delimiter has been found. continue using that
311311
# delimiter without doing further checks

0 commit comments

Comments
 (0)