Error: The following 1 raster values [-1] from "... aligned_lulc_Basline.tif" do not have values

Hi All,

I am running the SDR model with a shapefile that includes 7 side-by-side watersheds and their internal subwatersheds. I am getting the following error only with certain combinations of watersheds-subwatersheds, however when I run certain interior subwatersheds by themselves the model runs successfully. Here is the log:

Initializing...

Showing messages with level INFO and higher

10/01/2018 12:21:30 natcap.invest.utils INFO Writing log messages to Z:\Project Files\18\181-013\181-013.000\CAD-GIS\GIS\05_layers\Harding_sedanalysis\InVEST Results\Baseline\InVEST-Sediment-Delivery-Ratio-Model-(SDR)-log-2018-10-01--12_21_30.txt

10/01/2018 12:21:30 natcap.invest.ui.model Level 100 Starting model with parameters:

Arguments for InVEST natcap.invest.sdr 3.4.4:

biophysical_table_path C:/Users/nphares/Desktop/InVEST/Data_Inputs/Biophysical table/biophysicaltable.csv

dem_path C:/Users/nphares/Desktop/InVEST/Data_Inputs/Reprojected/DEM/dem_clip/w001001.adf

drainage_path

erodibility_path C:/Users/nphares/Desktop/InVEST/Data_Inputs/k_factor_full/w001001.adf

erosivity_path C:/Users/nphares/Desktop/InVEST/Data_Inputs/Reprojected/r_krig_full/w001001.adf

ic_0_param .5

k_param 2

lulc_path C:/Users/nphares/Desktop/InVEST/Data_Inputs/Reprojected/NLCD_2011_clip/nlcd_2011/w001001.adf

results_suffix Baseline

sdr_max .8

threshold_flow_accumulation 10

watersheds_path C:/Users/nphares/Desktop/InVEST/Data_Inputs/Reprojected/TEST_watersheds/subwatersheds_test_SY_allbutmajor.shp

workspace_dir Z:\Project Files\18\181-013\181-013.000\CAD-GIS\GIS\05_layers\Harding_sedanalysis\InVEST Results\Baseline


10/01/2018 12:21:30 natcap.invest.ui.usage ERROR Error when transforming coordinates: local variable 'spatial_ref' referenced before assignment

Traceback (most recent call last):

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\ui\usage.py", line 176, in _merge_local_bounding_boxes

UnboundLocalError: local variable 'spatial_ref' referenced before assignment

10/01/2018 12:21:30 natcap.invest.ui.usage ERROR Error when transforming coordinates: local variable 'spatial_ref' referenced before assignment

Traceback (most recent call last):

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\ui\usage.py", line 176, in _merge_local_bounding_boxes

UnboundLocalError: local variable 'spatial_ref' referenced before assignment

10/01/2018 12:21:30 natcap.invest.ui.usage ERROR Error when transforming coordinates: local variable 'spatial_ref' referenced before assignment

Traceback (most recent call last):

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\ui\usage.py", line 176, in _merge_local_bounding_boxes

UnboundLocalError: local variable 'spatial_ref' referenced before assignment

10/01/2018 12:21:30 natcap.invest.ui.usage ERROR Error when transforming coordinates: local variable 'spatial_ref' referenced before assignment

Traceback (most recent call last):

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\ui\usage.py", line 176, in _merge_local_bounding_boxes

UnboundLocalError: local variable 'spatial_ref' referenced before assignment

10/01/2018 12:21:30 natcap.invest.ui.usage ERROR Error when transforming coordinates: local variable 'spatial_ref' referenced before assignment

Traceback (most recent call last):

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\ui\usage.py", line 176, in _merge_local_bounding_boxes

UnboundLocalError: local variable 'spatial_ref' referenced before assignment

10/01/2018 12:21:30 natcap.invest.ui.usage ERROR Error when transforming coordinates: local variable 'spatial_ref' referenced before assignment

Traceback (most recent call last):

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\ui\usage.py", line 176, in _merge_local_bounding_boxes

UnboundLocalError: local variable 'spatial_ref' referenced before assignment

10/01/2018 12:21:30 natcap.invest.ui.usage ERROR Error when transforming coordinates: local variable 'spatial_ref' referenced before assignment

