Configuration¶
Complete reference for all settings parameters accepted by ACOLITE(ac, settings).
Settings can be provided as a Python dict or as a path to an ACOLITE settings file (.txt).
# Dict approach
ac_gee = ACOLITE(ac, {'s2_target_res': 10, 'dsf_spectrum_option': 'darkest'})
# File approach
ac_gee = ACOLITE(ac, 'path/to/settings.txt')
Settings files follow the ACOLITE format: key=value pairs, one per line.
Defaults are filled automatically
ACOLITE(ac, settings) merges ACOLITE's config/defaults.txt with your settings before parsing, so
values such as uoz_default, uwv_default and pressure_default are always available as fallbacks
when ancillary data cannot be retrieved. This is required for ACOLITE 2025.01 and later, whose
settings.parse() no longer merges the defaults by itself.
ACOLITE Version Compatibility¶
Tested with ACOLITE 20231023 and 20260421. The settings gee_acolite reads keep the same name and default across the 2023.10, 2025.01 and 2026.04 manuals, with one exception: the setting that selects the atmospheric correction algorithm was renamed.
| ACOLITE version | Setting name |
|---|---|
| 2023.10 | aerosol_correction |
| 2025.01 | atmospheric_correction_option |
| 2026.04 | atmospheric_correction_method |
The algorithm setting is ignored
gee_acolite does not read any of the three names above. It only implements Dark Spectrum Fitting (DSF),
so passing radcor or exponential has no effect.
Spatial Resolution¶
| Parameter | Type | Default | Description |
|---|---|---|---|
s2_target_res |
int |
10 |
Target spatial resolution in metres. All bands resampled to this. Valid: 10, 20, 60. |
s2_resampling_method |
str |
'nearest' |
How coarser bands are brought to the target grid: 'nearest' (pixel replication, equivalent to ACOLITE's reader when upsampling 20 m / 60 m to 10 m) or 'bilinear' (interpolation, gee_acolite <= 1.2.x behaviour). gee_acolite-only setting, not an ACOLITE setting. |
Dark Spectrum Fitting (DSF)¶
These parameters control how the single global AOT is estimated per image.
Always fixed DSF
gee_acolite always runs the fixed DSF: one AOT and one aerosol model per image. dsf_aot_estimate
is not read, so tiled, resolved, segmented and the other ACOLITE options (including optimise,
ancillary and ancillary_fixed in 2026.04) have no effect, and neither do the tiling settings
(dsf_tile_dimensions, dsf_min_tile_cover).
| Parameter | Type | Default | Description |
|---|---|---|---|
dsf_spectrum_option |
str |
'darkest' |
Dark spectrum extraction method: 'darkest', 'percentile', or 'intercept' |
dsf_percentile |
float |
1 |
Percentile when dsf_spectrum_option='percentile' |
dsf_intercept_pixels |
int |
1000 |
Darkest pixels for regression when dsf_spectrum_option='intercept' |
dsf_nbands |
int |
2 |
Number of darkest bands used for AOT fitting |
dsf_nbands_fit |
int |
3 |
Bands used for RMSD model validation |
dsf_model_selection |
str |
'min_drmsd' |
Model selection criterion: 'min_drmsd', 'min_dtau', or 'taua_cv' |
dsf_aot_compute |
str |
'min' |
How the AOT is taken from the lowest-AOT bands: 'min' (AOT of the single lowest band, ACOLITE default), 'mean' or 'median' (over the dsf_nbands lowest bands) |
dsf_allow_lut_boundaries |
bool |
False |
False (ACOLITE default): a band whose dark spectrum falls outside the LUT range gets a NaN AOT and is ignored. True: the AOT is clamped to the LUT limits (gee_acolite <= 1.2.x behaviour) |
Behaviour change since 1.2.x: AOT parity with ACOLITE
Versions up to 1.2.1 (including 1.2.0, used for the published paper) resampled the 20 m / 60 m bands
bilinearly, subsampled the dark spectrum with bestEffort, clamped out-of-LUT bands to the lowest
LUT AOT (0.001) and averaged the two lowest bands. This could lead to a different AOT and aerosol model
than ACOLITE for the same L1 image. The defaults now follow ACOLITE 20231023 dsf_aot_estimate=fixed
(s2_resampling_method='nearest', true minimum dark spectrum, dsf_aot_compute='min',
dsf_allow_lut_boundaries=False). To reproduce the previous behaviour use
s2_resampling_method='bilinear', dsf_aot_compute='mean' and dsf_allow_lut_boundaries=True
(the dark spectrum is always the true minimum).
Dark Spectrum Options¶
| Option | Description | When to use |
|---|---|---|
darkest |
Minimum over all valid (> 0) pixels of the image footprint | Clear water, fast (recommended) |
percentile |
Nth percentile (configurable) | Slightly turbid or coastal waters |
intercept |
Linear regression y-intercept on darkest N pixels | Heterogeneous scenes |
Model Selection Criteria¶
| Criterion | Description |
|---|---|
min_drmsd |
Minimise RMSD between observed and modelled TOA reflectance (recommended) |
min_dtau |
Minimise AOT difference between the two darkest bands |
taua_cv |
Minimise coefficient of variation of AOT estimates |
Fixed AOT (Skip DSF)¶
| Parameter | Type | Default | Description |
|---|---|---|---|
dsf_fixed_aot |
float |
None |
Fixed AOT at 550 nm. If set, DSF is skipped entirely. |
dsf_fixed_lut |
str |
None |
LUT model name. Required when dsf_fixed_aot is set. |
Atmospheric Parameters¶
| Parameter | Unit | Default | Typical range | Description |
|---|---|---|---|---|
pressure |
hPa | 1013.25 |
980–1040 | Surface atmospheric pressure |
uoz |
cm-atm | 0.3 |
0.2–0.45 | Total ozone column |
uwv |
g/cm² | 1.5 |
0.5–5.0 | Atmospheric water vapour |
wind |
m/s | 3.0 |
0–20 | Wind speed (affects sea surface roughness) |
Typical Water Vapour by Climate Zone¶
| Climate | uwv (g/cm²) |
|---|---|
| Arctic / polar | 0.3–0.5 |
| Temperate dry | 0.8–1.5 |
| Temperate humid | 1.5–2.5 |
| Subtropical | 2.0–3.5 |
| Tropical | 3.5–5.0 |
Ancillary Data (NASA Earthdata)¶
Automatically retrieve per-image atmospheric parameters from NASA Earthdata.
| Parameter | Type | Default | Description |
|---|---|---|---|
ancillary_data |
bool |
False |
Fetch atmospheric parameters from NASA Earthdata per image |
EARTHDATA_u |
str |
None |
NASA Earthdata username |
EARTHDATA_p |
str |
None |
NASA Earthdata password |
Tip
When ancillary_data=True, the manually specified pressure, uoz, uwv, and wind are overridden.
Water Quality Products¶
| Parameter | Type | Default | Description |
|---|---|---|---|
l2w_parameters |
list[str] |
[] |
List of products to compute after atmospheric correction |
Available Products¶
| Key | Output band | Description |
|---|---|---|
spm_nechad2016 |
spm_nechad2016 |
SPM at 665 nm — Nechad 2016 (mg/L) |
spm_nechad2016_704 |
spm_nechad2016_704 |
SPM at 704 nm (mg/L) |
spm_nechad2016_740 |
spm_nechad2016_740 |
SPM at 740 nm (mg/L) |
tur_nechad2016 |
tur_nechad2016 |
Turbidity at 665 nm — Nechad 2016 (FNU) |
tur_nechad2016_704 |
tur_nechad2016_704 |
Turbidity at 704 nm (FNU) |
tur_nechad2016_740 |
tur_nechad2016_740 |
Turbidity at 740 nm (FNU) |
chl_oc2 |
chl_oc2 |
Chlorophyll-a OC2 2-band algorithm (mg/m³) |
chl_oc3 |
chl_oc3 |
Chlorophyll-a OC3 3-band algorithm (mg/m³) |
chl_re_mishra |
chl_re_mishra |
Chlorophyll-a NDCI red-edge — Mishra (mg/m³) |
pSDB_green |
pSDB_green |
Pseudo-SDB: log(1000piB2) / log(1000piB3) |
pSDB_red |
pSDB_red |
Pseudo-SDB: log(1000piB2) / log(1000piB4) |
Rrs_B* |
Rrs_B1 … Rrs_B12 |
Remote sensing reflectance: rhos / pi (sr^-1) |
Quality Masking¶
| Parameter | Type | Default | Description |
|---|---|---|---|
l2w_mask_threshold |
float |
0.05 |
SWIR B11 threshold. Pixels with B11 >= threshold masked as land. |
l2w_mask_cirrus_threshold |
float |
0.005 |
B10 (1375 nm) cirrus cloud threshold |
l2w_mask_smooth |
bool |
True |
Gaussian-smooth the SWIR (B11) and cirrus (B10) bands before thresholding them, as ACOLITE does. False thresholds the raw bands (behaviour of 1.3.0 and earlier) |
l2w_mask_smooth_sigma |
float |
3 |
Standard deviation of that smoothing, in pixels of the output grid (3 pixels = 30 m when s2_target_res=10) |
l2w_mask_negative_rhow |
bool |
True |
Mask a pixel in every water product when any surface-reflectance band in l2w_mask_negative_wave_range is negative, as ACOLITE does. False keeps only the per-band masking of 1.3.0 and earlier |
l2w_mask_negative_wave_range |
list |
[400, 900] |
Wavelength range (nm) of the bands checked for negative reflectance (Sentinel-2: B1–B8A; B9 and the SWIR bands are outside) |
l2w_mask_high_toa_threshold |
float |
0.3 |
TOA reflectance cloud threshold |
s2_cloud_proba |
bool |
False |
Use Sentinel-2 Cloud Probability dataset for enhanced masking |
s2_cloud_proba__cloud_threshold |
int |
50 |
Cloud probability threshold (0–100) |
s2_cloud_proba__nir_dark_threshold |
float |
0.15 |
NIR threshold for shadow detection |
s2_cloud_proba__cloud_proj_distance |
float |
10 |
Shadow projection distance (km) |
s2_cloud_proba__buffer |
int |
50 |
Buffer around detected cloud/shadow (m) |
l2w_mask_mixed
ACOLITE 20231023 only sets the mixed-pixel flag for VIIRS, so l2w_mask_mixed has no effect for Sentinel-2 and is not implemented.
Mask Presets¶
# Conservative: fewer masked pixels
conservative = {
'l2w_mask_threshold': 0.02,
'l2w_mask_cirrus_threshold': 0.01,
'l2w_mask_high_toa_threshold': 0.4,
}
# Standard (default)
standard = {
'l2w_mask_threshold': 0.05,
'l2w_mask_cirrus_threshold': 0.005,
'l2w_mask_high_toa_threshold': 0.3,
}
# Strict: higher quality, less data
strict = {
'l2w_mask_threshold': 0.08,
'l2w_mask_cirrus_threshold': 0.003,
'l2w_mask_high_toa_threshold': 0.2,
's2_cloud_proba': True,
's2_cloud_proba__cloud_threshold': 35,
}
Glint Correction¶
| Parameter | Type | Default | Description |
|---|---|---|---|
dsf_residual_glint_correction |
bool |
False |
Apply residual sun glint correction after DSF |
dsf_residual_glint_correction_method |
str |
'alternative' |
Glint correction method (currently only 'alternative') |
glint_mask_rhos_threshold |
float |
0.05 |
Max surface reflectance for glint-free reference pixel |
glint_aot_floor |
float |
0.1 |
Minimum AOT at which the sky-reflectance (glint) ratios are evaluated, as in ACOLITE (gc_aot = max(0.1, AOT)). Only the glint ratios use it; the atmospheric correction keeps the real AOT. 0, None or 'none' disable the floor (gee_acolite <= 1.2.x behaviour). gee_acolite-only setting, not an ACOLITE setting. |
Residual glint correction was silently disabled for low AOT in 1.2.x
The sky-reflectance LUT is exactly 0 in B11/B12 for AOT <= 0.05, so up to 1.2.1 (including 1.2.0, used for the
published paper) the glint ratio was infinite and no glint was removed in scenes with AOT <= 0.05, even with
dsf_residual_glint_correction=True. For AOT between 0.05 and 0.1 the ratio was exaggerated (B2 ratio 4.95 at
AOT 0.06, 1.65 at 0.08) and too much glint was removed. ACOLITE evaluates the ratio at max(0.1, AOT);
gee_acolite now does the same by default (glint_aot_floor=0.1). If the SWIR reference sky reflectance is still
not finite and positive (degenerate LUT), the glint correction is skipped and a UserWarning is emitted.
Scenario Presets¶
Coastal Clear Waters¶
coastal_clear = {
's2_target_res': 10,
'dsf_spectrum_option': 'darkest',
'dsf_model_selection': 'min_drmsd',
'pressure': 1013.25, 'wind': 2.0, 'uoz': 0.3, 'uwv': 1.5,
'l2w_mask_threshold': 0.05,
'l2w_parameters': ['spm_nechad2016', 'chl_oc3', 'pSDB_green'],
}
Turbid Estuaries¶
turbid_waters = {
's2_target_res': 10,
'dsf_spectrum_option': 'percentile',
'dsf_percentile': 5,
'dsf_model_selection': 'min_drmsd',
'pressure': 1013.25, 'wind': 3.0, 'uoz': 0.3, 'uwv': 2.0,
'l2w_mask_threshold': -0.1,
'l2w_mask_high_toa_threshold': 0.4,
'l2w_parameters': ['spm_nechad2016', 'tur_nechad2016', 'spm_nechad2016_704'],
}
Inland Lakes¶
inland_waters = {
's2_target_res': 10,
'dsf_spectrum_option': 'darkest',
'dsf_model_selection': 'taua_cv',
'pressure': 950.0, 'wind': 1.0, 'uoz': 0.3, 'uwv': 1.0,
'l2w_mask_threshold': 0.0,
'l2w_parameters': ['chl_oc3', 'chl_re_mishra', 'tur_nechad2016'],
}