8000 Fix sun-earth distance correction · Issue #107 · pytroll/pygac · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix sun-earth distance correction #107

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

Closed
sfinkens opened this issue Jul 11, 2022 · 3 comments
Closed

Fix sun-earth distance correction #107

sfinkens opened this issue Jul 11, 2022 · 3 comments
Assignees
Labels

Comments

@sfinkens
Copy link
Member
sfinkens commented Jul 11, 2022

Recently a bug in pyorbital's sun-earth distance correction was fixed: pytroll/pyorbital#97.

Pygac does not use pyorbital for this, but makes the same mistake:

corr = 1.0 - 0.0334 * np.cos(2.0 * np.pi * (jday - 2) / 365.25)

I propose to use pyorbital for this.

@ninahakansson @abhaydd @kgkarl This would change the output (to the better).

@sfinkens sfinkens self-assigned this Jul 11, 2022
@sfinkens sfinkens added the bug label Jul 11, 2022
@mraspaud
Copy link
Member

It makes total sense to remove code duplication, I'm in favour.

To make sure the bug doesn't reappear, maybe a test case for reflectance computation could be added at the same time?

@sfinkens
Copy link
Member Author

Sorry, false alarm. As pointed out by @abhaydd the factor is applied only once, so there's no problem.

r_cal *= corr

I'm opening a new issue regarding code duplication.

@mraspaud
Copy link
Member

@sfinkens, I still think it makes sense to remove code duplication and use pyorbital here.

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

No branches or pull requests

2 participants
0