1 gaseous_correction
gaseous_correction
1.1 Classes
| Name | Description |
|---|---|
| Gas_correction_CKDMIP | CKDMIP-based gaseous correction using transmission model coefficients. |
| Gas_correction_O3 | Ozone absorption correction module |
| Gaseous_correction | Gaseous correction module |
1.1.1 Gas_correction_CKDMIP
gaseous_correction.Gas_correction_CKDMIP(
srf,
thres_correction=0.5,
list_gases=None,
)CKDMIP-based gaseous correction using transmission model coefficients.
Computes band-averaged transmission coefficients by integrating over the sensor spectral response function (SRF). Supports correction for multiple absorbing gases (O3, H2O, CH4, CO2, N2, N2O, etc.) using a parametric model T = Teq ** (x ** n) where x is the normalized column amount.
1.1.1.1 Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| srf | xr.Dataset | The sensor spectral response function. Must contain all bands present in the input dataset. | required |
| thres_correction | float | Minimum transmission threshold. Transmission values below this threshold are replaced with NaN to avoid extreme reflectance corrections. Default is 0.5. |
0.5 |
| list_gases | list of str | Gases to include in the correction. Default is all available gases in the transmission model: ['CH4', 'CO2', 'H2O', 'N2', 'N2O', 'O2', 'O3']. |
None |
1.1.1.2 Methods
| Name | Description |
|---|---|
| process_block | Apply CKDMIP gaseous correction to a single block. |
1.1.1.2.1 process_block
gaseous_correction.Gas_correction_CKDMIP.process_block(block)Apply CKDMIP gaseous correction to a single block.
Computes the combined transmission from all gases (O3, H2O, etc.) using log-space accumulation for numerical stability: prod(Teq(xn)) = exp(sum(x^n * log(Teq))) then divides the reflectance by the total gas transmission.
1.1.2 Gas_correction_O3
gaseous_correction.Gas_correction_O3(
ds,
srf,
dir_common,
K_OZ=None,
spectral_dim='bands',
)Ozone absorption correction module
1.1.2.1 Methods
| Name | Description |
|---|---|
| run | Apply O3 transmission |
1.1.2.1.1 run
gaseous_correction.Gas_correction_O3.run(bands, Rtoa_gc, ok, air_mass, ozone)Apply O3 transmission
ozone : total column in Dobson Unit (DU)
1.1.3 Gaseous_correction
gaseous_correction.Gaseous_correction(
ds,
srf=None,
input_var='rho_toa',
ouput_var='rho_gc',
spectral_dim='bands',
K_NO2=None,
K_OZ=None,
no2_correction='legacy',
gas_correction='o3_legacy',
list_gases=None,
dtype='float32',
**kwargs,
)Gaseous correction module
1.1.3.1 Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| ds | xr.Dataset | The dataset to which the gaseous correction is applied. The bands of ds shall be contained in srf. |
required |
| srf | xr.Dataset | The sensor spectral response function (SRF). | None |
| input_var | str | Name of the input variable in ds (Top of atmosphere reflectance) |
'rho_toa' |
| ouput_var | str | Name of the output variable in ds |
'rho_gc' |
| spectral_dim | str | Name of the spectral dimension in input_var and output_var | 'bands' |
| no2_correction | str | Method for NO2 correction. Options: “legacy” (default, uses climatology-based NO2 correction) or any other value to skip. | 'legacy' |
| gas_correction | str | Method for gas correction. Options: “o3_legacy” (default, legacy O3 correction), “ckdmip” (CKDMIP transmission coefficients). | 'o3_legacy' |
| K_NO2 | Dict | None | Explicit NO2 absorption coefficients per band. If None, coefficients are calculated from the SRF or central wavelengths. |
None |
| K_OZ | Dict | None | Explicit ozone absorption coefficients per band. If None, coefficients are calculated from the SRF or central wavelengths. |
None |
| list_gases | list of str | Subset of gases to include in the CKDMIP correction (used when gas_correction='ckdmip'). Valid gas names are ['CH4', 'CO2', 'H2O', 'N2', 'N2O', 'O2', 'O3']. If None (default), all gases available in the transmission model are used. |
None |
1.1.3.2 Example
Apply gaseous correction to l1
Gaseous_correction(l1).apply()