runOSCURS: Make a series of OSCURS runs

View source: R/runOSCURS.R

runOSCURSR Documentation

Make a series of OSCURS runs

Description

Function to make a series of OSCURS runs and download the results to a set of files.

Usage

runOSCURS(
  fnBase = "OSCURS_",
  path = ".",
  nDays = 90,
  stYrs = 2017,
  stMDs = list(APR = 15, MAY = c(1, 15), JUN = 1),
  stLLs = NULL,
  link = "https://oceanview.pfeg.noaa.gov/oscurs/runOscurs9.php?",
  wcsc = 1,
  wad = 0,
  gsf = 1,
  randNum = round(stats::runif(1, 1, 1e+05)),
  test = TRUE,
  verbose = FALSE
)

Arguments

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

path
  • path to use with output filenames (default = ".")

nDays
  • number of days to run model

stYrs
  • vector of years for particle releases

stMDs
  • list of release dates, by month

stLLs
  • a dataframe or tibble with initial particle lat/lon locations (see details below)

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

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/)

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

test
  • flag to print diagnostic output but NOT run OSCURS (useful to see what commands will be sent)

verbose
  • flag to print diagnostic output

Details

Runs the OSCURS model at the link given. An output file is created for each particle release of the form fnBase_year_month_day_latdegree_latminute_londegree_lonminute.csv, where lat and lon is the initial particle location.

The input parameter stLLs should be a dataframe or tibble. The following columns are required:

  • LATITUDE - latitude in decimal degrees (-90 to 90)

  • LONGITUDE - longitude in decimal degrees (-180 to 180)


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