Skip to content

Commit 47b5b68

Browse files
weiji14seisman
andcommitted
Let pygmt know about geographic grids
Previously it thought every xarray.DataArray grid was Cartesian! So the load_earth_relief() grid passed to GMT was treated as a Cartesian virtualfile, whereas the actual `@earth_relief` file was properly read as Geographic. Co-authored-by: Dongdong Tian <[email protected]>
1 parent 8ce734d commit 47b5b68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pygmt/clib/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ def virtualfile_from_grid(self, grid, registration="GMT_GRID_PIXEL_REG"):
12421242
gmt_grid = self.create_data(
12431243
family,
12441244
geometry,
1245-
mode="GMT_CONTAINER_ONLY",
1245+
mode="GMT_CONTAINER_ONLY|GMT_GRID_IS_GEO",
12461246
ranges=region,
12471247
inc=inc,
12481248
registration=registration,

0 commit comments

Comments
 (0)