Description Usage Arguments Details Value Examples
View source: R/SimulatedWorld_ROMS_TrophicInteraction.R
This code replicates SimulateWorld_ROMS_function, but adds in a trophic interaction, where:
Species A: distribution and abundance driven by SST and Chl-a. Suitability function is logistic.
Species B: distribution and abundance drivn by SST and Species A
EM for Species B: only have chl-a and temp as covariates.
Note only using GFDL for now
1 2 3 4 5 6 7 8 9 |
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 |
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.
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.
1 2 3 4 | ## Not run:
test <- SimulateWorld_ROMS_TrophicInteraction(PA_shape="logistic", abund_enviro="lnorm_low")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.