climr icon indicating copy to clipboard operation
climr copied to clipboard

Speed up when users only submit a few points

Open kdaust opened this issue 2 years ago • 4 comments

Currently, climr checks the bounding box of the points, and downloads the data for the box. In general, I think this works well, because with caching, data is often reusable. However, in the case where only a few (< 500) points over a large spatial area, it may not make sense to need to download the full dataset. A couple options:

  1. Send the points to the database and extract the data there directly. This theoretically is nice, but the bilinear extraction is quite slow - 350 points take about 50 seconds to process (better than ~5 mins for downloading the whole dataset, but still not great). Of course if we're down to ~50 points then its down to 5 seconds, which seems reasonable. I already have a mock-up of this process so it wouldn't be hard to fully implement.
  2. Only download the cells right around each point. This would be much less data, and would probably be fairly fast, but wouldn't be useful for caching. It would take some work to implement this well - obviously couldn't do a separate query for each point, so would have to send multiple mini bounding boxes, and then return a raster that's mostly empty except for the points? Depending on the implementation, could also end up being slow.
  3. Just make users wait for the data to download - they only need to do it once.

I would love your thoughts about this.

kdaust avatar Dec 13 '23 23:12 kdaust

I like option 1 (cloud downscaling), implemented as a parameter in the downscaling function. so, we default to caching, but the user can opt for cloud downscaling. then the documentation can explain the pros and cons. up to you about whether there is an optimized "auto" option but this seems like it could create other issues.

cmahony avatar Dec 13 '23 23:12 cmahony

Yes i like option 1 best as well. But I would say that we can find an "auto" option that is suitable. E.g. if using < X points default to extracting by point in the server, otherwise extract the full data (or the bouding box). Adding messages at the points where these decisions are made will be important, as well as offering the user the ability to override the option -- e.g. they might want to wait for the full dowload if often changing their points

CeresBarros avatar Dec 14 '23 00:12 CeresBarros

@kdaust please update this issue for current status

cmahony avatar Feb 14 '24 00:02 cmahony

In progress but still needs more work. I have it setup for normal, but need to implement for GCMs. Version 1

kdaust avatar Feb 14 '24 20:02 kdaust

I think this is fixed with the new options to pull individual tiles

kdaust avatar Jan 07 '25 22:01 kdaust