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