Index
source package isofit.atmosphere
Classes
-
BaseAtmosphere — This class controls the radiative transfer component of the forward model. An ordered dictionary is maintained of individual RTMs (MODTRAN, for example). We loop over the dictionary concatenating the radiation and derivatives from each RTM and interval to form the complete result.
source class BaseAtmosphere(full_config: Config, lut_path: str = '', wl: np.array = [], fwhm: np.array = [], n_cores: int = None, build_interpolators: bool = True, lut_postprocess: bool = True, **kwargs)
Bases : Reader
This class controls the radiative transfer component of the forward model. An ordered dictionary is maintained of individual RTMs (MODTRAN, for example). We loop over the dictionary concatenating the radiation and derivatives from each RTM and interval to form the complete result.
In general, some of the state vector components will be shared between RTMs and bands. For example, H20STR is shared between both VISNIR and TIR. This class maintains the master list of statevectors.
Methods
-
lut_postprocess — Checks for additional postprocessing that may need to be applied to the loaded LUT
-
get_indices — Retrieves the point indices for keys that source from different locations, such as statevector or geom
-
xa — Use the image-wide prior mean
-
Sa — Pull the priors from each of the individual RTs.
-
Sb — Uncertainty due to unmodeled variables.
-
get — Interpolate the LUT at the given RT statevector and geometry.
-
get_L_atm — Get the interpolated modeled atmospheric path radiance.
-
get_upward_transm — Get total upward transmittance w/physical check enforced (max_transm) and hand-off between 1c and 4c model.
-
two_albedo_method — Calculates split transmittance values from a multipart file using the two-albedo method. See notes for further detail.
-
couple — Calculates coupled terms on the input Dataset
-
summarize — Pretty prints lut_name=value, ...
source property BaseAtmosphere.coszen: np.ndarray
source property BaseAtmosphere.solar_irr: np.ndarray
source method BaseAtmosphere.lut_postprocess()
Checks for additional postprocessing that may need to be applied to the loaded LUT
source method BaseAtmosphere.get_indices()
Retrieves the point indices for keys that source from different locations, such as statevector or geom
Raises
-
AttributeError
source method BaseAtmosphere.update_heuristic_prior_means(x_atmosphere, geom)
source method BaseAtmosphere.xa(x_atmosphere, geom)
Use the image-wide prior mean
source method BaseAtmosphere.Sa()
Pull the priors from each of the individual RTs.
source method BaseAtmosphere.Sb()
Uncertainty due to unmodeled variables.
source method BaseAtmosphere.get(x_RT: np.array, geom: Geometry) → dict
Interpolate the LUT at the given RT statevector and geometry.
Parameters
-
x_RT : np.array — radiative-transfer portion of the statevector
-
geom : Geometry — local geometry conditions for lookup
Returns
-
dict — dict of interpolated LUT quantities
source method BaseAtmosphere.get_L_atm(x_RT: np.array, geom: Geometry) → np.array
Get the interpolated modeled atmospheric path radiance.
Parameters
-
x_RT : np.array — radiative-transfer portion of the statevector
-
geom : Geometry — local geometry conditions for lookup
Returns
-
np.array — interpolated modeled atmospheric path radiance
source method BaseAtmosphere.get_upward_transm(r: dict, geom: Geometry, max_transm: float = 1.05)
Get total upward transmittance w/physical check enforced (max_transm) and hand-off between 1c and 4c model.
This is called for all surfaces to handle thermal downwelling/upwelling component. While rt can be either rdn or transm modes, this must be in units of transmittance.
Raises
-
ValueError
source staticmethod BaseAtmosphere.two_albedo_method(case_0: dict, case_1: dict, case_2: dict, coszen: float, rfl_1: float = 0.1, rfl_2: float = 0.5) → dict
Calculates split transmittance values from a multipart file using the two-albedo method. See notes for further detail.
Parameters
-
case_0 : dict — MODTRAN output for a non-reflective surface (case 0 of the channel file)
-
case_1 : dict — MODTRAN output for surface reflectance = rfl_1 (case 1 of the channel file)
-
case_2 : dict — MODTRAN output for surface reflectance = rfl_2 (case 2 of the channel file)
-
coszen : float — cosine of the solar zenith angle
-
rfl_1 : float, defaults=0.1 — surface reflectance for case 1 of the MODTRAN output
-
rfl_2 : float, defaults=0.5 — surface reflectance for case 2 of the MODTRAN output
Returns
-
data : dict — Relevant information
Notes
This implementation follows Guanter et al. (2009) (DOI:10.1080/01431160802438555), modified by Nimrod Carmon. It is called the "2-albedo" method, referring to running MODTRAN with 2 different surface albedos. Alternatively, one could also run the 3-albedo method, which is similar to this one with the single difference where the "path_radiance_no_surface" variable is taken from a zero-surface-reflectance MODTRAN run instead of being calculated from 2 MODTRAN outputs.
There are a few argument as to why the 2- or 3-albedo methods are beneficial: (1) For each grid point on the lookup table you sample MODTRAN 2 or 3 times, i.e., you get 2 or 3 "data points" for the atmospheric parameter of interest. This in theory allows us to use a lower band model resolution for the MODTRAN run, which is much faster, while keeping high accuracy. (2) We use the decoupled transmittance products to expand the forward model and account for more physics, currently topography and glint.
source staticmethod BaseAtmosphere.couple(ds, inplace=True)
Calculates coupled terms on the input Dataset
Parameters
-
ds : xr.Dataset — Dataset to process on
-
inplace : bool, default=True — Insert the coupled terms in-place to the original Dataset. If False, copy the Dataset first
Returns
-
ds : xr.Dataset — Dataset with coupled terms
source method BaseAtmosphere.summarize(x_RT, *_)
Pretty prints lut_name=value, ...
source class Atmosphere()