digitalearthafrica / deafrica-sandbox-notebooks

Repository for Digital Earth Africa Sandbox, including: Jupyter notebooks, scripts, tools and workflows for geospatial analysis with Open Data Cube and xarray
Apache License 2.0
178 stars 130 forks source link

Vegetation_phenology-coffee_Kenya distributed.nanny - WARNING - Restarting worker #157

Closed mubea closed 4 years ago

mubea commented 4 years ago

Vegetation_phenology-coffee_Kenya.ipynb runs into error here https://gist.github.com/mubea/223b2ce984758dfff26847e8ea61b1f2

see screen shot here distributed.nanny - WARNING - Restarting worker image

Please review @andrewdhicks @caitlinadams @nanaboamah89 @cbur24

cbur24 commented 4 years ago

@mubea You are trying to compute this over a large area and very long time-series. Two things that will help:

  1. First of all, reduce the size of the dask chunks to {'x':750, 'y':750, 'time':-1}.
  2. Calculating phenology on a multiple-year time series won't return anything sensible as phenology is defined as the annual vegetation response to the seasons. You have two choices here, run the code over a single year (or better yet, run it over the known growing season you're interested e.g. if you know a crop grows from Feb to July, then calculate the phenology on a time series that goes from Jan to Aug; that way you won't be confusing it with any potential secondary growing season. Or, alternatively, load multiple years and then run a ds.groupby('year').mean() which will find the mean NDVI time-series across the years, then you can calculate phenology on that - this will tell you the average vegetation response.