DOI-USGS / lake-temperature-model-prep

Pipeline #1
Other
6 stars 13 forks source link

Update GCM grid using jx/iy as centroid not bottomleft #297

Closed lindsayplatt closed 2 years ago

lindsayplatt commented 2 years ago

Through a series of comments/investigations (starting with this comment), we discovered that we were setting up the grid to query GDP incorrectly. It was slightly shifted because we had made the assumption that the grid points provided (described as "cross points" in the attribute information) were the bottom left corner of the grid cells when they were indeed the centroid. This PR edits the grid construction functions to shift the points 0.5 of the cell width & height in order to get the correct x/y for the bottomleft corner of the bottomleft most grid cell.

Related to fixing #273

Here was the query_map_png before this fix (taken from here)

image

Here is the query_map_png target after this fix. Still 9 tiles

query_map

lindsayplatt commented 2 years ago

Separately running a quick test to compare download times if I did a 15x15 tile instead of 10x10 (per Jordan's comment here) since I have to re-download everything with this new grid configuration anyways. That potential change will be in a different PR.