doOSCURS: Run OSCURS and plot results

View source: R/doOSCURS.R

doOSCURSR Documentation

Run OSCURS and plot results

Description

Function to run OSCURS and plot results.

Usage

doOSCURS(
  fnBase = "OSCURS_",
  path = ".",
  nDays = 90,
  stYrs = 2017,
  stMDs = list(APR = 15),
  fnStartLocs = "OSCURS_StartLocations.csv",
  wcsc = 1,
  wad = 0,
  gsf = 1,
  link = "https://oceanview.pfeg.noaa.gov/oscurs/runOscurs9.php?",
  randNum = round(stats::runif(1, 1, 1e+05)),
  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

fnBase
  • base for output filenames (default = "OSCURS_")

path
  • path to folder in which to store output files

nDays
  • number of days to run model

stYrs
  • vector of years for particle releases

stMDs
  • list of release dates, by month

fnStartLocs
  • filename for csv file with initial particle lat/lon locations

wcsc
  • wind/current speed coefficient (default=1.0; see https://oceanview.pfeg.noaa.gov/oscurs/)

wad
  • wind angle deviation (default=0.0; see https://oceanview.pfeg.noaa.gov/oscurs/)

gsf
  • geostrophic speed factor (default=1.0; see https://oceanview.pfeg.noaa.gov/oscurs/)

link
  • url to run OSCURS (default = "https://oceanview.pfeg.noaa.gov/oscurs/runOscurs9.php?")

randNum
  • random number to add to server-side file name to ensure uniqueness

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

Requires packages readr, tmaptools, wtsGIS. 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

Value

same list as plotOSCURS (see @details).


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