Skip to content

Releases: razinkele/PyPath

v0.4.0 — Smelt IBM Early Life Stages

22 Mar 20:16

Choose a tag to compare

Smelt IBM Early Life Stages — Complete Lifecycle Model

This release adds mechanistic early life stages to the PyPath SmeltIBM, creating the first complete lifecycle individual-based model for European smelt (Osmerus eperlanus) in Python.

New Features

Package 1: Egg Stage

  • Temperature-dependent degree-day development (DD_hatch=149 °C·day, Keller et al. 2020)
  • 3-source mortality: thermal, oxygen, background
  • Per-zone spawning deposition with configurable cohort limits

Package 2: Yolk-Sac Stage

  • Q10-scaled basal metabolism yolk depletion
  • First feeding transition with point-of-no-return (PNR) starvation
  • Cushing match/mismatch now emergent from mechanistic processes

Package 3: Larval Bioenergetics

  • Thornton-Lessem (Fish Bioenergetics 3.0) temperature dome for Cmax
  • Ontogenetic sigmoid interpolation: Rs+Ra metabolism, size-dependent assimilation efficiency
  • Consumption blending: concentration-dependent Type II → adaptive foraging

Package 4: Oxygen Physiology

  • Full lifecycle Pcrit-based metabolic scope reduction (4.0→2.0 mg/L)
  • Lethal thresholds for eggs, yolk-sac larvae, and feeding larvae
  • Stress-accelerated yolk depletion under hypoxia

Package 5: Curonian Lagoon Zonal Model

  • 3-zone spatial: river spawning / lagoon nursery / coastal feeding
  • Zone-specific environmental forcing
  • Passive drift, ontogenetic habitat constraints, spawning migration

Package 6: Calibration Framework

  • calibrate_els() — differential evolution for ELS parameters
  • lhs_sensitivity() — Latin Hypercube Sampling
  • partial_rank_correlation() — PRCC sensitivity analysis

Stats

  • +2,340 lines of new code across 13 files
  • 229 IBM tests (162 original + 67 new), 1,502 total tests, 0 failures
  • Fully backward compatiblebaltic_defaults() unchanged, all v0.3.x tests pass

New API

from pypath.ibm import SmeltParams, SmeltIBM, EggParams, YolkSacParams, LarvalParams, OxygenParams, ZoneParams

# Enable early life stages
params = SmeltParams.baltic_defaults_els()

# Or customize
params = SmeltParams.baltic_defaults()
params.egg = EggParams(dd_hatch=149.0)
params.yolk_sac = YolkSacParams(initial_yolk_kj=0.15)
params.larval = LarvalParams(rs_a_larval=0.12)
params.oxygen = OxygenParams(pcrit_adult=2.0)

References

  • Drewes et al. (2025) Ecological Modelling 510:111313
  • Keller et al. (2020) J Fish Biol 97(2):368-381