Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions pygmt/src/sph2grd.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ def sph2grd(data, **kwargs):
- :class:`xarray.DataArray` if ``outgrid`` is not set
- None if ``outgrid`` is set (grid output will be stored in file set by
``outgrid``)

Example
-------
>>> import pygmt # doctest: +SKIP
>>> # Create a new grid from the remote file "EGM96_to_36.txt",
>>> # set the grid spacing to 1, and the region to "g"
>>> new_grid = pygmt.sph2grd(
... data="@EGM96_to_36.txt", spacing=1, region="g"
... ) # doctest: +SKIP
"""
with GMTTempFile(suffix=".nc") as tmpfile:
with Session() as lib:
Expand Down