Events

This page lists all the events that can be triggered in APSIM NG. Events are used to signal when certain actions should be performed within the simulation, allowing for a structured and organized approach to model execution.

Events are listed according the model that triggers them.

Simulation

Event Description
Commencing Invoked when simulation is about to commence before DoCommence event, giving all models a chance to initialise their state.
DoCommence Invoked to signal start of simulation after Commencing event.

Clock

The Clock model triggers events in a specific order during simulation execution. Events are organized by their timing within the simulation lifecycle.

Start of Simulation

Events that occur once at the beginning of the simulation:

Event Description
DoInitialSummary Occurs at start of simulation to make the initial summary.
StartOfSimulation Occurs once at the start of the simulation.
FinalInitialise Final Initialise event. Occurs once at start of simulation.
StartOfFirstDay Occurs once at the start of the first day of the simulation.

Daily Loop

Events that occur each day in calling order:

Daily Initialization

Event Description
DoCatchYesterday Occurs first each day to allow yesterdays values to be caught.
DoWeather Occurs each day to calculate weather.
DoDailyInitialisation Occurs each day to do daily updates to models.
StartOfDay Occurs at start of each day.

Conditional Daily Events

Event Description
StartOfMonth Occurs at start of each month (if 1st day).
StartOfYear Occurs at start of each year (if 1st day of year).
StartOfWeek Occurs at start of each week (if Sunday).

Management and Soil Processes

Event Description
DoManagement Occurs each day to do management actions and changes.
DoFertiliserApplications Invoked to perform all fertiliser applications.
DoPestDiseaseDamage Occurs to do Pest/Disease actions.
DoEnergyArbitration Occurs when the canopy energy balance needs to be calculated with MicroClimate.
DoSoilErosion Occurs to tell soil erosion to perform its calculations.
DoSoilWaterMovement Occurs each day to do water calculations such as irrigation, swim, water balance etc.
DoSoilTemperature Occurs to perform soil temperature calculations to do solute processes.
DoSolute Occurs each day for solute processes.
DoSurfaceOrganicMatterPotentialDecomposition Occurs each day to perform daily calculations of organic soil matter.
DoSoilOrganicMatter Occurs each day to perform daily calculations of organic soil matter.
DoSurfaceOrganicMatterDecomposition Occurs each day to do the daily residue decomposition.

Plant Growth and Development

Event Description
DoUpdateWaterDemand Occurs each day to do daily growth increment of total plant biomass.
DoDCAPST Occurs each day when dcaps performs its calculations. This must happen between DoPotentialPlantGrowth and DoPotentialPlantPartitioning.
DoWaterArbitration Occurs each day to do water arbitration.
PrePhenology Occurs between DoWaterArbitration and DoPhenology. Performs sorghum final leaf no calcs.
DoPhenology Occurs each day to perform phenology.
DoPotentialPlantGrowth Occurs each day to do potential growth.
DoPotentialPlantPartioning Occurs each day to do the water limited dm allocations. Water constraints to growth are accounted for in the calculation of DM supply and does initial N calculations to work out how much N uptake is required to pass to SoilArbitrator.
DoPastureWater Initiates water calculations for the Pasture model.
DoNutrientArbitration Occurs each day to do nutrient arbitration.
DoActualPlantPartioning Occurs each day to do nutrient allocations.
DoActualPlantGrowth Occurs each day to do actual plant growth (nutrient limited).
PartitioningComplete Occurs each day to finish partitioning.

Daily Finalization

Event Description
DoStock Occurs each day to process stock methods in GrazPlan Stock.
DoLifecycle Occurs each day to process a Pest and Disease lifecycle object.
DoUpdate Occurs near end of each day to do checks and finalising.
DoManagementCalculations Occurs each day after the simulation is done. Does management calculations.
DoEndPasture Occurs after pasture growth and sends material to SOM.
DoReportCalculations Occurs when do report calculations.

End of Period Events

Event Description
EndOfWeek Occurs at end of each week (if Saturday).
EndOfYear Occurs at end of each year (if 31 Dec).
EndOfMonth Occurs at end of each month.

Daily End

Event Description
EndOfDay Occurs at end of each day.
DoReport Occurs at end of each day for daily reporting.

End of Simulation

Events that occur once at the end of the simulation:

Event Description
EndOfSimulation Occurs at end of simulation.

Plant

At Sow

Event Description
Sowing Occurs when a plant is about to be sown.
PlantSowing This event is triggered when a plant is sown. It allows the model to initialize or reset any relevant state information related to the sowing process.

At Harvest

Event Description
Harvesting Occurs when a plant is about to be harvested so that values can be reported.
PostHarvesting Occurs when a plant is harvested, this event should trigger functions that remove biomass from organs and reset values.

At EndCrop

Event Description
PlantEnding Occurs when a plant is ended via EndCrop.

At PhaseChanged

Event Description
Flowering Occurs when a plant is about to flower.
StartPodDevelopment Occurs when a plant is about to start pod development.

GerminatingPhase

Event Description
SeedImbibed This event is raised when germination occurs by GerminatingPhase, signaling other models or processes to begin their activities related to the germinated seed.

Phenology

Event Purpose
PhaseChanged Indicates a new phase has started
PlantEmerged Signals that the emergence phase has been completed
StageWasReset Signals a manual reset of stage via SetToStage()
PostPhenology Raised after daily phenological timestep completes

BiomassRemovalEvents

Event Purpose
Cutting Raised when a cutting event occurs, typically to simulate mechanical removal of plant biomass.
Grazing Raised when a grazing event occurs, representing animal consumption of plant material.
Pruning Raised when a pruning event occurs, representing manual or mechanical removal of plant parts.
Harvesting Raised when a harvesting event occurs, representing the collection of crop yield.
EndCrop Raised when a crop is ended, signaling the termination of the crop’s lifecycle.