-
Notifications
You must be signed in to change notification settings - Fork 17
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
Handle geospatial data in the BMI #80
Comments
Link to #11, which has a similar request. |
A suggestion for a new BMI function (in SIDL): int get_grid_projection(in int grid, out string name); where the output is a string with projection information in a standard format. Note that the BMI doesn't specify which standard to use for the output; that's left to the implementation. We can, however, make recommendations; e.g., OGC Well-Known Text (WKT) representation of coordinate reference systems, or whatever xarray handles. A return string of "" or "none" (but not the UDUNITS "1", which could be taken as an EPSG code) could indicate no projection information. |
We also need a function (or functions) to specify the units of the grid in the CRS. Suggestions: int get_grid_units(in int grid, out string units); or, to be careful: int get_grid_x_units(in int grid, out string units);
int get_grid_y_units(in int grid, out string units);
int get_grid_z_units(in int grid, out string units); The return is a string; e.g., "meters", "m", "degrees", "deg". We can recommend UDUNITS strings, like we do for variables and time. |
We should also have an example that demonstrates this new functionality. The current sample implementations wouldn't use the new functionality, since they're just models of heat diffusion on a plate. And I assert that they should be left as-is, since they're simple and generic, by design. A candidate: @gantian127's SoilGrids data component could be modified. This wouldn't change the API or CLI of the component, but it would change the BMI, using the new functions to wrap the CRS information input through the API or CLI. We could then refer to this as the official sample implementation of the new functions. |
For reference, Data Carpentry has a short, useful lesson on CRS. |
The BMI should handle data with a coordinate reference system (CRS), allowing such data to be exchanged between models with a BMI. The BMI should handle geospatial data in the form of vectors (points, lines, polygons) and raster grids.
The text was updated successfully, but these errors were encountered: