File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -37,19 +37,12 @@ def load_earth_relief(resolution="01d"):
37
37
"""
38
38
_is_valid_resolution (resolution )
39
39
fname = which ("@earth_relief_{}" .format (resolution ), download = "u" )
40
- grid = xr .open_dataarray (fname )
40
+ grid = xr .open_dataset (fname ). to_array ( name = "elevation" ). squeeze ( drop = True )
41
41
# Add some metadata to the grid
42
- grid .name = "elevation"
43
42
grid .attrs ["long_name" ] = "elevation relative to the geoid"
44
43
grid .attrs ["units" ] = "meters"
45
44
grid .attrs ["vertical_datum" ] = "EMG96"
46
45
grid .attrs ["horizontal_datum" ] = "WGS84"
47
- # Remove the actual range because it gets outdated when indexing the grid,
48
- # which causes problems when exporting it to netCDF for usage on the
49
- # command-line.
50
- grid .attrs .pop ("actual_range" )
51
- for coord in grid .coords :
52
- grid [coord ].attrs .pop ("actual_range" )
53
46
return grid
54
47
55
48
You can’t perform that action at this time.
0 commit comments