Fetch ray - no bathymetry data error


I am testing the CV model for an exposed coast in the Mediterranean and my first run was completed, however I got this warning for every shore_id point: found fetch ray at shore_id … with no bathymetry data, assuming depth of -1 for wave height & period calculations

The same messages were also in the log for another run where I selected a lower maximum fetch value so the fetch rays would not exceed the limits of the provided bathymetry file.

In the intermediate results file “fetch_points” it seems that the vast majority of the “fdepth” columns for all directions are NULL. In this post Pardon my fetch - Fetch rays with no bathymetry data - #2 by dave however it is mentioned that Many will be NULL for the fetch rays that point towards land. The “fdist” columns have some 9999,999 values, which possibly has to do with the link above and may be irrelevant with the problem reported here.

I would appreciate some guidance on how to manage this issue as well as how this warning affects the model results (since the model run completes despite the warning). Also, any comment on the maximum fetch value selection, if relevant.

Hi @byron , good idea to check the intermediate results. If you see fdepth_XX values that are NULL where the corresponding fdist_XX is 0, that is to be expected. In that XX direction, there is no fetch ray because it is a landward direction.

The maximum fdist value you should see is whatever value you specified for the “max fetch distance”. If you see values exceeding that, something likely went wrong.

If you would like to package up your output workspace I can take a closer look. Also, please always attach your logfile here. Thank you,

Hi Dave,

The maximum fdist values are indeed up to the the max fetch distance in my last model run (though in a former run actually there were 9999,999 values, maybe it had to do with something else…).

The problem is the NULL for fdepth, as they do not correespond with fdist=0 but with -literally- every point and direction regardless of the fdist.

Sorry for omitting the log file, you may find it attached here
InVEST-natcap.invest.coastal_vulnerability-log-2024-02-20–11_12_52.txt (1022.3 KB)

Any help will be very important, thanks.

Hi @byron , thanks for sharing your data. I think I’ve found the problem. The model is incorrectly handling nan values in the bathymetry raster. nan seems to be the nodata value of your bathymetry layer, and the model is trying to average it into other real bathymetry values, resulting in all those NULL values.

The good news is, I believe this problem is already fixed in the latest version of invest (3.14.1 as I write this). Could you please try that version and see if it yields correct fdepth values?

Also, you may wish to adjust your max_fetch_distance parameter, or the coverage of your landmass polygon and bathymetry. As-is, the fetch rays extend far beyond the coverage of the landmass and bathymetry. The model should take this fetch distance into account before clipping the landmass or bathymetry, so I assume your input datasets look similar to this picture?

If there are other landmasses to the north/south, then excluding them would create artificially long fetch rays in those directions, which influence the wind and wave exposure calculations.

For the bathymetry, missing data along the rays will influence the wave height & period calculations, which influence wave exposure. It’s okay to have some missing values under the fetch rays – version 3.14.1 will ignore them – but if you really do believe that wind-driven waves can propagate over those distances, then you probably want reasonably accurate measurements of the ocean depth along the whole distance.

The User Guide has more details on this parameter in a few different sections.

Please let me know if version 3.14.1 does not seem to resolve this issue!

Actually, I may be mistaken. I think this is not yet fixed in 3.14.1. I will try to fix this and get you a new version to try shortly. Thanks!

@byron , here’s a development build that I think will resolve the bathymetry issue. Would you mind installing and trying it out? Thanks!


Do you have WW3 for the Mediterranean Sea, if you have this data please share it with me?

Hello Dave,

Thank you for the answer. I understand and agree that the input files for landmasses and bathymerty should be much broader than the AOI, for obtaining realistic results for every specific setting (I used that setup to get familiar with the model). However, in my view this is kind of irrelevant with the successful model completion, if the maxfetch distance is set as low as needed for the longer rays do not exceed the other input files’ coverage.
That’s why I had tried some model runs with this condition fulfilled, as I mentioned in my initial message:

which also concerns the first solution you proposed.
So, even the snapshot you sent is simIlar indeed for that input, even for other maxfetches the warning was there.
I tried that with further lower value (unreal) and also under 3.14.1 version, but the warning continues.

Anyways, the problem can be considered solved: I downloaded bathymetry (GEBCO) for a broader area and run the 3.14.1 version and the warning was gone. I also excecuted some test runs with a larger AOI and with higher maxfetch value, all good.
I think under this version some missing values along few rays are actually ignored, as you mentioned.

To sum up, it seems that the bathymetry file has to be large enough, the landmasses not that crucial for warnings. My dought is if the problem was relevant with my initial bathymetry file, which had higher resolution (also data type float32 while GEBCO is Int16, if related), as my intention is to use high resolution if available. Selecting a max fetch value that should be more appropriate for the model in cases of coasts exposed to open sea (no obstacle for several hundreds of km) is also still kind of questionable.
I would appreciate any suggestion on the above, as they any future model run depends on them.
Thank you for your time,
All the best

P.S. The development build you sent me was not excecuted as antivirus identified possible infection, probably it will not be necessary though.


The WW3 data were manually created for a local case study only.

Hi Byron, thanks for the update.

My comments about the spatial extent of the bathymetry and landmass relative to the max fetch distance were just general suggestions, not directly related to solving the problem of the warnings about NULL depth values.

As I mentioned earlier, the original problem was created by the presence of nan as the nodata value in your bathymetry raster. Presumably the GEBCO dataset does not use nan and thus the problem was avoided. If you wish to use your original bathymetry layer with invest 3.14.0 or 3.14.1, you will need to reclassify the nan values to any other number and make sure to assign that new number as the nodata value. And a future version of invest will treat nan properly.

thanks for your response,
can you give me a simple method for creating WW3?

Hi @HeshamMorgan and @byron , it’s great if you and others can compare notes on this, as several people have asked on this forum. If you do continue the conversation, may I request discussing it over on this thread: Are there any ways to download Wave Watch III for the Mediterranean Sea and suitable for applying the coastal vulnerability at inVEST model?

That way future people searching for “Mediterranean” can more easily find the conversation. Thank you,

1 Like

Hi Dave,

Yes I undesrtand, our conversation was very helpful anyways. Besides, after that I interpreted fully the nan issue… I thought the problem was the nan values which are result of missing values outside the bathymetry extent for longer rays, but nan values may exist throughout the area the bathymetry file includes.
Thanks again,
all the best.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.