sasktran2.optical.HenyeyGreenstein#
- class sasktran2.optical.HenyeyGreenstein(db_filepath: Path | None = None, db: Dataset | None = None, max_num_moments: int = 128)[source]#
Bases:
OpticalDatabaseAn optical property that uses a Henyey-Greenstein phase function. I.e., the phase function is defined from a single asymmetry parameter g.
The input should either be a path to a netCDF file containing the database, or an xarray Dataset.
The dataset must contain the following variables:
xs_total: Total extinction cross-section in [m^2]
ssa: Single scattering albedo (unitless)
asymmetry_parameter: Asymmetry parameter (unitless)
with Coordinates: - wavelength_nm: Wavelength in [nm]
The variables may have additional dimensions corresponding to different parameters (e.g., temperature).
- Parameters:
db_filepath (Path | None, optional) – Path to a netCDF file containing the database, by default None
db (xr.Dataset | None, optional) – An xarray Dataset containing the database, by default None
- __init__(db_filepath: Path | None = None, db: Dataset | None = None, max_num_moments: int = 128) None[source]#
An optical property that uses a Henyey-Greenstein phase function. I.e., the phase function is defined from a single asymmetry parameter g.
The input should either be a path to a netCDF file containing the database, or an xarray Dataset.
The dataset must contain the following variables:
xs_total: Total extinction cross-section in [m^2]
ssa: Single scattering albedo (unitless)
asymmetry_parameter: Asymmetry parameter (unitless)
with Coordinates: - wavelength_nm: Wavelength in [nm]
The variables may have additional dimensions corresponding to different parameters (e.g., temperature).
- Parameters:
db_filepath (Path | None, optional) – Path to a netCDF file containing the database, by default None
db (xr.Dataset | None, optional) – An xarray Dataset containing the database, by default None
Methods
__init__([db_filepath, db, max_num_moments])An optical property that uses a Henyey-Greenstein phase function.
atmosphere_quantities(atmo, **kwargs)cross_section_derivatives(wavelengths_nm, ...)cross_sections(wavelengths_nm, altitudes_m, ...)from_parameters(wavelength_nm, xs_total, ssa, g)Create a Henyey-Greenstein optical database from parameter arrays.
optical_derivatives(atmo, **kwargs)- classmethod from_parameters(wavelength_nm: array, xs_total: array, ssa: array, g: array, max_num_moments: int = 128) HenyeyGreenstein[source]#
Create a Henyey-Greenstein optical database from parameter arrays. Note that these parameters are thus geometry independent, i.e., do not depend on altitude or location.
- Parameters:
wavelength_nm (np.array) – Wavelength in [nm]
xs_total (np.array) – Total extinction cross-section in [m^2]
ssa (np.array) – Single scattering albedo (unitless)
g (np.array) – Asymmetry parameter (unitless)
max_num_moments (int, optional) –
- Maximum number of moments to use, should be set higher than the number of streams
used in the calculation. by default 128