PhaseLookup

PhaseLookup selects a value based on the current growth phase of the crop. It allows users to define different function values for different stages of development (e.g., vegetative, flowering, grain filling), and outputs the value corresponding to the current phase.

Overview

This function is used to dynamically select a value during simulation depending on which growth phase the crop is currently in. It is typically used when a biological response or parameter changes depending on the stage of development.

For example, you may want thermal time accumulation, stress response, or nutrient demand to behave differently in vegetative versus reproductive phases. PhaseLookup works like a switch that returns the appropriate value based on which phase the crop is currently in.

Model Structure

This section describes how this model is positioned within the APSIM framework. It outlines the broader structural and computational components that define its role and interactions in the simulation system.

This model inherits structural and functional behaviour from the following core APSIM components:

This function inherits from the following parent classes:

Connections to Other Components

This section describes how the model interacts with other components in the APSIM Next Generation framework.
These connections allow the model to exchange information—such as environmental conditions, developmental stage, or physiological responses—with other parts of the simulation system. For a general overview of how model components are connected in APSIM, see the Connections Overview.

Component Model Connection Type Description
PhaseLookupValue PhaseLookupValue Children One or more child models, each defining a value for a specific phase range.
Phenology Phenology Link (via children) Provides current growth stage information to determine which phase is active.

Model Variables

This section lists the key variables that describe or control the behaviour of this component. Some variables can be adjusted by the user to modify how the model behaves (configurable), while others are calculated internally and can be viewed as model outputs (reportable). For a general explanation of variable types and how they are used within the APSIM Next Generation framework, see the Model Variables Overview.

Configurable and Reportable Properties

No configurable properties are available for this function.

Read-Only Reportable Properties

Property Type Description
Value double The sum of values from all child functions.

Processes and Algorithms

This section describes the scientific processes and algorithms represented by this component. Each process corresponds to a biological, physical, or chemical mechanism simulated during a model time step. Where appropriate, equations or conceptual summaries are provided to explain how the process operates within the APSIM Next Generation framework.

Phase-Based Value Selection

The PhaseLookup function evaluates all its child PhaseLookupValue models in sequence. For each child:

  1. Check if the crop is currently between the child’s defined Start and End stages.
  2. If yes, return the value from the first matching child and stop checking further.
  3. If no phase matches any of the child PhaseLookupValue models, return 0 by default.

The logic can be expressed as:

\[ V = \begin{cases} V_i & \text{if crop is in phase range } i \\ 0 & \text{if no match} \end{cases} \]

where \(V\) is the returned value and \(V_i\) is the value from the \(i\)-th PhaseLookupValue child.

Key Behavior: The function returns the value from the first matching child and stops evaluation. This means the order of child PhaseLookupValue models matters if there are overlapping phase ranges.

Each PhaseLookupValue child defines: - Start phase name: The beginning of the active phase range - End phase name: The end of the active phase range - A value or function: What to return during that phase range (defined as a child of the PhaseLookupValue)

User Interface

PhaseLookup can be added as a child of any node in the model tree. Right-click the parent node, select “Add Model…”, and search for PhaseLookup in the Filter Box. A symbol for the PhaseLookup is displayed in the user interface to represent the function.

Practical Example

In a crop model, you may want a function to return a higher value during vegetative growth and a lower value during reproductive stages. You would use:

  • PhaseLookup as the parent function.
  • Two children of type PhaseLookupValue:
    • One active from Emergence to FloralInitiation, returning a value of 1.0
    • Another from FloralInitiation to Maturity, returning a value of 0.5

This setup allows the model to adjust behavior based on phase without writing additional logic elsewhere. For instance, this could be used to model radiation use efficiency that decreases after floral initiation, or nitrogen demand that varies between growth stages.

See Also