NDR error:(osgeo) utils._log_gdal_errors(98) WARNING [errno 1]

Hello,

I ran the NDR model 3.11.0, but the output maps of n_total_export and p_surface_export were incomplete, while the maps of load_n and load_p look good.

The attached maps of n_total_export and load_n with city boundary vector data on them can show the difference clearly, and also in the txt log, there is a error appear: (osgeo) utils._log_gdal_errors(98) WARNING [errno 1]. Could you kindly have a look and provide me a solution? Thank you in advance.

InVEST-Nutrient-Delivery-Ratio-log-2022-07-15–12_53_39.txt (59.2 KB)

:ballot_box_with_check: Are you using the latest version of InVEST?
:ballot_box_with_check: Have you have read the entire user’s guide section for your model?
:ballot_box_with_check: Have you searched the forum for similar questions using keywords from the error message? Many common problems have already been answered.

If you have tried all of these steps and still have a question,

:ballot_box_with_check: Fill out the sections below.
:ballot_box_with_check: Use the “optional tags” button above to tag this topic with the model you are using.
:ballot_box_with_check: Give this topic a descriptive title including the model name and keywords from your specific problem. Avoid very generic titles.

Examples of good titles:
✓ Habitat Quality model runs successfully but generates empty maps
✓ GLOBIO: KeyError in load_msa_parameter_table
✓ Coastal Vulnerability: ‘Could not open … as a gdal.OF_RASTER’

Description

Log file

InVEST version

Hi @yiant -

It’s not entirely obvious to me what is “incomplete” about the n_total_export map. I see some white areas, mostly around the edge of the city boundary, which may be NoData values, or may just be colored white because of the symbology.

If these areas are NoData, look at the stream.tif layer output by the model and see if streams are defined there (as is talked about in the User Guide section Defined Area of Outputs). If not, you will get NoData in these areas. Really, we recommend providing an area of interest that is based on hydrology (a complete watershed), not on city boundaries, which are usually not hydrologically complete.

~ Stacie

Hi @swolny,

Thank you very much for your reply. With the “incomplete”, I mean there are losing some parts in n_total_export and p_surface_export, while my watershed vector data and stream raster data look fine.
Please see the attached pictures and I overlaid n_total_export.tif with watershed.shp to show the missing parts clearer (the last picture on right the side).Thank you again.

Thanks @yiant. Here are two things to look at:

  • Do all of your spatial inputs cover the whole area? If any of them have NoData within your area of interest, you’ll get NoData in the result.

  • Check out the model output intermediate_outputs/ what_drains_to_stream.tif. The User Guide describes this as " Map of which pixels drain to a stream. A value of 1 means that at least some of the runoff from that pixel drains to a stream in stream.tif. A value of 0 means that it does not drain at all to any stream in stream.tif." So if you have 0s in those areas of missing data, they do not drain to a stream, so you will get NoData in the result.

Let us know what you find.

~ Stacie

Dear @swolny,

Thank you for your suggestions. Yes, my “what_drains_to_stream.tif” has value of 1 in those missing areas, what should I do to fix this problem?

Did you create your watershed area of interest based on the same DEM that you are using for modeling? For example, by creating a watershed using a GIS tool, or InVEST DelineateIt?

It looks to me like your area of interest does not all correspond with the hydrology that the DEM is creating. It’s likely that the areas that have 1s in the what_drains_to_stream.tif layer are the hydrologically complete watershed for your area, and the areas that have 0s are outside of that hydrologically complete watershed.

If your area of interest watershed is not based on the same DEM, I recommend re-creating it using the same DEM, run the model again with the new watershed and see what happens. In general, we recommend providing a complete watershed for modeling. That way, all of the nutrient and landscape processes that affect water quality at your area of interest will be taken into account. If some of the places in the area of interest do not connect to the stream, you’re only seeing part of the picture, especially if they drain off of the map.

~ Stacie

Hi @swolny,

Thank your for your explaination.

My watershed was generated by DEM via ArcGIS Hydrology tools and I also tried Delineatelt model (please see the picture). The good thing is txt.log of running the watersheds created by the Delineatelt model has no error, but still, some parts are missing. Are there other ways to make what_drains_to_stream.tif fully valued as 1?

If no streams are defined within those areas, then you will also get NoData for the export results, since the model is based on tracing nutrient downslope until it reaches a stream. You can make the threshold flow accumulation (TFA) value smaller, which creates more tributaries. The downside is that you might end up with an unrealistic stream network, if those smaller tributaries don’t exist in the real world.

Looking at your watersheds map, I wonder if you’re working with an island, or some place similar where all of the edges drain to the ocean. It is common for those edges to not have streams defined, since they’re usually made up of a lot of tiny watersheds. I’ve seen this often when working on watersheds that drain to the coast.

~ Stacie

Hi @swolny,

Thank you so much for the explanation.

My study area is an inland city with a large river running through it. I will try the smaller TFAs and see if they work well.

All the best,
Yiant