Skip to content

get cell connection data from grb for disv grid. #1682

Closed Answered by jlarsen-usgs
RyanConway91 asked this question in Q&A
Discussion options

You must be logged in to vote

@RyanConway91

The cell connection information can be accessed and assembled using the ia and ja property methods on the MfGridFile object. Alternatively, you can get a modelgrid object from MfGrdFile and then use the .neighbors() method to get grid cell connections.

Example:

grb = MfGridFile("my_model.dis.grb")
modelgrid = grb.modelgrid

cell_connections = modelgrid.neighbors(0, 1, 2)  # cellid can be input as lay, row, col; lay, node; or node 

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@RyanConway91
Comment options

@jlarsen-usgs
Comment options

@langevin-usgs
Comment options

@RyanConway91
Comment options

Answer selected by langevin-usgs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants