SimulateWorld_ROMS_TrophicInteraction: Simulated World ROMS Trophic Interactions

Description Usage Arguments Details Value Examples

View source: R/SimulatedWorld_ROMS_TrophicInteraction.R

Description

This code replicates SimulateWorld_ROMS_function, but adds in a trophic interaction, where:

Note only using GFDL for now

Usage

1
2
3
4
5
6
7
8
9
SimulateWorld_ROMS_TrophicInteraction(
  PA_shape = c("logistic", "logistic_prev", "linear"),
  abund_enviro = c("lnorm_low", "lnorm_high", "poisson"),
  dir = file.path(here::here(), "Rasters_2d_monthly"),
  roms.years = 1980:2100,
  n.samples = 400,
  maxN = 50,
  verbose = FALSE
)

Arguments

PA_shape

specifies how enviro suitability determines species B presence-absence. takes values of "logistic" (SB original), "logistic_prev" (JS, reduces knife-edge), "linear" (JS, reduces knife edge, encourages more absences)

abund_enviro

specifies abundance for species B (if present). Can be "lnorm_low" (SB original), "lnorm_high" (EW), or "poisson" (JS, increases abundance range)

dir

(optional) The path to the directory where the folder 'gfdl' is.

roms.years

The years for the ROMS data. The data files use the year and month. Default is 1980:2100.

n.samples

The number of samples to take from the ROMS layers each year. Default is 400.

maxN

max mean abundance at highest suitability

verbose

FALSE means print minimal progress, TRUE means print verbose progress output

Details

The ROMS data are assumed to be in the working directory in a folder called 'Rasters_2d_monthly' with subfolder 'gfdl'. If the ROMS data folder is different, you can pass that in via the 'dir' argument. However the ROMS data folder must have subfolders 'gfdl/sst_monthly' and 'gfdl/chl_surface' so that it will find the SST and CHL ROMS data.

Value

Returns the grid for species B. This is an object of class OM, which is a list with "grid" and "meta". "meta" has all the information about the simulation including all the parameters passed into the function.

Examples

1
2
3
4
## Not run: 
test <- SimulateWorld_ROMS_TrophicInteraction(PA_shape="logistic", abund_enviro="lnorm_low")

## End(Not run)

eeholmes/WRAP documentation built on Feb. 18, 2021, 10:51 a.m.