This PR adds in logic to filter out any lakes that fall outside of the GCM footprint before generating the final lake to cell mapping in adjust_lake_cell_tile_xwalk().
Previously, Lindsay's exploration showed that a number of queried cells in North and South Dakota were not returning data and were instead being assigned data from the easternmost parts of those states (see #347):
As before, the total # of queried cells that didn't return data is 342, but now only the 76 that fall within the GCM footprint are being assigned data from a nearby cell. 266 fall outside of the GCM footprint. The exported lake_cell_tile_xwalk.csv reflects this, with 266 fewer unique spatial_cell_no yet the same # of unique data_cell_no as before.
I checked and this resulted in 613 lakes being dropped from the lake_cell_tile_xwalk_df
This PR adds in logic to filter out any lakes that fall outside of the GCM footprint before generating the final lake to cell mapping in
adjust_lake_cell_tile_xwalk()
.Previously, Lindsay's exploration showed that a number of queried cells in North and South Dakota were not returning data and were instead being assigned data from the easternmost parts of those states (see #347):
With this PR, those lakes that fall outside the footprint of the cells that did return data (the GCM footprint) are dropped before the crosswalk is generated and data source cells are assigned for cells that did not return data that are within the GCM footprint:
As before, the total # of queried cells that didn't return data is 342, but now only the 76 that fall within the GCM footprint are being assigned data from a nearby cell. 266 fall outside of the GCM footprint. The exported
lake_cell_tile_xwalk.csv
reflects this, with 266 fewer uniquespatial_cell_no
yet the same # of uniquedata_cell_no
as before.I checked and this resulted in 613 lakes being dropped from the
lake_cell_tile_xwalk_df