Replies: 2 comments 1 reply
-
Actually, the comment line does matter. I removed the comment line (properly this time...) so that "UNSTRUCTURED" was the first line and the file was read successfully. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi Stu, #2177 should sort this out. Either wait for the next release or install flopy develop branch once (if) the PR is accepted. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to read in an unstructured grid using flopy.discretization.UnstructuredGrid.from_gridspec(file.gsf). Ithe GSF was generated using Algomesh and it is for a MODFLOW-USG model. However, flopy is returning the following error related to the header:
File ~\anaconda3\Lib\site-packages\flopy\discretization\unstructuredgrid.py:982, in UnstructuredGrid.from_gridspec(cls, file_path)
978 header = split_line()
979 if not (len(header) == 1 and header[0] == "UNSTRUCTURED") or (
980 len(header) == 2 and header == ["UNSTRUCTURED", "GWF"]
981 ):
--> 982 raise ValueError(f"Invalid GSF file, no header")
984 nnodes = int(split_line()[0])
985 verts_declared = int(split_line()[0])
ValueError: Invalid GSF file, no header
I have checked the gsf file and it does contain the specified header (after a # comment line). The error is generated with or without the comment line. Has anyone else had this issue, or is there a trick I am missing here?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions