← Back to all sparks
M

mizer

ANALYTICS
Velocity5.0

Dynamic Multi-Species Size Spectrum Modelling

After two and a half years dormant, mizer shipped three major versions in seven weeks.

size-spectrum-modellingmarine-ecologynumerical-methodsextension-frameworkr-package
Current state
The size-spectrum fish modelling package sat at 2.5.0 from December 2023 until June 2026, then released 3.0.0, 3.1.0 and 3.2.0 in the space of seven weeks. The three releases divide cleanly: 3.0.0 added biological realism through a diffusion term in the McKendrick-von Foerster equation, 3.1.0 added an opt-in second-order numerical scheme in size, and 3.2.0 rebuilt how species and resource parameters are set. Backward compatibility is handled carefully throughout — the experimental scheme is off by default and the first-order path is byte-identical to previous versions.
Where it's heading
Two threads run through the 3.x line. The first is numerical: diffusion, then higher-order accuracy in both size and time, with explicit warnings that enabling them shifts diagnostics and may require recalibration. The second is making the package composable — extensions now work regardless of load order, and parameter assignment propagates to the derived rate arrays instead of being silently discarded. That second thread reads as the more consequential one: the 3.2.0 notes describe scalar edits that previously vanished and now accumulate, which is the kind of fix that changes what published model configurations actually computed.
Prediction
Expect the experimental second-order scheme to move toward default-on once recalibration guidance exists, and the patch line to keep absorbing the documentation and website gaps that 3.2.1 started on.

Recent moves

  1. 15d ago

    pkgdown index fix for a man page added after the 3.2.0 build

    Indexes print.mizer_plot in _pkgdown.yml so the website build stops aborting on a missing topic. Documentation infrastructure only, with no effect on model behavior.

    View source ↗
  2. 25d ago

    Parameter assignment rebuilds derived rates; extensions compose in any load order

    Assigning to resource_params() now immediately rebuilds the size-dependent rate and capacity arrays from the scalars while leaving manually frozen arrays alone, which means edits to r_pp and n take effect instead of being silently discarded, and successive edits accumulate rather than overwrite. The extension framework became composable regardless of load order, and adjustSizeGrid() was added. The silent-discard fix is the one with retrospective consequences for anyone who tuned those scalars and assumed they landed.

    View source ↗
  3. 1mo ago

    Opt-in second-order accurate scheme in the size variable

    Adds an experimental second-order finite-volume scheme in w behind a new second_order_w slot, plus higher-order time-stepping options. It is off by default and the first-order path stays byte-identical, so existing results are untouched; enabling it shifts size-integrated diagnostics by order delta-w and may require recalibrating a tuned model. A careful way to ship a numerics change into a field where published models depend on reproducibility.

    View source ↗
  4. 2mo ago

    Diffusion enters the McKendrick-von Foerster equation, ending a two-year gap

    ⚡ SPARK

    The release that restarted the project and set up the 3.x line, adding individual growth variability to the core equation alongside the composable extension framework that 3.2.0 later completed. Everything shipped since builds on the structures introduced here.

    View source ↗
  5. 2y ago

    External encounter rate, and a split between given and calculated parameters

    Adds setExtEncounter() for food a predator encounters outside the modelled system, mirroring how external mortality already worked, and separates given_species_params() from calculated_species_params() so modellers can see what they specified versus what mizer defaulted. Requires upgrading stored objects. The given-versus-calculated split anticipates the parameter-propagation work that 3.2.0 finished.

    View source ↗
  6. 3y ago

    w_inf renamed to w_max to separate maximum size from von Bertalanffy asymptotic size

    A breaking rename that reserves w_inf for the von Bertalanffy asymptotic size and moves maximum size to w_max, with upgradeParams() copying values across automatically. The notes warn that copied values may need manual review or predicted size distributions will be wrong — a terminology correction with real numerical consequences for existing models.

    View source ↗