Calculate WaPOR productivity indices
wapor_indices.Rd
This function calculates several productivity indices based on WaPOR inputs. Users can specify a vector of classes for which to calculate the metrics. From the land cover classification mask layers are calculated and the indices are returned seperatly for each class. The function writes raster files with the calculated indices to the specified output directory. The calculated indices are:
Land Use Median (lcc_median)
Land Use Mode (lcc_mode)
Land Use Frequency (lcc_freq)
Breakpoint year of land use change (lcc_break)
Global productivity index (LP1_global)
Yearly productivity index (LP2_yearly)
Epoch differences (epoch_diff)
Linear trends (trend)
Number of double seasons (double_season)
Usage
wapor_indices(
input_files = NULL,
years,
mask_values,
ncores = 1,
epoch1 = 2010:2011,
epoch2 = 2012:2014,
outdir,
overwrite = TRUE,
verbose = T
)
Arguments
- input_files
A character vector pointing to the raster files of Land cover classification (LCC), Total Biomass Productivity (TBP), Net Biomass Water Productivity (NBWP), Gross Biomass Water Produtivity (GBWP).
- years
The years for which to calculate the indices.
- mask_values
A numeric vector indicatiing the class codes for which to calculate the indices.
- ncores
The number of cores used for parallel processing of some index calculations.
- epoch1
A vector of years representing the first epoch for epoch comparisons.
- epoch2
A vector of years representing the second epoch for epoch comparisons.
- outdir
A charachter vector pointing to an output directory.
- overwrite
Logical wether to overwrite existing raster files.
- verbose
A logical indicating if informative messages should be printed.
Details
Where applicable, above mentioned metrics are calculated for Net Biomass Water Productivity (NBWP), Gross Biomass Water Productivity (GBWP), Total Biomass Production (TBP) and the productivity indices seperatly. This will be denoted in the resulting filename that are structured according to: int-measurment-season-index.tif. E.g. the filename for land use class 30 the trend of NBWP for the first season looks like this: "30-nbwp-s1-raw-trend.tif"