MOOC, Coastal Vulnerability

I’m a new learner, and I can’t find the Sea Level Rise (vector) file in samples files. When I try to run the model, it won’t complete, although it’s opcional. Where can I find the missing file, please?

Hi @fcarvalho, and welcome to the forum!

You’re correct that we don’t provide a sea level rise layer in the sample data. But the model should run fine without it. If the model won’t complete, please post the entire log file (.txt file) that’s created in your Workspace, so we can see the error and your inputs and hopefully understand what’s going wrong.

~ Stacie

08/31/2022 13:46:26 natcap.invest.utils Level 100 Writing log messages to [C:\Users\bapti\OneDrive\�rea de Trabalho\Ambiente-Agro\CV\InVEST-natcap.invest.coastal_vulnerability-log-2022-08-31–13_46_26.txt]
08/31/2022 13:46:26 main Level 100 Starting model with parameters:
Arguments for InVEST natcap.invest.coastal_vulnerability 3.11.0:
aoi_vector_path C:\Users\bapti\OneDrive\Documentos\InVEST\CoastalVulnerability\aoi_grandbahama_utm.shp
bathymetry_raster_path C:\Users\bapti\OneDrive\Documentos\InVEST\CoastalVulnerability\bathymetry.tif
dem_averaging_radius 900
dem_path C:\Users\bapti\OneDrive\Documentos\InVEST\CoastalVulnerability\dem_srtm_grandbahama.tif
geomorphology_fill_value 3
geomorphology_vector_path C:\Users\bapti\OneDrive\Documentos\InVEST\CoastalVulnerability\geomorphology_grandbahama.shp
habitat_table_path C:\Users\bapti\OneDrive\Documentos\InVEST\CoastalVulnerability\GrandBahama_Habitats\Natural_Habitats.csv
landmass_vector_path C:\Users\bapti\OneDrive\Documentos\InVEST\CoastalVulnerability\landmass_polygon.shp
max_fetch_distance 1500
model_resolution 1000
n_workers -1
population_radius 500
population_raster_path C:\Users\bapti\OneDrive\Documentos\InVEST\CoastalVulnerability\population_grandbahama.tif
results_suffix GB
shelf_contour_vector_path C:\Users\bapti\OneDrive\Documentos\InVEST\CoastalVulnerability\continental_shelf_polyline_global.shp
slr_vector_path
workspace_dir C:\Users\bapti\OneDrive\�rea de Trabalho\Ambiente-Agro\CV
wwiii_vector_path C:\Users\bapti\OneDrive\Documentos\InVEST\CoastalVulnerability\WaveWatchIII_global.shp

