Sai
Sai

Reputation: 11

How to find Index3 of all the fine grid cells associated with a corresponding coarse grid cell?

How to find Index3 of all the fine grid cells associated with a corresponding coarse grid cell?

Terminology used:

Fine Grid : Assume there is a grid with dimensions 10 x 10 x 2

Coarse Grid : This is the coarser version of fine grid which could be of dimensions 5 x 5 x 1.

So for a given grid cell in Coarse Grid, can we find the corresponding fine grid cells associated with it. Is there a ready-made method available or if we need to make our own method, which service should i be using.

For any given Coarse grid cell, we can find the 8 corner points, and now my goal is to find all the fine grid cells which are within the volume made up by those 8 corner points.

Here we are talking about a single grid cell, not entire grid, just to avoid confusion I am mentioning it. This question is for developers who work with Ocean API.

Upvotes: 1

Views: 122

Answers (1)

Torbjørn Vik
Torbjørn Vik

Reputation: 58

Slb.Ocean.Petrel.Grid has a couple of functions that might help you...

GetPointAtCell
GetCellAtPoint

By using GetPointAtCell on the corner points of your coarse grid you can get the positions of each corner of your cell. Then, you can pass these points into GetCellAtPoint on your fine grid and retrieve the fine-cell-ijk indices for the XYZ corner points you got from your coarse grid. Depending on whether you only want fine cells that are entirely inside the coarse cell or not, you may have to massage the indices a bit, but you get the idea.

(Thanks to Thomas Gehrmann for helping me with the answer)

Upvotes: 2

Related Questions