"src/vscode:/vscode.git/clone" did not exist on "4e2c1f3a4da7436a861dd444035e6e27a3f1c6b7"
Commit 43e3e720 authored by Andrea Paris's avatar Andrea Paris Committed by Boris Bonev
Browse files

updated docstring

parent c44d4b23
...@@ -75,49 +75,29 @@ def _split_distributed_convolution_tensor_s2( ...@@ -75,49 +75,29 @@ def _split_distributed_convolution_tensor_s2(
out_shape: Tuple[int], out_shape: Tuple[int],
): ):
""" """
Precomputes the rotated filters at positions $R^{-1}_j \omega_i = R^{-1}_j R_i \nu = Y(-\theta_j)Z(\phi_i - \phi_j)Y(\theta_j)\nu$. Splits a pre-computed convolution tensor along the latitude dimension for distributed processing.
Assumes a tensorized grid on the sphere with an equidistant sampling in longitude as described in Ocampo et al.
The output tensor has shape kernel_shape x nlat_out x (nlat_in * nlon_in). This function takes a convolution tensor that was generated by the serial routine and filters
it to only include entries corresponding to the local latitude slice assigned to this process.
The rotation of the Euler angles uses the YZY convention, which applied to the northpole $(0,0,1)^T$ yields The filtering is done based on the polar group rank and the computed split shapes.
$$
Y(\alpha) Z(\beta) Y(\gamma) n =
{\begin{bmatrix}
\cos(\gamma)\sin(\alpha) + \cos(\alpha)\cos(\beta)\sin(\gamma) \\
\sin(\beta)\sin(\gamma) \\
\cos(\alpha)\cos(\gamma)-\cos(\beta)\sin(\alpha)\sin(\gamma)
\end{bmatrix}}
$$
Parameters Parameters
---------- ----------
idx: torch.Tensor
Indices of the pre-computed convolution tensor
vals: torch.Tensor
Values of the pre-computed convolution tensor
in_shape: Tuple[int] in_shape: Tuple[int]
Shape of the input tensor Shape of the input tensor (nlat_in, nlon_in)
out_shape: Tuple[int] out_shape: Tuple[int]
Shape of the output tensor Shape of the output tensor (nlat_out, nlon_out)
filter_basis: FilterBasis
Filter basis to use
grid_in: str
Grid type for the input tensor
grid_out: str
Grid type for the output tensor
theta_cutoff: float
Theta cutoff for the filter basis
theta_eps: float
Epsilon for the theta cutoff
transpose_normalization: bool
Whether to transpose the normalization
basis_norm_mode: str
Normalization mode for the filter basis
merge_quadrature: bool
Whether to merge the quadrature weights
Returns Returns
------- -------
out_idx: torch.Tensor idx: torch.Tensor
Indices of the output tensor Filtered indices corresponding to the local latitude slice
out_vals: torch.Tensor vals: torch.Tensor
Values of the output tensor Filtered values corresponding to the local latitude slice
""" """
assert len(in_shape) == 2 assert len(in_shape) == 2
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment