credit.transforms.transforms_les
================================

.. py:module:: credit.transforms.transforms_les

.. autoapi-nested-parse::

   normalize_les.py
   -------------------------------------------------------
   Content
       - NormalizeLES
       - ToTensorLES



Attributes
----------

.. autoapisummary::

   credit.transforms.transforms_les.logger


Classes
-------

.. autoapisummary::

   credit.transforms.transforms_les.NormalizeLES
   credit.transforms.transforms_les.ToTensorLES


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

.. py:data:: logger

.. py:class:: NormalizeLES(conf)

   .. py:attribute:: mean_ds


   .. py:attribute:: std_ds


   .. py:attribute:: mean_tensors


   .. py:attribute:: std_tensors


   .. py:attribute:: levels


   .. py:attribute:: varname_upper_air


   .. py:attribute:: num_upper_air


   .. py:attribute:: flag_surface


   .. py:attribute:: flag_dyn_forcing


   .. py:attribute:: flag_diagnostic


   .. py:attribute:: flag_forcing


   .. py:attribute:: flag_static


   .. py:method:: __call__(sample, inverse: bool = False)


   .. py:method:: transform_array(x: torch.Tensor) -> torch.Tensor

      This function applies to y_pred, so there won't be dynamic forcing, forcing, and static variables.



   .. py:method:: transform(sample: Dict[str, numpy.ndarray]) -> Dict[str, numpy.ndarray]

      This function transforms training batches, it handles forcing & static as follows:
          - forcing & static don't need to be transformed; users should transform them and save them to the file
          - other variables (upper-air, surface, dynamic forcing, diagnostics) need to be transformed



   .. py:method:: inverse_transform(x: torch.Tensor) -> torch.Tensor

      This function applies to y_pred, so there won't be dynamic forcing, forcing, and static vars



   .. py:method:: inverse_transform_input(x: torch.Tensor) -> torch.Tensor

      Inverse transform for input x.
      Forcing and static variables are not transformed
      (they were not transformed in the transform function).



.. py:class:: ToTensorLES(conf)

   .. py:attribute:: conf


   .. py:attribute:: output_dtype
      :value: Ellipsis



   .. py:attribute:: hist_len


   .. py:attribute:: for_len


   .. py:attribute:: flag_surface


   .. py:attribute:: flag_dyn_forcing


   .. py:attribute:: flag_diagnostic


   .. py:attribute:: flag_forcing


   .. py:attribute:: flag_static


   .. py:attribute:: varname_upper_air


   .. py:attribute:: num_forcing_static
      :value: 0



   .. py:method:: __call__(sample)


