Skip to contents

Calculates the energy rate (grams/year) available for reproduction after growth and metabolism have been accounted for.

Usage

getERepro(
  params,
  n = initialN(params),
  n_pp = initialNResource(params),
  n_other = initialNOther(params),
  t = 0,
  ...
)

Arguments

params

A MizerParams object

n

A matrix of species abundances (species x size).

n_pp

A vector of the resource abundance by size

n_other

A list of abundances for other dynamical components of the ecosystem

t

The time for which to do the calculation (Not used by standard mizer rate functions but useful for extensions with time-dependent parameters.)

...

Unused

Value

A two dimensional array (prey species x prey size) holding $$\psi_i(w)E_{r.i}(w)$$

where \(E_{r.i}(w)\) is the rate at which energy becomes available for growth and reproduction, calculated with getEReproAndGrowth(), and \(\psi_i(w)\) is the proportion of this energy that is used for reproduction. This proportion is taken from the params object and is set with setReproduction().

Your own reproduction rate function

By default getERepro() calls mizerERepro(). However you can replace this with your own alternative reproduction rate function. If your function is called "myERepro" then you register it in a MizerParams object params with

params <- setRateFunction(params, "ERepro", "myERepro")

Your function will then be called instead of mizerERepro(), with the same arguments.

Examples

