Skip to content
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

Changed meaning of sun_earth_distance_correction_factor #2757

Open
ninahakansson opened this issue Mar 12, 2024 · 0 comments
Open

Changed meaning of sun_earth_distance_correction_factor #2757

ninahakansson opened this issue Mar 12, 2024 · 0 comments

Comments

@ninahakansson
Copy link
Contributor

Feature Request

Is your feature request related to a problem? Please describe.

I have looked at the history of the sun earth distance correction in pygac/satpy and pyorbital. With some combination of satpy and pyorbital (2020-2022) the correction where in practice applied twice. And since 2022 the attribute sun_earth_distance_correction_factor from satpy no longer includes the factor for correction but sqrt(the original correction).

The history of the correction in pytroll:

Original formula in pygac and pyorbital corr_ = 1 - 0.0334 * np.cos(2 * np.pi * (jdays2000(utc_time) - 2) / year) from around 2014. Calulcated in pygac and applied like refl = refl * corr_. With attribute set in pygac: sun_earth_distance_correction_factor = corr_

2020-06 Pygac correction depricated.
2020-09 Satpy reads corrrection from pyorbital but applies like refl = refl * corr_ * corr_ causing the correction to be applied twice.
2020-09 Attribute set in satpy: sun_earth_distance_correction_factor = corr_, same as before.

2022-06 Pyorbital correction in principle replaced with sqrt(corr_). This implies reflections now corrected with refl = refl * corr_ in satpy as expected. The sun_earth_distance_correction_factor attribute in principle set to np.sqrt(corr_) which means the attribute no longer contain the original sun_earth_distance_correction_factor attribute.

Describe the solution you'd like
I would like the sun_earth_distance_correction_factor to keep the old behaviour and be set to the factor needed to to the correction.

This would with the current implementation in pyorbital be:

sun_earth_distance_correction_factor = corr * corr

I would suggest adding a different attribute to store the corr as it is if needed.

Describe any changes to existing user workflow
Are there any backwards compatibility concerns? Changes to the build process? Additional dependencies?

For GAC data this would restore the meaning of the attribute which was lost september 2022. I am unsure how it will affect the EUMETSAT GAC FDR and others using the attribute.

Additional context
Have you considered any alternative solutions or is there anything else that would help describe your request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant