The model operates in two modes. Mode (a) generates a landcover map based on a base landcover map and information about crop yields, infrastructure, and more. Mode (b) assumes the globio landcover map is generated. These modes are used below to describe input parameters.

  • args['workspace_dir'] (string) – output directory for intermediate, temporary, and final files

  • args['predefined_globio'] (boolean) – if True then “mode (b)” else “mode (a)”

  • args['results_suffix'] (string) – (optional) string to append to any output files

  • args['lulc_path'] (string) – used in “mode (a)” path to a base landcover map with integer codes

  • args['lulc_to_globio_table_path'] (string) –

    used in “mode (a)” path to table that translates the land-cover args[‘lulc_path’] to intermediate GLOBIO classes, from which they will be further differentiated using the additional data in the model. Contains at least the following fields:

    • ’lucode’: Land use and land cover class code of the dataset used. LULC codes match the ‘values’ column in the LULC raster of mode (b) and must be numeric and unique.

    • ’globio_lucode’: The LULC code corresponding to the GLOBIO class to which it should be converted, using intermediate codes described in the example below.

  • args['infrastructure_dir'] (string) – used in “mode (a) and (b)” a path to a folder containing maps of either gdal compatible rasters or OGR compatible shapefiles. These data will be used in the infrastructure to calculation of MSA.

  • args['pasture_path'] (string) – used in “mode (a)” path to pasture raster

  • args['potential_vegetation_path'] (string) – used in “mode (a)” path to potential vegetation raster

  • args['pasture_threshold'] (float) – used in “mode (a)”

  • args['intensification_fraction'] (float) – a value between 0 and 1 denoting proportion of total agriculture that should be classified as ‘high input’

  • args['primary_threshold'] (float) – used in “mode (a)”

  • args['msa_parameters_path'] (string) – path to MSA classification parameters

  • args['aoi_path'] (string) – (optional) if it exists then final MSA raster is summarized by AOI

  • args['globio_lulc_path'] (string) – used in “mode (b)” path to predefined globio raster.

  • args['n_workers'] (int) – (optional) The number of worker processes to use for processing this model. If omitted, computation will take place in the current process.



natcap.invest.globio.load_msa_parameter_table(msa_parameter_table_filename, intensification_fraction)

Load parameter table to a dict that to define the MSA ranges.

  • msa_parameter_table_filename (string) – path to msa csv table

  • intensification_fraction (float) – a number between 0 and 1 indicating what level between msa_lu 8 and 9 to define the general GLOBIO code “12” to.


{‘msa_f’: {

valuea: msa_f_value, … valueb: … ‘<’: (bound, msa_f_value), ‘>’: (bound, msa_f_value)}

’msa_i_other_table’: {

valuea: msa_i_value, … valueb: … ‘<’: (bound, msa_i_other_value), ‘>’: (bound, msa_i_other_value)}

’msa_i_primary’: {

valuea: msa_i_primary_value, … valueb: … ‘<’: (bound, msa_i_primary_value), ‘>’: (bound, msa_i_primary_value)}

’msa_lu’: {

valuea: msa_lu_value, … valueb: … ‘<’: (bound, msa_lu_value), ‘>’: (bound, msa_lu_value) 12: (msa_lu_8 * (1.0 - intensification_fraction) + msa_lu_9 * intensification_fraction}}

Return type:

dictionary of the form

natcap.invest.globio.make_gaussian_kernel_path(sigma, kernel_path)

Create a gaussian kernel raster.