Skip to content

InterpEquirectangular

GlobalNADANVIDIAPyTorch

Import path: earth2studio.models.da.InterpEquirectangular

View source on GitHub View install commands

Documentation

Bases: Module

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 (ndarray | None, default: None ) –

    Latitude coordinates for output grid, by default None (uses default grid over CONUS)

  • lon (ndarray | None, default: None ) –

    Longitude coordinates for output grid, by default None (uses default grid over CONUS)

  • interp_method (str, default: 'smolyak' ) –

    Interpolation method to use: 'nearest' or 'smolyak', by default "smolyak"

  • time_tolerance (TimeTolerance, default: timedelta64(10, 'm') ) –

    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__

__call__(obs: DataFrame) -> DataArray

Stateless forward pass

create_generator

create_generator() -> Generator[DataArray, DataFrame, None]

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

Yields:

  • DataArray –

    Assimilated data output the generator yields

Receives:

  • *DataFrame –

    Observations sent via generator.send()