Configuration Classes
Defined in DisortConfig.hpp and DisortFluxConfig.hpp.
DisortFlags
Control flags for the general solver.
struct DisortFlags {
bool use_user_tau = false;
bool use_user_mu = false;
BoundaryConditionType ibcnd = BoundaryConditionType::General;
bool use_lambertian_surface = true;
bool use_thermal_emission = false;
bool use_spherical_beam = false;
bool comp_only_fluxes = false;
BrdfType brdf_type = BrdfType::None;
bool intensity_corr_buras = false;
bool intensity_corr_nakajima = false;
bool use_delta_m_plus = false;
bool use_diffusion_lower_bc = false;
bool output_fourier_expansion = false;
};
Member |
Default |
Description |
|---|---|---|
|
|
Return radiant quantities at user-specified optical depths
( |
|
|
Return intensities at user-specified polar angles ( |
|
|
Boundary condition type. |
|
|
Use an isotropically reflecting (Lambertian) bottom boundary with
reflectivity |
|
|
Include thermal emission. Requires |
|
|
Use pseudo-spherical geometry for the direct beam attenuation. The diffuse calculation remains plane-parallel. |
|
|
Compute only fluxes and mean intensities (skip angular intensities). Significantly faster when intensities are not needed. |
|
|
Type of BRDF model for the surface. When not |
|
|
Apply the Buras & Emde single-scattering intensity correction. |
|
|
Apply the Nakajima & Tanaka (1988) TMS/IMS intensity correction. |
|
|
Use Delta-M+ scaling (Lin et al. 2018) instead of standard Delta-M. |
|
|
Use the diffusion approximation as the lower boundary condition.
Designed for stellar atmospheres where there is no surface.
The upward intensity at the bottom boundary is set to
\(I(\mu) = B(T_\mathrm{bottom}) + \mu\,\mathrm{d}B/\mathrm{d}\tau\),
where \(\mathrm{d}B/\mathrm{d}\tau\) is estimated from the
temperature gradient in the deepest layer.
Requires |
|
|
Return the Fourier expansion of the intensity as a separate output
in |
BoundaryConditions
Boundary condition parameters.
struct BoundaryConditions {
double direct_beam_flux = 0.0;
double direct_beam_mu = 0.5;
double direct_beam_phi = 0.0;
double isotropic_flux_top = 0.0;
double isotropic_flux_bottom = 0.0;
double temperature_top = 0.0;
double temperature_bottom = 0.0;
double emissivity_top = 1.0;
double surface_albedo = 0.0;
};
Member |
Default |
Description |
|---|---|---|
|
0.0 |
Intensity of the incident parallel beam at the top boundary. |
|
0.5 |
Cosine of the polar angle of the incident beam (positive, measured from the normal). |
|
0.0 |
Azimuth angle of the incident beam [degrees, 0–360]. |
|
0.0 |
Intensity of isotropic illumination at the top boundary. |
|
0.0 |
Intensity of isotropic illumination at the bottom boundary. |
|
0.0 |
Temperature of the top boundary [K]. |
|
0.0 |
Temperature of the bottom boundary [K]. |
|
1.0 |
Emissivity of the top boundary. |
|
0.0 |
Lambertian albedo of the bottom boundary. |
BRDF specifications
RpvBrdfSpec
Rahman-Pinty-Verstraete BRDF parameters.
struct RpvBrdfSpec {
double rho0 = 0.0;
double k = 0.0;
double theta = 0.0;
double sigma = 0.0; // snow extension
double t1 = 0.0; // snow extension
double t2 = 0.0; // snow extension
double scale = 1.0;
};
AmbralsBrdfSpec
Ambrals (Ross-Li) kernel-based BRDF parameters.
struct AmbralsBrdfSpec {
double iso = 0.0; // isotropic component
double vol = 0.0; // volumetric component
double geo = 0.0; // geometric component
};
CoxMunkBrdfSpec
Cox & Munk ocean surface BRDF parameters.
struct CoxMunkBrdfSpec {
double u10 = 0.0; // wind speed at 10 m [m/s]
double pcl = 0.0; // pigment concentration
double xsal = 0.0; // salinity
double refractive_index = 1.34; // refractive index of water
bool do_shadow = true; // enable Tsang shadowing
};
HapkeBrdfSpec
Hapke opposition-effect BRDF parameters.
struct HapkeBrdfSpec {
double b0 = 1.0; // opposition effect amplitude
double hh = 0.06; // opposition effect angular width
double w = 0.6; // single-scattering albedo of surface
};
BrdfSpecification
Container holding the active BRDF model.
struct BrdfSpecification {
std::optional<RpvBrdfSpec> rpv;
std::optional<AmbralsBrdfSpec> ambrals;
std::optional<CoxMunkBrdfSpec> cox_munk;
std::optional<HapkeBrdfSpec> hapke;
void setRpv(const RpvBrdfSpec& spec);
void setAmbrals(const AmbralsBrdfSpec& spec);
void setCoxMunk(const CoxMunkBrdfSpec& spec);
void setHapke(const HapkeBrdfSpec& spec);
};
Set the appropriate BRDF specification using the setter methods. The BRDF
type must match DisortFlags::brdf_type.
DisortConfig
Main configuration class for the general solver.
Defined in DisortConfig.hpp.
Constructors
DisortConfig();
DisortConfig(int num_layers, int num_streams, int num_phase_func_moments = 0);
The parameterised constructor sets the three core dimensions. Call
allocate() after setting all dimension and flag fields to allocate the
internal arrays.
Nested structs
DisortFlags flags; // control flags
BoundaryConditions bc; // boundary conditions
BrdfSpecification brdf; // BRDF specification
Dimension members
Member |
Description |
|---|---|
|
Number of atmospheric layers. |
|
Number of computational streams (must be even, >= 4). |
|
Number of phase function Legendre moments (not counting the zeroth). |
|
Number of user-specified optical depths for output. |
|
Number of user-specified polar angle cosines for intensity output. |
|
Number of azimuthal output angles. |
|
Number of scattering angle grid points (for tabulated phase functions). |
Physical parameters
Member |
Description |
|---|---|
|
Lower wavenumber bound [cm-1] for Planck function integration. |
|
Upper wavenumber bound [cm-1]. |
|
Convergence criterion for the azimuthal Fourier series (0 = use default). |
|
Planetary radius [km] for pseudo-spherical geometry. |
Array members
These are allocated by allocate() and must be filled before calling the
solver.
Member |
Description |
|---|---|
|
Optical depth of each layer [ |
|
Single-scattering albedo of each layer [ |
|
Phase function Legendre moments
[ |
|
Temperature at each level [ |
|
Altitude at each level [ |
|
User-specified optical depths [ |
|
User-specified polar angle cosines [ |
|
User-specified azimuthal angles [degrees] [ |
|
Scattering angle cosines for tabulated phase functions
[ |
|
Tabulated phase function values
[ |
Methods
- int nmomNstr() const
Returns
max(num_phase_func_moments, num_streams).
- void allocate()
Allocate all internal arrays based on the current dimension and flag settings. Must be called after setting dimensions and before filling arrays.
- void validate() const
Validate the configuration. Throws
std::invalid_argumentif any parameter is out of range or inconsistent.
- void setHenyeyGreenstein(double g, int lc = -1)
Fill the phase function moments with the Henyey-Greenstein function (\(\chi_k = g^k\)). If
lc >= 0, only fill layerlc; otherwise fill all layers.
- void setIsotropic(int lc = -1)
Set isotropic scattering for the specified layer(s).
- void setRayleigh(int lc = -1)
Set Rayleigh scattering for the specified layer(s).
- void setHazeGarciaSiewert(int lc = -1)
Set the Haze-L phase function (Garcia & Siewert, 1985).
- void setCloudGarciaSiewert(int lc = -1)
Set the Cloud C.1 phase function (Garcia & Siewert, 1985).
- void setPhaseFunction(PhaseFunction type, double g = 0.0, int lc = -1)
Set the phase function by enum type. The parameter g is used only for
HenyeyGreenstein.
DisortFluxConfig
Lightweight configuration for the flux-only solver. All fields are flat (no nested structs) for minimal overhead.
Defined in DisortFluxConfig.hpp.
Constructors
DisortFluxConfig();
DisortFluxConfig(int num_layers, int num_streams, int num_phase_func_moments = 0);
Members
Dimensions:
int num_layers– Number of atmospheric layers.int num_streams– Number of streams (must match the template parameter ofDisortFluxSolver<NStr>).int num_phase_func_moments– Number of phase function moments.
Flags:
bool use_thermal_emission– Include thermal emission (default:false).bool use_spherical_beam– Pseudo-spherical beam geometry (default:false).bool use_delta_m_plus– Delta-M+ scaling (default:false).bool use_diffusion_lower_bc– Use diffusion approximation for the lower boundary condition (default:false). SeeDisortFlagsfor details.
Boundary conditions:
double direct_beam_flux– Incident beam intensity (default: 0).double direct_beam_mu– Beam polar angle cosine (default: 0.5).double isotropic_flux_top– Isotropic top illumination (default: 0).double isotropic_flux_bottom– Isotropic bottom illumination (default: 0).double temperature_top– Top boundary temperature [K] (default: 0).double temperature_bottom– Bottom boundary temperature [K] (default: 0).double emissivity_top– Top boundary emissivity (default: 1).double surface_albedo– Lambertian surface albedo (default: 0).
Physical parameters:
double wavenumber_low– Lower wavenumber [cm-1] (default: 0).double wavenumber_high– Upper wavenumber [cm-1] (default: 0).double bottom_radius– Planetary radius [km] (default: 0).
Arrays (allocated by allocate()):
vector<double> delta_tau– Layer optical depths [num_layers].vector<double> single_scat_albedo– Layer single-scattering albedos [num_layers].vector<vector<double>> phase_function_moments– Phase function moments [num_layers][nmomNstr()+1].vector<double> temperature– Level temperatures [num_layers+1].vector<double> level_altitudes– Level altitudes [num_layers+1].
Methods
DisortFluxConfig provides the same methods as DisortConfig:
nmomNstr(), allocate(), validate(), setHenyeyGreenstein(),
setIsotropic(), setRayleigh(), setHazeGarciaSiewert(),
setCloudGarciaSiewert(), and setPhaseFunction().