eradiate.radprops.ArrayRadProfile#

class eradiate.radprops.ArrayRadProfile(sigma_a=None, sigma_s=None, has_absorption=True, has_scattering=True, interpolation_method='nearest', interpolation_kwargs=NOTHING, *, rayleigh_depolarization=NOTHING)[source]#

Bases: RadProfile

Array radiative profile.

This class provides an interface to generate vertical profiles of atmospheric volume radiative properties (also sometimes referred to as collision coefficients).

The array radiative profile is built from absorption and scattering coefficient data provided as input. This can be useful for debugging and benchmarking.

Parameters:
  • sigma_a (DataArray or None, default: None) – DataArray of absorption coefficients. The DataArray is composed of two dimensions {w, z} representing the wavelength and altitude respectively. Note that w must be of length 2 minimum to be correctly interpolated.

  • sigma_s (DataArray or None, default: None) – DataArray of scattering coefficients. The DataArray is composed of two dimensions {w, z} representing the wavelength and altitude respectively. Note that w must be of length 2 minimum to be correctly interpolated.

  • has_absorption (bool, default: True) – Absorption switch. If True, the absorption coefficient is computed. Else, the absorption coefficient is not computed and instead set to zero.

  • has_scattering (bool, default: True) – Scattering switch. If True, the scattering coefficient is computed. Else, the scattering coefficient is not computed and instead set to zero.

  • rayleigh_depolarization (array-like, optional, default: [0]) – Depolarization factor of the rayleigh phase function. A ndarray will be interpreted as a description of the depolarization factor at different levels of the atmosphere. Must be shaped (N,) with N the number of layers.

  • interpolation_method ({'nearest', 'linear'}, default: nearest) – Method of interpolation of the absorption and scattering coefficients.

  • interpolation_kwargs (dict, optional) – Keyword arguments passed to xarray.DataArray.interp() when called.

Fields:
  • sigma_a (DataArray or None) – DataArray of absorption coefficients.

  • sigma_s (DataArray or None) – DataArray of scattering coefficients.

  • has_absorption (bool) – Absorption switch.

  • has_scattering (bool) – Scattering switch.

  • rayleigh_depolarization (ndarray) – Depolarization factor of the rayleigh phase function.

  • interpolation_method (str) – Method of interpolation of the absorption and scattering coefficients.

  • interpolation_kwargs (dict) – Keyword arguments passed to xarray.DataArray.interp() when called.

eval_albedo(si, zgrid=None)#

Evaluate albedo at given spectral index.

Parameters:
  • si (SpectralIndex) – Spectral index.

  • zgrid (ZGrid, optional) – The altitude grid for which the albedo is evaluated. If unset, a profile-specific default is used.

Returns:

quantity – Evaluated spectrum as an array with length equal to the number of layers.

eval_dataset(si, zgrid=None)#

Evaluate radiative properties at given spectral index.

Parameters:
  • si (SpectralIndex) – Spectral index.

  • zgrid (ZGrid, optional) – The altitude grid for which the radiative profile is evaluated. If unset, a profile-specific default is used.

Returns:

Dataset – Radiative property dataset.

eval_depolarization_factor(si, zgrid=None)#

Evaluate depolarization factor at given spectral index.

Parameters:
  • si (SpectralIndex) – Spectral index.

  • zgrid (ZGrid, optional) – The altitude grid for which the depolarization factor is evaluated. If unset, a profile-specific default is used.

Returns:

quantity – Evaluated depolarization factor as an array with length equal to the number of layers if it is parametrized over layers, otherwise as an array of length 1.

eval_sigma_a(si, zgrid=None)#

Evaluate absorption coefficient at given spectral index.

Parameters:
  • si (SpectralIndex) – Spectral index.

  • zgrid (ZGrid, optional) – The altitude grid for which the absorption coefficient is evaluated. If unset, a profile-specific default is used.

Returns:

quantity – Evaluated spectrum as an array with length equal to the number of layers.

eval_sigma_a_ckd(w, g, zgrid)[source]#

Evaluate absorption coefficient spectrum in CKD modes.

eval_sigma_a_mono(w, zgrid)[source]#

Evaluate absorption coefficient spectrum in monochromatic mode.

eval_sigma_s(si, zgrid=None)#

Evaluate scattering coefficient at given spectral index.

Parameters:
  • si (SpectralIndex) – Spectral index.

  • zgrid (ZGrid, optional) – The altitude grid for which the scattering coefficient is evaluated. If unset, a profile-specific default is used.

Returns:

quantity – Evaluated spectrum as an array with length equal to the number of layers.

eval_sigma_t(si, zgrid=None)#

Evaluate extinction coefficient at given spectral index.

Parameters:
  • si (SpectralIndex) – Spectral index.

  • zgrid (ZGrid, optional) – The altitude grid for which the extinction coefficient is evaluated. If unset, a profile-specific default is used.

Returns:

quantity – Evaluated spectrum as an array with length equal to the number of layers.

property zbounds#

Bounds of the z profile.

property zgrid#

Default altitude grid used for profile evaluation.