Skip to content

One more PyGMT crash with grid shading #3843

@seisman

Description

@seisman

The script reads the remote file @tut_relief.nc in to xarray and pass it to grdimage. It crashes with shading=True, but works without shading.

import pygmt
import xarray as xr

pygmt.show_versions()

fig = pygmt.Figure()
fname = pygmt.which("@tut_relief.nc", download='a')
dem = xr.open_dataarray(fname)

fig.grdimage(dem, frame='af', projection='M6i', cmap='geo', shading=True, V='d')

fig.savefig("shading.png")

Here is the screenshot showing where it crashes:

It crashes at line 627 in grdgradient.c:
image

image

Related variables:

image

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions