With #3397 it is suggested that the default behaviour of sunz_corrected modifier (SunZenithCorrector) should be changed to compute the true reflectance in Satpy >= 1.0. We would then have the sunz_corrected modifier that computes the true reflectance for scientific or quantitative use and the effective_solar_pathlength_corrected modifier which uses the Li and Shibata (2006) parameterization to avoid over-correction at high Sun zenith angels for (RGB) imagery.
For now, #3397 keeps the current default values and behavior (reduction of the sunz correction between 88-95 degrees), but adds a config parameter that can be set to either retain the legacy default behavior of the SunZenithCorrector/sunz_corrected modifier, also after upgrade to Satpy v1.0 or to opt in for the new behavior (no reduction and simple 1/cos(sunz) correction) already before Satpy v1.0. This can be controlled set with:
import satpy
satpy.config.set(use_legacy_sunz_correction=True) # or False
With #3397 use_legacy_sunz_correction is set to True by default, making sure to keep the current/legacy behavior. Hence, we simply have to set the defautl configuration value it False in Satpy v1.0 to have a direct switch to the new behaviour of SunZenithCorrector and sunz_corrected
Later, once the changes in #3397 and v1.0 have been established (say for Satpy v1.1), we can remove the option to use the legacy behaviour and cleanup the code accordingly:
With #3397 it is suggested that the default behaviour of
sunz_correctedmodifier (SunZenithCorrector) should be changed to compute the true reflectance in Satpy >= 1.0. We would then have thesunz_correctedmodifier that computes the true reflectance for scientific or quantitative use and theeffective_solar_pathlength_correctedmodifier which uses the Li and Shibata (2006) parameterization to avoid over-correction at high Sun zenith angels for (RGB) imagery.For now, #3397 keeps the current default values and behavior (reduction of the sunz correction between 88-95 degrees), but adds a config parameter that can be set to either retain the legacy default behavior of the
SunZenithCorrector/sunz_correctedmodifier, also after upgrade to Satpy v1.0 or to opt in for the new behavior (no reduction and simple1/cos(sunz)correction) already before Satpy v1.0. This can be controlled set with:With #3397
use_legacy_sunz_correctionis set toTrueby default, making sure to keep the current/legacy behavior. Hence, we simply have to set the defautl configuration value itFalsein Satpy v1.0 to have a direct switch to the new behaviour ofSunZenithCorrectorandsunz_correctedLater, once the changes in #3397 and v1.0 have been established (say for Satpy v1.1), we can remove the option to use the legacy behaviour and cleanup the code accordingly:
use_legacy_sunz_correctionin_config.pycorrection_limitandmax_sunzofSunZenithCorrectorto NoneSunZenithCorrector__default__andself.use_legacyas well as warning inSunZenithCorrector._apply_correction()SunZenithCorrector(see f3b605d)EffectiveSolarPathLengthCorrectorEffectiveSolarPathLengthCorrectorabout deprecated input arguments.