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
19 stars 2 forks source link

get_closest_gridcell logic needs to handle lat-lon inputs outside of spatial domain #388

Closed vicford closed 1 month ago

vicford commented 2 months ago

Context: SCE asked if whether using get_closest_gridcell returns a point in CA (or NV) if the lat lon passed is well outside the range

Example: Pass coordinates for SLC Utah with manual selections (not possible with GUI), and specifically have spatial res set to 3 km, and use get_closest_gridcell.

What actually happens is that the function works as intended and returns a gridcell in Nevada at the very edge of the 3km boundary. What we need to happen is that if the lat lon passed is well outside the range of the domain, get_closest_gridcell needs to return an error

elehmer commented 2 months ago

I will take a look at this tomorrow. Thx

elehmer commented 1 month ago

Fixed in #392