Learn R Programming

SplitR (version 0.3)

trajectory_read: Read HYSPLIT trajectory output files into a data frame

Description

The function takes HYSPLIT trajectory output files in a specified output directory and processes all files into a data frame object.

Usage

trajectory_read(archive_folder, year = NULL, start_height_m_AGL = NULL)

Arguments

archive_folder

the absolute path and filename of the trajectory archive file (UNIX) or folder (Windows) is to be provided.

year

providing a year will filter the list of trajectory endpoints files to be read into a data frame. This is usually only effective for filtering those trajectory endpoints files generated by SplitR using the hysplit_trajectory function since such files have a specified naming convention.

start_height_m_AGL

providing a starting height will filter the list of trajectory endpoints files to be read into a data frame. This argument can be used in conjunction with the year argument in order to filter a directory of endpoints files by year and by starting height. As with the year argument, this option is usually only effective for filtering those trajectory endpoints files generated by SplitR.

Value

data frame with several wind trajectory parameters

Examples

Run this code
# NOT RUN {
# Process all trajectory output files in the specified output directory
trajectory_df <-
  trajectory_read(archive_folder = "~/hysplit/output/traj--2014-06-16--23-58-44.zip")

# Process trajectory output files in the same folder but only those
# files from 2002 with a starting height of 500 m
trajectory_df <-
  trajectory_read(archive_folder = "~/hysplit/output/traj--2014-06-16--23-58-44.zip",
                  year = 2002,
                  start_height_m_AGL = 500)
# }

Run the code above in your browser using DataLab