plotOSCURS: Plot particle tracks from OSCURS model runs on a map

View source: R/plotOSCURS.R

plotOSCURSR Documentation

Plot particle tracks from OSCURS model runs on a map

Description

Function to plot particle tracks from OSCURS model runs on a map.

Usage

plotOSCURS(
  tracks,
  stLLs,
  idCol = NULL,
  strCRS = tmaptools::get_proj4(3338, output = "character"),
  basemap = wtsGIS::createBaseTMap(layer.land = wtsGIS::getPackagedLayer("Alaska"),
    layer.bathym = wtsGIS::getPackagedLayer("ShelfBathymetry"), strCRS.finl = strCRS),
  alpha = 1,
  showMap = TRUE,
  verbose = FALSE
)

Arguments

tracks
  • a tibble with OSCURS tracks (e.g., the tracks list element from a call to convertOSCURStoTbl)

stLLs
  • a dataframe or tibble with starting particle locations (e.g., from reading the initial particle locations csv file using readr::read_csv)

idCol
  • name or number of stLLs column to use as a unique identifier for the start locations (default=NULL. See details)

strCRS
  • character representation of coordinate reference system for final map (default is Alaska Albers EPSG=3338)

basemap
  • a base map for plotting the tracks (default is the EBS using CRS defined by strCRS)

alpha
  • transparency for track lines

showMap
  • flag to show the map

verbose
  • flag to print diagnostic info

Details

The returned list has the following elements:

  • map - a tmap object

  • tracks - a sf tibble with tracks that span the IDL to "roll your own" map

  • startLocs - a sf tibble with starting track locations as points to "roll your own" map

  • basemap - a basemap to "roll your own" map

The map object is in the Alaska Albers projection. If 'idCol' is NULL, then each row in stLLs is assumed to represent a unique starting location.

Requires packages dplyr, magrittr, sf, tmap, tmaptools, wtsGIS.

Value

  • a list (see details)


wStockhausen/rOSCURS documentation built on April 29, 2023, 5:51 a.m.