Skip to content

bug: Better error support for reading UCN file from modflow 6 #2784

Description

@hansonmcoombs

Describe the bug
I'm finally getting around to transitioning my workflows from mt3d to mf6 transport.

I expected loading the GWT concentration file to be supported by the flopy.utils.UcnFile, I now know that I was wrong and that it should be loaded by flopy.utils.HeadFile(path, text="concentration").

The error produced was NOT helpful : EOFError

To Reproduce

ucn_file = 'path/to/mf6/concentration.ucn'
flopy.utils.UcnFile(ucn_file)

Expected behavior
Raise a better error message when a user tries to read a mf6 transport concentration file:

e.g.,

'If this is a mf6.GWT file, please use flopy.utils.HeadFile(path, text="concentration") instead.'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions