-
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
Add support for geospatial data #99
Open
mdpiper
wants to merge
38
commits into
develop
Choose a base branch
from
mdpiper/get-grid-projection
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also arranged functions to match order in documentation + removed stale headers.
Also: * Updated ordering * Removed deprecated functions
@gregtucker This PR addresses the geospatial BMI task from CSDMS 3. |
The docs for the branch are active: https://bmi.readthedocs.io/en/mdpiper-get-grid-projection/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds four new functions that, together, allow a user to represent geospatial data in a BMI:
The changes in this PR are part of the BMI 2.1 Milestone. The BMI version has been incremented to v2.1-beta.
A summary of each function, and the problem it addresses, is given below.
get_grid_coordinate_names
This function supports the get_grid_coordinate function, described below, allowing coordinates to be named something other than x, y, and z (e.g., lon and lat for geographic data). The function is patterned on the existing get_input_var_names function: given a grid identifier, the function returns a 1D string array of coordinate names.
This resolves #90.
get_grid_coordinate_units
This function gets the units of a grid coordinate; e.g., a projected CRS may use meters for spatial coordinates. The function is patterned on the existing get_var_units function: given a grid identifier and a coordinate name from get_grid_coordinate_names, return the units of the coordinate as a string.
This resolves #87. See #90 (comment) for some discussion on this new function.
get_grid_coordinate
This function is patterned on, and supersedes, the get_grid_[xyz] functions. Given a grid identifier and a coordinate name (like "x"), this function gets a 1D array of locations for the coordinate. Put another way, given "x", this function replicates the behavior of get_grid_x.
The get_grid_[xyz] functions have been marked as deprecated in the documentation.
This resolves #88.
get_grid_crs
This is the primary function of this PR, and also the simplest. Given a grid identifier, return a string with coordinate reference system (CRS) information. The BMI does not stipulate the format of the CRS information. See the documentation for this function for more information and a brief example.
Resolves #80, resolves #11.