Blue Carbon Package

Model Entry Point

invest_natcap.blue_carbon.blue_carbon.execute(args)

Entry point for the blue carbon model.

Parameters:
  • args["workspace_dir"] (str) – The directory to hold output from a particular model run
  • args["lulc_uri_1"] (str) – The land use land cover raster for time 1.
  • args["year_1"] (int) – The year for the land use land cover raster for time 1.
  • args["lulc_uri_2"] (str) – The land use land cover raster for time 2.
  • args["year_2"] (int) – The year for the land use land cover raster for time 2.
  • args["lulc_uri_3"] (str) – The land use land cover raster for time 3.
  • args["year_3"] (int) – The year for the land use land cover raster for time 3.
  • args["lulc_uri_4"] (str) – The land use land cover raster for time 4.
  • args["year_4"] (int) – The year for the land use land cover raster for time 4.
  • args["lulc_uri_5"] (str) – The land use land cover raster for time 5.
  • args["year_5"] (int) – The year for the land use land cover raster for time 5.

Blue Carbon

invest_natcap.blue_carbon.blue_carbon.alignment_check_uri(dataset_uri_list)
invest_natcap.blue_carbon.blue_carbon.datasource_from_dataset_bounding_box_uri(dataset_uri, datasource_uri)

Creates a shapefile with the bounding box from a raster.

Parameters:
  • dataset_uri (str) – The uri for the input raster.
  • datasource_uri (str) – The uri for the output shapefile.
Returns:

None

invest_natcap.blue_carbon.blue_carbon.emissions_interpolation(start_year, end_year, this_year, next_year, alpha)

returns the proportion of the half-life contained within the subrange

invest_natcap.blue_carbon.blue_carbon.execute(args)

Entry point for the blue carbon model.

Parameters:
  • args["workspace_dir"] (str) – The directory to hold output from a particular model run
  • args["lulc_uri_1"] (str) – The land use land cover raster for time 1.
  • args["year_1"] (int) – The year for the land use land cover raster for time 1.
  • args["lulc_uri_2"] (str) – The land use land cover raster for time 2.
  • args["year_2"] (int) – The year for the land use land cover raster for time 2.
  • args["lulc_uri_3"] (str) – The land use land cover raster for time 3.
  • args["year_3"] (int) – The year for the land use land cover raster for time 3.
  • args["lulc_uri_4"] (str) – The land use land cover raster for time 4.
  • args["year_4"] (int) – The year for the land use land cover raster for time 4.
  • args["lulc_uri_5"] (str) – The land use land cover raster for time 5.
  • args["year_5"] (int) – The year for the land use land cover raster for time 5.
invest_natcap.blue_carbon.blue_carbon.sum_by_category_uri(category_uri, value_uri, categories=None)
invest_natcap.blue_carbon.blue_carbon.sum_uri(dataset_uri, datasource_uri)

Wrapper call to raster_utils.aggregate_raster_values_uri to extract total

Parameters:
  • dataset_uri (str) – The uri for the input raster.
  • datasource_uri (str) – The uri for the input shapefile.
Returns:

The total of the raster values within the shapefile

Return type:

float

invest_natcap.blue_carbon.blue_carbon.transition_soil_carbon(area_final, carbon_final, depth_final, transition_rate, year, area_initial, carbon_initial, depth_initial)

This is the formula for calculating the transition of soil carbon

\[(af * cf * df) - \frac{1}{(1 + tr)^y} * [(af * cf * df) - (ai * ci * di)]\]

where

  • \(af\) is area_final
  • \(cf\) is carbon_final
  • \(df\) is depth_final
  • \(tr\) is transition_rate
  • \(y\) is year
  • \(ai\) is area_initial
  • \(ci\) is carbon_initial
  • \(di\) is depth_initial
Parameters:
  • area_final (float) – The final area of the carbon
  • carbon_final (float) – The final amount of carbon per volume
  • depth_final (float) – The final depth of carbon
  • transition_rate (float) – The rate at which the transition occurs
  • year (float) – The amount of time in years overwhich the transition occurs
  • area_initial (float) – The intial area of the carbon
  • carbon_initial (float) – The iniital amount of carbon per volume
  • depth_initial (float) – The initial depth of carbon
Returns:

Transition amount of soil carbon

Return type:

float

Blue Carbon Preprocessor

invest_natcap.blue_carbon.blue_carbon_preprocessor.execute(args)
invest_natcap.blue_carbon.blue_carbon_preprocessor.get_transition_set_count_from_uri(dataset_uri_list, ignore_nodata=True)

Module contents