Git Product home page Git Product logo

Comments (9)

bdestombe avatar bdestombe commented on May 30, 2024

Wouldn't it be better to depend on the plotting functions of flopy? Thus via #40 provide a nice way to get back from model_ds to the flopy environment. In that case, this issue can be closed.

from nlmod.

dbrakenhoff avatar dbrakenhoff commented on May 30, 2024

I think a lot of flopy's plotting utilities also accept a modelgrid object? So another method would be to build the modelgrid from model_ds, and pass that onto the plotting methods.

I think nlmod.mdims.mgrid.modelgrid_from_model_ds() can do this? And this object should have methods to obtain the vertices.

edit: wrong path to function

from nlmod.

bdestombe avatar bdestombe commented on May 30, 2024

Ah I didn't see that function. Thanks!

from nlmod.

bdestombe avatar bdestombe commented on May 30, 2024

@dbrakenhoff That function requires gridprops to be defined. Is there already a function that generates the gridprops from model_ds?

from nlmod.

dbrakenhoff avatar dbrakenhoff commented on May 30, 2024

Hmm, good point. The only method that does this I think, is nlmod.mdims.mgrid.create_vertex_grid() which supports caching, but constructs a completely new grid.

Another option would be to load the mf6 grid object (the .grb file). From flopy: grb = flopy.mf6.utils.MfGrdFile("flow.disv.grb", verbose=True).

Any of these options useful?

from nlmod.

dbrakenhoff avatar dbrakenhoff commented on May 30, 2024

Hmm, not sure if flopy has a method to convert to go from a modelgrid object to a gridprops dictionary... Shouldn't be too complicated, but it might make more sense to convert that method to use a modelgrid object instead of the much less commonly used gridprops dictionary?

from nlmod.

rubencalje avatar rubencalje commented on May 30, 2024

Hmm, not sure if flopy has a method to convert to go from a modelgrid object to a gridprops dictionary... Shouldn't be too complicated, but it might make more sense to convert that method to use a modelgrid object instead of the much less commonly used gridprops dictionary?

I agree, I think the modelgrid-object is a more commonly used object, that can be used to construct a disv-package or to plot model properties.

Is there a way to to save a modelgrid object to a grb-file in Flopy? It seems only MODFLOW is able to do this.

from nlmod.

rubencalje avatar rubencalje commented on May 30, 2024

I am working on adding information from a modelgrid to a model_ds and getting a modelgrid-object from a model_ds (without needing gridprops), will add it when I am finished.

from nlmod.

OnnoEbbens avatar OnnoEbbens commented on May 30, 2024

fixed by #53

from nlmod.

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.