Skip to contents

Calculates the energy rate \(g_i(w)\) (grams/year) available by species and size for growth after metabolism, movement and reproduction have been accounted for.

Usage

getEGrowth(
  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)

Your own growth rate function

By default getEGrowth() calls mizerEGrowth(). However you can replace this with your own alternative growth rate function. If your function is called "myEGrowth" then you register it in a MizerParams object params with

params <- setRateFunction(params, "EGrowth", "myEGrowth")

Your function will then be called instead of mizerEGrowth(), 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
getEGrowth(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
#>   Sprat   0.03898727 0.04367083 0.04891468 0.05478551 0.06135789 0.06871518
#>   Sandeel 0.05897984 0.06606582 0.07399970 0.08288246 0.09282702 0.10395968
#>   N.pout  0.06841484 0.07646616 0.08544993 0.09547148 0.10664750 0.11910708
#>   Herring 0.07499078 0.08403287 0.09415554 0.10548733 0.11817199 0.13237024
#>   Dab     0.06509621 0.07284200 0.08149917 0.09117329 0.10198187 0.11405572
#>   Whiting 0.05945713 0.06645437 0.07426208 0.08297184 0.09268514 0.10351431
#>   Sole    0.04802253 0.05375077 0.06015549 0.06731545 0.07531841 0.08426210
#>   Gurnard 0.04119965 0.04610888 0.05159689 0.05773090 0.06458577 0.07224488
#>   Plaice  0.03093383 0.03460552 0.03870761 0.04328972 0.04840702 0.05412089
#>   Haddock 0.07837947 0.08773978 0.09820772 0.10991264 0.12299874 0.13762670
#>   Cod     0.12952994 0.14485889 0.16197732 0.18109037 0.20242607 0.22623782
#>   Saithe  0.10428505 0.11659036 0.13032665 0.14565706 0.16276279 0.18184491
#>          w
#> sp           0.00289    0.00345    0.00411    0.00491    0.00586   0.00699
#>   Sprat   0.07695057 0.08616823 0.09648458 0.10802968 0.12094886 0.1354044
#>   Sandeel 0.11642166 0.13037086 0.14598380 0.16345784 0.18301354 0.2048974
#>   N.pout  0.13299295 0.14846267 0.16569002 0.18486638 0.20620222 0.2299287
#>   Herring 0.14826178 0.16604751 0.18595202 0.20822628 0.23315080 0.2610390
#>   Dab     0.12754035 0.14259758 0.15940732 0.17816944 0.19910597 0.2224634
#>   Whiting 0.11558355 0.12903008 0.14400528 0.16067598 0.17922585 0.1998568
#>   Sole    0.09425537 0.10541938 0.11788892 0.13181398 0.14736128 0.1647162
#>   Gurnard 0.08080100 0.09035738 0.10102886 0.11294309 0.12624195 0.1410830
#>   Plaice  0.06049958 0.06761890 0.07556309 0.08442565 0.09431032 0.1053322
#>   Haddock 0.15397550 0.17224449 0.19265558 0.21545575 0.24091976 0.2693532
#>   Cod     0.25280702 0.28244601 0.31550124 0.35235673 0.39343778 0.4392150
#>   Saithe  0.20312644 0.22685451 0.25330272 0.28277357 0.31560107 0.3521534
#>          w
#> sp          0.00834   0.00995    0.0119    0.0142    0.0169    0.0202    0.0241
#>   Sprat   0.1515776 0.1696707 0.1899097 0.2125465 0.2378621 0.2661702 0.2978202
#>   Sandeel 0.2293850 0.2567840 0.2874384 0.3217324 0.3600949 0.4030051 0.4509980
#>   N.pout  0.2562993 0.2855918 0.3181097 0.3541851 0.3941803 0.4384907 0.4875480
#>   Herring 0.2922411 0.3271483 0.3661975 0.4098768 0.4587309 0.5133683 0.5744680
#>   Dab     0.2485152 0.2775646 0.3099477 0.3460371 0.3862449 0.4310272 0.4808884
#>   Whiting 0.2227904 0.2482700 0.2765620 0.3079582 0.3427782 0.3813715 0.4241213
#>   Sole    0.1840845 0.2056949 0.2298011 0.2566846 0.2866574 0.3200651 0.3572904
#>   Gurnard 0.1576413 0.1761109 0.1967070 0.2196683 0.2452588 0.2737707 0.3055273
#>   Plaice  0.1176187 0.1313112 0.1465659 0.1635558 0.1824719 0.2035256 0.2269498
#>   Haddock 0.3010956 0.3365245 0.3760589 0.4201642 0.4693565 0.5242082 0.5853535
#>   Cod     0.4902084 0.5469924 0.6102000 0.6805286 0.7587446 0.8456898 0.9422866
#>   Saithe  0.3928356 0.4380922 0.4884100 0.5443205 0.6064023 0.6752831 0.7516423
#>          w
#> sp           0.0288    0.0343    0.0409    0.0489    0.0583    0.0696     0.083
#>   Sprat   0.3332015 0.3727480 0.4169429 0.4663241 0.5214902 0.5831073 0.6519158
#>   Sandeel 0.5046707 0.5646897 0.6317989 0.7068280 0.7907026 0.8844550 0.9892361
#>   N.pout  0.5418236 0.6018333 0.6681421 0.7413722 0.8222104 0.9114205 1.0098566
#>   Herring 0.6427879 0.7191736 0.8045688 0.9000257 1.0067182 1.1259548 1.2591945
#>   Dab     0.5363862 0.5981364 0.6668190 0.7431849 0.8280627 0.9223669 1.0271070
#>   Whiting 0.4714476 0.5238121 0.5817234 0.6457444 0.7165006 0.7946916 0.8811047
#>   Sole    0.3987567 0.4449321 0.4963335 0.5535316 0.6171557 0.6878992 0.7665254
#>   Gurnard 0.3408852 0.3802384 0.4240209 0.4727106 0.5268334 0.5869669 0.6537454
#>   Plaice  0.2530019 0.2819655 0.3141536 0.3499114 0.3896198 0.4336995 0.4826158
#>   Haddock 0.6534948 0.7294096 0.8139575 0.9080886 1.0128523 1.1294063 1.2590273
#>   Cod     1.0495451 1.1685693 1.3005652 1.4468493 1.6088582 1.7881612 1.9864747
#>   Saithe  0.8362121 0.9297800 1.0331897 1.1473433 1.2732031 1.4117937 1.5642051
#>          w
#> sp           0.0991     0.118     0.141     0.168     0.201      0.24    0.286
#>   Sprat   0.7287391 0.8144924 0.9101923 1.0169682 1.1360739 1.2689017 1.416997
#>   Sandeel 1.1063284 1.2371616 1.3833281 1.5466015 1.7289565 1.9325912 2.159951
#>   N.pout  1.1184820 1.2383921 1.3708437 1.5172913 1.6794330 1.8592653 2.059150
#>   Herring 1.4080629 1.5743717 1.7601388 1.9676117 2.1992923 2.4579658 2.746731
#>   Dab     1.1433981 1.2724724 1.4156935 1.5745722 1.7507864 1.9462034 2.162908
#>   Whiting 0.9766328 1.0822968 1.1992724 1.3289253 1.4728523 1.6329325 1.811388
#>   Sole    0.8538743 0.9508690 1.0585237 1.1779518 1.3103753 1.4571352 1.619703
#>   Gurnard 0.7278639 0.8100839 0.9012389 1.0022401 1.1140835 1.2378574 1.374751
#>   Plaice  0.5368840 0.5970766 0.6638317 0.7378628 0.8199721 0.9110658 1.012173
#>   Haddock 1.4031220 1.5632390 1.7410824 1.9385260 2.1576288 2.4006533 2.670084
#>   Cod     2.2056806 2.4478502 2.7152741 3.0105016 3.3363907 3.6961732 4.093537
#>   Saithe  1.7315967 1.9152023 2.1163381 2.3364124 2.5769398 2.8395603 3.126065
#>          w
#> sp           0.342    0.408    0.486     0.58    0.693    0.827    0.987
#>   Sprat   1.582073 1.766031 1.970981 2.199257 2.453449 2.736420 3.051342
#>   Sandeel 2.413757 2.697034 3.013145 3.365825 3.759226 4.197955 4.687126
#>   N.pout  2.281896 2.530852 2.810018 3.124175 3.479032 3.881395 4.339360
#>   Herring 3.069035 3.428711 3.830022 4.277702 4.777012 5.333796 5.954537
#>   Dab     2.403235 2.669810 2.965600 3.293971 3.658761 4.064371 4.515870
#>   Whiting 2.010859 2.234486 2.486012 2.769904 3.091479 3.457070 3.874197
#>   Sole    1.799694 1.998882 2.219219 2.462856 2.732167 3.029779 3.358614
#>   Gurnard 1.526066 1.693224 1.877787 2.081472 2.306169 2.553975 2.827221
#>   Plaice  1.124472 1.249316 1.388272 1.543163 1.716123 1.909656 2.126717
#>   Haddock 2.968651 3.299352 3.665485 4.070678 4.518931 5.014661 5.562762
#>   Cod     4.532734 5.018707 5.557262 6.155266 6.820901 7.563962 8.396211
#>   Saithe  3.438430 3.778862 4.149857 4.554277 4.995449 5.477281 6.004421
#>          w
#> sp            1.18       1.4      1.68         2      2.39      2.85       3.4
#>   Sprat   3.401719  3.791421  4.224723  4.706336  5.241454  5.835794  6.495645
#>   Sandeel 5.232406  5.840052  6.516790  7.268641  8.092443  8.919734  9.330494
#>   N.pout  4.862530  5.462269  6.151986  6.947467  7.867265  8.933162 10.170754
#>   Herring 6.646432  7.417462  8.276477  9.233282 10.298741 11.484879 12.805006
#>   Dab     5.019128  5.580971  6.209374  6.913688  7.704908  8.596008  9.602327
#>   Whiting 4.351780  4.900373  5.532445  6.262706  7.108492  8.090226  9.232024
#>   Sole    3.721930  4.123379  4.567073  5.057674  5.600493  6.201623  6.868092
#>   Gurnard 3.128517  3.460802  3.827415  4.232172  4.679472  5.174425  5.723016
#>   Plaice  2.370792  2.646007  2.957241  3.310262  3.711880  4.170120  4.694416
#>   Haddock 6.168669  6.838450  7.578906  8.397704  9.303542 10.306353 11.417565
#>   Cod     9.331805 10.387781 11.584620 12.946892 14.503982 16.290914 18.349289
#>   Saithe  6.582440  7.218059  7.919421  8.696416  9.561062 10.527960 11.614819
#>          w
#> sp             4.06      4.84      5.78       6.9      8.23      9.82      11.7
#>   Sprat    7.227903  8.040030  8.939416  9.928697 10.973594 11.801057 11.097103
#>   Sandeel  8.334053  6.938232  6.561657  6.626575  6.738552  6.779473  6.699245
#>   N.pout  11.610442 13.289187 15.251768 17.547976 20.235387 23.380764 27.053777
#>   Herring 14.273845 15.907672 17.724477 19.744126 21.988553 24.481961 27.251048
#>   Dab     10.742103 12.037227 13.514007 15.203128 17.140680 19.368050 21.923336
#>   Whiting 10.562772 12.118127 13.941801 16.081715 18.593290 21.542025 25.004617
#>   Sole     7.608075  8.431157  9.348654 10.373851 11.522484 12.813306 14.268745
#>   Gurnard  6.332308  7.010722  7.768357  8.617253  9.571873 10.649687 11.871813
#>   Plaice   5.295853  5.987481  6.784630  7.705028  8.769269 10.001327 11.429084
#>   Haddock 12.650450 14.020631 15.546641 17.250205 19.157160 21.298523 23.711633
#>   Cod     20.728409 23.486733 26.693459 30.429464 34.789596 39.885298 45.847462
#>   Saithe  12.843101 14.238791 15.833329 17.664581 19.778194 22.229234 25.084143
#>          w
#> sp               14      16.7      19.9      23.8      28.4        33.8
#>   Sprat    7.453033  4.424125  3.098257  2.179364  1.131725   0.0000000
#>   Sandeel  6.456526  6.005034  5.289494  4.243356  2.786609   0.8233617
#>   N.pout  31.222146 35.538734 37.416250 31.293118 23.567638  20.9506505
#>   Herring 30.325221 33.736946 37.521959 41.719593 46.373127  51.5299497
#>   Dab     24.768959 27.399876 27.635029 25.009091 24.481414  25.9678010
#>   Whiting 29.030358 33.755452 39.287825 45.716680 53.155718  61.7379728
#>   Sole    15.913968 17.782405 19.912229 22.347105 25.139178  28.3498212
#>   Gurnard 13.262025 14.851581 16.673332 18.743191 20.930987  22.3203056
#>   Plaice  13.082894 15.002008 17.229402 19.811980 22.804192  26.2691823
#>   Haddock 26.438084 29.533959 33.063966 37.105199 41.751123  47.1135157
#>   Cod     52.823809 60.998273 70.579572 81.804126 94.947068 110.3261129
#>   Saithe  28.416030 32.322002 36.913622 42.322965 48.706438  56.2470153
#>          w
#> sp             40.4      48.2      57.5      68.7       81.9       97.8
#>   Sprat     0.00000   0.00000   0.00000   0.00000   0.000000   0.000000
#>   Sandeel   0.00000   0.00000   0.00000   0.00000   0.000000   0.000000
#>   N.pout   20.18792  19.22679  17.32401  14.01599   8.826783   1.187192
#>   Herring  57.24032  63.54649  70.40517  77.17149  79.788579  66.400342
#>   Dab      28.07995  30.34005  32.57979  34.67024  36.455710  37.731582
#>   Whiting  71.56904  82.58367  93.57213  98.18398  90.600575  87.250597
#>   Sole     32.04343  36.23738  40.56660  42.70243  38.637507  34.718770
#>   Gurnard  21.05530  19.61028  20.26202  21.86243  23.760676  25.764763
#>   Plaice   30.27860  34.91181  40.24742  46.27421  52.346863  55.307077
#>   Haddock  53.32140  60.52712  68.91875  78.71361  90.154419 103.445540
#>   Cod     128.30022 149.27370 173.70821 202.11214 235.044504 273.120801
#>   Saithe   65.15314  75.66282  88.04840 102.61560 119.706084 139.702553
#>          w
#> sp              117       139       166       198       237        282
#>   Sprat     0.00000   0.00000   0.00000   0.00000   0.00000   0.000000
#>   Sandeel   0.00000   0.00000   0.00000   0.00000   0.00000   0.000000
#>   N.pout    0.00000   0.00000   0.00000   0.00000   0.00000   0.000000
#>   Herring  43.81969  32.81146  27.85641  23.33841  17.52383   9.725926
#>   Dab      38.23245  37.59740  35.34707  30.88285  23.46658  12.179243
#>   Whiting  91.99602  99.42457 107.22432 114.55659 120.94959 125.931126
#>   Sole     35.20473  37.39969  39.90644  42.25836  44.18072  45.379875
#>   Gurnard  27.78530  29.72661  31.45162  32.77447  33.45147  33.161849
#>   Plaice   53.32492  54.21913  58.82626  64.81500  71.33614  78.117396
#>   Haddock 118.27518 131.07856 131.67387 127.75165 135.10128 148.984149
#>   Cod     317.03203 367.51327 425.31332 491.24476 566.22497 651.270131
#>   Saithe  163.04253 190.21242 221.73271 258.18138 300.22090 348.597680
#>          w
#> sp              337       402       480        573        683         816
#>   Sprat     0.00000   0.00000   0.00000    0.00000    0.00000    0.000000
#>   Sandeel   0.00000   0.00000   0.00000    0.00000    0.00000    0.000000
#>   N.pout    0.00000   0.00000   0.00000    0.00000    0.00000    0.000000
#>   Herring   0.00000   0.00000   0.00000    0.00000    0.00000    0.000000
#>   Dab       0.00000   0.00000   0.00000    0.00000    0.00000    0.000000
#>   Whiting 128.93034 129.23285 125.94663  117.96888  103.95098   82.256841
#>   Sole     45.48170  44.00000  40.30805   33.60704   22.88946    6.895993
#>   Gurnard  31.48835  27.89479  21.70010   12.04831    0.00000    0.000000
#>   Plaice   84.98928  91.76426  98.20200  103.99142  108.73462  111.928576
#>   Haddock 165.39885 183.14186 201.71137  220.64539  239.34729  257.016420
#>   Cod     747.50449 856.17324 978.65677 1116.48279 1271.31431 1444.757554
#>   Saithe  404.14762 467.79489 540.53016  623.27192  715.93948  811.522685
#>          w
#> sp               973        1160      1390       1650       1970      2360
#>   Sprat      0.00000    0.000000    0.0000    0.00000    0.00000    0.0000
#>   Sandeel    0.00000    0.000000    0.0000    0.00000    0.00000    0.0000
#>   N.pout     0.00000    0.000000    0.0000    0.00000    0.00000    0.0000
#>   Herring    0.00000    0.000000    0.0000    0.00000    0.00000    0.0000
#>   Dab        0.00000    0.000000    0.0000    0.00000    0.00000    0.0000
#>   Whiting   50.91209    7.546454    0.0000    0.00000    0.00000    0.0000
#>   Sole       0.00000    0.000000    0.0000    0.00000    0.00000    0.0000
#>   Gurnard    0.00000    0.000000    0.0000    0.00000    0.00000    0.0000
#>   Plaice   112.94329  110.995856  105.1198   94.12886   76.57458   50.6965
#>   Haddock  272.59384  284.703986  291.5855  291.01013  280.18558  255.6396
#>   Cod     1636.91676 1836.752084 1974.4133 1903.81913 1806.51987 1867.9509
#>   Saithe   871.87162  853.971385  859.8834  922.93544 1007.07609 1096.9705
#>          w
#> sp              2810      3350       4000     4780     5700     6800     8120
#>   Sprat      0.00000    0.0000    0.00000    0.000    0.000    0.000    0.000
#>   Sandeel    0.00000    0.0000    0.00000    0.000    0.000    0.000    0.000
#>   N.pout     0.00000    0.0000    0.00000    0.000    0.000    0.000    0.000
#>   Herring    0.00000    0.0000    0.00000    0.000    0.000    0.000    0.000
#>   Dab        0.00000    0.0000    0.00000    0.000    0.000    0.000    0.000
#>   Whiting    0.00000    0.0000    0.00000    0.000    0.000    0.000    0.000
#>   Sole       0.00000    0.0000    0.00000    0.000    0.000    0.000    0.000
#>   Gurnard    0.00000    0.0000    0.00000    0.000    0.000    0.000    0.000
#>   Plaice    14.36463    0.0000    0.00000    0.000    0.000    0.000    0.000
#>   Haddock  213.08111  147.2376   51.65954    0.000    0.000    0.000    0.000
#>   Cod     1998.48840 2145.1137 2292.18471 2432.926 2561.551 2671.428 2754.547
#>   Saithe  1187.60744 1276.1291 1359.81220 1435.661 1500.371 1550.390 1582.007
#>          w
#> sp            9690    11600    13800    16500    19600    23400     28000
#>   Sprat      0.000    0.000    0.000    0.000    0.000    0.000    0.0000
#>   Sandeel    0.000    0.000    0.000    0.000    0.000    0.000    0.0000
#>   N.pout     0.000    0.000    0.000    0.000    0.000    0.000    0.0000
#>   Herring    0.000    0.000    0.000    0.000    0.000    0.000    0.0000
#>   Dab        0.000    0.000    0.000    0.000    0.000    0.000    0.0000
#>   Whiting    0.000    0.000    0.000    0.000    0.000    0.000    0.0000
#>   Sole       0.000    0.000    0.000    0.000    0.000    0.000    0.0000
#>   Gurnard    0.000    0.000    0.000    0.000    0.000    0.000    0.0000
#>   Plaice     0.000    0.000    0.000    0.000    0.000    0.000    0.0000
#>   Haddock    0.000    0.000    0.000    0.000    0.000    0.000    0.0000
#>   Cod     2801.255 2800.051 2737.398 2597.556 2362.395 2011.133 1519.8699
#>   Saithe  1591.399 1574.553 1526.909 1442.593 1313.140 1125.761  861.3869
#>          w
#> sp           33400        39900
#>   Sprat     0.0000 0.000000e+00
#>   Sandeel   0.0000 0.000000e+00
#>   N.pout    0.0000 0.000000e+00
#>   Herring   0.0000 0.000000e+00
#>   Dab       0.0000 0.000000e+00
#>   Whiting   0.0000 0.000000e+00
#>   Sole      0.0000 0.000000e+00
#>   Gurnard   0.0000 0.000000e+00
#>   Plaice    0.0000 0.000000e+00
#>   Haddock   0.0000 0.000000e+00
#>   Cod     860.6838 2.037268e-10
#>   Saithe  492.8864 0.000000e+00
# }