skyscapes.physical_model.exojax.components.clouds
=================================================

.. py:module:: skyscapes.physical_model.exojax.components.clouds

.. autoapi-nested-parse::

   Cloud opacity components.



Attributes
----------

.. autoapisummary::

   skyscapes.physical_model.exojax.components.clouds.DEFAULT_CLOUD_SSA
   skyscapes.physical_model.exojax.components.clouds.DEFAULT_CLOUD_ASYMMETRY_G
   skyscapes.physical_model.exojax.components.clouds.DEFAULT_CLOUD_LOG_SIGMA


Classes
-------

.. autoapisummary::

   skyscapes.physical_model.exojax.components.clouds.GrayCloud
   skyscapes.physical_model.exojax.components.clouds.NoCloud


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

.. py:data:: DEFAULT_CLOUD_SSA
   :value: 1.0


.. py:data:: DEFAULT_CLOUD_ASYMMETRY_G
   :value: 0.85


.. py:data:: DEFAULT_CLOUD_LOG_SIGMA
   :value: 0.3


.. py:class:: GrayCloud

   Bases: :py:obj:`skyscapes.physical_model.exojax.components.base.AbstractClouds`


   Single-layer gray-scattering cloud.

   The total cloud scattering optical depth is distributed across
   layers via a Gaussian in log-pressure (softmax-normalised so the
   weights are well-defined even when the cloud pressure is far
   outside the layer grid -- useful for ablation runs with
   ``log_opt_depth = -inf``).

   Wavelength-grey: the cloud's cross-section is constant across the
   spectrum. A Mie cloud with composition-dependent scattering would
   be a separate component implementing the same contract.

   Attributes (PyTree leaves, fittable):
       log_pressure_bar: Log10 cloud-deck pressure [bar], shape ``(K,)``.
       log_opt_depth: Log10 of the vertically-integrated cloud
           scattering optical depth, shape ``(K,)``.

   Static attributes (configuration):
       ssa: Single-scattering albedo (default 1.0, pure scattering).
       g: Asymmetry parameter (default 0.85, forward-peaked).
       log_sigma: Vertical-distribution width in log10(P) [dex].


   .. py:attribute:: log_pressure_bar
      :type:  jaxtyping.Array


   .. py:attribute:: log_opt_depth
      :type:  jaxtyping.Array


   .. py:attribute:: ssa
      :type:  float


   .. py:attribute:: g
      :type:  float


   .. py:attribute:: log_sigma
      :type:  float


   .. py:method:: compute(log_pressure_bar_scalar, log_opt_depth_scalar, pressure, n_nu)

      Gray cloud contribution at a single pressure level.



.. py:class:: NoCloud

   Bases: :py:obj:`skyscapes.physical_model.exojax.components.base.AbstractClouds`


   Disable cloud opacity: zero contribution.

   Equivalent to a ``GrayCloud`` with ``log_opt_depth = -inf`` but
   structurally explicit, so that ``isinstance(atm.clouds, NoCloud)``
   documents intent in code that builds cloud-free atmospheres.


   .. py:method:: compute(log_pressure_bar_scalar, log_opt_depth_scalar, pressure, n_nu)

      Return zero-everywhere cloud contribution.

      ``log_pressure_bar_scalar`` and ``log_opt_depth_scalar`` are
      accepted for parity with :class:`GrayCloud` but unused.



