Skip to content

Commit

Permalink
Merge 064a465 into 0f7282c
Browse files Browse the repository at this point in the history
  • Loading branch information
philipc2 authored Sep 18, 2024
2 parents 0f7282c + 064a465 commit 8ff264e
Show file tree
Hide file tree
Showing 22 changed files with 1,304 additions and 38 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,6 @@ docs/notebook-examples.txt
benchmarks/env
benchmarks/results
benchmarks/html
meshfiles
scratch.py
docs
24 changes: 21 additions & 3 deletions benchmarks/mpas_ocean.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ class DatasetBenchmark:


def setup(self, resolution, *args, **kwargs):


self.uxds = ux.open_dataset(file_path_dict[resolution][0], file_path_dict[resolution][1])

def teardown(self, resolution, *args, **kwargs):
Expand All @@ -50,7 +48,6 @@ class GridBenchmark:
params = [['480km', '120km'], ]

def setup(self, resolution, *args, **kwargs):

self.uxgrid = ux.open_grid(file_path_dict[resolution][0])

def teardown(self, resolution, *args, **kwargs):
Expand Down Expand Up @@ -144,6 +141,27 @@ class HoleEdgeIndices(DatasetBenchmark):
def time_construct_hole_edge_indices(self, resolution):
ux.grid.geometry._construct_hole_edge_indices(self.uxds.uxgrid.edge_face_connectivity)

class ZonalMean(DatasetBenchmark):

def setup(self, resolution, *args, **kwargs):
self.uxds = ux.open_dataset(file_path_dict[resolution][0], file_path_dict[resolution][1])
self.uxds.uxgrid.normalize_cartesian_coordinates()
def time_zonal_mean(self, resolution):
self.uxds['bottomDepth'].zonal_mean()

class ZonalMeanExcludingBounds(DatasetBenchmark):

param_names = DatasetBenchmark.param_names + ['lat_step_size']
params = DatasetBenchmark.params + [[5, 10, 20, 40]]

def setup(self, resolution, *args, **kwargs):
self.uxds = ux.open_dataset(file_path_dict[resolution][0], file_path_dict[resolution][1])
self.uxds.uxgrid.normalize_cartesian_coordinates()
self.uxds.uxgrid.bounds

def time_zonal_mean(self, resolution, lat_step_size):
self.uxds['bottomDepth'].zonal_mean(lat_deg=(-90, 90, lat_step_size))

class CheckNorm:
param_names = ['resolution']
params = ['480km', '120km']
Expand Down
9 changes: 9 additions & 0 deletions docs/internal_api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,15 @@ Integration
grid.integrate._get_faces_constLat_intersection_info


Zonal Mean
----------
.. autosummary::
:toctree: generated/

core.zonal._get_candidate_faces_at_constant_latitude
core.zonal._non_conservative_zonal_mean_constant_one_latitude
core.zonal._non_conservative_zonal_mean_constant_latitudes

Remapping
=========

Expand Down
Loading

0 comments on commit 8ff264e

Please sign in to comment.