Description Usage Arguments Value Author(s)
View source: R/hyspdisp_fac_model.R
hyspdisp_fac_model
takes multiple inputs and outputs counts of particles per zip code. hyspdisp_fac_model_parallel
is a parallelized version applicable for functions such as mclapply
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | hyspdisp_fac_model(run_ref_tab,
start_day,
start_hour,
duration_emiss_hours,
duration_run_hours,
unit,
species,
zcta2,
crosswalk,
hpbl_raster,
npart = 100,
overwrite = F,
link2zip = T,
prc_dir = NULL,
hyo_dir = NULL,
current_dir = getwd(),
met_dir = file.path( getwd(), 'metfiles'),
bin_path = NULL,
keep.hysplit.files = FALSE)
hyspdisp_fac_model_parallel(x,
run_ref_tab,
unit,
species,
zcta2,
crosswalk,
hpbl_raster,
npart = 100,
overwrite = F,
link2zip = T,
prc_dir = NULL,
hyo_dir = NULL,
current_dir = getwd(),
met_dir = file.path( getwd(), 'metfiles'),
bin_path = NULL,
keep.hysplit.files = FALSE)
|
x |
row numbers of |
run_ref_tab |
table of parameters in required in |
start_hour |
numeric starting hour of dispersion event (0,23). Optional if |
start_day |
starting date of dispersion event in format YYYY-MM-DD. Optional if |
duration_emiss_hours |
numeric duration of emission event. Optional if |
duration_run |
numeric duration of simulation. Optional if |
unit |
single emissions unit information, including columns named |
species |
particle species name as character. One either of 'so2' or 'so4'. |
npart |
number of particles emitted per hour. Defaults to 100. |
current_dir |
working directory. Defaults to current directory. |
prc_dir |
run directory. Defaults to |
hyo_dir |
HYSPLIT output directory. Defaults to |
bin_path |
path to HYSPLIT binaries. Defaults to |
zcta2 |
ZCTA code |
crosswalk |
ZIP - ZCTA crosswalk file. Must include columns named |
hpbl_raster |
monthly mean boundary layer heights from NOAA's Earth System Research Library: https://www.esrl.noaa.gov/psd/data/gridded/data.20thC_ReanV2.monolevel.mm.html. |
overwrite |
Logical. Overwrite previous hysplit files? |
link2zip |
Logical. If true, calculate ZIP code concentrations using air parcel locations. |
met_dir |
Where are the meteorological files stored? Defaults to a directory named "metfiles" in the working directory. |
If overwrite = TRUE
, hyspdisp_fac_model
and hyspdisp_fac_model_parallel
write HYSPLIT output files "[prc_dir]/[hyo_dir]/hyspdisp_[unit$ID]_[start_date]_[start_hour].csv" that includes information about each parcel such as the time, date, location, and height.
If link2zip = TRUE
, hyspdisp_fac_model
and hyspdisp_fac_model_parallel
write output files "[prc_dir]/zip_counts/hyspdisp_[unit$ID]_[start_date]_[start_hour].csv".
If link2zip = FALSE
, hyspdisp_fac_model
returns a data.table of HYSPLIT parcel locations with locations trimmed below 0m and above the highest height in hpbl_raster
. If link2zip = FALSE
, the returned list also includes a data.table with ZIP codes and air parcel counts.
hyspdisp_fac_model_parallel
returns data.tables of saved locations of the relavent files. It is recommended to run hyspdisp_fac_model
first as a test.
LH & CC
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.