Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support grids of rank > 3 #88

Open
mdpiper opened this issue Nov 9, 2021 · 3 comments · May be fixed by #99
Open

Support grids of rank > 3 #88

mdpiper opened this issue Nov 9, 2021 · 3 comments · May be fixed by #99
Milestone

Comments

@mdpiper
Copy link
Member

mdpiper commented Nov 9, 2021

Currently, to obtain the nodes of rectilinear, structured quadrilateral, and unstructured grids, the BMI has functions

int get_grid_x(in int grid, in array<double, 1> x);
int get_grid_y(in int grid, in array<double, 1> y);
int get_grid_z(in int grid, in array<double, 1> z);

representing grids of up to three dimensions.

The BMI should also support grids of these types with rank greater than three.

@mdpiper
Copy link
Member Author

mdpiper commented Nov 9, 2021

A recent use case: when writing the ERA5 data component, @gantian127 found that the dataset uses 5 dimensions: three spatial + time + an ensemble number.

@mdpiper
Copy link
Member Author

mdpiper commented Nov 9, 2021

In #87 (comment), @mcflugen suggests

int get_grid_node_coordinates(in int grid, in int dim, in array<double, 1> coordinates)

Building on this. we could swap the dim parameter for a name parameter, which might be more readable (e.g., name = "x" or name = "x1" for the first coordinate dimension).

@mdpiper
Copy link
Member Author

mdpiper commented Nov 9, 2021

If we make a new function (or functions), it may break backward compatibility with BMI 2.

@mdpiper mdpiper added this to the BMI 3.0 milestone Nov 9, 2021
@mdpiper mdpiper changed the title Handle grids of rank > 3 Support grids of rank > 3 Nov 9, 2021
@mdpiper mdpiper linked a pull request Mar 17, 2022 that will close this issue
@mdpiper mdpiper modified the milestones: BMI 3.0, BMI 2.2 Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant