Skip to content

read_from_cnf is untested and does not work #687

@mwtoews

Description

@mwtoews

While working on #686 there are several issues with read_from_cnf:

$ flake8 --select F821
./flopy/modflow/mfdis.py:602:32: F821 undefined name 'model'
./flopy/modflow/mfdis.py:604:32: F821 undefined name 'model'
./flopy/modflow/mfdis.py:606:31: F821 undefined name 'model'
./flopy/modflow/mfdis.py:619:32: F821 undefined name 'model'

this method is not tested anywhere, and appears to be untouched for the past 5 years. I see that it is used to create a ModflowDis object, perhaps like this?

import flopy
m = flopy.modflow.Modflow()
dis = flopy.modflow.ModflowDis(m)
dis.read_from_cnf('MT3D.CNF')

(this will raise "NameError: name 'model' is not defined")
Is this method needed? If so, what for? It should either be refractored (perhaps as a classmethod) or removed.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions