Seasonal Water yield model - divide by zero error

Hi everyone,

I´m trying to run the model for three different watersheds and I keep getting the same error, but I don´t know why. The warning message says: divide by zero encountered in divide Has anyone encountered this error? Thanks!!

Here is the log:
.

Initializing...

04/20/2016 11:52:50 root DEBUG Loading <module 'natcap.invest.seasonal_water_yield.seasonal_water_yield' from 'C:\INVEST~1.0_X\INVEST~1\natcap\invest\seasonal_water_yield\seasonal_water_yield.pyc'> in frozen environment

Arguments:

alpha_m 1/12

aoi_path C:/IADO/SAFER/SAFER Student project/Seasonalwateryieldmodel/Winooskiriver/Winooski_Watershed_shape/winooskiUTM18N.shp

beta_i 1.0

biophysical_table_path C:/IADO/SAFER/SAFER Student project/Seasonalwateryieldmodel/Winooskiriver/Biophysicaltable/Seasonalbiophysical_table.csv

dem_raster_path C:/IADO/SAFER/SAFER Student project/Seasonalwateryieldmodel/Winooskiriver/NewDEM/FillMascProjecDEM.tif

et0_dir C:\IADO\SAFER\SAFER Student project\Seasonalwateryieldmodel\Winooskiriver\CurrentConditions (1950-200)\Winooski_ET

gamma 1.0

lulc_raster_path C:/IADO/SAFER/SAFER Student project/Seasonalwateryieldmodel/Winooskiriver/LULC/Winooski_lulc.tif

monthly_alpha False

precip_dir C:\IADO\SAFER\SAFER Student project\Seasonalwateryieldmodel\Winooskiriver\CurrentConditions (1950-200)\Winooski_PPT

rain_events_table_path C:/IADO/SAFER/SAFER Student project/Seasonalwateryieldmodel/Winooskiriver/Rain_event_table/Winooski_rain_events.csv

soil_group_path C:/IADO/SAFER/SAFER Student project/Seasonalwateryieldmodel/Winooskiriver/Soils/Winooskisoilgroup.tif

threshold_flow_accumulation 10

user_defined_climate_zones False

user_defined_local_recharge False

workspace_dir C:\IADO\SAFER\SAFER Student project\Seasonalwateryieldmodel\Winooskiriver\Investresults



04/20/2016 11:52:50 root INFO Logging will be saved to natcap.invest.seasonal_water_yield.seasonal_water_yield-log-2016-04-20--11_52_50.txt

04/20/2016 11:52:50 root DEBUG Loaded the model from natcap.invest.seasonal_water_yield.seasonal_water_yield

04/20/2016 11:52:50 root INFO Executing the loaded model

04/20/2016 11:52:50 root INFO Running InVEST version "3.3.0"

04/20/2016 11:52:50 root INFO Python architecture: ('32bit', 'WindowsPE')

04/20/2016 11:52:50 root INFO Disk space remaining for workspace: 372.84 GB

04/20/2016 11:52:50 root INFO Pointing temporary directory at the workspace at C:\IADO\SAFER\SAFER Student project\Seasonalwateryieldmodel\Winooskiriver\Investresults

04/20/2016 11:52:50 root INFO Updating os.environ["TMP"]=C:\IADO\SAFER\SAFER Student project\Seasonalwateryieldmodel\Winooskiriver\Investresults\tmp to C:\IADO\SAFER\SAFER Student project\Seasonalwateryieldmodel\Winooskiriver\Investresults

04/20/2016 11:52:50 root INFO Updating os.environ["TEMP"]=C:\IADO\SAFER\SAFER Student project\Seasonalwateryieldmodel\Winooskiriver\Investresults\tmp to C:\IADO\SAFER\SAFER Student project\Seasonalwateryieldmodel\Winooskiriver\Investresults

04/20/2016 11:52:50 root INFO Updating os.environ["TMPDIR"]=C:\IADO\SAFER\SAFER Student project\Seasonalwateryieldmodel\Winooskiriver\Investresults\tmp to C:\IADO\SAFER\SAFER Student project\Seasonalwateryieldmodel\Winooskiriver\Investresults

04/20/2016 11:52:50 root INFO Setting tempfile.tempdir to C:\IADO\SAFER\SAFER Student project\Seasonalwateryieldmodel\Winooskiriver\Investresults\tmp

04/20/2016 11:52:50 root INFO Starting natcap.invest.seasonal_water_yield.seasonal_water_yield

04/20/2016 11:52:50 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO prepare and test inputs for common errors

04/20/2016 11:52:50 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO Building file registry

04/20/2016 11:52:50 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO Checking that the AOI is not the output aggregate vector

04/20/2016 11:52:50 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO Aligning and clipping dataset list

04/20/2016 11:52:50 pygeoprocessing.geoprocessing WARNING These two datasets might not be in the same projection. The different projections are:


'filename: C:\IADO\SAFER\SAFER Student project\Seasonalwateryieldmodel\Winooskiriver\CurrentConditions (1950-200)\Winooski_PPT\ppt_12.tif'

PROJCS["NAD_1983_2011_UTM_Zone_18N",

GEOGCS["GCS_NAD_1983_2011",

DATUM["NAD_1983_2011",

SPHEROID["GRS_1980",6378137,298.257222101]],

PRIMEM["Greenwich",0],

UNIT["degree",0.0174532925199433]],

PROJECTION["Transverse_Mercator"],

PARAMETER["latitude_of_origin",0],

PARAMETER["central_meridian",-75],

PARAMETER["scale_factor",0.9996],

PARAMETER["false_easting",500000],

PARAMETER["false_northing",0],

UNIT["metre",1,

AUTHORITY["EPSG","9001"]]]


and:


'filename:C:/IADO/SAFER/SAFER Student project/Seasonalwateryieldmodel/Winooskiriver/Soils/Winooskisoilgroup.tif'

PROJCS["WGS_1984_UTM_Zone_18N",

GEOGCS["WGS 84",

DATUM["WGS_1984",

SPHEROID["WGS 84",6378137,298.257223563,

AUTHORITY["EPSG","7030"]],

AUTHORITY["EPSG","6326"]],

PRIMEM["Greenwich",0],

UNIT["degree",0.0174532925199433],

AUTHORITY["EPSG","4326"]],

PROJECTION["Transverse_Mercator"],

PARAMETER["latitude_of_origin",0],

PARAMETER["central_meridian",-75],

PARAMETER["scale_factor",0.9996],

PARAMETER["false_easting",500000],

PARAMETER["false_northing",0],

UNIT["metre",1,

AUTHORITY["EPSG","9001"]],

AUTHORITY["EPSG","32618"]]



04/20/2016 11:52:55 pygeoprocessing.geoprocessing INFO align_dataset_list aligning dataset 12 of 27

04/20/2016 11:53:03 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO Masking invalid lulc, dem, and possible soil group overlap

04/20/2016 11:53:04 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO flow direction

04/20/2016 11:53:10 pygeoprocessing.routing.routing_core INFO flow_direction_inf 99.1% complete

04/20/2016 11:53:11 pygeoprocessing.routing.routing_core INFO labeling flats

04/20/2016 11:53:12 pygeoprocessing.routing.routing_core INFO draining away from higher

04/20/2016 11:53:12 pygeoprocessing.routing.routing_core INFO draining towards lower

04/20/2016 11:53:12 pygeoprocessing.routing DEBUG flats exist, calculating flow direction for them

04/20/2016 11:53:14 pygeoprocessing.routing.routing_core INFO labeling flats

04/20/2016 11:53:15 pygeoprocessing.routing.routing_core INFO draining away from higher

04/20/2016 11:53:15 pygeoprocessing.routing.routing_core INFO draining towards lower

04/20/2016 11:53:15 pygeoprocessing.routing INFO flats exist on second pass, must be flat areas that abut the raster edge

04/20/2016 11:53:16 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO flow weights

04/20/2016 11:53:16 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO flow accumulation

04/20/2016 11:53:16 pygeoprocessing.routing DEBUG starting flow accumulation

04/20/2016 11:53:22 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO stream thresholding

04/20/2016 11:53:22 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO quick flow

04/20/2016 11:53:22 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO loading number of monthly events

04/20/2016 11:53:23 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO calculate curve number

04/20/2016 11:53:24 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO calculate Si raster

04/20/2016 11:53:24 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO calculate quick flow for month 1

04/20/2016 11:53:24 root ERROR ---------------------------------------------------

04/20/2016 11:53:24 root ERROR ---------------------- ERROR ----------------------

04/20/2016 11:53:24 root ERROR ---------------------------------------------------

04/20/2016 11:53:24 root ERROR Error: exception found while running natcap.invest.seasonal_water_yield.seasonal_water_yield

04/20/2016 11:53:24 root DEBUG

04/20/2016 11:53:24 root DEBUG Build details

04/20/2016 11:53:24 root DEBUG Interpreter

04/20/2016 11:53:24 root DEBUG Current temp dir: C:\IADO\SAFER\SAFER Student project\Seasonalwateryieldmodel\Winooskiriver\Investresults\tmp

04/20/2016 11:53:24 root DEBUG tempfile.tempdir: C:\IADO\SAFER\SAFER Student project\Seasonalwateryieldmodel\Winooskiriver\Investresults\tmp

04/20/2016 11:53:24 root DEBUG

04/20/2016 11:53:24 root DEBUG System

04/20/2016 11:53:24 root DEBUG OS : Windows-8-6.2.9200

04/20/2016 11:53:24 root DEBUG Processor architecture: AMD64

04/20/2016 11:53:24 root DEBUG FS encoding : mbcs

04/20/2016 11:53:24 root DEBUG Preferred encoding: cp1252

04/20/2016 11:53:24 root DEBUG

04/20/2016 11:53:24 root DEBUG Python

04/20/2016 11:53:24 root DEBUG Version : 2.7.9

04/20/2016 11:53:24 root DEBUG Build : ('default', 'Dec 10 2014 12:24:55')

04/20/2016 11:53:24 root DEBUG Compiler : MSC v.1500 32 bit (Intel)

04/20/2016 11:53:24 root DEBUG Implementation : CPython

04/20/2016 11:53:24 root DEBUG Architecture : 32bit

04/20/2016 11:53:24 root DEBUG Linkage format : WindowsPE

04/20/2016 11:53:24 root DEBUG

04/20/2016 11:53:24 root DEBUG Packages

04/20/2016 11:53:24 root DEBUG Cython : ?

04/20/2016 11:53:24 root DEBUG Numpy : 1.10.2rc1

04/20/2016 11:53:24 root DEBUG Scipy : 0.16.0b2

04/20/2016 11:53:24 root DEBUG OSGEO : 1.11.3

04/20/2016 11:53:24 root DEBUG Shapely : 1.5.5

04/20/2016 11:53:24 root DEBUG InVEST : 3.3.0

04/20/2016 11:53:24 root DEBUG

04/20/2016 11:53:24 root DEBUG

04/20/2016 11:53:24 root DEBUG Exception not environment-related

04/20/2016 11:53:24 root DEBUG Printing traceback

Traceback (most recent call last):

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\natcap.invest.iui.executor", line 560, in runModel

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\natcap.invest.seasonal_water_yield.seasonal_water_yield", line 158, in execute

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\natcap.invest.seasonal_water_yield.seasonal_water_yield", line 381, in _execute

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\natcap.invest.seasonal_water_yield.seasonal_water_yield", line 563, in _calculate_monthly_quick_flow

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\pygeoprocessing.geoprocessing", line 2410, in vectorize_datasets

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\natcap.invest.seasonal_water_yield.seasonal_water_yield", line 553, in si_op

RuntimeWarning: divide by zero encountered in divide



04/20/2016 11:53:24 root ERROR Exiting due to failures



Comments

  • PerrinePerrine Moderator, NatCap Staff
    Hi Vanesa, 

    I think this could be related to your curve numbers (CN).
    CN should be >0, and all columns in the biophysical table (CN_A, CN_B, CN_C, CN_D) should be filled (even if you don't have soils of group D, for example).

    Let us know if this isn't the issue!
  • Thank you! It was!
Sign In or Register to comment.