eradiate.data.io.load_aerosol_libradtran

eradiate.data.io.load_aerosol_libradtran(data, particle_shape=None, tolerance=None, wbounds=(None, None), fallback_units=None, **kwargs)[source]

Convert a libRadtran NetCDF aerosol file to the Eradiate aerosol data format. Both effective radius and humidity-indexed data are supported.

Parameters:
  • data (Dataset or path-like) – A libRadtran NetCDF aerosol dataset. If a path is passed, it will be resolved by the file resolver and tentatively loaded into memory.

  • particle_shape ({"spherical", "spheroidal"}, optional) – The expected shape of the particle (this will tell the phase matrix coefficients it should expect). If unset, the shape is inferred from the input dataset.

  • reff, hum (float or quantity) – For datasets with a humidity or effective radius dimension, the coordinate point to select. By default, the nearest data point is selected; tolerance can be adjusted using the tolerance parameter. Quantities are accepted (see Notes for expected dimensions and defaults). These parameters are optional if the dataset has only one point on these dimensions.

  • wbounds (tuple, optional) – Bounds to restrict the spectral domain where conversion is performed. This parameter accepts a tuple with the minimum and maximum values (use None to leave a bound open). Examples: (300, 3000), (None, 3000), (0.3, 3) * ureg.micron, (None, 3 * ureg.micron).

  • tolerance (dict) – A mapping that allows to specify a tolerance for nearest neighbour lookup for relevant parameters. Units are applied with the same rules as for the reff and hum parameters.

  • fallback_units (dict, optional) – A mapping that specifies units to apply to variables that are missing them.

Returns:

Dataset

Notes

Parameter

Dimension

Default units

reff

Length

μm

hum

Dimensionless (fraction)

percent

wbounds

Wavelength

ucc.get("wavelength") (usually, nm)

  • The current implementation resamples the angular dimension at the highest resolution to minimize the loss of information on phase matrix coefficients.

  • All conversion is done in memory: very large dataset might result in massive converted data. In such case, an easy way to split the conversion is to chunk it on the spectral dimension.