geocat.comp.spherical.scale_voronoi#
- geocat.comp.spherical.scale_voronoi(theta, phi, chunk_size='auto')#
Calculate the area weighting for dataset.
- Parameters
theta (
numpy.ndarray
,xarray.DataArray
) – 2-dimensional array containing the theta (longitude in radians) values for each datapoint in data.phi (
numpy.ndarray
,xarray.DataArray
) – 2-dimensional array containing the theta (latitude in radians) values for each datapoint in data.Phi
is zero at the top of the sphere andpi
at the bottom,phi = (lat_degrees-90)*(-1)*pi/180
chunk_size (
int
, optional) – The size of each edge of the dask chunks if using xarray.DataArray inputs. Some arrays will be 2d, and others 1d, and the final calculation operates on a 3d array. thus the chunks used in the largest calculation scale atchunk_size^3
A chunk size of 256 is recommended. Defaults to ‘auto’
- Returns
scale (
numpy.ndarray
,xarray.DataArray
) – 2-dimensional array containing the area of the spherical voronoi cell for eachtheta
andphi
pair.