bmi icon indicating copy to clipboard operation
bmi copied to clipboard

Inconsistency in `get_grid_size` for unstructured grids

Open BSchilperoort opened this issue 2 years ago • 3 comments

In the model grid overview for unstructured grids, the function get_grid_size is not listed.

However, in the SIDL overview it states the following:

This function is needed for every grid type.

The grid size is used for, among other things, the length of arrays returned by get_grid_x and get_grid_y for unstructured and structured quad grids.

Seeing as the functionality of get_grid_size for unstructured grids is identical to get_node_count I am not sure if it's actually required.

BSchilperoort avatar Oct 25 '23 08:10 BSchilperoort

@BSchilperoort Thank you for catching this! I think I'll make a note on this in the model grid overview--I don't want to change the main page of the docs without a release. When I write the PR, may I tag you on it for review and approval?

Seeing as the functionality of get_grid_size for unstructured grids is identical to get_node_count I am not sure if it's actually required.

We've thought about deprecating get_grid_size universally in favor of get_grid_node_count because of this.

mdpiper avatar Oct 25 '23 15:10 mdpiper

@BSchilperoort Also, if you have a recommendation for how to address this issue, I'd welcome it.

mdpiper avatar Oct 25 '23 18:10 mdpiper

When I write the PR, may I tag you on it for review and approval?

Yeah feel free to tag me.

We've thought about deprecating get_grid_size universally in favor of get_grid_node_count because of this.

This sounds like a good solution to me. It is more generic and will work for all grid types.

BSchilperoort avatar Oct 26 '23 12:10 BSchilperoort