digitalearthpacific / dep-coastlines

GNU General Public License v3.0
3 stars 1 forks source link

Add missing areas #18

Closed jessjaco closed 7 months ago

jessjaco commented 1 year ago
  1. Check missing scenes
  2. Check boundary buffer
jessjaco commented 1 year ago

Path 82 Row 75 seems to be missing. No clean_nir file but there is a water_index file, at least for 2016

jessjaco commented 1 year ago

Seeing this (happens to be in 2016 82 75). Red is the area we should have raster data for. I'm not positive what's happening here. Could be dask chunks which never came back? <- But then why would they be regular-ish

Read errors which were turned to nodata? <- ditto

Possibly clips which went awry? (unlikely?)

I notice it's the same in 2017 image

jessjaco commented 1 year ago

I think it's something to do with the tides

jessjaco commented 1 year ago

eek! image

jessjaco commented 1 year ago

OK, it's not a classic shift, the reprojection is screwy. here is a lowres tide model with a reprojected one on top of it. I had been using xr.interp to do the resampling so I tried (the new dask-enabled) odc.geo.reproject and the results were identical. Perhaps it has something to do with the way the resampling algorithm propagates nodata values

image

jessjaco commented 1 year ago

What was happening was reprojection / use of xr.interp was propagating nodata values in the gaps. There's no perfect solution but for now I'm using .rio.interpolate_na('nearest') to fill these areas before doing the .interp. I'm using nearest because as you can see in narrow islands like above an averaging-type resampler would conceivably smooth based on tide heights on the opposite side of the island. This might only be an issue with tpxo9, so we may need to revisit (or not) if switching tidal models. If time permits, the ideal solution might be to fill these nodata areas with a more-expansive model.

jessjaco commented 1 year ago

~Ok, tide stuff is fixed. But e.g. 82-74 2016 is missing and do not know why~

NM, I found it

jessjaco commented 7 months ago

Redid tide calcs so this doesn't happen again