This forum is shutting down! Please post new discussions at

Coastal Vulnerability errors


I'm new on Invest. I'm trying to run the Coastal Vulnerability model using much of the data from the sample data that we got at the NatCap Symp 2018. The only data that is not from this data base is the AOI and the Habitats (which I'm only interested in assessing the role of mangroves).

I'm using Invest 3.4.2 on a Mac (High Sierra 10.13.2).

Here's the files from NatCap data base that I'm using for each input:
-Land Polygon: global_polygon.shp
-Bathymetry layer: DEMs/global_dem/w001001.adf
-Relief: DEMs/global_dem/w001001.adf
-Model resolution: 1000
-Depth threshold: 0
-Exposure proportion: 0.8
-Climatic forcing grid: WaveWatchIII.shp
-Continental shelf: continentalShelf.shp
-Depth contour: 150
-Population layer: global_pop/w001001.adf
-Min population in urban centers: 5000
-Elevation averaging radius: 5000
-Mean sea level datum: 0
-Rays per sector: 1
-Maximun fetch distance: 12000
-Coastal overlap: 250
-Coastal neighborhood: 1000

I keep getting the same errors (attached the entire error message). It seems that this one is the main one: not recognised as a supported file format.

Since I'm using almost all the information from that data base from NatCap, I thought I was not going to have many problems when I try it for the first time, but I was wrong.

Could you please help me with this? I'd appreciate so much.



  • DaveDave Member, Administrator, NatCap Staff

    I think there's a couple issues going on here, luckily they are documented in other threads.

    First, the OSGEO errors about unsupported file types are not actually interfering with the model execution and can be ignored (see this thread).

    Second, I think the model stops executing due to this problem:

    07/05/2018 17:01:40 natcap.invest.coastal_vulerability.core WARNING There is no shore to detect: land area = 0
    07/05/2018 17:01:40 osgeo ERROR [errno 1] Attempt to create 0x0 dataset is illegal,sizes must be larger than zero.

    To resolve that, check if your AOI has a 'projected' coordinate system, as opposed to a 'geographic' coordinate system.

    More details from another thread:

    "It turns out the problem is that the AOI shapefile has a geographic coordinate system (with units of degrees) when it needs to have a projected coordinate system (with units of meters). This needs to be more clear in our documentation. The "cell_size" parameter is described to have units of meters, but in reality it has units that match the units of the AOI shapefile coordinate system. So in your example, that means a cell size of 100 with a decimal degree coordinate system will instruct the model to create a raster with cells 100 degrees wide! That resulted in a raster with 0 cells, and eventually raised the error you saw.

    The solution is to project the AOI shapefile to a coordinate system that uses meters for units (such as a UTM system). Then specify the cell_size in meters, as you have done. You should not need to re-project all of your other data sources, the model will do that for you by transforming all the other input data to match the AOI coordinate system. "
  • Hi @Dave

    Thanks so much for the quick response, appreciate a lot.

    I did what you told me to do, and it worked!

    2 last questions:
    -Are the rest of the parameters that I used ok? Like I said, I used the default ones or some from the Bark Clay example.
    -I only wanted to know the role of mangroves, so in the csv table I only have this one, but I wasn't sure about the "protection distance", so I used 500m just to try the model, but I'd like to have a more accurate number. I even thought about putting 0 since many of the mangroves are right at the coast. What do you think?

    Thanks again @Dave
  • DaveDave Member, Administrator, NatCap Staff
    Hi Marcello,

    1) lt's fine to use those global default layers for many of these inputs. You can replace them with local data when/if it is available.

    2) It is fine to have only one habitat in the csv table. The protection distance should be customized for the coastline and the type of mangrove. So I suggest doing some lit review and perhaps some trial and error with different values. If mangroves are right at the coast, you can still think of them protecting area on the landward side. A protection distance of 0 would be equivalent to removing the mangroves altogether.
  • Hi again @Dave

    Regarding the protection distance of mangroves, according to some authors it is approximately 500, which is exactly what I used when I first ran the model. That distance means that energy from wind and waves will be dissipated 100% as it pass through 500m of mangroves.

    On the other hand, what you suggested, considering the protecting area on the landward side, is different, so I tried with 3000m to take into account this somehow, the results were quite different. In the first case, in the raster of habitat role, I got several pixels but not through all the coast, but in the second case I got pixels with information through all the coast.

    So I'm confused, what do I need to consider? 1) the mangrove belt (distance that energy needs to cross through the mangrove)?, 2) the distance that mangroves protect taking into account the external side (landward) of the mangrove belt? or 3) both?

    I think this is very interesting, and results depend on how you interpret coastal protection distance.

    Appreciate the help Dave.
  • DaveDave Member, Administrator, NatCap Staff
    Hi Marcello,

    The protection distance value refers to your #2: the distance within which mangroves protect coastline. The model uses that value as a radius for a circle around each shoreline point. If there is magrove within the search radius, that shore point gains the protective value of the mangrove. So it makes sense that with the large distance of 3000m, many more shore points were classified as being protected by mangroves, and you saw that reflected in the habitat role value.

    If you want to alter the strength of the protection, as opposed to the distance, you could consider changing the RANK value in that same table, or even divide your mangrove layer into multiple habitat layers where each get different ranks based on their morphology, for example.
Sign In or Register to comment.