hysplit_trajectory: Conduct HYSPLIT trajectory runs

Description Usage Arguments Examples

View source: R/hysplit_trajectory.R

Description

The function executes single/multiple forward or backward HYSPLIT trajectory runs using specified meteorological datasets.

Usage

1
2
3
4
5
6
hysplit_trajectory(lat = 49.263, lon = -123.25, height = 50,
  duration = 24, days = NULL, daily_hours = 0,
  direction = "forward", met_type = "reanalysis", vert_motion = 0,
  model_height = 20000, extended_met = FALSE, config = NULL,
  ascdata = NULL, traj_name = NULL, binary_path = NULL,
  met_dir = NULL, exec_dir = NULL, clean_up = TRUE)

Arguments

lat, lon, height

The receptor position in terms of latitude and longitude (both in decimal degrees), and height in meters above ground level.

duration

The duration of each model run (whether it is in the forward direction or running backwards) in hours.

days

A vector of days that the model will run. This is combined with the daily_hours to produce a series of date-times.

daily_hours

A vector of daily hours for initiations of runs across the given days. Use values from from 0 to 23.

direction

An option to select whether to conduct the model in the "forward" (default) or "backward" directions.

met_type

The type of meteorological data files to use. The options are: "reanalysis" (NCAR/NCEP global reanalysis data, the default), "gdas1" and "gdas0.5" (Global Data Assimilation System 1-degree and 0.5-degree resolution data), "narr" (North American Regional Reanalysis), "gfs0.25" (Global Forecast System 0.25 degree data), and "nam12" (North American Mesoscale Forecast System, 12-km/6-hour resolution data).

vert_motion

A numbered option to select the method used to simulation vertical motion. The methods are: 0 (input model data), 1 (isobaric), 2 (isentropic), 3 (constant density), 4 (isosigma), 5 (from divergence), 6 (remap MSL to AGL), 7 (average data), and 8 (damped magnitude).

model_height

The upper limit of the model domain in meters.

extended_met

An option to report additional meteorological data along each output trajectory.

config

A configuration list serves to internally generate the SETUP.CFG file. This list can be easily created by using the set_config() function. If NULL, then the default configuration list will be generated.

ascdata

An ascdata list that will be used to create the ASCDATA.CFG file. This list can be provided through use of the set_ascdata() function. If NULL, then the default ascdata list will be generated.

traj_name

An optional, descriptive name for the output file collection.

binary_path

An optional path to a HYSPLIT trajectory model binary. When not specified, the model binary will be chosen from several available in the package (based on the user's platform).

met_dir

An optional file path for storage and access of meteorological data files.

exec_dir

An optional file path for the working directory of the model input and output files.

clean_up

An option to make the exec_dir directory clean after completion of all trajectory runs. By default, this is set to TRUE.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
library(lubridate)

# Run a trajectory model 4 times a day
# for 6 days in 2012 using NCEP/NCAR
# reanalysis data
trajectory <-
  hysplit_trajectory(
    lat = 50.108,
    lon = -122.942,
    height = 100,
    duration = 48,
    days = seq(
      lubridate::ymd("2012-02-22"),
      lubridate::ymd("2012-02-27"),
      by = "1 day"
    ),
    daily_hours = c(0, 6, 12, 18)
  )

## End(Not run)

rich-iannone/splitr documentation built on Nov. 3, 2021, 6:51 a.m.