e2ep_plot_ycurve {StrathE2EPolar} | R Documentation

## Plot fishery yield curve data for planktivorous or demersal fish.

### Description

Plot planktivorous or demersal fish yield curve data generated by the function e2ep_run_ycurve().

### Usage

    e2ep_plot_ycurve(
      model,
      selection = "",
      use.saved = FALSE,
      use.example = FALSE,
      results = NULL,
      title = ""
    )

### Arguments

`model` | R-list object defining the baseline model configuration used to generate the data and compiled by the e2ep_read() function.
`selection` | Text string from a list identifying the fish guild for which a yield curve is to be generated. Select from: "PLANKTIV", "DEMERSAL". Remember to include the phrase within "" quotes.
`use.saved` | Logical. If TRUE use data from a prior user-defined run held as csv files data in the current results folder as set by an e2ep_read() function call (default=FALSE).
`use.example` | NOT YET ENABLED. In future versions - Logical. If TRUE use pre-computed example data from the internal Barents Sea model rather than user-generated data (default=FALSE).
`results` | Dataframe generated by the function e2ep_run_ycurve(). Only needed if use.saved2=FALSE and use.example2=FALSE. (Default=NULL).
`title` | Optional free text (enclosed in "") to be added as a header for the plot (default = "").

### Details

In the function e2ep_run_ycurve(), the baseline for the sequence of runs (harvest ratio multiplier = 1.0) is a model name and variant as loaded by the e2ep_read() function. The function then generates a set of biomass, landings and discards data for multiples of the target fish (planktivorous or demersal) harvest ratios relative to this baseline. This is done for a given value of the alternative (demersal or planktivorous) harvest ratio (also a multiple of the the baseline).

This function plots two graphs - the annual average fish biomass in the whole model domain (mMN/m2) as a function of harvest ratio multiplier, and the yield curve, ie the annual catch (and discards) (mMN/m2/y) as functions of the multiplier.

The yield curve represents the catch that would be generated from the stationary state of the model attained with long-term repeating annual cycles of all driving data including fishing.

Arguments for this function permit the input data to be drawn from an existing data object generated by the function e2ep_run_ycurve(), a previously generated csv file, or example data provided with the package for versions of the internal Barents Sea models.

### Value

Dataframe of results from which the plot is created, graphical display in a new graphics window

### See Also

`e2ep_read`, `e2ep_run`, `e2ep_run_ycurve`

### Examples

    # Load the 2011-2019 version of the Barents Sea model supplied with the package and
    # generate a yield data object:
    # WARNING - this example will take several minutes to run even though the model is
    # only run for 3 years per step in harvest ratio. A realistic run would require
    # at least 50 years per step and take much longer.
        model <- e2ep_read("Barents_Sea", "2011-2019")
        pfhr=c(0,0.5,0.75,1.0,1.25,1.5,2.0,2.5,3.0)
        pf_yield_data <- e2ep_run_ycurve(model,selection="PLANKTIV",nyears=3, HRvector=pfhr,
                                        HRfixed=1,csv.output=FALSE)
        data <- e2ep_plot_ycurve(model,selection="PLANKTIV", results=pf_yield_data,
                                title="Planktivorous yield with baseline demersal fishing")

    # Users can then plot other biomass, landings and discards data in the results
    # object by, for example:
        par(mfrow=c(2,1))
        par(mar=c(3.2,5,2,0.8))
        ym<-1.1*max(pf_yield_data$Cetaceanbiom)
        plot(pf_yield_data$PlankFishHRmult, pf_yield_data$Cetaceanbiom, ylim=c(0,ym),
             type="l",lwd=3,yaxt="n",xaxt="n",ann=FALSE)
           abline(v=1,lty="dashed")
           axis(side=1,las=1,cex.axis=0.9)
           axis(side=2,las=1,cex.axis=0.9)
           mtext("Planktiv. fish harvest ratio multiplier",cex=1,side=1,line=2)
           mtext("Cetacean biomass",cex=1,side=2,line=3.5)
           mtext(bquote("mMN.m"^-2),cex=0.7,side=3,line=-0.05,adj=-0.18)
        ym<-1.1*max(pf_yield_data$Cetaceandisc)
        plot(pf_yield_data$PlankFishHRmult, pf_yield_data$Cetaceandisc, ylim=c(0,ym),
             type="l",lwd=3,yaxt="n",xaxt="n",ann=FALSE)
           abline(v=1,lty="dashed")
           axis(side=1,las=1,cex.axis=0.9)
           axis(side=2,las=1,cex.axis=0.9)
           mtext("Planktiv. fish harvest ratio multiplier",cex=1,side=1,line=2)
           mtext("Cetacean by-catch",cex=1,side=2,line=3.5)
           mtext(bquote("mMN.m"^-2 ~ ".y"^-1),cex=0.7,side=3,line=-0.05,adj=-0.18)

    # Using example data generated with selection="PLANKTIV" ...
    # Plot example data for one of the Barents Sea model versions internal to the package
    # This example requires the StrathE2EPolarexamples supplementary data package.
    if(require(StrathE2EPolarexamples)){
         model <- e2ep_read("Barents_Sea", "2011-2019")
         pf_yield_data<-e2ep_plot_ycurve(model, selection="PLANKTIV", use.example=TRUE)
    }

    # Using example data generated with selection="DEMERSAL"...
    # This example requires the StrathE2EPolarexamples supplementary data package.
    if(require(StrathE2EPolarexamples)){
        model <- e2ep_read("Barents_Sea", "2011-2019")
        df_yield_data<-e2ep_plot_ycurve(model, selection="DEMERSAL", use.example=TRUE)
    }

[Package StrathE2EPolar version 2.0.0 Index]