Earth2Studio is now OSS!

earth2studio.data.DataSetFile#

class earth2studio.data.DataSetFile(file_path, array_name, **xr_args)[source]#

A local xarray dataset file data source. This file should be compatable with xarray. For example, a netCDF file.

Parameters:
  • file_path (str) – Path to xarray dataset compatible file.

  • array_name (str) – Data array name in xarray dataset

  • xr_args (Any)

__call__(time, variable)[source]#

Function to get data.

Parameters:
  • time (datetime | list[datetime] | TimeArray) – Timestamps to return data for.

  • variable (str | list[str] | VariableArray) – Strings or list of strings that refer to variables to return.

Returns:

Loaded data array

Return type:

xr.DataArray