windkit.wind_climate.get_cross_predictions

windkit.wind_climate.get_cross_predictions(wcs, wcs_src=None, include_self_predictions=True, only_upward_extrapolations=True, filter_range=None, sample_size=None, seed=4)[source]

Get cross predictions from a dataset

Given the filtering options, return a dataset with the points where we want to predict from and where we want to predict to.

Parameters:
  • wcs (xarray.Dataset) – wind climate xarray.Dataset for which we want to do cross predictions

  • wcs_src (xarray.Dataset) – wind climate xarray.Dataset used as source for the cross predictions. If None, wcs is used as source and as target. Defaults to None.

  • include_self_predictions (bool) – A self prediction is a pair of points where the input point is the exact same as the output point. Keep self predictions in the dataset?

  • only_upward_extrapolations (bool) – Keep only the cross predictions where the height of point_in >= the height of point_out?

  • filter_range (list) – height range that we want to retain from the input dataset

  • sample_size (int) – Number of samples to take from the input dataset

  • seed (int) – Seed number for the random sampling, if applied

Returns:

  • from_locs (xr.Dataset) – xarray dataset with input locations

  • to_locs (xr.Dataset) – xarray dataset with target locations