credit.xr_sampler
=================

.. py:module:: credit.xr_sampler


Attributes
----------

.. autoapisummary::

   credit.xr_sampler.config


Classes
-------

.. autoapisummary::

   credit.xr_sampler.XRSamplerByYear


Module Contents
---------------

.. py:class:: XRSamplerByYear(config_path, conf=None)

   given a conf and datetime, samples an xarray with only variables specified in conf["data"]
   WARNING: only compatible with single zarr store for all variables
   - excludes static variables
   - only compatible with files with the year in their filename

   future features:
   - keep variables based on predict.save_vars
   - handle multiple zarr stores


   .. py:attribute:: filenames


   .. py:attribute:: variables
      :value: []



   .. py:attribute:: current_file_year
      :value: -1



   .. py:method:: __call__(timestamp: numpy.datetime64)


.. py:data:: config
   :value: '/glade/work/dkimpara/CREDIT_runs/cesm_rollout/model.yml'


