@@ -81,10 +81,9 @@ def test_get_faces_constLat_intersection_info_one_intersection(self):
8181 ])
8282
8383 latitude_cart = - 0.8660254037844386
84- is_directed = False
8584 is_latlonface = False
8685 is_GCA_list = None
87- unique_intersections , pt_lon_min , pt_lon_max = _get_faces_constLat_intersection_info (face_edges_cart , latitude_cart , is_GCA_list , is_latlonface , is_directed )
86+ unique_intersections , pt_lon_min , pt_lon_max = _get_faces_constLat_intersection_info (face_edges_cart , latitude_cart , is_GCA_list , is_latlonface )
8887 # The expected unique_intersections length is 1
8988 self .assertEqual (len (unique_intersections ), 1 )
9089
@@ -111,10 +110,10 @@ def test_get_faces_constLat_intersection_info_encompass_pole(self):
111110 latitude_rad = np .arcsin (latitude_cart )
112111 latitude_deg = np .rad2deg (latitude_rad )
113112 print (latitude_deg )
114- is_directed = False
113+
115114 is_latlonface = False
116115 is_GCA_list = None
117- unique_intersections , pt_lon_min , pt_lon_max = _get_faces_constLat_intersection_info (face_edges_cart , latitude_cart , is_GCA_list , is_latlonface , is_directed )
116+ unique_intersections , pt_lon_min , pt_lon_max = _get_faces_constLat_intersection_info (face_edges_cart , latitude_cart , is_GCA_list , is_latlonface )
118117 # The expected unique_intersections length should be no greater than 2* n_edges
119118 self .assertLessEqual (len (unique_intersections ), 2 * len (face_edges_cart ))
120119
@@ -133,10 +132,9 @@ def test_get_faces_constLat_intersection_info_on_pole(self):
133132 [- 5.2264427688714095e-02 , - 5.2264427688714102e-02 , - 9.9726468863423734e-01 ]]
134133 ])
135134 latitude_cart = - 0.9998476951563913
136- is_directed = False
137135 is_latlonface = False
138136 is_GCA_list = None
139- unique_intersections , pt_lon_min , pt_lon_max = _get_faces_constLat_intersection_info (face_edges_cart , latitude_cart , is_GCA_list , is_latlonface , is_directed )
137+ unique_intersections , pt_lon_min , pt_lon_max = _get_faces_constLat_intersection_info (face_edges_cart , latitude_cart , is_GCA_list , is_latlonface )
140138 # The expected unique_intersections length is 2
141139 self .assertEqual (len (unique_intersections ), 2 )
142140
@@ -156,10 +154,9 @@ def test_get_faces_constLat_intersection_info_near_pole(self):
156154 latitude_cart = - 0.9876883405951378
157155 latitude_rad = np .arcsin (latitude_cart )
158156 latitude_deg = np .rad2deg (latitude_rad )
159- is_directed = False
160157 is_latlonface = False
161158 is_GCA_list = None
162- unique_intersections , pt_lon_min , pt_lon_max = _get_faces_constLat_intersection_info (face_edges_cart , latitude_cart , is_GCA_list , is_latlonface , is_directed )
159+ unique_intersections , pt_lon_min , pt_lon_max = _get_faces_constLat_intersection_info (face_edges_cart , latitude_cart , is_GCA_list , is_latlonface )
163160 # The expected unique_intersections length is 2
164161 self .assertEqual (len (unique_intersections ), 1 )
165162
@@ -182,10 +179,9 @@ def test_get_faces_constLat_intersection_info_2(self):
182179 [0.6546536707079771 , - 0.37796447300922714 , - 0.6546536707079772 ]]])
183180
184181 latitude_cart = - 0.6560590289905073
185- is_directed = False
186182 is_latlonface = False
187183 is_GCA_list = None
188- unique_intersections , pt_lon_min , pt_lon_max = _get_faces_constLat_intersection_info (face_edges_cart , latitude_cart , is_GCA_list , is_latlonface , is_directed )
184+ unique_intersections , pt_lon_min , pt_lon_max = _get_faces_constLat_intersection_info (face_edges_cart , latitude_cart , is_GCA_list , is_latlonface )
189185 # The expected unique_intersections length is 2
190186 self .assertEqual (len (unique_intersections ), 2 )
191187
@@ -208,10 +204,9 @@ def test_get_faces_constLat_intersection_info_2(self):
208204 [0.6546536707079771 , - 0.37796447300922714 , - 0.6546536707079772 ]]])
209205
210206 latitude_cart = - 0.6560590289905073
211- is_directed = False
212207 is_latlonface = False
213208 is_GCA_list = None
214- unique_intersections , pt_lon_min , pt_lon_max = _get_faces_constLat_intersection_info (face_edges_cart , latitude_cart , is_GCA_list , is_latlonface , is_directed )
209+ unique_intersections , pt_lon_min , pt_lon_max = _get_faces_constLat_intersection_info (face_edges_cart , latitude_cart , is_GCA_list , is_latlonface )
215210 # The expected unique_intersections length is 2
216211 self .assertEqual (len (unique_intersections ), 2 )
217212
@@ -240,8 +235,7 @@ def test_get_zonal_face_interval(self):
240235 # The latlon bounds for the latitude is not necessarily correct below since we don't use the latitudes bound anyway
241236 interval_df = _get_zonal_face_interval (face_edge_nodes , constZ ,
242237 np .array ([[- 0.25 * np .pi , 0.25 * np .pi ], [1.6 * np .pi ,
243- 0.4 * np .pi ]]),
244- is_directed = False )
238+ 0.4 * np .pi ]]))
245239 expected_interval_df = pd .DataFrame ({
246240 'start' : [1.6 * np .pi , 0.0 ],
247241 'end' : [2.0 * np .pi , 00.4 * np .pi ]
@@ -285,7 +279,7 @@ def test_get_zonal_face_interval_empty_interval(self):
285279 [3.14159265 , 3.2321175 ]
286280 ])
287281
288- res = _get_zonal_face_interval (face_edges_cart , latitude_cart , face_latlon_bounds , is_directed = False )
282+ res = _get_zonal_face_interval (face_edges_cart , latitude_cart , face_latlon_bounds )
289283 expected_res = pd .DataFrame ({"start" : [0.0 ], "end" : [0.0 ]})
290284 pd .testing .assert_frame_equal (res , expected_res )
291285
@@ -322,7 +316,7 @@ def test_get_zonal_face_interval_encompass_pole(self):
322316 })
323317
324318 # Call the function to get the result
325- res = _get_zonal_face_interval (face_edges_cart , latitude_cart , face_latlon_bounds , is_directed = False )
319+ res = _get_zonal_face_interval (face_edges_cart , latitude_cart , face_latlon_bounds )
326320
327321 # Assert the result matches the expected DataFrame
328322 pd .testing .assert_frame_equal (res , expected_df )
@@ -349,8 +343,7 @@ def test_get_zonal_face_interval_FILL_VALUE(self):
349343 # The latlon bounds for the latitude is not necessarily correct below since we don't use the latitudes bound anyway
350344 interval_df = _get_zonal_face_interval (face_edge_nodes , constZ ,
351345 np .array ([[- 0.25 * np .pi , 0.25 * np .pi ], [1.6 * np .pi ,
352- 0.4 * np .pi ]]),
353- is_directed = False )
346+ 0.4 * np .pi ]]))
354347 expected_interval_df = pd .DataFrame ({
355348 'start' : [1.6 * np .pi , 0.0 ],
356349 'end' : [2.0 * np .pi , 00.4 * np .pi ]
@@ -383,7 +376,7 @@ def test_get_zonal_face_interval_GCA_constLat(self):
383376 interval_df = _get_zonal_face_interval (face_edge_nodes , constZ ,
384377 np .array ([[- 0.25 * np .pi , 0.25 * np .pi ], [1.6 * np .pi ,
385378 0.4 * np .pi ]]),
386- is_directed = False , is_GCA_list = np .array ([True , False , True , False ]))
379+ is_GCA_list = np .array ([True , False , True , False ]))
387380 expected_interval_df = pd .DataFrame ({
388381 'start' : [1.6 * np .pi , 0.0 ],
389382 'end' : [2.0 * np .pi , 00.4 * np .pi ]
@@ -415,7 +408,7 @@ def test_get_zonal_face_interval_equator(self):
415408 interval_df = _get_zonal_face_interval (face_edge_nodes , 0.0 ,
416409 np .array ([[- 0.25 * np .pi , 0.25 * np .pi ], [1.6 * np .pi ,
417410 0.4 * np .pi ]]),
418- is_directed = False , is_GCA_list = np .array ([True , True , True , True ]))
411+ is_GCA_list = np .array ([True , True , True , True ]))
419412 expected_interval_df = pd .DataFrame ({
420413 'start' : [1.6 * np .pi , 0.0 ],
421414 'end' : [2.0 * np .pi , 00.4 * np .pi ]
@@ -434,7 +427,7 @@ def test_get_zonal_face_interval_equator(self):
434427 interval_df = _get_zonal_face_interval (face_edge_nodes , 0.0 ,
435428 np .array ([[- 0.25 * np .pi , 0.25 * np .pi ], [1.6 * np .pi ,
436429 0.4 * np .pi ]]),
437- is_directed = False , is_GCA_list = np .array ([True , False , True , False ]))
430+ is_GCA_list = np .array ([True , False , True , False ]))
438431 expected_interval_df = pd .DataFrame ({
439432 'start' : [1.6 * np .pi , 0.0 ],
440433 'end' : [2.0 * np .pi , 00.4 * np .pi ]
@@ -605,7 +598,7 @@ def test_get_zonal_faces_weight_at_constLat_equator(self):
605598 weight_df = _get_zonal_faces_weight_at_constLat (np .array ([
606599 face_0_edge_nodes , face_1_edge_nodes , face_2_edge_nodes ,
607600 face_3_edge_nodes
608- ]), 0.0 , latlon_bounds , is_directed = False )
601+ ]), 0.0 , latlon_bounds )
609602
610603 nt .assert_array_almost_equal (weight_df , expected_weight_df , decimal = 3 )
611604
@@ -666,7 +659,7 @@ def test_get_zonal_faces_weight_at_constLat_regular(self):
666659 weight_df = _get_zonal_faces_weight_at_constLat (np .array ([
667660 face_0_edge_nodes , face_1_edge_nodes , face_2_edge_nodes ,
668661 face_3_edge_nodes
669- ]), np .sin (0.1 * np .pi ), latlon_bounds , is_directed = False )
662+ ]), np .sin (0.1 * np .pi ), latlon_bounds )
670663
671664 nt .assert_array_almost_equal (weight_df , expected_weight_df , decimal = 3 )
672665
@@ -693,7 +686,7 @@ def test_get_zonal_faces_weight_at_constLat_on_pole_one_face(self):
693686 ])
694687 constLat_cart = - 1
695688
696- weight_df = _get_zonal_faces_weight_at_constLat (face_edges_cart , constLat_cart , face_bounds , is_directed = False )
689+ weight_df = _get_zonal_faces_weight_at_constLat (face_edges_cart , constLat_cart , face_bounds )
697690 # Define the expected DataFrame
698691 expected_weight_df = pd .DataFrame ({"face_index" : [0 ], "weight" : [1.0 ]})
699692
@@ -740,7 +733,7 @@ def test_get_zonal_faces_weight_at_constLat_on_pole_faces(self):
740733
741734 constLat_cart = 1.0
742735
743- weight_df = _get_zonal_faces_weight_at_constLat (face_edges_cart , constLat_cart , face_bounds , is_directed = False )
736+ weight_df = _get_zonal_faces_weight_at_constLat (face_edges_cart , constLat_cart , face_bounds )
744737 # Define the expected DataFrame
745738 expected_weight_df = pd .DataFrame ({
746739 'face_index' : [0 , 1 , 2 , 3 ],
@@ -774,7 +767,7 @@ def test_get_zonal_face_interval_pole(self):
774767 ])
775768 constLat_cart = - 0.9986295347545738
776769
777- weight_df = _get_zonal_face_interval (face_edges_cart , constLat_cart , face_bounds , is_directed = False )
770+ weight_df = _get_zonal_face_interval (face_edges_cart , constLat_cart , face_bounds )
778771 # No Nan values should be present in the weight_df
779772 self .assertFalse (weight_df .isnull ().values .any ())
780773
@@ -827,7 +820,7 @@ def test_get_zonal_faces_weight_at_constLat_latlonface(self):
827820 # Assert the results is the same to the 3 decimal places
828821 weight_df = _get_zonal_faces_weight_at_constLat (np .array ([
829822 face_0_edge_nodes , face_1_edge_nodes , face_2_edge_nodes
830- ]), np .sin (np .deg2rad (20 )), latlon_bounds , is_directed = False , is_latlonface = True )
823+ ]), np .sin (np .deg2rad (20 )), latlon_bounds , is_latlonface = True )
831824
832825
833826 nt .assert_array_almost_equal (weight_df , expected_weight_df , decimal = 3 )
@@ -839,4 +832,4 @@ def test_get_zonal_faces_weight_at_constLat_latlonface(self):
839832 with self .assertRaises (ValueError ):
840833 _get_zonal_faces_weight_at_constLat (np .array ([
841834 face_0_edge_nodes , face_1_edge_nodes , face_2_edge_nodes
842- ]), np .deg2rad (20 ), latlon_bounds , is_directed = False )
835+ ]), np .deg2rad (20 ), latlon_bounds )
0 commit comments