biomass2tsb: Simulate survey based on NORWECOM data.

Description Usage Arguments

View source: R/pelfoss.R

Description

biomass2tsb Reads biomass and superind files, draws transects, converts biomass to NASC, draws trawl stations, creates and runs a StoX project, and saves the results.

biomass2nasc Funciton for converting from a biomass density to nautical area scattering coefficient NASC (linear values, not dB) used in biomass2tsb.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
biomass2tsb(
  projectName,
  xmlOutputDir,
  biomass,
  superind,
  stratumFile,
  startdate = "31/1",
  dateshift = 0,
  centroid = c(0, 68),
  seed = 0,
  nboot = 10,
  xsd = list(acoustic = "1", biotic = "1.4"),
  nTrawl = 50,
  hours = list(240),
  type = "RectEnclZZ",
  knots = 10,
  equalEffort = FALSE,
  bearing = "along",
  distsep = 1,
  margin = 0.1,
  tsn = 161722,
  m = 20,
  TS0 = -71.9,
  b = NULL,
  condPar = NULL,
  LcmMean = NULL,
  platform = 4174,
  distance = 5,
  sweepWidth = 25,
  probfact = 1,
  radius = 10,
  N = 100,
  cores = list(biotic = 1, acoustic = 1, bootstrap = 1),
  unit = "mt",
  superindFilter = NULL,
  stagesToRemove = c(0, 1, 2),
  ...
)

biomass2nasc(Wg, LcmOne, a, b, m = 20, TS0 = -71.9)

Arguments

projectName

The biomass area density in units of g/m^2 (gram per square meter in the horizontal plane).

xmlOutputDir

The biomass area density in units of g/m^2 (gram per square meter in the horizontal plane).

biomass

The path to a NORWECOM NetCDF4 file with biomass in grams per square meter in a irregular geographical grid. The file should contain the variables "biomass", "longitude" and "latitude".

superind

The path to a NORWECOM NetCDF4 file with superindividuals. The file should contain the variables "age", "inumb", "length", "weight", "longitude" and "latitude".

stratumFile

The path to a file with the stratum polygons given as a two column matrix with stratum name in the first column and a MULTIPOLYGON wkt string in the second conlumn.

startdate

The start date of the survey, given as "%d/%m", e.g., 31 January is "31/1".

dateshift

An integer number of days to shift the survey by, negative values shifting to earlier in the year.

centroid

The centroid of the data, given in longitude, latitude.

seed

A single integer, or a list of seeds used in the funciton, including the following seeds: ('transect') for drawing transects using surveyPlanner(), ('trawl') for drawing trawl stations along the transects with probability as a funciton of the NASC (see probfact), and ('bootstrap') for getting the final estimate using runBootstrap() (see nboot).

nboot

Number of bootstrap replicates.

xsd

A named list of xsd versions of the acoustic and biotic file format.

nTrawl

The number of trawls to draw. Implies a penalty on the total transect time by hoursPerTrawl.

hours, type, knots, equalEffort, bearing, distsep, margin

See surveyPlanner

tsn

The tsn code of the species. Default is 161722 (herring). Run taxa <- getNMDinfo("taxa") to get a data frame of species used by the IMR (takes 2 min to download and process).

m, TS0

The parameters of the target strength-length relationship TS = m * log10(Lcm) + TS0, typically m = 20 and TS0 = -71.9 (herring, from Foote, K. G. 1987. Fish target strengths for use in echo integrator surveys. Journal of the Acoustical Society of America, 82: 981 - 987.)

condPar

A two element vector representing the condition parameters a and b in the standard allomettric formula W = a * L^b.

LcmMean

The characteristic fish length representing the mean acoustic backscatter, typically calculated as sqrt(mean(L^2)).

platform

The platform to use, defaulted to G.O.Sars. Only kept for cosmetic reasons.

distance, sweepWidth

The trawled distance and the seew width of the simulated trawl.

probfact

A numeric indicating an addition in the probability of selecting a log distance for trawling. I.e., add probfact / numberOfTransects to each log distance probability NASC / sum(NASC), and normalize to toal probability = 1.

radius

The radius around the trawl station within which individuals are drawn from the superindividuals. If given as a numeric vector of length 2, the second element is interpreted as the radius inside which superindividuals are selected when converting from biomass in gram/square meter to nautical area scattering coefficient NASC.

N

The number of individuals to draw for each trawl station.

cores

The number of cores to use for writing XML files and for the bootstrapping in the StoX project, given either as a named list such as list(biotic=1, acoustic=1, bootstrap=1), og a single numeric setting the cores for all.

unit

The unit used in the report form the StoX project (see getPlottingUnit).

superindFilter

An optional function acting on the superind data, such as longitude or latitude, e.g., superindFilter <- function(x) x$longitude < 20.

...

Arguments passed to surveyPlanner.

Wg

The biomass area density in units of g/m^2 (gram per square meter in the horizontal plane).

LcmOne

The length in cm representative of the individuals in the survey region. This length should be so that the NASC converted from the biomass in grams per square meters is unbiased. The function getTotalBiomass with type="length" can be used to obtain this value.

a, b

Parameters of the length-weight relationship Wg = a * Lcm^b, where Wg is the weight in grams and Lcm is the length in cm. Typical values are e.g., a = 0.01 and b = 3.


Sea2Data/pelfoss documentation built on Dec. 7, 2020, 12:31 a.m.