Okay, so here’s what I know so far…
In my environment that has
gdal 3.6.4, and
libgdal 3.7.0, and calling
n_workers set to
-1 on @dcdenu4 's suggestion on this thread, I get
Warning 1: the input vector layer has a SRS, but the source raster dataset does not.
Cutline results may be incorrect.
which, with hindsight, is just a warning. I tracked this down to my runoff proxy raster missing a defined CRS. Adding that metadata,
ndr.execute runs without error or warning in some 2.6 s. However, the
watershed_results_ndr gpkg output has
nan in the n export columns. These are the outputs that motivated this post, with
ic_factor being produced but
ndr_n not. On @esoth 's suggestion (above) I looked at the
effective_retention_n intermediate output as well. I’ve now highlighted where these two outputs have
The red boundaries are the subcatchments I’ve specified to be of interest. (The black boundary you can partially see is where I’d defined input LULC). Clearly the
along the stream network, but also around the uppermost reaches around the perimeter of the watershed. The
intermediate, however, is riddled with
. (NB these plots have 1 where data is
, 0 otherwise).
Now I switch back to my environment that has
gdal 3.6.2, and
libgdal 3.6.2 installed and run again. Now, instead of the warning about a source raster missing an SRS, I get
ERROR 1: ./local_data_test_1/intermediate_outputs/ic_factor_test_1.tif, band 1: Failed to compute statistics, no valid pixels found in sampling.
(NB this is when giving it input that is missing a defined SRS in an input raster).
So now “fixing” the missing SRS issue, I get the same
ERROR 1 again after the model runs for 3+ minutes. Differences in output with this version include that
ic_factor, as well as
ndr_n are all
export columns in the
watershed_results_ndr gpkg file are now zero rather than
effective_retention_n intermediate output is also entirely
Whatever the issue with my inputs, they cause quite different degrees of problem between these two versions of
invest. I think it’s time to beg that help from Doug and will package up my inputs, if that’s still okay. I’ve about run out of “ah ha, I think it will be … oh, it wasn’t that …”