get cell connection data from grb for disv grid. #1682
-
I want to know my grid cell connections for a disv grid. When I load the grb file (MfGrdFile(grb_file)) I am not seeing any properties that give me the grid cell connections. Is this information in there somewhere in the grb class object? If so, how do I access? I am trying to recreate the 'targpestu' interpolator and need the cell connections to do the distance weighting. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
The cell connection information can be accessed and assembled using the 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 |
Beta Was this translation helpful? Give feedback.
@RyanConway91
The cell connection information can be accessed and assembled using the
ia
andja
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: