credit.transforms.transforms_wrf
================================

.. py:module:: credit.transforms.transforms_wrf

.. autoapi-nested-parse::

   normalize_wrf.py
   -------------------------------------------------------
   Content
       - NormalizeWRF
       - ToTensorWRF



Attributes
----------

.. autoapisummary::

   credit.transforms.transforms_wrf.logger


Classes
-------

.. autoapisummary::

   credit.transforms.transforms_wrf.NormalizeWRF
   credit.transforms.transforms_wrf.ToTensorWRF


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

.. py:data:: logger

.. py:class:: NormalizeWRF(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:attribute:: mean_ds_outside


   .. py:attribute:: std_ds_outside


   .. py:attribute:: mean_tensors_outside


   .. py:attribute:: std_tensors_outside


   .. py:attribute:: levels_outside


   .. py:attribute:: varname_upper_air_outside


   .. py:attribute:: num_upper_air_outside


   .. py:attribute:: flag_surface_outside


   .. 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 boundary input, forcing, and static variables.



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

      This function transforms training batches
          - forcing & static don't need to be transformed; users should transform them and save them to the file
          - other variables 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:class:: ToTensorWRF(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:attribute:: hist_len_outside


   .. py:attribute:: for_len_outside


   .. py:attribute:: flag_surface_outside


   .. py:attribute:: varname_upper_air_outside


   .. py:method:: __call__(sample)


