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

Update the solar angle calculations to use per-line times. #1878

Open
simonrp84 opened this issue Nov 9, 2021 · 1 comment
Open

Update the solar angle calculations to use per-line times. #1878

simonrp84 opened this issue Nov 9, 2021 · 1 comment
Labels
enhancement code enhancements, features, improvements

Comments

@simonrp84
Copy link
Member

Feature Request

At present, the SunZenithCorrectorBase computes the solar zenith angle based upon the start_time of a given scene - computed on line 73 of modifiers/geometry.py:

coszen = xr.DataArray(cos_zen(vis.attrs["start_time"], lons, lats), dims=['y', 'x'], coords=coords)

This is okay, but leads to some inaccuracies. For SEVIRI, pixels at the end (north) of the scan are sensed 12 minutes after the start_time, and for some sensors the difference in time between sensing and given time may be even larger. I have not checked, but this would be a significant issue if done for polar satellites providing full-orbit granules, as the solar position may be out-of-date by up to 90 minutes!

Describe the solution you'd like
It would be a useful improvement if we calculate the solar angle based on a per-scanline time (where available) or at the least an average of the scene start and end times, as this would minimise error across the scene.

Describe any changes to existing user workflow
No changes required by users, although this would slightly affect (positively) the output from composites that perform sun zenith correction.

@mraspaud mraspaud added the enhancement code enhancements, features, improvements label Nov 9, 2021
@sfinkens
Copy link
Member

sfinkens commented Nov 9, 2021

Good idea! Would be nice if this was available as an utility function. Here's how it is done for SEVIRI in level1c4pps, maybe that helps: https://github.com/foua-pps/level1c4pps/blob/58519bc6b3fc7f78234484fff57f88491b2630a7/level1c4pps/seviri2pps_lib.py#L176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement code enhancements, features, improvements
Projects
None yet
Development

No branches or pull requests

3 participants