earth2studio.data.prep_data_array#

earth2studio.data.prep_data_array(da, device='cpu')[source]#

Prepares a data array from a data source for inference workflows by converting the data array to a torch tensor and the coordinate system to an OrderedDict.

Parameters:
  • da (xr.DataArray) – Input data array

  • device (torch.device, optional) – Torch devive to load data tensor to, by default “cpu”

Returns:

Tuple containing output tensor and coordinate OrderedDict

Return type:

tuple[torch.Tensor, CoordSystem]

Examples using earth2studio.data.prep_data_array#

Generative Downscaling

Generative Downscaling