pygmt.datasets.load_black_marble
- pygmt.datasets.load_black_marble(resolution='01d', region=None)[source]
- Load NASA Black Marble images in various resolutions.   - Earth day/night dataset. - This function downloads the dataset from the GMT data server, caches it in a user data directory (usually - ~/.gmt/server/earth/earth_night/), and load the dataset as an- xarray.DataArray. An internet connection is required the first time around, but subsequent calls will load the dataset from the local data directory.- The dataset can also be accessed by specifying a file name in any grid processing function or plotting method, using the following file name format: @earth_night_res. res is the grid resolution. If res is omitted (i.e., - @earth_night), GMT automatically selects a suitable resolution based on the current region and projection settings.- Refer to https://www.generic-mapping-tools.org/remote-datasets/earth-daynight.html for more details about available datasets, including version information and references. - Parameters:
- resolution ( - Literal[- '01d',- '30m',- '20m',- '15m',- '10m',- '06m',- '05m',- '04m',- '03m',- '02m',- '01m',- '30s'], default:- '01d') – The image resolution. The suffix- d,- m, and- sstand for arc-degrees, arc-minutes, and arc-seconds.
- region ( - Sequence[- float] |- str|- None, default:- None) – The subregion of the image to load, in the form of a sequence [xmin, xmax, ymin, ymax].
 
- Return type:
- Returns:
- image – The NASA Black Marble image. Coordinates are latitude and longitude in degrees. 
 - Note - The registration and coordinate system type of the returned - xarray.DataArrayimage can be accessed via the gmt accessor. Refer to- pygmt.GMTDataArrayAccessorfor detailed explanations and limitations.- Examples - >>> from pygmt.datasets import load_black_marble >>> # Load the default image (pixel-registered 1 arc-degree image) >>> image = load_black_marble()