08/31/2022 13:46:26 natcap.invest.coastal_vulnerability INFO Validating arguments
08/31/2022 13:46:26 natcap.invest.validation INFO Starting whole-model validation with ARGS_SPEC
08/31/2022 13:46:29 pygeoprocessing.geoprocessing INFO starting reprojection
08/31/2022 13:46:29 pygeoprocessing.geoprocessing INFO reprojection 100.0% complete on clipped_projected_landmass_GB.gpkg
08/31/2022 13:46:29 natcap.invest.coastal_vulnerability INFO Masking positive values from bathymetry
08/31/2022 13:46:30 natcap.invest.coastal_vulnerability WARNING C:\Users\bapti\OneDrive\Documentos\InVEST\CoastalVulnerability\bathymetry.tif is unprojected and will be warped to match the AOI and resampled to a pixel size of 1000.0 meters
08/31/2022 13:46:30 pygeoprocessing.geoprocessing INFO starting stats_worker
08/31/2022 13:46:30 pygeoprocessing.geoprocessing INFO started stats_worker
08/31/2022 13:46:30 pygeoprocessing.geoprocessing INFO 100.0% complete
08/31/2022 13:46:30 pygeoprocessing.geoprocessing INFO Waiting for raster stats worker result.
08/31/2022 13:46:30 natcap.invest.coastal_vulnerability INFO preparing landmass geometry and interpolating shore points
08/31/2022 13:46:30 taskgraph.Task ERROR Something went wrong when adding task index landmass geometry and interpolate shore points (2), terminating taskgraph.
Traceback (most recent call last):
File “taskgraph\Task.py”, line 674, in add_task
File “taskgraph\Task.py”, line 1093, in _call
File “natcap\invest\coastal_vulnerability.py”, line 740, in prepare_landmass_line_index_and_interpolate_shore_points
File “rtree\index.py”, line 284, in init
File “rtree\index.py”, line 1411, in init
File “rtree\core.py”, line 23, in check_void
rtree.exceptions.RTreeError: Error in “Index_Create”: Spatial Index Error: IllegalArgumentException: SpatialIndex::DiskStorageManager: Index/Data file cannot be created.
08/31/2022 13:46:30 natcap.invest.utils ERROR Exception while executing natcap.invest.coastal_vulnerability
Traceback (most recent call last):
File “natcap\invest\utils.py”, line 165, in prepare_workspace
File “natcap\invest\cli.py”, line 486, in main
File “natcap\invest\coastal_vulnerability.py”, line 476, in execute
File “taskgraph\Task.py”, line 674, in add_task
File “taskgraph\Task.py”, line 1093, in _call
File “natcap\invest\coastal_vulnerability.py”, line 740, in prepare_landmass_line_index_and_interpolate_shore_points
File “rtree\index.py”, line 284, in init
File “rtree\index.py”, line 1411, in init
File “rtree\core.py”, line 23, in check_void
rtree.exceptions.RTreeError: Error in “Index_Create”: Spatial Index Error: IllegalArgumentException: SpatialIndex::DiskStorageManager: Index/Data file cannot be created.
08/31/2022 13:46:30 natcap.invest.utils INFO Elapsed time: 4.16s
08/31/2022 13:46:30 natcap.invest.utils INFO Execution finished

Hi @fcarvalho,

Have you had any luck on this issue? Would you mind attaching the logfile that you copied from above?

~ Doug

Hi,

I am doing the Introduction to the Natural Capital Project Approach on Edx course.

This question is about the Coastal Vulnerability Model exercise : Module #2: NatCap Tools for Ecosystem Services in Decisions / Running the Coastal Vulnerability model

There is not downloadable data associated with the module, so I used the data for CoastalVulnerability in the InVEST sample data download which appears to be grandbahama also.

However, running the model I get these warnings/issues in the log (attached).

I was wondering how I can understand their implications on the results and whether the outputs are ok.

regards
Matt
InVEST-natcap.invest.coastal_vulnerability-log-2023-10-13–08_41_55.txt (12.9 KB)

Hi @matthal -

One thing to be aware of is that the edX course was created a few years ago, and there was a significant update to the Coastal Vulnerability model (and Sediment model too, and the whole InVEST user interface!) since then, so there are some differences between what’s shown in the MOOC and what you see in recent versions of InVEST, including the sample data.

That said, when there are WARNINGs, they usually don’t have a critical impact on results. However, it is interesting to see that there are warnings like “Ring self-intersection”, which means that we need to clean up this sample data, since there are geometry issues in some of the input shapefiles.

This message is a not a warning, but informational:
1 points inherited the geomorphology_fill_value (3) because no geomorphology segments were found within the search distance (500.00 meters) around those points. You may wish to add geomorphology segments near these points, or you may wish to view the geomorphology and landmass polygon inputs in a GIS and edit one or both layers to make them align more closely.

This is pretty self-explanatory, and the situation itself is ok. If you were doing a real-world analysis (not just working with sample data), you’d probably want to look into the point that’s missing geomorphology and decide how to handle it. Same thing with this warning:
434 shore points are missing values after aggregating /development/InVEST/Outputs/CoastalVulnerability/intermediate/population/clipped_projected_pop_GB.tif. No valid pixels were found within the search radius (500.0 meters) around these points.

which is a similar message, but about the population data instead of geomorphology.

~ Stacie

2 Likes

Thank you Stacie, that all makes sense.