Seasonal water yield

I try the seasonal water yield in my research, But who can tell me what is the number in column "CN_A, CN_B, CN_C and CN_B" in the Biophysical_table, Now I have the soil group map already, Thanks for advance.

Comments

  • swolnyswolny Member, NatCap Staff
    Hi @dhamma57 -

    CN stands for Curve Number. a value that represents a combination of soil, landuse and hydrologic condition, which is used as a simple way of helping estimate the amount of water that is likely to directly run off, versus infiltrate. Higher curve number values indicate that a particular combination of soil/landuse/condition is more likely to generate direct runoff (and contribute to quick flow.) Lower CN values indicate a soil that is more permeable.

    Looking at it now, the InVEST User Guide admittedly does not describe what the Curve Number is very well, but it does provide some information on setting the values. Check out this Wikipedia article for more specific information on the values involved and how it works.

    As you said, the biophysical table requires 4 values for CN. The A/B/C/D represent different soil classifications - soil type A has the lowest runoff potential, soil type D has the highest. These are mapped to the values 1/2/3/4 as given in the soil group map that you already have. In the biophysical table, you relate these different soil types to each land use/land cover class, so yes, there are a lot of values to fill in.

    ~ Stacie


  • Hi swolny

    Thanks a lot for guidance. This is extremely useful.


  • Hi

    Now i run the seasonal water yield, there are some error warning (in the attach files) but i can not fixed this error
    can you guide me again?
    Thanks

    Thammanoon 
  • swolnyswolny Member, NatCap Staff
    Would you please post all of the output in that Messages window? (Or, the entire contents of the log file that is created.) That will help understand why it's giving this error.

    One thing I do know is that the model cannot take a value of zero for curve number, so perhaps you have one of your CN values set to 0? If so, try setting it to 1.

    ~ Stacie

  • Hi Stacie

    Thank you very much for your guide line, I found  some Kc value set to zero, I correct it and it's work.

    Thammanoon 


  • Hi

    I try to run the seasonal water yield model, I got the error message like this.

    Initializing...

    01/01/2017 12:42:28 root DEBUG Loading <module 'natcap.invest.seasonal_water_yield.seasonal_water_yield' from 'C:\INVEST~1.2_X\INVEST~1\natcap\invest\seasonal_water_yield\seasonal_water_yield.pyc'> in frozen environment

    Arguments:

    alpha_m 1/12

    aoi_path H:/MW_edit2017/WS_2017/WS_edit6.shx

    beta_i 1.0

    biophysical_table_path H:/MW_edit2017/Seasonal_WY/biophysical_table_MW_edit2.csv

    dem_raster_path H:/MW_edit2017/DEM/dem_mw.tif

    et0_dir H:\MW_edit2017\ETo_Month\ETo_forModel

    gamma 1.0

    lulc_raster_path H:/MW_edit2017/final_MW2017/mw_lu2016.tif

    monthly_alpha False

    precip_dir H:\MW_edit2017\Preci_monthly\Preci_forModel

    rain_events_table_path H:/MW_edit2017/Seasonal_WY/rain_events_table_MW.csv

    results_suffix Time5_KCedit

    soil_group_path H:/MW_edit2017/final_MW2017/soilgroup_mw_edit3.tif

    threshold_flow_accumulation 1000

    user_defined_climate_zones False

    user_defined_local_recharge False

    workspace_dir H:\MW_edit2017\Seasonal_WY



    01/01/2017 12:42:28 root INFO Logging will be saved to natcap.invest.seasonal_water_yield.seasonal_water_yield-log-2017-01-01--12_42_28.txt

    01/01/2017 12:42:28 root DEBUG Loaded the model from natcap.invest.seasonal_water_yield.seasonal_water_yield

    01/01/2017 12:42:28 root INFO Executing the loaded model

    01/01/2017 12:42:28 root INFO Running InVEST version "3.3.2"

    01/01/2017 12:42:28 root INFO Python architecture: ('32bit', 'WindowsPE')

    01/01/2017 12:42:28 root INFO Disk space remaining for workspace: 561.32 GB

    01/01/2017 12:42:28 root INFO Pointing temporary directory at the workspace at H:\MW_edit2017\Seasonal_WY

    01/01/2017 12:42:28 root INFO Updating os.environ["TMP"]=C:\Users\MACBOO~1\AppData\Local\Temp to H:\MW_edit2017\Seasonal_WY

    01/01/2017 12:42:28 root INFO Updating os.environ["TEMP"]=C:\Users\MACBOO~1\AppData\Local\Temp to H:\MW_edit2017\Seasonal_WY

    01/01/2017 12:42:28 root INFO Setting os.environ["TMPDIR"]=H:\MW_edit2017\Seasonal_WY

    01/01/2017 12:42:28 root INFO Setting tempfile.tempdir to H:\MW_edit2017\Seasonal_WY\tmp

    01/01/2017 12:42:28 root INFO Starting natcap.invest.seasonal_water_yield.seasonal_water_yield

    01/01/2017 12:42:28 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO prepare and test inputs for common errors

    01/01/2017 12:42:28 natcap.invest.iui._log_model WARNING an exception encountered when logging [Errno socket error] [Errno 11001] getaddrinfo failed

    01/01/2017 12:42:28 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO Building file registry

    01/01/2017 12:42:28 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO Checking that the AOI is not the output aggregate vector

    01/01/2017 12:42:28 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO Aligning and clipping dataset list

    01/01/2017 12:42:33 pygeoprocessing.geoprocessing INFO align_dataset_list aligning dataset 9 of 27

    01/01/2017 12:42:39 pygeoprocessing.geoprocessing INFO align_dataset_list aligning dataset 20 of 27

    01/01/2017 12:42:49 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO Masking invalid lulc, dem, and possible soil group overlap

    01/01/2017 12:42:53 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO flow direction

    01/01/2017 12:43:00 pygeoprocessing.routing.routing_core INFO flow_direction_inf 71.0% complete

    01/01/2017 12:43:04 pygeoprocessing.routing.routing_core INFO labeling flats

    01/01/2017 12:43:06 pygeoprocessing.routing.routing_core INFO draining away from higher

    01/01/2017 12:43:09 pygeoprocessing.routing.routing_core INFO draining towards lower

    01/01/2017 12:43:11 pygeoprocessing.routing DEBUG flats exist, calculating flow direction for them

    01/01/2017 12:43:16 pygeoprocessing.routing.routing_core INFO labeling flats

    01/01/2017 12:43:16 pygeoprocessing.routing.routing_core INFO draining away from higher

    01/01/2017 12:43:18 pygeoprocessing.routing.routing_core INFO draining towards lower

    01/01/2017 12:43:18 pygeoprocessing.routing INFO flats exist on second pass, must be flat areas that abut the raster edge

    01/01/2017 12:43:19 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO flow weights

    01/01/2017 12:43:19 pygeoprocessing.routing.routing_core WARNING no flow direction found for 0 9

    01/01/2017 12:43:19 pygeoprocessing.routing.routing_core WARNING no flow direction found for 0 9

    01/01/2017 12:43:19 pygeoprocessing.routing.routing_core WARNING no flow direction found for 0 9

    01/01/2017 12:43:19 pygeoprocessing.routing.routing_core WARNING no flow direction found for 0 9

    01/01/2017 12:43:19 pygeoprocessing.routing.routing_core WARNING no flow direction found for 0 9

    01/01/2017 12:43:19 pygeoprocessing.routing.routing_core WARNING no flow direction found for 0 9

    01/01/2017 12:43:22 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO flow accumulation

    01/01/2017 12:43:22 pygeoprocessing.routing DEBUG starting flow accumulation

    01/01/2017 12:43:30 pygeoprocessing.routing.routing_core WARNING no flow direction found for 0 9

    01/01/2017 12:43:30 pygeoprocessing.routing.routing_core WARNING no flow direction found for 0 9

    01/01/2017 12:43:30 pygeoprocessing.routing.routing_core WARNING no flow direction found for 0 9

    01/01/2017 12:43:30 pygeoprocessing.routing.routing_core WARNING no flow direction found for 0 9

    01/01/2017 12:43:30 pygeoprocessing.routing.routing_core WARNING no flow direction found for 0 9

    01/01/2017 12:43:30 pygeoprocessing.routing.routing_core WARNING no flow direction found for 0 9

    01/01/2017 12:43:38 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO stream thresholding

    01/01/2017 12:43:40 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO quick flow

    01/01/2017 12:43:40 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO loading number of monthly events

    01/01/2017 12:43:57 natcap.invest.seasonal_water_yield.seasonal_water_yield INFO calculate curve number

    01/01/2017 12:43:57 root ERROR ---------------------------------------------------

    01/01/2017 12:43:57 root ERROR ---------------------- ERROR ----------------------

    01/01/2017 12:43:57 root ERROR ---------------------------------------------------

    01/01/2017 12:43:57 root ERROR Error: exception found while running natcap.invest.seasonal_water_yield.seasonal_water_yield

    01/01/2017 12:43:57 root DEBUG

    01/01/2017 12:43:57 root DEBUG Build details

    01/01/2017 12:43:57 root DEBUG Interpreter

    01/01/2017 12:43:57 root DEBUG Current temp dir: H:\MW_edit2017\Seasonal_WY\tmp

    01/01/2017 12:43:57 root DEBUG tempfile.tempdir: H:\MW_edit2017\Seasonal_WY\tmp

    01/01/2017 12:43:57 root DEBUG

    01/01/2017 12:43:57 root DEBUG System

    01/01/2017 12:43:57 root DEBUG OS : Windows-8-6.2.9200

    01/01/2017 12:43:57 root DEBUG Processor architecture: AMD64

    01/01/2017 12:43:57 root DEBUG FS encoding : mbcs

    01/01/2017 12:43:57 root DEBUG Preferred encoding: cp874

    01/01/2017 12:43:57 root DEBUG

    01/01/2017 12:43:57 root DEBUG Python

    01/01/2017 12:43:57 root DEBUG Version : 2.7.9

    01/01/2017 12:43:57 root DEBUG Build : ('default', 'Dec 10 2014 12:24:55')

    01/01/2017 12:43:57 root DEBUG Compiler : MSC v.1500 32 bit (Intel)

    01/01/2017 12:43:57 root DEBUG Implementation : CPython

    01/01/2017 12:43:57 root DEBUG Architecture : 32bit

    01/01/2017 12:43:57 root DEBUG Linkage format : WindowsPE

    01/01/2017 12:43:57 root DEBUG

    01/01/2017 12:43:57 root DEBUG Packages

    01/01/2017 12:43:57 root DEBUG Cython : ?

    01/01/2017 12:43:57 root DEBUG Numpy : 1.11.2rc1

    01/01/2017 12:43:57 root DEBUG Scipy : 0.16.1

    01/01/2017 12:43:57 root DEBUG OSGEO : 1.11.3

    01/01/2017 12:43:57 root DEBUG Shapely : 1.5.5

    01/01/2017 12:43:57 root DEBUG InVEST : 3.3.2

    01/01/2017 12:43:57 root DEBUG

    01/01/2017 12:43:57 root DEBUG

    01/01/2017 12:43:57 root DEBUG Exception not environment-related

    01/01/2017 12:43:57 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 163, 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 371, 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 666, in _calculate_curve_number_raster

    DeprecationWarning: unorderable dtypes; returning scalar but in the future this will be an error



    01/01/2017 12:43:57 root ERROR Exiting due to failures

    01/01/2017 12:43:57 root INFO Elapsed time: 1m 29.22s



    How can I resolve it?, Thanks


  • RichRich Administrator, NatCap Staff
    Hi, I dug into that line of code (ooo 666!) and it happens in a spot where the land use code are put into sorted order.  Is it possible that you have a land use code in your biophysical table that's not an integer value?  Like maybe an empty space or some text?
    1. First, however, it is important to review the model documentation
    2. by clicking the link at the top of the interface.
    3. When I click the link, it is not active, does not take me anywhere, when I copy the link and try to open it in the new browser window it says the site can not be reached.
  • RichRich Administrator, NatCap Staff
    Ahh sorry, looks like there is a bug in the UI link.  Here's a direct link to the user's guide: http://data.naturalcapitalproject.org/nightly-build/invest-users-guide/html/seasonal_water_yield.html
  • Thanks to Rich

    My mistake like you say.
    I fixed it and can run the model now.


Sign In or Register to comment.