# calc_SSB: Calculate Spawning Stock Biomass (SSB) or total biomass In LeMaRns: Length-Based Multispecies Analysis by Numerical Simulation

## Description

Calculates the spawning stock biomass (SSB) or total biomass of each species in the model.

## Usage

 ```1 2 3``` ```calc_SSB(wgt, mature, N) calc_biomass(wgt, N) ```

## Arguments

 `wgt` A matrix with dimensions `nsc` and `nfish` representing the weight of each species in each length class. `mature` A matrix with dimensions `ncs` and `nfish` with elements in the range 0-1 representing the proportion of mature individuals of each species in each length class. `N` A matrix with dimensions `nsc` and `nfish` representing the number of individuals in each length class for the current time step.

## Details

The Spawning Stock Biomass is equal to `colSums(mature*N*wgt)` and the total biomass is equal to `colSums(mature*N*wgt)`.

## Value

`calc_SSB` returns a numeric vector of length `nfish` representing the SSB of each species (g).

`calc_biomass` returns a numeric vector of length `length(species)` where the `j`th element is the biomass (g) of the `j`th species.

`calc_recruits`
 ``` 1 2 3 4 5 6 7 8 9 10``` ```# Set up and run the model NS_params <- LeMansParam(NS_par, tau=NS_tau, eta=rep(0.25, 21), L50=NS_par\$Lmat, other=1e12) effort <- matrix(0.5, 10, dim(NS_params@Qs)) model_run <- run_LeMans(NS_params, years=10, effort=effort) # Calculate SSB calc_SSB(wgt=NS_params@wgt, mature=NS_params@mature, N=model_run@N[,,101]) # Calculate biomass in the last time step calc_biomass(wgt=NS_params@wgt, N=model_run@N[,,101]) ```