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

Padding lon/lat bounds in _area/_crop_cube returns invalid bounds in extract_region if the geometry is all Earth #625

Closed
valeriupredoi opened this issue Apr 30, 2020 · 0 comments · Fixed by #626
Assignees
Labels
bug Something isn't working

Comments

@valeriupredoi
Copy link
Contributor

Here - if geometry is as is from esmvalcore/preprocessor/ne_masks/ne_10m_ocean.shp and its bounds are [-179.99999999999991 -85.22193775799991 180.0 90.00000000000006] by padding that will introduce a ValueError: Invalid end_latitude: 90.50000000000006 from extract_region:

Traceback (most recent call last):
  File "test_ne.py", line 49, in <module>
    cube = _crop_cube(cube, *geometries.bounds)
  File "/home/valeriu/ESMValCore/esmvalcore/preprocessor/_area.py", line 340, in _crop_cube
    start_latitude, end_latitude)
  File "/home/valeriu/ESMValCore/esmvalcore/preprocessor/_area.py", line 54, in extract_region
    raise ValueError(f"Invalid end_latitude: {end_latitude}")
ValueError: Invalid end_latitude: 90.50000000000006
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants