Carbon model

Hi All
I have this error

TypeError: float() argument must be a string or a number

I try changing type of field in the raster layer but it doesn´t work
I don´t know what to do
Could you help me please?

Comments

  • jdouglassjdouglass Administrator, NatCap Staff
    Hi @Maruoe, this error usually has to do with a value in a CSV column that couldn't be converted to a floating-point number.  If this is still an issue, could you attach your log file from the model run so that we can take a closer look at the error?
  • MauroeMauroe Member
    edited November 2017
    Hi, thanks for your help this is the log

    Arguments:
    carbon_pools_path C:/carbon/carbon_pools_co_2012.csv
    lulc_cur_path C:/carbon/landuse90_co.tif
    workspace_dir C:\carbon


    11/01/2017 13:09:37 root INFO Logging will be saved to natcap.invest.carbon-log-2017-11-01--13_09_37.txt
    11/01/2017 13:09:37 root DEBUG Loaded the model from natcap.invest.carbon
    11/01/2017 13:09:37 root INFO Executing the loaded model
    11/01/2017 13:09:37 root INFO Running InVEST version "3.3.3"
    11/01/2017 13:09:37 root INFO Python architecture: ('32bit', 'WindowsPE')
    11/01/2017 13:09:37 root INFO Disk space remaining for workspace: 463.62 GB
    11/01/2017 13:09:37 root INFO Pointing temporary directory at the workspace at C:\carbon
    11/01/2017 13:09:37 root INFO Starting natcap.invest.carbon
    11/01/2017 13:09:37 root INFO Setting tempfile.tempdir to C:\carbon\tmp
    11/01/2017 13:09:37 natcap.invest.carbon INFO Building file registry
    11/01/2017 13:09:37 root ERROR ---------------------------------------------------
    11/01/2017 13:09:37 root ERROR ---------------------- ERROR ----------------------
    11/01/2017 13:09:37 root ERROR ---------------------------------------------------
    11/01/2017 13:09:37 root ERROR Error: exception found while running natcap.invest.carbon
    11/01/2017 13:09:37 root DEBUG
    11/01/2017 13:09:37 root DEBUG Build details
    11/01/2017 13:09:37 root DEBUG Interpreter
    11/01/2017 13:09:37 root DEBUG Current temp dir: C:\carbon\tmp
    11/01/2017 13:09:37 root DEBUG tempfile.tempdir: C:\carbon\tmp
    11/01/2017 13:09:37 root DEBUG
    11/01/2017 13:09:37 root DEBUG System
    11/01/2017 13:09:37 root DEBUG OS : Windows-7-6.1.7601-SP1
    11/01/2017 13:09:37 root DEBUG Processor architecture: AMD64
    11/01/2017 13:09:37 root DEBUG FS encoding : mbcs
    11/01/2017 13:09:37 root DEBUG Preferred encoding: cp1252
    11/01/2017 13:09:37 root DEBUG
    11/01/2017 13:09:37 root DEBUG Python
    11/01/2017 13:09:37 root DEBUG Version : 2.7.9
    11/01/2017 13:09:37 root DEBUG Build : ('default', 'Dec 10 2014 12:24:55')
    11/01/2017 13:09:37 root DEBUG Compiler : MSC v.1500 32 bit (Intel)
    11/01/2017 13:09:37 root DEBUG Implementation : CPython
    11/01/2017 13:09:37 root DEBUG Architecture : 32bit
    11/01/2017 13:09:37 root DEBUG Linkage format : WindowsPE
    11/01/2017 13:09:37 root DEBUG
    11/01/2017 13:09:37 root DEBUG Packages
    11/01/2017 13:09:37 root DEBUG Cython : ?
    11/01/2017 13:09:37 root DEBUG Numpy : 1.11.2
    11/01/2017 13:09:37 root DEBUG Scipy : 0.16.1
    11/01/2017 13:09:37 root DEBUG OSGEO : 1.11.3
    11/01/2017 13:09:37 root DEBUG Shapely : 1.5.5
    11/01/2017 13:09:37 root DEBUG InVEST : 3.3.3
    11/01/2017 13:09:37 root DEBUG
    11/01/2017 13:09:37 root DEBUG
    11/01/2017 13:09:37 root DEBUG Exception not environment-related
    11/01/2017 13:09:37 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 620, in runModel
    File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\natcap.invest.carbon", line 119, in execute
    File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\pygeoprocessing.geoprocessing", line 2452, in get_lookup_from_table
    File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\pygeoprocessing.fileio", line 257, in __init__
    File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\pygeoprocessing.fileio", line 156, in read_table
    TypeError: float() argument must be a string or a number


    Post edited by Mauroe on
  • RichRich Administrator, NatCap Staff
    Hi, it looks like there's a value in your table that is not a number when there's supposed to be one. If you can spot it yourself, could you post your table on here (I don't know if that will work) or share it with me on Dropbox to richsharp@stanford.edu? I can take a look and post back whatever I can find.
  • SIR, i want to run this model for the ecosystem services analysis of national park in India. but i am unable to find the data( deadwood, soil carbon, below ground biomass) and above ground biomass can be detected and LULC can be formed. please help me by providing the name of sites where i can get these data or any other help related to this.

  • swolnyswolny Member, NatCap Staff
    Hi @DEEP_2909 -

    Have you looked at the Data Sources section of the User Guide for the Carbon model? It provides information on sources for general values for the 4 types of carbon stocks. Before using global/general values, however, we usually recommend doing a literature search for carbon
    studies that have been done for your area or specific types of land cover. Also note that if you cannot find data for one of the carbon pools, you can set it to 0 in the carbon pool table.

    This model is really just a lookup table that maps the carbon pools to LULC, so having better carbon pool data will definitely make for more accurate results.

    ~ Stacie
  • Dear sir, thank you so much for the link you provided. i am looking into this. I have one more doubt and i.e ,Is there any need of field inventory or field based data  required in"C pool" estimation or  I will get everything online. As field visit will be difficult for me as i am running the model for National park, Rajasthan, India
  • swolnyswolny Member, NatCap Staff
    Well, it's certainly optimal to have field-based data that's particular to your site, as you'll get much more accurate results that way, and you can feel more confident in the results. But in reality, most of us don't have that kind of data, and can't run out and collect that data, so we most often use literature sources instead. That's why it's important to do a good literature search, and try to find values that represent your vegetation types as closely as possible. If you can't find those, then look at the more general global carbon pool data and methods.

    ~ Stacie

Sign In or Register to comment.