lair.geo#
Grids, maps and distances.
BaseGrid and the functions it wraps work on gridded xarray data:
clip to a region (clip()), grid-cell areas on the WGS84 ellipsoid
(gridcell_area()), and regridding with xESMF (regrid(),
resample(); Total an inventory over a region says which method a flux needs).
plot_grid() and the tick and inset-map helpers draw maps with cartopy
(Draw a map of an inventory), and haversine() and bearing() measure on
the sphere. Importing the module needs the geo extra, and regridding needs
ESMF as well (see Optional dependencies).
Attributes
plain longitude and latitude. |
Functions
Add latitude ticks to the map. |
|
Add latitude and longitude ticks to the map. |
|
Add a small locator map inside a map that shows where the main map is. |
|
Add longitude ticks to the map. |
|
Bounding box to extent. |
|
Great-circle bearing from point 1 to point 2 on a sphere. |
|
Clip the data to the given bounds. |
|
Calculate cosine weights from latitude. |
|
Degree-minute-second to decimal degree |
|
Calculate radius of Earth assuming oblate spheroid defined by WGS84 |
|
Extent to bounding box. |
|
Generate a regular grid. |
|
Calculate the area of each grid cell in a grid. |
|
Calculate the area of each grid cell in a lat-lon grid. |
|
Great-circle distance between two points on a sphere (haversine formula). |
|
Plot a grid. |
|
Generate points spaced along a line or a network of lines. |
|
Regrid data to a new grid. |
|
Resample the data to a new resolution. |
|
Round latitude and longitude values to a specified number of decimal places. |
|
Transform the longitude values into the half-open interval [base, base + period). |
|
Write the CRS and coordinate system to the rioxarray accessor. |
Classes