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

Starting a new data model from ex-gwf-csub-p04 crashes Model Viewer #20

Open
scharlton2 opened this issue Feb 23, 2022 · 2 comments
Open

Comments

@scharlton2
Copy link
Collaborator

No description provided.

@scharlton2
Copy link
Collaborator Author

This still needs work the CSUB model features aren't handled correctly. Temporarily fixed by excluding CSUB features within the Modflow6DataSource::IsModelFeature function.

@scharlton2 scharlton2 reopened this Mar 15, 2022
@scharlton2
Copy link
Collaborator Author

The list of Model Features (from the 'Model Features Toolbox') is created by iterating over the budget file. For each 'Flowtype' (TEXT) where (IMETH=6) and doesn't contain any of the following substrings ("MVR", "UZF-GWD", "UZF-GWET", "LAK", "FLOW-JA-FACE", "DATA-SPDIS") it adds TXT2ID2 to the list of model features.

The problem in example ex-gwf-csub-p04 arises when it loads ex-gwf-csub-p04.cbc and both Flowtypes "CSUB-ELASTIC" and "CSUB-INELASTIC" have TXT2ID2="CSUB". This causes the m_ModelFeatureArraySize to be too small to hold both the elastic and inelastic cell ids.

I created a python file that simulates what model viewer does:
CellBudgetFile2.py

modelviewer-mf6 1.0.0 fixed it by adding CSUB to the list of ignored flowTypes:
CellBudgetFile2.py:L29-L31

I could fix modelviewer-mf6 using the special cases:
CellBudgetFile2.py:L45-L52

But sometimes the TXT2ID2 has an integer appended to the Flowtype(TEXT) in TXT2ID2 for example
from ex-gwf-csub-p04.cbc:

TEXT = '             RCH'   TXT2ID2 = 'RCH_0           '

while ex-gwf-disvmesh.cbc doesn't

TEXT = '             RCH'   TXT2ID2 = 'RCH             '

I don't know if this occurs in the "CSUB-ELASTIC" or "CSUB-INELASTIC" flowtypes(imeth==6). That's what the two assertions on lines 48 and 51 are verifying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant