earth2studio.models.da.InterpEquirectangular#

class earth2studio.models.da.InterpEquirectangular(lat=None, lon=None, interp_method='smolyak', tolerance=numpy.timedelta64(10, 'm'))[source]#

Interpolation assimilation model that interpolates sparse observations to a lat-lon grid.

This is a sample implementation of an AssimilationModel that: - Accepts DataFrames with observations (time, lat, lon, observation, variable) - Interpolates observations to a regular lat-lon grid using specified method - Validates input observations against schema constraints - Supports interpolation methods: ‘nearest’ or ‘smolyak’ (Smolyak sparse grid algorithm)

Parameters:
  • lat (np.ndarray | None, optional) – Latitude coordinates for output grid, by default None (uses default grid over CONUS)

  • lon (np.ndarray | None, optional) – Longitude coordinates for output grid, by default None (uses default grid over CONUS)

  • interp_method (str, optional) – Interpolation method to use: ‘nearest’ or ‘smolyak’, by default “smolyak”

  • tolerance (TimeTolerance, optional) – Time tolerance for filtering observations. Observations within the tolerance window around each requested time will be used for interpolation, by default np.timedelta64(10, “m”)

Raises:

ValueError – If interp_method is not one of the supported methods

__call__(x)[source]#

Stateless forward pass

Parameters:

x (DataFrame)

Return type:

DataArray

create_generator()[source]#

Creates a generator which accepts collection of input observations and outputs a collection of assimilated data.

Parameters:
  • x (AssimilationInput) – Input configuration for the assimilation model

  • *DataFrame – Observations sent via generator.send()

Yields:

xr.DataArray – Assimilated data output the generator yields

Return type:

Generator[DataArray, DataFrame, None]