opendrift.readers.reader_global_landmask
Attributes
Classes
An interface to the GSHHS dataset. |
|
The global landmask reader is based on the coastline data from |
Functions
|
Returns an instance of the landmask type and landmask. The mask data is |
|
Plot the landmask or the shapes from GSHHG. |
Module Contents
- opendrift.readers.reader_global_landmask.logger
- opendrift.readers.reader_global_landmask.__roaring_mask__ = None
- opendrift.readers.reader_global_landmask.__polys__ = None
- opendrift.readers.reader_global_landmask.get_mask()[source]
Returns an instance of the landmask type and landmask. The mask data is usually shared between threads.
- class opendrift.readers.reader_global_landmask.LandmaskFeature(scale='auto', globe=None, **kwargs)[source]
Bases:
cartopy.feature.GSHHSFeature
An interface to the GSHHS dataset.
See https://www.ngdc.noaa.gov/mgg/shorelines/gshhs.html
Parameters
- scale
The dataset scale. One of ‘auto’, ‘coarse’, ‘low’, ‘intermediate’, ‘high, or ‘full’ (default is ‘auto’).
- levels
A list of integers 1-6 corresponding to the desired GSHHS feature levels to draw (default is [1] which corresponds to coastlines).
Other Parameters
- **kwargs
Keyword arguments to be used when drawing the feature. Defaults are edgecolor=’black’ and facecolor=’none’.
- opendrift.readers.reader_global_landmask.plot_land(ax, lonmin, latmin, lonmax, latmax, fast, ocean_color='white', land_color=cfeature.COLORS['land'], lscale='auto', globe=None)[source]
Plot the landmask or the shapes from GSHHG.
- class opendrift.readers.reader_global_landmask.Reader[source]
Bases:
opendrift.readers.basereader.BaseReader
,opendrift.readers.basereader.ContinuousReader
The global landmask reader is based on the coastline data from GSHHG (https://www.ngdc.noaa.gov/mgg/shorelines/) optimized for checking against landmasks.
Common constructor for all readers
- name = 'global_landmask'
- variables = ['land_binary_mask']
- proj4 = None
- crs = None
- z = None
- mask
- get_variables(requestedVariables, time=None, x=None, y=None, z=None)[source]
Get binary mask of whether elements are on land or not.
- Args:
x (deg[]): longitude (decimal degrees) y (deg[]): latitude (decimal degrees) …
x, y is given in reader local projection.
- Returns:
Binary mask of point x, y on land.