Skip to contents

Generate N-Sink Static Maps for a given HUC

Usage

nsink_generate_static_maps(
  input_data,
  removal,
  samp_dens,
  ncpu = future::availableCores() - 1,
  seed = 23
)

Arguments

input_data

A list of input datasets created with nsink_prep_data.

removal

The removal raster stack or removal list, generated by nsink_calc_removal

samp_dens

A value, in the units of the input data, divided by total area of the input HUC. It is used to determine the number of points, determined through a regular sample, to calculate removal. For instance, a value of 90 would roughly equate to a point per every 90 meters.

ncpu

Number of CPUs to use for calculating flowpath removal for larger (i.e. greater than 50) number of flowpaths. Default is the number of cores available minus one.

seed

Random seed to ensure reproducibility of sample point creation for transport maps. Default set to 23.

Value

This function returns a list of rasters: nitrogen removal efficiency, nitrogen loading index, nitrogen transport index, and the nitrogen delivery index.

Examples

if (FALSE) {
library(nsink)
niantic_huc <- nsink_get_huc_id("Niantic River")$huc_12
niantic_data <- nsink_get_data(niantic_huc, data_dir = "nsink_data")
aea <- 5072
niantic_nsink_data <- nsink_prep_data(niantic_huc, projection = aea,
                                      data_dir = "nsink_data")
removal <- nsink_calc_removal(niantic_nsink_data)
static_maps <- nsink_generate_static_maps(niantic_nsink_data, removal,samp_dens = 900)
}