# \donttest{
params <- NS_params
# Project with constant fishing effort for all gears for 20 time steps
sim <- project(params, t_max = 20, effort = 0.5)
# Get the energy at a particular time step
getERepro(params, n = N(sim)[15, , ], n_pp = NResource(sim)[15, ], t = 15)
#>          w
#> sp        0.001 0.00119 0.00142 0.0017 0.00203 0.00242 0.00289 0.00345 0.00411
#>   Sprat       0       0       0      0       0       0       0       0       0
#>   Sandeel     0       0       0      0       0       0       0       0       0
#>   N.pout      0       0       0      0       0       0       0       0       0
#>   Herring     0       0       0      0       0       0       0       0       0
#>   Dab         0       0       0      0       0       0       0       0       0
#>   Whiting     0       0       0      0       0       0       0       0       0
#>   Sole        0       0       0      0       0       0       0       0       0
#>   Gurnard     0       0       0      0       0       0       0       0       0
#>   Plaice      0       0       0      0       0       0       0       0       0
#>   Haddock     0       0       0      0       0       0       0       0       0
#>   Cod         0       0       0      0       0       0       0       0       0
#>   Saithe      0       0       0      0       0       0       0       0       0
#>          w
#> sp        0.00491 0.00586 0.00699 0.00834 0.00995 0.0119 0.0142 0.0169 0.0202
#>   Sprat         0       0       0       0       0      0      0      0      0
#>   Sandeel       0       0       0       0       0      0      0      0      0
#>   N.pout        0       0       0       0       0      0      0      0      0
#>   Herring       0       0       0       0       0      0      0      0      0
#>   Dab           0       0       0       0       0      0      0      0      0
#>   Whiting       0       0       0       0       0      0      0      0      0
#>   Sole          0       0       0       0       0      0      0      0      0
#>   Gurnard       0       0       0       0       0      0      0      0      0
#>   Plaice        0       0       0       0       0      0      0      0      0
#>   Haddock       0       0       0       0       0      0      0      0      0
#>   Cod           0       0       0       0       0      0      0      0      0
#>   Saithe        0       0       0       0       0      0      0      0      0
#>          w
#> sp        0.0241 0.0288 0.0343 0.0409 0.0489 0.0583 0.0696 0.083 0.0991 0.118
#>   Sprat        0      0      0      0      0      0      0     0      0     0
#>   Sandeel      0      0      0      0      0      0      0     0      0     0
#>   N.pout       0      0      0      0      0      0      0     0      0     0
#>   Herring      0      0      0      0      0      0      0     0      0     0
#>   Dab          0      0      0      0      0      0      0     0      0     0
#>   Whiting      0      0      0      0      0      0      0     0      0     0
#>   Sole         0      0      0      0      0      0      0     0      0     0
#>   Gurnard      0      0      0      0      0      0      0     0      0     0
#>   Plaice       0      0      0      0      0      0      0     0      0     0
#>   Haddock      0      0      0      0      0      0      0     0      0     0
#>   Cod          0      0      0      0      0      0      0     0      0     0
#>   Saithe       0      0      0      0      0      0      0     0      0     0
#>          w
#> sp        0.141 0.168 0.201 0.24 0.286 0.342 0.408 0.486 0.58        0.693
#>   Sprat       0     0     0    0     0     0     0     0    0 0.000000e+00
#>   Sandeel     0     0     0    0     0     0     0     0    0 2.445016e-08
#>   N.pout      0     0     0    0     0     0     0     0    0 0.000000e+00
#>   Herring     0     0     0    0     0     0     0     0    0 0.000000e+00
#>   Dab         0     0     0    0     0     0     0     0    0 0.000000e+00
#>   Whiting     0     0     0    0     0     0     0     0    0 0.000000e+00
#>   Sole        0     0     0    0     0     0     0     0    0 0.000000e+00
#>   Gurnard     0     0     0    0     0     0     0     0    0 0.000000e+00
#>   Plaice      0     0     0    0     0     0     0     0    0 0.000000e+00
#>   Haddock     0     0     0    0     0     0     0     0    0 0.000000e+00
#>   Cod         0     0     0    0     0     0     0     0    0 0.000000e+00
#>   Saithe      0     0     0    0     0     0     0     0    0 0.000000e+00
#>          w
#> sp               0.827        0.987         1.18          1.4         1.68
#>   Sprat   0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.0000000000
#>   Sandeel 1.696419e-07 1.176831e-06 8.162436e-06 5.660313e-05 0.0003924021
#>   N.pout  0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.0000000000
#>   Herring 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.0000000000
#>   Dab     0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.0000000000
#>   Whiting 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.0000000000
#>   Sole    0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.0000000000
#>   Gurnard 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.0000000000
#>   Plaice  0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.0000000000
#>   Haddock 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.0000000000
#>   Cod     0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.0000000000
#>   Saithe  0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.0000000000
#>          w
#> sp                 2         2.39         2.85          3.4         4.06
#>   Sprat   0.00000000 9.540756e-08 6.599987e-07 4.564333e-06 3.155571e-05
#>   Sandeel 0.00271798 1.874848e-02 1.264080e-01 7.561829e-01 2.910307e+00
#>   N.pout  0.00000000 0.000000e+00 0.000000e+00 0.000000e+00 1.165671e-07
#>   Herring 0.00000000 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>   Dab     0.00000000 0.000000e+00 0.000000e+00 2.604327e-08 1.810174e-07
#>   Whiting 0.00000000 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>   Sole    0.00000000 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>   Gurnard 0.00000000 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>   Plaice  0.00000000 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>   Haddock 0.00000000 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>   Cod     0.00000000 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>   Saithe  0.00000000 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>          w
#> sp                4.84         5.78          6.9         8.23         9.82
#>   Sprat   2.180855e-04 1.506411e-03 1.038927e-02 7.112216e-02 4.676243e-01
#>   Sandeel 5.593734e+00 7.401935e+00 8.928204e+00 1.058410e+01 1.250657e+01
#>   N.pout  8.289683e-07 5.911146e-06 4.225611e-05 3.027465e-04 2.173201e-03
#>   Herring 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>   Dab     1.260288e-06 8.791011e-06 6.144635e-05 4.304094e-04 3.020845e-03
#>   Whiting 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>   Sole    0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>   Gurnard 0.000000e+00 0.000000e+00 5.607116e-08 3.869722e-07 2.675048e-06
#>   Plaice  0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>   Haddock 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>   Cod     0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>   Saithe  0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>          w
#> sp                11.7           14         16.7         19.9         23.8
#>   Sprat   2.525680e+00 7.666732e+00 1.234919e+01 1.549975e+01 1.842993e+01
#>   Sandeel 1.476644e+01 1.742779e+01 2.056185e+01 2.425120e+01 2.859224e+01
#>   N.pout  1.561589e-02 1.116693e-01 7.782051e-01 4.717666e+00 1.761806e+01
#>   Herring 0.000000e+00 0.000000e+00 2.305021e-07 1.592820e-06 1.100356e-05
#>   Dab     2.121093e-02 1.475401e-01 9.644544e-01 4.736344e+00 1.201775e+01
#>   Whiting 0.000000e+00 3.354842e-07 2.423682e-06 1.752675e-05 1.267149e-04
#>   Sole    0.000000e+00 1.382030e-07 9.594926e-07 6.675486e-06 4.654733e-05
#>   Gurnard 1.852774e-05 1.285933e-04 8.946249e-04 6.235980e-03 4.338540e-02
#>   Plaice  0.000000e+00 0.000000e+00 2.745040e-08 1.958762e-07 1.399431e-06
#>   Haddock 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>   Cod     0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>   Saithe  0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>          w
#> sp                28.4         33.8         40.4         48.2         57.5
#>   Sprat   2.169158e+01 2.525683e+01 2.792709e+01 3.085162e+01 3.404815e+01
#>   Sandeel 3.369756e+01 3.969852e+01 4.498729e+01 4.992216e+01 5.537164e+01
#>   N.pout  3.324229e+01 4.505773e+01 5.645179e+01 6.962687e+01 8.554769e+01
#>   Herring 7.599257e-05 5.246534e-04 3.620795e-03 2.496773e-02 1.715988e-01
#>   Dab     1.795472e+01 2.275567e+01 2.795094e+01 3.418018e+01 4.180801e+01
#>   Whiting 9.153766e-04 6.604304e-03 4.751326e-02 3.384389e-01 2.298371e+00
#>   Sole    3.253321e-04 2.279199e-03 1.599431e-02 1.119190e-01 7.608008e-01
#>   Gurnard 2.945104e-01 1.738252e+00 6.303218e+00 1.160061e+01 1.545639e+01
#>   Plaice  1.000806e-05 7.162925e-05 5.129470e-04 3.673751e-03 2.627538e-02
#>   Haddock 1.762887e-07 1.235987e-06 8.691246e-06 6.129731e-05 4.336443e-04
#>   Cod     0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>   Saithe  0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>          w
#> sp                68.7         81.9        97.8        117        139       166
#>   Sprat   3.753446e+01  41.32838693  45.4478652  49.911115  54.736974  59.94543
#>   Sandeel 6.138439e+01  68.01265287  75.3123286  83.342962  92.167693 101.85312
#>   N.pout  1.049111e+02 128.45361357 157.0615667 182.296469 209.843205 241.05810
#>   Herring 1.158700e+00   7.12066830  29.9993603  63.077137  85.694546 103.48667
#>   Dab     5.118142e+01  62.70279214  76.8602225  94.261939 115.625106 141.76412
#>   Whiting 1.249008e+01  36.96955887  59.5951628  76.917169  94.695968 115.37658
#>   Sole    4.414443e+00  15.22448405  27.0130281  35.723727  44.278058  54.31507
#>   Gurnard 1.913775e+01  23.43407792  28.6991290  35.215446  43.294549  53.29903
#>   Plaice  1.861331e-01   1.24871425   6.5087603  17.956182  27.942594  35.80399
#>   Haddock 3.076923e-03   0.02188399   0.1555233   1.085307   6.789496  27.87144
#>   Cod     0.000000e+00   0.00000000   0.0000000   0.000000   0.000000   0.00000
#>   Saithe  0.000000e+00   0.00000000   0.0000000   0.000000   0.000000   0.00000
#>          w
#> sp                 198          237          282          337          402
#>   Sprat   6.555843e+01 7.160099e+01 7.810280e+01 8.510040e+01 9.263998e+01
#>   Sandeel 1.124691e+02 1.240883e+02 1.367861e+02 1.506395e+02 1.657271e+02
#>   N.pout  2.761296e+02 3.154613e+02 3.595401e+02 4.089206e+02 4.642090e+02
#>   Herring 1.221982e+02 1.437071e+02 1.688617e+02 1.977886e+02 2.190391e+02
#>   Dab     1.736482e+02 2.124671e+02 2.596541e+02 3.128035e+02 3.594774e+02
#>   Whiting 1.399744e+02 1.693326e+02 2.043793e+02 2.462002e+02 2.960715e+02
#>   Sole    6.657463e+01 8.165073e+01 1.002005e+02 1.230066e+02 1.510111e+02
#>   Gurnard 6.566613e+01 8.093258e+01 9.974948e+01 1.229028e+02 1.513370e+02
#>   Plaice  4.406219e+01 5.378791e+01 6.550193e+01 7.964922e+01 9.672125e+01
#>   Haddock 5.711176e+01 7.928401e+01 9.976603e+01 1.232797e+02 1.518323e+02
#>   Cod     0.000000e+00 0.000000e+00 3.531748e-06 2.518572e-05 1.792314e-04
#>   Saithe  1.993258e-06 1.440096e-05 1.038931e-04 7.483624e-04 5.381764e-03
#>          w
#> sp                 480          573          683         816        973
#>   Sprat   1.007812e+02 1.096020e+02 119.20458154 129.7226670 141.330418
#>   Sandeel 1.821278e+02 1.999200e+02 219.18111037 239.9859686 262.406626
#>   N.pout  5.260510e+02 5.951284e+02 672.16647459 757.9455867 853.301428
#>   Herring 2.425718e+02 2.686514e+02 297.58078927 329.7082501 365.436101
#>   Dab     4.125515e+02 4.727916e+02 541.04131855 618.2327325 705.396071
#>   Whiting 3.554877e+02 4.261932e+02 510.22533365 609.9656422 728.191168
#>   Sole    1.853465e+02 2.273707e+02 278.70790515 341.2976353 401.515145
#>   Gurnard 1.861828e+02 2.287904e+02 278.64135762 321.8871707 371.231083
#>   Plaice  1.172932e+02 1.420446e+02 171.77962966 207.4497133 250.179398
#>   Haddock 1.868159e+02 2.296742e+02 282.08701765 346.0514061 423.947589
#>   Cod     1.272898e-03 9.022322e-03   0.06382335   0.4503362   3.157807
#>   Saithe  3.862915e-02 2.764333e-01   1.96007349  13.3088311  73.708223
#>          w
#> sp             1160      1390      1650      1970      2360      2810      3350
#>   Sprat   154.25257  168.7761  185.2633  204.1659  226.0400  251.5627  281.5486
#>   Sandeel 286.51169  312.3665  340.0345  369.5798  401.0723  434.5968  470.2660
#>   N.pout  959.13022 1076.3743 1206.0226 1349.0998 1506.6668 1679.7767 1869.4922
#>   Herring 405.23138  449.6385  499.2948  554.9486  617.4811  687.9322  767.5307
#>   Dab     803.66984  914.3118 1038.7121 1178.4058 1335.0844 1510.6032 1707.0001
#>   Whiting 868.13257  982.8636 1101.6246 1232.9807 1377.9822 1537.6710 1713.0843
#>   Sole    462.38519  531.7084  610.4785  699.7866  800.8293  914.9156 1043.4777
#>   Gurnard 427.39289  491.1633  563.4114  645.0922  737.2543  841.0462  957.7269
#>   Plaice  301.29670  362.3681  435.2395  522.0826  625.4491  748.3292  859.2356
#>   Haddock 518.61128  633.4163  772.3733  940.2463 1142.6888 1386.4020 1679.3271
#>   Cod      21.53615  127.9733  471.3260  873.0633 1151.0148 1398.3059 1671.6860
#>   Saithe  227.41333  373.5742  480.0170  583.8565  701.3785  838.4046  998.4557
#>          w
#> sp             4000      4780      5700      6800      8120      9690     11600
#>   Sprat    316.9679  358.9662  408.8873  468.2998  539.0302  623.2062  723.3121
#>   Sandeel  508.2418  548.7651  592.1992  639.0897  690.2467  746.8539  810.6108
#>   N.pout  2076.8899 2303.0698 2549.1871 2816.5185 3106.5376 3421.0543 3762.3875
#>   Herring  857.7300  960.2491 1077.1201 1210.7421 1363.9428 1540.0469 1742.9532
#>   Dab     1926.5097 2171.5758 2444.8627 2749.2661 3087.9208 3464.2065 3881.7480
#>   Whiting 1905.2402 2115.1184 2343.6513 2591.7347 2860.2546 3150.1658 3462.6228
#>   Sole    1188.0810 1350.4319 1532.3865 1735.9567 1963.3157 2216.7997 2498.9067
#>   Gurnard 1088.6739 1235.3918 1399.5197 1582.8377 1787.2724 2014.9000 2267.9477
#>   Plaice   966.7793 1086.4072 1219.2727 1366.5945 1529.6464 1709.7418 1908.2126
#>   Haddock 2030.8688 2370.6456 2694.5363 3058.2033 3466.0672 3923.0051 4434.3918
#>   Cod     1990.7374 2366.3519 2808.5646 3328.3292 3937.9829 4651.4459 5484.3850
#>   Saithe  1184.7903 1400.8872 1650.6509 1938.6608 2270.5909 2653.8955 3098.8372
#>          w
#> sp            13800     16500    19600     23400     28000     33400     39900
#>   Sprat    842.2610  983.4883 1151.072  1349.881  1585.757  1865.725  2198.229
#>   Sandeel  883.9137  970.0785 1073.608  1200.497  1358.570  1557.828  1810.775
#>   N.pout  4133.5557 4538.4588 4982.008  5470.160  6009.845  6608.860  7275.798
#>   Herring 1977.2198 2248.1567 2561.928  2925.662  3347.571  3837.078  4404.957
#>   Dab     4344.4109 4856.2891 5421.683  6045.070  6731.065  7484.379  8309.786
#>   Whiting 3799.1654 4161.9458 4553.962  4979.247  5442.999  5951.688  6513.211
#>   Sole    2812.2892 3159.7415 3544.178  3968.599  4436.051  4949.567  5512.093
#>   Gurnard 2548.7914 2859.9492 3204.071  3583.923  4002.364  4462.328  4966.792
#>   Plaice  2126.3793 2365.5126 2626.785  2911.214  3219.596  3552.443  3909.925
#>   Haddock 5006.1412 5644.7504 6357.344  7151.722  8036.403  9020.679 10114.669
#>   Cod     6454.4157 7581.4181 8888.085 10400.881 12151.679 14180.362 16538.636
#>   Saithe  3619.8689 4237.2640 4978.732  5880.636  6988.456  8356.407 10030.227
# }