windkit.spatial.to_stacked_point#

windkit.spatial.to_stacked_point(obj_in, _honor_pwio=False)[source]#

Converts a WindKit dataset or dataarray to a ‘stacked_point’ structure

Parameters:

obj (xarray.Dataset, xarray.DataArray) – WindKit xarray.Dataset or DataArray containing spatial dimensions and CRS variable

Returns:

WindKit xarray dataset or dataarray as a ‘stacked_point’ structure

Return type:

xarray.Dataset, xaray.DataArray

Notes

Variables with height_dim_policy: "forbidden" metadata are returned without a height dimension. A warning is raised if such a variable’s values genuinely vary with height; this check is skipped for chunked (dask-backed) variables to avoid forcing a compute. For objects carrying internal stacking metadata (created by _spatial_stack), the private _pwio_data_is_2d attribute recorded at stacking time takes precedence, so internal round trips restore the original structure exactly.