File tree 1 file changed +27
-0
lines changed
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,33 @@ def test_concat_dim_coords_along_existing_dim(self):
228
228
assert result .data .zarray .zarr_format == zarray .zarr_format
229
229
230
230
231
+ class TestDetermineCoords :
232
+ def test_determine_all_coords (self , netcdf4_file_with_2d_coords ):
233
+ vds = open_virtual_dataset (netcdf4_file_with_2d_coords , indexes = {})
234
+
235
+ expected_dimension_coords = ["ocean_time" , "s_rho" ]
236
+ expected_2d_coords = ["lon_rho" , "lat_rho" , "h" ]
237
+ expected_1d_non_dimension_coords = ["Cs_r" ]
238
+ expected_scalar_coords = ["hc" , "Vtransform" ]
239
+ expected_coords = (
240
+ expected_dimension_coords
241
+ + expected_2d_coords
242
+ + expected_1d_non_dimension_coords
243
+ + expected_scalar_coords
244
+ )
245
+ assert set (vds .coords ) == set (expected_coords )
246
+
247
+ #print(vds.attrs)
248
+ #assert False
249
+
250
+ # TODO assert coord attributes have been altered
251
+ for coord_name in expected_coords :
252
+ print (vds [coord_name ].attrs )
253
+ #assert vds[coord_name].attrs['']
254
+
255
+ #assert False
256
+
257
+
231
258
class TestOpenVirtualDatasetAttrs :
232
259
def test_drop_array_dimensions (self , netcdf4_file ):
233
260
# regression test for GH issue #150
You can’t perform that action at this time.
0 commit comments