cal-adapt / climakitae

A Python toolkit for retrieving, visualizing, and performing scientific analyses with data from the Cal-Adapt Analytics Engine.
https://climakitae.readthedocs.io
BSD 3-Clause "New" or "Revised" License
21 stars 2 forks source link

Closest cell fix for `get_closest_gridcell` util function #392

Closed elehmer closed 5 months ago

elehmer commented 5 months ago

Description of PR

This PR changes the behavior of get_closest_gridcell by using a tolerance for how far it will search for a gridcell. The tolerance is derived from the dataset resolution attribute. If the input point is farther than one grid cell away from any of the input data it will return None.

Summary of changes and related issue

388

Relevant motivation and context

See issue for motivation.

Dependencies required for this change?

Fixes # (issue), delete if not necessary

Type of change

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

Checklist:

claalmve commented 5 months ago

LGTM! Feel free to implement or ignore the above suggestions, PR is totally good as is too.