-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial Implementation of Latitude Longitude Face Bounds (#692)
* Initial Draft Algorithm * Revert "Initial Draft Algorithm" This reverts commit 99573b8. * boilerpalte * remove bounding box property for now * Work in Progress * Initial commit * Revert "Initial commit" This reverts commit 1ba6880. * Initial commit * Merge branch 'get-bounding-box' of https://github.com/UXARRAY/uxarray into get-bounding-box merge` * Fix complete * WIP * WIP * WIP * Fix interval looks * fix interval data storage type * fix interval data storage type * Initial draft complete * Support for the `is_latlonface` * Support for the `is_latlonface` and `is_GCA_List` * Finish final draft * Finish * refractor complete * Address PRs * add benchmark to face bounds * update bounds * rename bounds to face_bounds * fix tests * Delete grid_geoflow.exo * rename connectivity * Address PR Review * add warning * add warning --------- Co-authored-by: Hongyu Chen <hyvchen@ucdavis.edu> Co-authored-by: Orhan Eroglu <32553057+erogluorhan@users.noreply.github.com>
- Loading branch information
1 parent
b78516b
commit 0020265
Showing
11 changed files
with
1,035 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import os | ||
from pathlib import Path | ||
|
||
import uxarray as ux | ||
|
||
current_path = Path(os.path.dirname(os.path.realpath(__file__))).parents[0] | ||
|
||
grid_quad_hex = current_path / "test" / "meshfiles" / "ugrid" / "quad-hexagon" / "grid.nc" | ||
grid_geoflow = current_path / "test" / "meshfiles" / "ugrid" / "geoflow-small" / "grid.nc" | ||
grid_scrip = current_path / "test" / "meshfiles" / "scrip" / "outCSne8" / "outCSne8.nc" | ||
grid_mpas= current_path / "test" / "meshfiles" / "mpas" / "QU" / "oQU480.231010.nc" | ||
|
||
|
||
|
||
class FaceBounds: | ||
|
||
params = [grid_quad_hex, grid_geoflow, grid_scrip, grid_mpas] | ||
|
||
|
||
def setup(self, grid_path): | ||
self.uxgrid = ux.open_grid(grid_path) | ||
|
||
def teardown(self, n): | ||
del self.uxgrid | ||
|
||
def time_face_bounds(self, grid_path): | ||
"""Time to obtain ``Grid.face_bounds``""" | ||
self.uxgrid.bounds | ||
|
||
def peakmem_face_bounds(self, grid_path): | ||
"""Peak memory usage obtain ``Grid.face_bounds.""" | ||
face_bounds = self.uxgrid.bounds |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -275,6 +275,7 @@ Grid Descriptors | |
|
||
Grid.face_areas | ||
Grid.antimeridian_face_indices | ||
Grid.bounds | ||
|
||
|
||
Attributes | ||
|
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
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
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
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
Oops, something went wrong.