-
Notifications
You must be signed in to change notification settings - Fork 309
Standardize the correction for atmospheric path length for solar channels #3096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Nice write up! Nice images! I wonder if this is controversial enough (I think I'm fine with all of it) that we might want to have which atmospheric path length method is used controlled by a If the change to the Li and Shibata method by default does not seem controversial (or not very) then I think just changing the default everywhere and even making it called "sunz_corrected" would be fine with me. Or is there a more generic name for this operation? "correction of atmospheric path lenght"? We could make a modifier wrapper class that:
This way users wanting to change which method is used doesn't require changing every recipe or changing YAML at all. |
To make my usual comment: Just as long as this is only applied as an enhancement/modified when saving RGBs! We need to make sure that users who want the actual reflectance data either have it without SZA correction, or with the cos(SZA) correction. :) (edit) For what it's worth, I agree with Johan's first two proposals. For the third one ( |
Good point(s) @simonrp84. I think that is all doable if people approve of my idea. The composites could basically have 3 defined modifiers (if we'd like) sunz, pathlength, and config_pathlength. So all previous advice to users to do |
Great investigative work @strandgren ! |
What I also proposed in refactoring issue #2955 would be to refactor the
this wouldn't break anything and we'd just need to update the modifier name in the yaml recipes where we think it should be the case. I probably know too little about the design to know how this would fit with the proposed config option. I also see the problem with data coming with the @simonrp84 I agree that we should not do this by default, only in RGBs or if the users explicitly asks for it when loading data. But I don't see that we necessarily need the |
@strandgren For quantitative use of the data I think it's important that the result becomes unphysical as the sun reaches the horizon: This indicates to the user that they're doing something wrong. Reflectance as a quantity makes no sense at very high SZA because you see a much larger proportion of diffuse rather than direct radiation (at least in the VIS channels).Having the "reflectance" explode at least lets users know that there's a problem. Just to stress, I'm strongly in favour of applying this updated correction as you describe for RGBs (it looks great), but strongly against doing so for any quantitative use of the data at all. For that we need to stick to either no SZA correction or the simple cos(sza) correction. |
Thanks for explaining @simonrp84, makes sense 🙂 |
I agree with @simonrp84 in that data that is not for visualisation should not use the effective pathlength for normalisation. |
In the case of high thunder clouds I think 95 degrees is still plausibly within sun light. Might be useful to see those clouds and at least not mask them out in some cases. |
@mraspaud what do you mean with interactive use? Like this |
Yes, and I don't really see the need for phasing out the correction with the default reduction that we have now. If the correction factor is kept constant (as in my experimental example above) the signal will anyway be phased out to zero with the decreasing signal. |
yes |
I assumed that this pre-configured modifier was used in that case: satpy/satpy/etc/composites/visir.yaml Line 9 in 248be12
method in the yaml, no?
|
yes, that should be fine. |
@guidocioni No I don't think so. The topic in this issue only affects the imagery at very low solar zenith angles (> 85 degrees) and this scene seems to be well illuminated. I think the reason is different methods used to simulate the green band which is not available on GOES/ABI. |
Related PR (although only for day cloud type and day cloud phase): #3032 |
For information: in DWD, we have been Li and Shibata with a constant correction since April 2023 for all our single-channel solar imagery and daytime-only RGBs. |
I added some day cloud type and day cloud phase images with Li and Shibata with the constant correction ( |
Uh oh!
There was an error while loading. Please reload this page.
As part of the RGB workshop 2025 it was proposed to conclude on the correction method to recommend for the normalization of the atmospheric path length for solar channels. Hence, I decided to dig into this and prepare some examples to give an overview. I put the results from my analysis in this issue such that we can discuss also within our community regarding the best approach.
In short we have two corrections available:
sunz_corrected
- standard1/cos(sza)
correction: https://github.com/pytroll/satpy/blob/main/satpy/modifiers/angles.py#L534effective_solar_pathlength_corrected
- following Li and Shibata (2006): https://github.com/pytroll/satpy/blob/main/satpy/utils.py#L270Without any modification the "raw" version of the correction formulas look like this:
Setting
correction_limit
to a high value (120 degrees) where we have no meaningful VIS/NIR data is just a current hack to disable the any reduction/modification of the correction and thus get the "Raw" version.Looking at the Cloud Phase RGB, this results in the following imagery (no Rayleigh correction)
To tackle the fact that
1/cos(sza)
is undefined at SZA=90 and not well defined for the purpose beyond 90 degrees, we have a functionality to reduce the correction starting at a given angle (correction_limit
) until it reaches 0.0 atmax_sza
. This reduction is applied by default in satpy for bothsunz_corrected
andeffective_solar_pathlength_corrected
usingcorrection_limit=88
andmax_sza=95
. However, this results in an unnatural sharp transition atcorrection_limit
(88 degrees) as shown here:and results in this imagery
Although the left image using
sunz_corrected
now look much better and retains information beyond 90 degrees, a bright line is introduced parallell to the terminator (commonly visible also in animations). This bright line is also introduced ineffective_solar_pathlength_corrected
, where also some information at very high angles is lost compared to the raw version ofeffective_solar_pathlength_corrected
above.The bright line is introduced by the sharp transition at 88 degrees sen above. This can be mitigated by instead applying a constant correction beyond a given SZA. This can be achieved by setting
max_sza
to None, in which case the correction atcorrection_limit
will be used for all angles beyondcorrection_limit
. Using this approach and some testing,correction_limit=86
turned out to work quite well in the sense of not having bright artefacts close to the terminator:resulting in this imagery
The same imagery but for the True Color RGB (including default Rayleigh correction) looks like this:
So to me the
effective_solar_pathlength_corrected
correction clearly performs better thansunz_corrected
and can also be used as is. This is not in-line with our current implementation where the reduction between 88-95 degrees is applied by default.sunz_corrected
can still be used, but I think the best results are achieved by using a constant correction beyondcorrection_limit
.Based on this I proposed to add the following information in the best practices document that will be one of the outputs from the workshop, which no-one objected to:
Talking to other colleagues at the workshop (Meteo-France and CIRA), I also found out that they also use the Li and Shibata parameterization without any reduction/modification.
Hence, I propose the following changes in Satpy:
effective_solar_pathlength_corrected
. We can keep the functionality, but it should not be done by default.sunz_corrected
toeffective_solar_pathlength_corrected
(without reduction) in the composite yaml recipes.max_sza
forsunz_corrected
from 95 toNone
and possibly reduce thecorrection_limit
to 86 - not sure about this one though. Might need more testingA while back I proposed refactoring the code for the atmospheric path length corrections (see #2955) so I suggest to tackle the first point together with that one. For the second point, I guess this can be done step-by-step by multiple developers working on the RGB recipes.
Thoughts?
The text was updated successfully, but these errors were encountered: