earthkit.meteo.regimes.xarray.project¶
- earthkit.meteo.regimes.xarray.project(fields, patterns, weights, patterns_coords=None)¶
Project onto the given patterns.
- Parameters:
fields (
xarray.DataArray) – Input field(s) to project. The patterns are projected onto the trailing dimensions of the input fields.patterns (
earthkit.meteo.regimes.Patterns) – Patterns to project on.weights (
xarray.DataArray) – Weights for the summation in the projection. Weights are normalised before application so the sum of weights over the domain equals 1.patterns_coords (
Mapping[str,str] | Sequence[str], optional) – Mapping of coordinate names to keyword arguments of the pattern generation function. If a sequence is given, argument and associated coordinate names are assumed to be identical. Only coordinates that are dimensions of fields can be mapped.
- Returns:
The projection(s) for each pattern, with rightmost a
"pattern"dimension replacing the spatial dimension(s) reduced in the projection.- Return type: