@@ -35,103 +35,98 @@ class TestQuadHex:
3535 All four faces intersect a constant latitude of 0.0
3636 """
3737
38- @pytest .mark .parametrize ("use_spherical_bounding_box" , [True , False ])
39- def test_constant_lat_cross_section_grid (self , use_spherical_bounding_box ):
40-
41-
38+ def test_constant_lat_cross_section_grid (self ):
4239
4340 uxgrid = ux .open_grid (quad_hex_grid_path )
4441
45- grid_top_two = uxgrid .cross_section .constant_latitude (lat = 0.1 , use_spherical_bounding_box = use_spherical_bounding_box )
42+ grid_top_two = uxgrid .cross_section .constant_latitude (lat = 0.1 , )
4643
4744 assert grid_top_two .n_face == 2
4845
49- grid_bottom_two = uxgrid .cross_section .constant_latitude (lat = - 0.1 , use_spherical_bounding_box = use_spherical_bounding_box )
46+ grid_bottom_two = uxgrid .cross_section .constant_latitude (lat = - 0.1 , )
5047
5148 assert grid_bottom_two .n_face == 2
5249
53- grid_all_four = uxgrid .cross_section .constant_latitude (lat = 0.0 , use_spherical_bounding_box = use_spherical_bounding_box )
50+ grid_all_four = uxgrid .cross_section .constant_latitude (lat = 0.0 , )
5451
5552 assert grid_all_four .n_face == 4
5653
5754 with pytest .raises (ValueError ):
5855 # no intersections found at this line
59- uxgrid .cross_section .constant_latitude (lat = 10.0 , use_spherical_bounding_box = use_spherical_bounding_box )
56+ uxgrid .cross_section .constant_latitude (lat = 10.0 , )
6057
61- @pytest .mark .parametrize ("use_spherical_bounding_box" , [False ])
62- def test_constant_lon_cross_section_grid (self , use_spherical_bounding_box ):
58+ def test_constant_lon_cross_section_grid (self ):
6359 uxgrid = ux .open_grid (quad_hex_grid_path )
6460
65- grid_left_two = uxgrid .cross_section .constant_longitude (lon = - 0.1 , use_spherical_bounding_box = use_spherical_bounding_box )
61+ grid_left_two = uxgrid .cross_section .constant_longitude (lon = - 0.1 , )
6662
6763 assert grid_left_two .n_face == 2
6864
69- grid_right_two = uxgrid .cross_section .constant_longitude (lon = 0.2 , use_spherical_bounding_box = use_spherical_bounding_box )
65+ grid_right_two = uxgrid .cross_section .constant_longitude (lon = 0.2 , )
7066
7167 assert grid_right_two .n_face == 2
7268
7369 with pytest .raises (ValueError ):
7470 # no intersections found at this line
7571 uxgrid .cross_section .constant_longitude (lon = 10.0 )
7672
77- @pytest .mark .parametrize ("use_spherical_bounding_box" , [False ])
78- def test_constant_lat_cross_section_uxds (self , use_spherical_bounding_box ):
73+ def test_constant_lat_cross_section_uxds (self ):
7974 uxds = ux .open_dataset (quad_hex_grid_path , quad_hex_data_path )
8075 uxds .uxgrid .normalize_cartesian_coordinates ()
8176
82- da_top_two = uxds ['t2m' ].cross_section .constant_latitude (lat = 0.1 , use_spherical_bounding_box = use_spherical_bounding_box )
77+ da_top_two = uxds ['t2m' ].cross_section .constant_latitude (lat = 0.1 , )
8378
8479 nt .assert_array_equal (da_top_two .data , uxds ['t2m' ].isel (n_face = [1 , 2 ]).data )
8580
86- da_bottom_two = uxds ['t2m' ].cross_section .constant_latitude (lat = - 0.1 , use_spherical_bounding_box = use_spherical_bounding_box )
81+ da_bottom_two = uxds ['t2m' ].cross_section .constant_latitude (lat = - 0.1 , )
8782
8883 nt .assert_array_equal (da_bottom_two .data , uxds ['t2m' ].isel (n_face = [0 , 3 ]).data )
8984
90- da_all_four = uxds ['t2m' ].cross_section .constant_latitude (lat = 0.0 , use_spherical_bounding_box = use_spherical_bounding_box )
85+ da_all_four = uxds ['t2m' ].cross_section .constant_latitude (lat = 0.0 , )
9186
9287 nt .assert_array_equal (da_all_four .data , uxds ['t2m' ].data )
9388
9489 with pytest .raises (ValueError ):
9590 # no intersections found at this line
96- uxds ['t2m' ].cross_section .constant_latitude (lat = 10.0 , use_spherical_bounding_box = use_spherical_bounding_box )
91+ uxds ['t2m' ].cross_section .constant_latitude (lat = 10.0 , )
92+
9793
98- @pytest .mark .parametrize ("use_spherical_bounding_box" , [False ])
99- def test_constant_lon_cross_section_uxds (self , use_spherical_bounding_box ):
94+ def test_constant_lon_cross_section_uxds (self ):
10095 uxds = ux .open_dataset (quad_hex_grid_path , quad_hex_data_path )
10196 uxds .uxgrid .normalize_cartesian_coordinates ()
10297
103- da_left_two = uxds ['t2m' ].cross_section .constant_longitude (lon = - 0.1 , use_spherical_bounding_box = use_spherical_bounding_box )
98+ da_left_two = uxds ['t2m' ].cross_section .constant_longitude (lon = - 0.1 , )
10499
105100 nt .assert_array_equal (da_left_two .data , uxds ['t2m' ].isel (n_face = [0 , 2 ]).data )
106101
107- da_right_two = uxds ['t2m' ].cross_section .constant_longitude (lon = 0.2 , use_spherical_bounding_box = use_spherical_bounding_box )
102+ da_right_two = uxds ['t2m' ].cross_section .constant_longitude (lon = 0.2 , )
108103
109104 nt .assert_array_equal (da_right_two .data , uxds ['t2m' ].isel (n_face = [1 , 3 ]).data )
110105
111106 with pytest .raises (ValueError ):
112107 # no intersections found at this line
113- uxds ['t2m' ].cross_section .constant_longitude (lon = 10.0 , use_spherical_bounding_box = use_spherical_bounding_box )
108+ uxds ['t2m' ].cross_section .constant_longitude (lon = 10.0 , )
114109
115110
116111class TestCubeSphere :
117- @ pytest . mark . parametrize ( "use_spherical_bounding_box" , [ True , False ])
118- def test_north_pole (self , use_spherical_bounding_box ):
112+
113+ def test_north_pole (self ):
119114 uxgrid = ux .open_grid (cube_sphere_grid )
120115
121116 lats = [89.85 , 89.9 , 89.95 , 89.99 ]
122117
123118 for lat in lats :
124- cross_grid = uxgrid .cross_section .constant_latitude (lat = lat , use_spherical_bounding_box = use_spherical_bounding_box )
119+ cross_grid = uxgrid .cross_section .constant_latitude (lat = lat , )
125120 # Cube sphere grid should have 4 faces centered around the pole
126121 assert cross_grid .n_face == 4
127- @ pytest . mark . parametrize ( "use_spherical_bounding_box" , [ True , False ])
128- def test_south_pole (self , use_spherical_bounding_box ):
122+
123+ def test_south_pole (self ):
129124 uxgrid = ux .open_grid (cube_sphere_grid )
130125
131126 lats = [- 89.85 , - 89.9 , - 89.95 , - 89.99 ]
132127
133128 for lat in lats :
134- cross_grid = uxgrid .cross_section .constant_latitude (lat = lat , use_spherical_bounding_box = use_spherical_bounding_box )
129+ cross_grid = uxgrid .cross_section .constant_latitude (lat = lat , )
135130 # Cube sphere grid should have 4 faces centered around the pole
136131 assert cross_grid .n_face == 4
137132
@@ -152,8 +147,7 @@ def test_constant_lat(self):
152147
153148 candidate_faces = constant_lat_intersections_face_bounds (
154149 lat = const_lat ,
155- face_min_lat_rad = bounds_rad [:, 0 , 0 ],
156- face_max_lat_rad = bounds_rad [:, 0 , 1 ],
150+ face_bounds_lat = bounds_rad [:, 0 ],
157151 )
158152
159153 # Expected output
@@ -176,8 +170,7 @@ def test_constant_lat_out_of_bounds(self):
176170
177171 candidate_faces = constant_lat_intersections_face_bounds (
178172 lat = const_lat ,
179- face_min_lat_rad = bounds_rad [:, 0 , 0 ],
180- face_max_lat_rad = bounds_rad [:, 0 , 1 ],
173+ face_bounds_lat = bounds_rad [:, 0 ],
181174 )
182175
183176 assert len (candidate_faces ) == 0
0 commit comments