sasktran2.Config#
- class sasktran2.Config[source]#
Bases:
objectObject which stores all of the configuration settings for the radiative transfer calculation.
- __init__()[source]#
Object which stores all of the configuration settings for the radiative transfer calculation.
Methods
__init__()Object which stores all of the configuration settings for the radiative transfer calculation.
Attributes
Controls whether the delta-M scaling is applied to the calculation.
Enables backpropagation for the weighting functions when using the DO source in plane parallel or pseudo-spherical geometry.
Sets which (if any) emission source is to be used inside the calculation.
flux_typesIf set to true, when using the successive orders source, it will be initialized with a source calculated with the discrete ordinates source instead of a single scattering source.
Sets the input validation mode to use in the calculation.
Controls the level of logging output from the spdlog library.
Controls whether or not refraction is enabled for the observer line of sight rays.
Controls whether or not refraction is enabled for the solar line of sight rays.
Sets which (if any) multiple scatter source is to be used inside the calculation.
If set to a value greater than 0, the discrete ordinates method will use this number of azimuth terms independent of convergence.
The number of Legendre expansion moments to use in the single scatter calculation.
Sets the number of Stokes parameters used in the calculation.
The number of streams to use in the discrete ordinates method.
The number of incoming points to use in the successive orders calculation for each solar zenith angle.
The number of integration nodes to use in the successive orders algorithm when calculating the incoming radiance at each grid point.
The number of iterations to perform when using the successive orders of scattering multiple scatter source.
The number of sample points to use in the successive orders algorithm to calculate the outgoing source function on radiance at each grid point.
The number of solar zenith angle discretizations to use when calculating the multiple scatter source.
Controls the number of threads used in the calculation.
Sets which (if any) occultation source is to be used inside the calculation.
If True, then the output from a calculate_radiance call will also contain an "optical_depth" variable with dimensions ["los", "wavelength"] that is the optical depth for each line of sight.
Sets which (if any) single scatter source is to be used inside the calculation.
Controls whether or not refraction is enabled for the solar rays.
Sets the spectral grid mode to use in the calculation.
stokes_basisSets the threading library to use in the calculation.
Sets the multi-threading mode to use in the calculation.
- property delta_m_scaling: bool#
Controls whether the delta-M scaling is applied to the calculation. Defaults to False.
- property do_backprop: bool#
Enables backpropagation for the weighting functions when using the DO source in plane parallel or pseudo-spherical geometry. Can greatly improve the computation speed of the calculation when the number of lines of sight is small. Default to True
- property emission_source: EmissionSource#
Sets which (if any) emission source is to be used inside the calculation.
- sasktran2.EmissionSource.NoSource (Default)
No emission source included
- sasktran2.EmissionSource.Standard
An emission source defined on the atmosphere grid is enabled.
- property init_successive_orders_with_discrete_ordinates: bool#
If set to true, when using the successive orders source, it will be initialized with a source calculated with the discrete ordinates source instead of a single scattering source. This greatly reduces the number of iterations required for the method, as well as provides a better weighting function approximation.
- property input_validation_mode: InputValidationMode#
Sets the input validation mode to use in the calculation.
- sasktran2.InputValidationMode.Strict (Default)
All input validation checks are performed. This is the recommended mode for most users.
- sasktran2.InputValidationMode.Standard
Only the most important input validation checks are performed. This mode is recommended for advanced users who are confident in the input data.
- sasktran2.InputValidationMode.Disabled
No input validation checks are performed. This mode is recommended for advanced users who are confident in the input data and want to maximize performance.
- property log_level: LogLevel#
Controls the level of logging output from the spdlog library.
- sasktran2.LogLevel.Trace
Most verbose logging level, includes all messages
- sasktran2.LogLevel.Debug
Debug information for development
- sasktran2.LogLevel.Info
General informational messages
- sasktran2.LogLevel.Warn (Default)
Warning messages only
- sasktran2.LogLevel.Error
Error messages only
- sasktran2.LogLevel.Critical
Only critical errors
- sasktran2.LogLevel.Off
Disables all logging output
- property los_refraction: bool#
Controls whether or not refraction is enabled for the observer line of sight rays. Requires the refractive index to be set in the Geometry object for refraction to work. Defaults to False.
- property multiple_scatter_refraction: bool#
Controls whether or not refraction is enabled for the solar line of sight rays. Requires the refractive index to be set in the Geometry object for refraction to work. Only has an effect when the single scatter source term is set to Table. Defaults to False.
- property multiple_scatter_source: MultipleScatterSource#
Sets which (if any) multiple scatter source is to be used inside the calculation.
- sasktran2.MultipleScatterSource.NoSource (Default)
Multiple scattering is disabled
- sasktran2.MultipleScatterSource.DiscreteOrdinates
The discrete ordinates technique is used to estimate the multiple scatter signal
- sasktran2.MultipleScatterSource.SuccessiveOrders
The successive orders of scattering method is used to estimate the multiple scatter signal
- property num_forced_azimuth: int#
If set to a value greater than 0, the discrete ordinates method will use this number of azimuth terms independent of convergence. Defaults to -1, which means to use the number of azimuth terms required for convergence.
- property num_singlescatter_moments: int#
The number of Legendre expansion moments to use in the single scatter calculation. Must be greater or equal to num_streams. Default to 16.
- property num_stokes: int#
Sets the number of Stokes parameters used in the calculation. 1 is equivalent to the scalar approximation. Currently the only supported values are 1, and 3.
- property num_streams: int#
The number of streams to use in the discrete ordinates method. This is the number of streams in full space, i.e. each hemisphere has num_streams / 2 angular discretizations. Must be an even number. Default to 16.
- property num_successive_order_points: int#
The number of incoming points to use in the successive orders calculation for each solar zenith angle. Must be equal to or less than the number of atmosphere altitude grid points. Default is -1 which means to use every altitude grid point.
- property num_successive_orders_incoming: int#
The number of integration nodes to use in the successive orders algorithm when calculating the incoming radiance at each grid point. Must be one of [6, 14, 26, 38, 50, 74, 86, 110, 146, 170, 194, 230, 266, 302, 350, 434, 590, 770, 974, 1202, 1454, 1730, 2030, 2354, 2702, 3074, 3470, 3890]. Default is 110.
- property num_successive_orders_iterations: int#
The number of iterations to perform when using the successive orders of scattering multiple scatter source.
- property num_successive_orders_outgoing: int#
The number of sample points to use in the successive orders algorithm to calculate the outgoing source function on radiance at each grid point. Must be one of [6, 14, 26, 38, 50, 74, 86, 110, 146, 170, 194, 230, 266, 302, 350, 434, 590, 770, 974, 1202, 1454, 1730, 2030, 2354, 2702, 3074, 3470, 3890]. Default is 110.
- property num_sza: int#
The number of solar zenith angle discretizations to use when calculating the multiple scatter source. For the discrete ordinates source, this determines the number of independent discrete ordinates calculations to perform. In the successive orders of scattering source, this is directly the number of discretizations. Defaults to 1, indicating that the multiple scatter source is estimated only at the reference point.
- property num_threads: int#
Controls the number of threads used in the calculation. For maximum performance it is recommended to set this to the number of physical cores on your machine. Defaults to 1
- property occultation_source: OccultationSource#
Sets which (if any) occultation source is to be used inside the calculation.
- sasktran2.OccultationSource.NoSource (Default)
No occultation source included
- sasktran2.OccultationSource.Standard
A constant source of 1 is placed at the end of every individual line of sight.
- property output_los_optical_depth: bool#
If True, then the output from a calculate_radiance call will also contain an “optical_depth” variable with dimensions [“los”, “wavelength”] that is the optical depth for each line of sight.
- property single_scatter_source: SingleScatterSource#
Sets which (if any) single scatter source is to be used inside the calculation.
- sasktran2.SingleScatterSource.Exact (Default)
A single scatter source where exact ray tracing is performed at each quadrature point along the observer lines of sight towards the sun
- sasktran2.SingleScatterSource.Table
A single scatter source where a pre-computed table is used to calculate solar transmission to quadrature points along the line of sight.
- sasktran2.SingleScatterSource.DiscreteOrdinates
Lets the discrete ordinates source function calculate the single scatter source. Only has an effect if the geometry mode is set to PlaneParallel or PseudoSpherical, and if the DiscreteOrdinates source function is also used for multiple scatter.
- sasktran2.SingleScatterSource.NoSource
Disables the single scatter source
- property solar_refraction: bool#
Controls whether or not refraction is enabled for the solar rays. Requires the refractive index to be set in the Geometry object for refraction to work. Defaults to False.
- property spectral_grid_mode: SpectralGridMode#
Sets the spectral grid mode to use in the calculation.
- sasktran2.SpectralGridMode.Monochromatic (Default)
Each wavelength grid point represents a delta function sampling of the spectrum.
- sasktran2.SpectralGridMode.AtmosphereIntegratedLineShape
Each wavelength grid point represents an integrated line shape over the atmosphere.
- sasktran2.SpectralGridMode.EngineIntegratedLineShape
Each wavelength grid point represents an integrated line shape over the radiative transfer engine.
- property threading_lib: ThreadingLib#
Sets the threading library to use in the calculation. Default is ThreadingLib.Rayon.
- property threading_model: ThreadingModel#
Sets the multi-threading mode to use in the calculation.
- sasktran2.ThreadingModel.Wavelength (Default)
Calculation is multi-threaded over the wavelength (batch) dimension only. This method works very well when this dimension is large, but may increase memory usage. It also is not very effective for a small number of wavelengths.
- sasktran2.ThreadingModel.Source
Calculation is multi-threaded individually by each source function for each wavelength. This method is recommended when memory is a concern, or when the number of wavelengths is small.