healpix_resample.OverlapConservativeResampler#

class healpix_resample.OverlapConservativeResampler(lon_bounds, lat_bounds, level, nest=True, normalization='destination')[source]#

First-order overlap-area conservative remapping onto HEALPix.

Parameters:
  • lon_bounds, lat_bounds (array-like) – One-dimensional cell boundaries, in degrees, of a (possibly irregular) rectilinear lat/lon source grid: nlon = len(lon_bounds) - 1 columns and nlat = len(lat_bounds) - 1 rows. lat_bounds must be strictly monotonic in [-90, 90]; lon_bounds strictly monotonic with total span <= 360 degrees (antimeridian crossing is allowed).

  • level (int) – Target HEALPix level (nside = 2**level).

  • nest (bool) – Nested (default) or ring target indexing.

  • normalization ({"destination", "covered"}) – Weight normalization for intensive fields; see the module docstring for the xESMF correspondence.

cell_ids#

The M HEALPix cells receiving nonzero overlap, int64.

Type:

numpy.ndarray

weights#

SciPy CSR sparse matrix of shape (M, nlat * nlon): the normalization-dependent intensive-remapping matrix W (x = W y), built once and reusable for every field sharing this source and target grid.

Type:

object

overlap#

SciPy CSR sparse matrix of the raw overlap areas O_ji, in steradians.

Type:

object

target_area#

Exact HEALPix cell area 4 * pi / (12 * nside ** 2), in steradians.

Type:

float

covered_area#

Per target cell, sum_i O_ji in steradians, shape (M,).

Type:

numpy.ndarray

source_area#

Per source cell, |S_i| in steradians, shape (nlat * nlon,).

Type:

numpy.ndarray

__init__(lon_bounds, lat_bounds, level, nest=True, normalization='destination')[source]#

Methods

__init__(lon_bounds, lat_bounds, level[, ...])

resample(values[, quantity])

Remap a source field.