Learn R Programming

SplitR (version 0.4)

hysplit_trajectory: Conduct HYSPLIT trajectory runs

Description

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

Usage

hysplit_trajectory(lat = 49.263, lon = -123.25, height = 50,
  duration = 24, run_period = "2015-07-01", daily_hours = 0,
  direction = "forward", met_type = "reanalysis", vert_motion = 0,
  model_height = 20000, extended_met = FALSE, return_traj_df = TRUE,
  traj_name = NULL)

Arguments

lat

the starting latitude (in decimal degrees) for the model run(s).

lon

the starting longitude (in decimal degrees) for the model run(s).

height

the starting height (in meters above ground level) for the model run(s).

duration

the duration of each model run (either forward or backward) in hours.

run_period

the extended period (i.e., days, years) when the model will initialize and run. This can take the form of a single-length vector for a day ("YYYY-MM-DD") or year (YYYY), or, a vector of length 2 to specify the range of days or years.

daily_hours

should consist of a single daily hour as an integer hour (from 0 to 23), or, a vector of several daily hours represented as integers.

direction

an option to select whether to conduct the model in the forward or backward directions.

met_type

an option to select meteorological data files. The options are gdas1 (Global Data Assimilation System 1-degree resolution data), reanalysis (NCAR/NCEP global reanalysis data), and narr (North American Regional Reanalysis).

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.

return_traj_df

an option to return a data frame with trajectory data.

traj_name

an optional, descriptive name for the output file collection.

Examples

Run this code
# NOT RUN {
# Run a trajectory model 4 times a day throughout
# 2004 using NCEP/NCAR reanalysis data
trajectory <- 
  hysplit_trajectory(
    lat = 50.108,
    lon = -122.942,
    height = 100,
    duration = 48,
    run_period = 2004,
    daily_hours = c(0, 6, 12, 18))
# }

Run the code above in your browser using DataLab