File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -8,3 +8,17 @@ def test_read_icon_grid(gridpath):
88def test_read_icon_dataset (gridpath ):
99 grid_path = gridpath ("icon" , "R02B04" , "icon_grid_0010_R02B04_G.nc" )
1010 uxds = ux .open_dataset (grid_path , grid_path )
11+
12+ def test_icon_cross_section (gridpath ):
13+ grid_path = gridpath ("icon" , "R02B04" , "icon_grid_0010_R02B04_G.nc" )
14+ uxds = ux .open_dataset (grid_path , grid_path )
15+
16+ # Test cross_section with cell_area variable
17+ result = uxds .cell_area .cross_section (start = (0 , - 90 ), end = (0 , 90 ))
18+ assert result is not None
19+ assert len (result ) == 100 # 100 steps by default
20+ assert result .dims == ('steps' ,)
21+ assert all (result .coords ['lon' ] == 0.0 ) # Constant longitude
22+ assert result .coords ['lat' ].min () == - 90.0
23+ assert result .coords ['lat' ].max () == 90.0
24+ assert result .attrs ['units' ] == 'steradian'
You can’t perform that action at this time.
0 commit comments