neural_lam.datastore
====================

.. py:module:: neural_lam.datastore

.. autoapi-nested-parse::

   Datastore backends for loading and serving weather model data.



Submodules
----------

.. toctree::
   :maxdepth: 1

   /api/neural_lam/datastore/base/index
   /api/neural_lam/datastore/mdp/index
   /api/neural_lam/datastore/npyfilesmeps/index
   /api/neural_lam/datastore/plot_example/index


Attributes
----------

.. autoapisummary::

   neural_lam.datastore.DATASTORES
   neural_lam.datastore.DATASTORE_CLASSES


Functions
---------

.. autoapisummary::

   neural_lam.datastore.init_datastore


Package Contents
----------------

.. py:function:: init_datastore(datastore_kind: str, config_path: str | pathlib.Path, n_boundary_points: int | None = None) -> base.BaseDatastore

   Instantiate a datastore based on its short-name identifier.

   :param datastore_kind: Key corresponding to one of :data:`DATASTORES`.
   :type datastore_kind: str
   :param config_path: Path to the datastore-specific configuration file.
   :type config_path: str | pathlib.Path
   :param n_boundary_points: Forwarded to :class:`~neural_lam.datastore.mdp.MDPDatastore` when
                             ``datastore_kind`` is ``"mdp"``, overriding its default boundary-mask
                             width. Must be left unset for other datastore kinds.
   :type n_boundary_points: int, optional

   :returns: Concrete datastore instance configured for ``config_path``.
   :rtype: BaseDatastore

   :raises NotImplementedError: If ``datastore_kind`` is not registered.
   :raises ValueError: If ``n_boundary_points`` is set for a ``datastore_kind`` other than
       :data:`MDPDatastore.SHORT_NAME`.


.. py:data:: DATASTORES

.. py:data:: DATASTORE_CLASSES

