Skip to content

Conversation

dshean
Copy link
Member

@dshean dshean commented Feb 19, 2019

Fixes error that I encountered using LS8 row,path (46, 27) with example notebook. There was one missing B4.TIF file, which produced inconsistent number of datasets and dates (when extracted from original df).

@dshean
Copy link
Member Author

dshean commented Feb 19, 2019

Now realizing this might not be repo for latest example notebooks. @scottyhq, maybe you can integrate wherever appropriate?

@scottyhq
Copy link
Member

Sorry for the confusion @dshean, there are now a few versions of this notebook with a few fixes as you've picked up. the search was set up without date bounds and it seems like that was causing the issue. See also a slightly modified notebook from the December 2018 AGU tutorial (https://github.com/pangeo-data/pangeo-tutorial-agu-2018), and a demonstration of accessing the same Landsat8 data on AWS as of Feb 2019 (https://github.com/scottyhq/esip-tech-dive).

@dshean
Copy link
Member Author

dshean commented Feb 19, 2019

OK, thanks for the links. It's still an issue in the updated notebooks. Issue is:
index = gpd.pd.DatetimeIndex(items.dates(), name='time')
You're assuming all items have valid datasets. My case with a different path/row had one missing B4.tif, so index contained 112 items.dates(), but datasets lists contained only 111 datasets from the for loop in the cell above with the try/except. So the mismatch causes concatenate step to fail (da = xr.concat(datasets, dim=index)). I just created another list to store dates and used that to create the Datetimeindex, but could also pull out directly from the datasets list. Should be a simple fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants