Error when writing contours to a new file

Hello, I’m new to GMT and PyGMT, and I’m trying to write lithospheric depth contours into a new file through PyGMT (the equivalent of gmt grdcontour LAB.nc -C+170 -DLAB.ll).

I have mapped them out using fig.grdcontour(grid=‘LAB.nc’, interval = 170) but I don’t see a dump parameter for it. I noticed a dump parameter for pygmt.Figure.contour so I tried fig.contour(data = sl, levels = 170, D = ‘DLAB’) but I received two contour errors (Map region exceeds 360 degrees, General map projection error) and I am pretty sure the longitudes in my data file is -180 to 180 and latitudes are -90 to 90.

May I have some advice on this? :slight_smile:

I think you can also use D="DLAB" in fig.grdcontour.