neural_lam.datastore#

Datastore backends for loading and serving weather model data.

Submodules#

Attributes#

Functions#

init_datastore(→ base.BaseDatastore)

Instantiate a datastore based on its short-name identifier.

Package Contents#

neural_lam.datastore.init_datastore(datastore_kind: str, config_path: str | pathlib.Path, n_boundary_points: int | None = None) → base.BaseDatastore[source]#

Instantiate a datastore based on its short-name identifier.

Parameters:
  • datastore_kind (str) – Key corresponding to one of DATASTORES.

  • config_path (str | pathlib.Path) – Path to the datastore-specific configuration file.

  • n_boundary_points (int, optional) – Forwarded to MDPDatastore when datastore_kind is "mdp", overriding its default boundary-mask width. Must be left unset for other datastore kinds.

Returns:

Concrete datastore instance configured for config_path.

Return type:

BaseDatastore

Raises:
  • NotImplementedError – If datastore_kind is not registered.

  • ValueError – If n_boundary_points is set for a datastore_kind other than MDPDatastore.SHORT_NAME.

neural_lam.datastore.DATASTORES#
neural_lam.datastore.DATASTORE_CLASSES#