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

Warning log message is incorrectly showing resolution as 'meters' #458

Open
simonrp84 opened this issue Oct 5, 2022 · 0 comments
Open
Labels

Comments

@simonrp84
Copy link
Member

Problem description

The code here:
https://github.com/pytroll/pyresample/blob/main/pyresample/area_config.py#L724

Raises a warning log message if the output area size are not a whole number. This is fine, but the message uses the word meters even in cases where the input resolution is given in degrees.

Example

from pyresample import create_area_def
area_ext = (-180, -65, 180, 65)
res = (0.03, 0.03)
targ_srs = create_area_def("source_area", "EPSG:4326", area_extent=area_ext, resolution=res)

Gives this message:

WARNING:root:shape found from radius and resolution does not contain only integers: (4333.333333333334, 12000.0)
Rounding shape to (4334, 12000) and resolution from (0.03, 0.03) meters to (0.03, 0.029995385325334564) meters

But the resolution passed to create_area_def is in degrees...

@djhoese djhoese added the bug label Oct 5, 2022
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