link_all_units: create a set of directories to run disperseR

Description Usage Arguments Details Value

View source: R/link_all_units.R

Description

with 'link_all_units()' users can link all air parcels to relevant spatial scales by month for specified units with combinations of years and months. 'link_all_units()' reads in all the relevant HYSPLIT files (i.e., those that correspond to the provided units) produced by the 'run_disperser_parallel()' function and saves them. Then it links them to relevant spatial scales.

Usage

1
2
3
4
link_all_units(units.run, link.to = "zips", mc.cores = detectCores(),
  year.mons = NULL, start.date = NULL, end.date = NULL,
  pbl.height = pblheight, crosswalk. = NULL, counties. = NULL,
  duration.run.hours = 240, res.link = 12000, overwrite = FALSE)

Arguments

units.run

information on unit locations as output from disperseR::units()

link.to

one of 'zips', 'counties', or 'grids' to denote spatial linkage scale. zips and counties are only for the USA

mc.cores

'link_all_units()' enables the parallel run by default splitting different months on different cores, but you can make it serial just by setting the 'mc.cores' argument to '1'.As mentioned before 'link_all_units()' enables the parallel run by default splitting different months on different cores, but you can make it serial just by setting the 'mc.cores' argument to '1'.

year.mons

these are the months for which we would like to do the linking. You can use the get_yearmon() function to create a vector that can be an input here.

start.date

this argument is not necessary, but can be used if the user is interested in specifying a specific date to start the analysis with as opposed to using months. For example 'start.date="2005-01-02"' for 2 January 2005. This argument are set to 'NULL' by default and the function computes the start and the end dates using the 'year.mons' provided.

pbl.height

'pbl.height = pblheight' by default but you can change it. See the vignette

crosswalk.

'crosswalk. = crosswalk' by default but you can change it. See the vignette

duration.run.hours

'duration.run.hours = 240' by default which equals 10 days. 10 days is the maximum (approximately) that sulfur stays in the atmosphere before it deposits to the ground.

res.link

Defines the grid resolution (in meters—defaults to 12000m = 12km) for linking. This is important for all link.to values, since parcel locations are first put on this grid before spatially allocating to other spatial domains.

overwrite

'overwrite = FALSE' by default. Would you like to overwrite files that already exist?

start.end

this argument is not necessary, but can be used if the user is interested in specifying a specific date to end the analysis with as opposed to using months. For example 'start.date="2005-01-02"' for 2 January 2005.This argument are set to 'NULL' by default and the function computes the start and the end dates using the 'year.mons' provided.

Details

link_all_units

Value

vector of months that you can loop over


lhenneman/disperseR documentation built on Nov. 14, 2021, 6:24 p.m.