-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ Turn BBox into a dataclass with bounds and subset methods
Refactor the BBox namedtuple into a Python 3.7+ dataclass, complete with convenience functions to get the bounding box coordinates as a tuple (either in a PyGMT or Shapely compatible format), as well as geographically subsetting an xarray.Dataset! This BBox class also allows us to set a name, and has a automatic 'scale' property, handy for making PyGMT plots later. Also moved the optional geographic subsetting section nearer to the top of the notebook as some people might want to do that before all the compute heavy stuff.
- Loading branch information
Showing
2 changed files
with
330 additions
and
239 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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