pygmt.grdlandmask

pygmt.grdlandmask(**kwargs)[source]

Read the selected shoreline database and create a grid to specify which nodes in the specified grid are over land or over water. The nodes defined by the selected region and lattice spacing will be set according to one of two criteria: (1) land vs water, or (2) the more detailed (hierarchical) ocean vs land vs lake vs island vs pond.

Full option list at https://docs.generic-mapping-tools.org/latest/grdlandmask.html

Aliases:

  • G = outgrid

  • I = increment

  • R = region

Parameters
  • outgrid (str or None) – The name of the output netCDF file with extension .nc to store the grid in.

  • region (str or list) – Required if this is the first plot command. xmin/xmax/ymin/ymax[+r][+uunit]. Specify the region of interest.

Returns

ret (xarray.DataArray or None) – Return type depends on whether the outgrid parameter is set:

  • xarray.DataArray if outgrid is not set

  • None if outgrid is set (grid output will be stored in file set by outgrid)