
ThreeHourAirTemperature
The ThreeHourAirTemperature function provides 3-hourly estimates of air temperature by interpolating between daily maximum and minimum temperatures using a sinusoidal method.
Overview
ThreeHourAirTemperature is used to generate sub-daily (3-hourly) air temperature values from daily weather data. This is important for models that require finer temporal resolution of temperature, such as those simulating plant or soil processes sensitive to diurnal temperature variation.
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:
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 |
|---|---|---|---|
| MetData | IWeather | First Available | Provides daily maximum and minimum air temperatures from weather data. |
| SubDailyInterpolation | SubDailyInterpolation | Parent | Parent model that utilizes this interpolation method. |
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.
Read-Only Reportable Properties
| Property | Type | Description |
|---|---|---|
| OutputValueType | string | The type of variable for sub-daily values as air temperature |
| SubDailyValues | double[] | Array of interpolated 3-hourly air temperature values for the day. |
Events
This section describes the events associated with this component. Events are signals or notifications that indicate when a particular process occurs within the simulation, or when a component needs to respond to a change in another part of the system. Some events are listened for by this component to trigger its processes, while others are raised to inform other components about changes. For a general overview of how APSIM Next Generation uses events to coordinate processes between components, see the Events Overview.
Events Listened For
These are signals or notifications that the function listens for from other parts of the simulation:
| Event | Purpose |
|---|---|
| Commencing | Calculate \(\text{TRF}_p\) at starting of simulation |
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.
Sub-Daily Temperature Interpolation
The 24-hour day is divided into 8 equal 3-hour periods. For each period \(p \in \{1, 2, \dots, 8\}\), a temperature range factor \(\text{TRF}_p\) is calculated as:
\[ \text{TRF}_p = 0.92105 + 0.1140p - 0.0703p^2 + 0.0053p^3 \]
These factors represent the proportion of the daily diurnal range \((T_\text{max} - T_\text{min})\) added to the daily minimum temperature to estimate sub-daily temperatures.
For each 3-hour interval \(p\), the temperature \(T_p\) is computed as:
\[ T_p = T_\text{min} + \text{TRF}_p \cdot (T_\text{max} - T_\text{min}) \]
Where:
- \(T_\text{min}\): Minimum air temperature for the day
- \(T_\text{max}\): Maximum air temperature for the day
- \(\text{TRF}_p\): Temperature range factor for period \(p\)
User Interface
ThreeHourAirTemperature only can be added as a child of a SubDailyInterpolation node in the model tree. Right-click the parent node, select “Add Model…”, and search for ThreeHourAirTemperature in the Filter Box.
Practical Example
If the daily temperature ranges from 10 °C to 30 °C, and you want the interpolated value for whole day, the function will calculate the 3-hourly temperatures as follows:
- Compute the range: \(T_\text{max} - T_\text{min} = 20\) °C.
- Compute \(\text{TRF}_3\) at period \(p = 3\):
\[ \text{TRF}_3 = 0.92105 + 0.1140 \cdot 3 - 0.0703 \cdot 3^2 + 0.0053 \cdot 3^3 = 0.77345 \]
- Compute sub-daily temperature:
\[ T_3 = 10 + 0.77345 \cdot 20 = 25.469^\circ \text{C} \]
See Also
- Source code: ThreeHourAirTemperature.cs on GitHub