Traceback (most recent call last):

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\ui\usage.py", line 176, in _merge_local_bounding_boxes

UnboundLocalError: local variable 'spatial_ref' referenced before assignment

10/01/2018 12:21:30 natcap.invest.sdr INFO calculating slope

10/01/2018 12:21:31 natcap.invest.sdr INFO calculating flow direction

10/01/2018 12:21:31 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core INFO labeling flats

10/01/2018 12:21:31 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core INFO draining away from higher

10/01/2018 12:21:31 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core INFO draining towards lower

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core INFO labeling flats

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core INFO draining away from higher

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core INFO draining towards lower

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing INFO flats exist on second pass, must be flat areas that abut the raster edge

10/01/2018 12:21:32 natcap.invest.sdr INFO calculating flow accumulation

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 0

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 1

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 1

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 1

10/01/2018 12:21:32 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core WARNING no flow direction found for 0 1

10/01/2018 12:21:33 natcap.invest.sdr INFO calculate ls term

10/01/2018 12:21:33 natcap.invest.sdr INFO classifying streams from flow accumulation raster

10/01/2018 12:21:33 natcap.invest.sdr INFO calculate per pixel W

10/01/2018 12:21:33 natcap.invest.ui.model ERROR Exception while executing <function execute at 0x15C45AF0>

Traceback (most recent call last):

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\ui\model.py", line 1505, in _logged_target

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\sdr.py", line 205, in execute

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\sdr.py", line 554, in _calculate_w

File "site-packages\pygeoprocessing\geoprocessing.py", line 1207, in reclassify_raster

File "site-packages\pygeoprocessing\geoprocessing.py", line 198, in raster_calculator

File "site-packages\pygeoprocessing\geoprocessing.py", line 1201, in _map_dataset_to_value_op

ValueError: The following 1 raster values [-1] from "Z:\Project Files\18\181-013\181-013.000\CAD-GIS\GIS\05_layers\Harding_sedanalysis\InVEST Results\Baseline\aligned_lulc_Baseline.tif" do not have corresponding entries in the `value_map`: {43.0: 0.9, 71.0: 0.2, 41.0: 0.7, 42.0: 0.8, 11.0: 0.1, 81.0: 0.3, 82.0: 0.4, 52.0: 0.1, 21.0: 0.2, 22.0: 0.3, 23.0: 0.4, 24.0: 0.5, 90.0: 0.5, 31.0: 0.6, 95.0: 0.6}

10/01/2018 12:21:33 natcap.invest.ui.model INFO Execution finished

10/01/2018 12:21:33 natcap.invest.utils INFO Elapsed time: 3.51s

10/01/2018 12:21:33 natcap.invest.ui.execution ERROR Target <function _logged_target at 0x3475EBB0> failed with exception

Traceback (most recent call last):

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\ui\execution.py", line 68, in run

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\ui\model.py", line 1505, in _logged_target

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\sdr.py", line 205, in execute

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\sdr.py", line 554, in _calculate_w

File "site-packages\pygeoprocessing\geoprocessing.py", line 1207, in reclassify_raster

File "site-packages\pygeoprocessing\geoprocessing.py", line 198, in raster_calculator

File "site-packages\pygeoprocessing\geoprocessing.py", line 1201, in _map_dataset_to_value_op

ValueError: The following 1 raster values [-1] from "Z:\Project Files\18\181-013\181-013.000\CAD-GIS\GIS\05_layers\Harding_sedanalysis\InVEST Results\Baseline\aligned_lulc_Baseline.tif" do not have corresponding entries in the `value_map`: {43.0: 0.9, 71.0: 0.2, 41.0: 0.7, 42.0: 0.8, 11.0: 0.1, 81.0: 0.3, 82.0: 0.4, 52.0: 0.1, 21.0: 0.2, 22.0: 0.3, 23.0: 0.4, 24.0: 0.5, 90.0: 0.5, 31.0: 0.6, 95.0: 0.6}

10/01/2018 12:21:33 natcap.invest.ui.execution INFO Execution finished



687 x 142 - 9K

Comments

This discussion has been closed.