Repository navigation
Release Notes OSMOSE 4.4.0
This release introduces major architectural improvements, new biological capabilities, expanded economic modeling, and significant refactoring of internal processes, especially:
- Background species system overhaul
- Region‑aware mortality
- Fishing & discards tracked in numbers
- Maturity ogive (stochastic reproduction) (see here for details)
- New egg size bioenergetics formulation
- Reworked restart logic
- Large configuration key migration
- Simplified bioenergetics computation when lack of data (see Simplified Bioenergetics)
- Post-reproduction mortality (see here)
These changes modernize the modeling framework and extend its biological, ecological, and economic realism.
| Old Key | New Key |
|---|---|
simulation.bioen.enabled |
module.bioenergetics.enabled |
simulation.genetic.enabled |
module.genetics.enabled |
fisheries.enabled |
module.multispecies.fisheries.enabled |
economy.enabled |
module.bioeconomics.enabled |
| Old Key | New Key |
|---|---|
output.restart.enabled |
simulation.restart.enabled |
output.restart.recordfrequency.ndt |
simulation.restart.recordfrequency.ndt |
output.restart.spinup |
simulation.restart.spinup.nyear |
| Old Key | New Key |
|---|---|
predation.ingestion.rate.max.bioen.spX |
predation.ingestion.rate.max.spX |
predation.coef.ingestion.rate.max.larvae.bioen.sp |
predation.larval.ingestion.rate.increase.ratio.spX |
species.bioen.maturity.eta.spX |
species.maturity.eta.spX |
species.bioen.maturity.r.spX |
species.maturity.r.spX |
species.bioen.maturity.m0.spX |
species.bioen.maturity.m0.spX |
species.bioen.maturity.m1.spXX |
species.maturity.m1.spX |
These renames are mandatory for existing configurations.
-
species.reproduction.strategy.sp#=iteroparousorsemelparous -
species.reproduction.postspawning.survivaltime.sp#= post-reproduction survival time (in years). Used only forsemelparous
-
simulation.fixed.seed.enabled: used to control the stochasticity of a simulation and allow replicable runs -
simulation.nschool.multiplier: Parameter to multiply the number of schools for all species (default one):
See here for details
-
species.maturity.mode: controls whether stochastic (stochastic) or deterministic (legacy) production is used. -
species.maturity.l50.sp#: mean of the gaussian -species.maturity.l75.sp#
-
species.egg.density.sp#: density of eggs (in$g.cm^{-3}$ ) used to compute length from weight.
-
species.multiplier.sp#: multiplier to control background species biomass -
species.multiplier.log.sp#: multiplier to control background species biomass (in log value)
-
movement.randomwalk.range.sp#: allow to specify the range of random walk for background species. -
movement.netcdf.enabled: allow map distributions from NetCDF for Background species
The bioeconomic module is now functional. Parameters are fully described here
species.stock.elasticity.sp#baseline.costs.t0.sp#price.time.trend.sp#species.consumption.elasticity.sp#species.sizeconsumption.elasticity.sp#species.size.preference.sp#weight.fish.consumptionsubstitution.elasticityelasticity.demand.fish
See details here
-
movement.random.walk.coef.sp#: Random walk coefficient (between 0 and 1) -
movement.base.search.radius.sp#: perception (integer, ranging from 1 to 0)
-
simulation.resources.computePercent.legacy: if set to True, the LTL percentage that is eaten by a school is computed based on the original linear relationship. Else, it will use a$\log$ relationship.
Parameters to control whether a simplified bioenergetic implementation should be used (see here for details)
-
species.bioenergetics.model.sp:fullorsimple predation.efficiency.critical.spXspecies.temperature.tmin.spXspecies.temperature.tmax.spXspecies.temperature.topt.spXpredation.ingestion.rate.max.spX
- Gradient based spatial distribution has been included (Gradient based movements)
- Possibility to use a log version of the
computePercentmethod
Mortality is now tracked per output region. Arrays such as nDead and ageDeath are now 2‑dimensional: [region][mortality_cause].
Fishing/discard tracking moved from biomass to abundance:
-
fishedBiomass→fishedAbundance -
discardedBiomass→discardedAbundance - Biomass now computed on demand using abundance × mass functions.
A new full subsystem handles background species:
- Background schools are now real “schools” integrated into the simulation
- Background movement powered by maps (CSV/NetCDF)
- New classes for background distribution and filtering
- Background schools populate the grid using class-based biomass and spatial maps
- Full per-timestep movement/redistribution support
- Consistent inclusion of background schools in outputs
Optional probabilistic (not deterministic) maturity (see here for details):
- Uses parameters
species.maturity.l50.sp#&species.maturity.l75.sp# - A normal CDF calculates probability of maturing between timesteps
- Once mature, always mature
Under the bioenergetics module:
- Egg size uses a spherical egg model based on density
- New config key:
species.egg.density.sp#
This replaces the adult-coefficient-based egg mass–length conversion.
Economic modelling expanded significantly:
- Harvesting costs
- Consumer utility of fish consumption
- Species & size‑class prices
- Profit and profit margin
- Multi‑elasticity modeling
- Multi‑dimensional harvested/accessible biomass arrays:
[fishery][species][size-class]
New parameters include elasticities, cost time trends, size preferences and more.
- Restart keys migrated to
simulation.restart.* - Intelligent fallback between plain and per-rank files
- Required global attribute in restart NetCDF:
step - Improved error messages
simulation.fixed.seed.enabled enforces reproducible random number generation for:
- Movement
- Reproduction
- Genetics
- Resource forcing
- Fishing selectivity
Default chunking now uses the standard NetCDF-4 chunking strategy for improved performance.
Refactor ensures consistent treatment of background schools in spatial, fisheries, mortality, and predator-prey outputs.
-
fishedBy()/discardedBy()replaced byfishedNBy()/discardedNBy() - Fishing inputs/outputs now primarily use numbers, not biomass
incrementNdead() now requires the timestep:
incrementNdead(MortalityCause cause, double nDead, int timeStep)nDead, ageDeath, caught fish, discards, mortality outputs and other arrays now include a region dimension.
Restart files missing this field will cause the simulation to abort.
Old keys will not work without migration.
Existing background configurations relying on older semantics may need adjustment.
A very large subsystem rewrite:
-
BackgroundProcessexecutes each timestep -
BackgroundMapDistributioncontrols school movement -
BackgroundMapSethandles map loading (CSV/NetCDF) - Schools moved to cells via probability maps
- Schools reinitialized/reset when maps change
- Background species are tracked with real biomass × class distributions
This will impact any tool, plugin, or analysis code accessing background species.
New abstract methods required in AbstractSchool / IAggregation:
isMature()isAlive()getClassIndex()isOut()
Plus new utilities:
resetAccessiblePreyIndex()addAccessiblePreyIndex()getAccessiblePreyIndex()
Internal arrays:
-
nDeadandageDeathbecome 2D arrays[region][cause].
- Many key comparisons now use
equalsIgnoreCase() - Path resolution uses
getAbsolutePath()instead ofgetCanonicalPath()(fix for Windows) - Restart key structure updated
- More defensive parsing for command-line arguments
Developers integrating with the economy module must update:
- New matrices for biomass accessibility and harvest
- New cost and price calculations
- Multi-parameter elasticity and preference models
- Utility & profit functions rewritten
- Many new configuration points
- Genetic diversity and trait values may now be restored from restart files
- Population initialization more modular
- Schools created during reproduction have improved genetic initialization logic
- Correction of the
BiomassDietStageOutput.writemethod. There was a bug in the indexing during the conversion from 2D to 1D. - In
SimulationStep,movementProcess.run()is now called beforeindicators.initStep(). This in order to make sure that the initial biomass is always less than the total predated biomass. - In spatial outputs (
SpatialAbundanceOutput.javaandSpatialBiomassOutput.java), only cut-off ages were working, not cut-off length. This has been corrected. - Correction in MPA initialization when using restart files. In some cases, the
isUpToDatevariable of thesetMPAmethod was alwaystrue, therefore the fishing effort was never modified. Besides, MPA index as defined in the configuration files (.mpaXX) were expected to start from 0 onward. Now any index can work, as for species. - Correction in the reading of files from regular expressions. Canonical path was replaced by absolute paths to make it work on Windows
- Correct a bug in
SurveysandOutputRegion. When school was out of the domain, the code crashed. Fixed by assuming that outside schools are out of the survey region. - Correct a bug in the
NetcdfPopulator.javawhen genetic is enabled. The genotype was not instanciated. - Correct a bug in the
RelativeBiomassPopulator.javawhen genetic and/or bioenegetic was on. Genotype was not instanciated and maturity and gonadic weight were not initialized - Species name validation now supports hyphens
| Category | Summary |
|---|---|
| New Features | Region‑specific mortality, stochastic maturity ogive, density-based egg size, background movement maps, expanded bioeconomics |
| Breaking Changes | New fishing/discard APIs, mortality API requires timestep, config key renames, restart requirements, region dimension added |
| Behavioral Changes | NetCDF chunking change, background school process rewrite, new maturity logic, numbers-based fishing |
| Developer Refactors | Background species subsystem, economy engine, school interface changes, initialization/restart logic |
| Bug Fixes | Improved validation, safer parsing, corrected map logic, more robust biomass and egg handling |
- Region‑specific mortality
- Fishing/discards tracked in numbers
- Background school overhaul (movement maps, biomass classes)
- Stochastic maturity ogive (L50/L75)
- Egg size from spherical-density model
- Bioeconomics: costs, utility, prices, profit
- Config key migration to module.* and simulation.restart.*
- Restart requires global attribute 'step'
- NetCDF chunking uses 'standard' by default
- New end-to-end calibration workflow: add setup, test, run-model, and check utilities for OSMOSE calibrations, including automatic generation of parameter bounds/templates and observed-data scaffolding.
- Much richer output handling: improved reading/structuring of fishery & survey outputs, including by-fishery-by-species arrays, time/class aggregation, and functional group rollups.
-
Major
get_var()upgrade: new subsetting, safer behavior, and replicate sampling features make extraction of outputs more flexible and robust.
A complete set of calibration utilities was added, centered around:
-
osmose_calibration_setup()Creates a calibration directory structure, writes guess/min/max/phase parameter files, installs scripts/templates, runs pre-flight model checks, and creates (or consumes) observed-data templates plus calibration settings. -
osmose_calibration_test()Runs automated tests (data compatibility + sequential and parallel “smoke tests”) to validate that the calibration environment is correctly configured. -
osmose_calibration_runmodel()Runs the calibration-ready model using the calibration directory and parameter sets, with safeguards against mixing calibrated vs non-calibrated parameters. -
osmose_calibration_check()Re-runs the model with best parameters from results/restart and returns a calibration object combining simulated/observed/settings/cv. -
osmose_calibration_outputs()Produces a curated list of calibration-ready outputs (surveys, landings, catch-at-length, penalties for growth/mortality/collapse/outburst, etc.).
New helpers make it easier to transform, replicate, and write parameter sets:
- Parameter manipulation & transformations:
-
set_par(),transform_par(),replicate_par() -
logit(),ilogit()helpers
-
- Parameter extraction logic for calibration/grouped parameters:
-
get_par2(),get_par_phase(),get_calibration_parameters(),get_osmose_parameter()
-
- Writers:
-
write_osmose_parameter()(writes guess/min/max/phase entries for a parameter block)
-
- Calibration settings creators:
-
.create_calibration_settings()plus type-specific helpers (simple/survey)
-
New head.* and tail.* methods preserve OSMOSE output class when slicing:
-
tail.osmose.biomass,tail.osmose.abundance,tail.osmose.yield,tail.osmose.yieldN -
head.osmose.biomass,head.osmose.abundance,head.osmose.yield,head.osmose.yieldN
A new internal check warns when egg density appears unrealistic:
-
.check_density()computes density from egg weight and egg size and emits warnings for “lower than seawater”, “abnormal”, or “wrong” density ranges.
- New argument
bySurvey(in addition tobySpecies) supports more structured output folder parsing. - Combined grouping (
bySpecies + bySurvey) is supported, with logic based on how many “grouping dimensions” are requested. - Returns
NULLwhen no matching files exist, avoiding downstream failures.
New NetCDF-based fishery outputs are supported and integrated:
- Added reading/representation of:
-
yieldByFisheryBySpecies,yieldNByFisheryBySpecies,accessibleBiomassByFishery
-
- New reshaping and aggregation helpers:
-
.reshapeFishery()(withby="fishery"|"species"andaggregate=TRUE/FALSE) - Aggregations across time/class/year:
-
.aggregate_catch_bytime(),.aggregate_catch_byclass(),.aggregate_catch_byyear()
-
-
- New “observed.*” fields are produced from reshaped fishery catches (e.g.,
observed.landings,observed.discards) to feed calibration workflows.
- Survey outputs now support
bySurveyand include additional survey datasets (e.g., mortality/predator pressure) where available. - Survey outputs can be filtered to their target species based on config.
- CSV readers now fail gracefully and return
NULLon read errors instead of erroring. - NetCDF reader
.read_osmose_ncdf()was hardened:- uses
try(nc_open(...))and returnsNULLif opening fails - adds dimension names (
time,species,fishery,replicates) and handlesspecies_names/fisheries_namesattributes
- uses
get_var.osmose() now supports:
- hierarchical subsetting:
-
sp,srv,fsharguments for species / survey / fishery selection
-
- safer behavior:
-
no.error=TRUEreturnsNULLinstead of throwing when variables are missing
-
- output shaping and replicate sampling:
-
drop,size,random,replacefor slicing/sampling replicates
-
- new generic helpers/methods:
-
get_var.default(),get_var.osmose.calibration(),get_var.list,get_var.NULL
-
Potential breaking change: code that relied on
get_var()erroring on missing variables may need updates ifno.error=TRUEis used or propagated.
-
plot.osmose()now passes derived metadata (initialYear,freq) when plotting extracted variables, improving plot correctness for time axes.
-
print.osmose()now prints model name/version from configuration, replicate count, species list, and a compact list of available outputs (excluding empty/system fields).
-
cacheManager,cachePath,flushCache,updateCachewere refactored:- consistent
TRUE/FALSE, clearer assignments, explicitreturn(invisible(NULL)) - updated jar URL naming consistency for 4.3.2/4.3.3 entries
- consistent
- Version validation now accepts
X.Y.Z.Win addition toX,X.Y,X.Y.Z.
- New
.trim_matrix()drops trailing all-NAcolumns more safely when reading some outputs.
- Author name capitalization normalized (e.g., “Nicolas BARRIER”).
- Roxygen imports expanded (notably
utils::relist/as.relistableand severalcalibrarfunctions).
-
Fishery outputs: previous
yieldByFisherystructures are replaced/extended by new arrays and reshaped derivatives (landingsBy*,discardsBy*, etc.). If you depended on legacy fields, update to the new names. -
readOsmoseFiles()grouping: introducingbySurveychanges how files can be grouped/parsed; calling code may need to specifybySpecies/bySurveyexplicitly. -
get_var()signature expanded: if you were using...forwarding intoget_var.osmose()you may want to ensure no name collisions with new formal args (sp,srv,fsh,size, etc.).