Code Monkey home page Code Monkey logo

Comments (2)

scharlton2 avatar scharlton2 commented on July 20, 2024

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

from modelviewer-mf6.

scharlton2 avatar scharlton2 commented on July 20, 2024

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.

from modelviewer-mf6.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.