Error running Offshore Wind Energy with custom AOI and custom grid/land points


I’m trying to run the Offshore Wind Energy tool with valuation for the west coast of North America. I’m using a custom AOI and custom grid and land points, but otherwise the inputs are default. I’ve run the analysis with two different InVEST versions, but both fail to produce results:

  1. Using InVEST 3.7.0, a run without valuation finishes without throwing any errors, but the density_W_per_m2.tif and the harvested_energy_MWhr_per_yr.tif files are filled with NAs instead of values (log file InVEST-Wind-Energy-log-2019-09-30–10_48_54.txt (7.0 KB) ). The problem is probably in my custom AOI or how it’s being processed (?).
  2. Then, running InVEST 3.7.0 with valuation produces an error about “UnboundLocalError: local variable ‘final_dist_task’ referenced before assignment,” which I am guessing occurs because the wind energy calculations earlier in the pipeline failed.
  3. I also tried using a development version 3.7.0.post212+hd9612c04a8dc courtesy of @jdouglass. The version was posted to fix an error in the Wave Energy toolbox, but the Offshore Wind Energy tool also seems to be working a bit better. I can run the energy calculations without valuation, and the density_W_per_m2.tif and the harvested_energy_MWhr_per_yr.tif files both look good at the end.
  4. However, when I turn on valuation for version 3.7.0.post212+hd9612c04a8dc, I get errors that seem related to there not being any grid points in the AOI (log file InVEST-Wind-Energy-log-2019-09-30–11_57_13.txt (9.1 KB) ). Plotting the grid points and the AOI on the same map in QGIS, though, shows that they both overlap (I’ll post the files separately).
  5. Running version 3.7.0.post212+hd9612c04a8dc with valuation turned on, but without custom grid & land points, I get results that look good, all the way through net present value. However, I’d really like to be able to use the custom grid & land points.

Any ideas on what may be going wrong here?

If it helps at all, I’ve tried effectively the same analysis for the east coast of North America (same grid & land file, but different AOI). The analysis runs perfectly and produces results that look good. It seems to be something with the west coast run.

Many thanks in advance for any thoughts.


Also attaching the custom AOI ( (94.6 KB) ) and custom grid & land points file (landgridpts_northamerica_wind.csv (147.7 KB) )