The APSIM Meteorological Data Module (Met)

 

Description

The APSIM Met module provided daily meteorological information to all modules within an APSIM simulation. Encapsulating the functionality of meteorological data provision in a single module will allow further enhancement of this important component of agricultural production systems simulation.

Operation

The APSIM Met module is operated in a way similar to other APSIM modules. The specification of this module in the simulation control file, and its parameters in the parameter files follow normal APSIM module protocols.

Parameter file settings

The APSIM Met Module requires parameters to specify the climate of the site for each APSIM time step. This information is included in a ‘ weather' , or ‘ met' , file. Climate information can exist in the met file either of two formats: Keyword or Column format.

 

Keyword Climate Constants

Climate information for the simulation site that is independent of time can be specified at the top of the data section using standard APSIM keyword syntax. Examples of data that is specified in this manner are shown in the example below.

 

Time step Column Values

Information that needs to be specified for each APSIM time step can be arranged in space-delimited columns. The data columns can be arranged in any order and contain any data of any type. The line following the list of column names must be followed by a line containing the units, in brackets ‘ ()' , for the information in each column.

 

The only restraints are as follows

AN EXAMPLE

The control file would require a specification such as

 

[apsim.sample simulation]

module = clock sample.par[all_treatments]

module = report sample.par[all_treatments]

module = met sample.met[toowoomba]

.

.

 

 

The file “sample.met” could then have the following:-

 

[toowoomba.met.weather]

site = toowoomba

latitude = -26.8 (degrees)

 

year day radn maxt mint rain

() () (MJ/m2) (oC) (oC) (mm)

1996 65 20 29 20.5 0

1996 66 20 29 20 0

1996 67 20 29 21 0

1996 68 20 22.5 20 0

1996 69 20 27.5 18.5 0

. . . . . .

. . . . . .

. . . . . .

 

Module Output Variables

 The APSIM Met Module can provide the values of several state variables for reporting to an output file or use by other modules.

 

Name

Units

Description

keyword

as specified

Each keyword climate constant is

available for output by the user.

Column name

as specified

Each column data field is available

for output by the user. The value

for the current simulation timestep

will be returned. The time

specifiers (ie day, year,

day_of_month, month) are not

available for output.

Day_length

hours

Day length (hours of sunlight) for

the current simulation day. This

value is calculated using time of

year and latitude and assumes a

civil twilight angle of 6 degrees.

 

Resetting Met Variables (eg Climate Change scenario)

The APSIM Met Module can reset the values of any variables specified in the met file. Both keyword climate constants and data column values (apart from the time specification column values) for the current timestep can be reset using standard APSIM communication techniques. However, changing met data dynamically during a simulation must only occur at a predefined stage during daily simulation execution. See example below. Resetting met variables at 'start_of_day' or 'end_of_day' could result in critical modules (eg Soilwat2) missing the information due to process ordering. Setting met variables at the 'preNewMet' stage (see example) will avoid this risk.

 

AN EXAMPLE

Most modules in APSIM get their weather data from a newmet event that is produced by the MET module, so we need to change the weather variables before this event gets sent out. The MET module produces an event that makes this easy. It is called prenewmet. This event is fired just before a newmet event. So all we have to do is to trap this event and change the weather variables.

 

From the manager\sample\manager.par file:

 

[modify_met.manager.preNewmet]

maxt = maxt + 2

mint = mint + 2

 

When the prenewmet event fires, we increase the maximum and minimum temperature by 2 degrees, which then gets propagated to all other APSIM modules when the newmet event is sent by the MET module.