geocat.comp.spherical.recomposition#
- geocat.comp.spherical.recomposition(data, theta, phi, max_harm=23)#
Calculate a dataset from spherical harmonics.
- Parameters:
data (
numpy.ndarray
,xarray.DataArray
) – 1-dimensional array of spherical harmonics. These must be in the same order output bygeocat.comp.spherical.decomposition
.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
max_harm (
int
, optional) – The maximum harmonic value for both m and n. The total of harmonics calculated is(max_harm+1)*(max_harm+2)/2
The number of total harmonics must equal the number of harmoncs in the input data. Defaults to 23, for 300 total harmonics.
- Returns:
recomposition (
numpy.ndarray
,xarray.DataArray
) – The spherical harmonic recomposition of the input data