1 Introduction
Overview of User Interface
Introduction
Starting with version 4, APSIM comes with a user interface that lets users
configure simulations using a drag and drop paradigm. This interface, unlike
APSFront, provides complete access to all APSIM parameters and supports
multiple point simulations.
Getting started
When first started (by clicking Windows Start Menu -> All Programs -> Apsim 7.3 r1387 -> APSIM User Interface), the interface shows a toolbar at the top, a toolbar at the bottom and two empty panes in between.

To create a simulation, click
New on the toobar at the top of the screen and select a simulation that is closest to the type of simulation you want to build.

This list of default simulations will be expanded over time. In fact, you can add
your own default simulations to this list allowing you to reuse common
simulations.
Description of a simulation
Simulation
Configuration Tree
Properties for selected component (clock)
The tree control on the left shows the components that make up the APSIM simulation
(Simulation Tree). Clicking on a component will show the properties for
that component on the right. The picture above shows the clock component
selected with it's properties on the right.
It is recommended that users work their way from top to bottom in the
simulation tree, checking each component's properties. Components can be renamed
by selecting them, pausing for a second and then clicking again. Components
may be deleted from the simulation tree by selecting the component and pressing
delete. They can also be renamed or deleted by right mouse clicking on them and selecting "Rename" or "Delete".
Remember though that deleting or renaming components usually has
implications for other components. For example, deleting a crop usually means
the management of that crop (e.g. sow, harvest etc), under the Manager
component, needs to be changed as well.
Note that you can change the order of components in the tree. You do this by right mouse clicking on the component and clicking
Move Up or
Move Down or you can hold down the Ctrl key and use the up and down arrow. The order of the components is not usually important it is merely cosmetic. The only exception is the order under the
Manager folder component.
Adding components to a simulation via Toolboxes
To add components to a simulation tree, click the
Standard button on the toolbar at the bottom of the window. This will show the standard toolbox containing many components and simulation
entities that can be dragged onto the simulation tree.

A toolbox is a collection of reusable simulation components. By default there
are many in the standard toolbox that cover a lot of the standard functionality
required. The onus, though, is very much on the user to know which combinations
of components work together. It is not expected that first time users will know
which components work together. The recommendation is to start with a pre-built
simulation and modify it, rather than starting from scratch. If in doubt, contact the
APSIM Forum.
How to Build, Run and Graph a Simulation¶
Building, running and graphing simulations¶
Click on the
New button and select a simulation that closest matches
the simulation you're trying to create.
For this example, choose
Continuous Wheat Simulation.
Weather
The weather properties are located under the
Met component in the
simulation tree. There you will have the ability to browse to a weather file.
Weather files need to be in APSIM format and should have a .met extension. Many
sample weather files (e.g. Dalby) can be found in the
apsim\met\sample directory
under your apsim installation.
e.g.
c:\program files\Apsim73 r1387\apsim\met\sampleClosely related to the weather file are the start and end date of simulation.
These two properties can be found under the
Clock component. They need to
be within the range of the weather file. At this stage, to set the clock
properties to include the entire climate record involves looking at the met
file, taking note of the first and last date and entering those dates in the
clock properties screen.
Soil
Picking a soil file involves finding a suitable soil from the
Soils toolbox.
To open the toolbox just click on the
Soils button on the toolbar at the bottom of the window.
The
Soils toolbox has many soils to choose from.

Drag your chosen soil from the toolbox and drop into the paddock on the
simulation tree. You can then delete the existing soil in the paddock as it is
no longer needed. Once the soil has been dropped it can be modified by clicking
on it and then modifying the parameters to the right.
Important:
- Once you have dragged your soil onto your simulation tree, you should rename it to something with a shorter name. Some soil names in the toolbox are too long and will cause your run to crash if it is not renamed to something shorter.
- It is important to remember that the soil must be parameterised for the crops that you're going to sow. If your simulation is going to sow wheat, then the soil must have LL, KL and XF values for wheat. These soil/crop values can be added to the soil but it is probably better to choose a soil that is already parameterised for the crops that you want.
The starting water that a simulation initialises with can be found by expanding the soil component in the simulation tree and then clicking
Initial water.

The initial water can be specified in multiple ways by selecting one of the
radio buttons and then entering a percent water or mm water. All changes made are
automatically reflected in the graph on the right.
Initial water can also be specified directly on a layer by layer basis. See the SW column in the
Initial Nitrogen node.
nb. by entering a date in the
Initial Nitrogen component you are able to specify a measured soil water and/or nitrogen at any date during the simulation. APSIM will reset the soilwater and/or nitrogen to these values on that date and keep going with its simulation. If you leave the date blank, APSIM will assign it the initial start date of the simulation.
The starting nitrogen that a simulation initialises with can be found under
the
Initial Nitrogen node under the soil in the Simulation tree.

A single value for amount of nitrate or ammonia can be entered for the whole profile (in kg/ha)(by clicking in the respective "Total:" cells in the grid) OR amounts for individual layers can be entered in the grid.
Surface Residues / Organic Matter
The parameters for the initial surface residues can be found under the
surface organic matter component in the simulation tree.

The "Organic Matter pool name" is simply an alphabetic description of the residue pool.
The more important parameters are the "Organic matter type" and "Initial surface residue", "C:N ratio of initial residue" and the "Fraction of residue standing".
Fertiliser
This component does not have any editable parameters. This component only needs to be present if you are going to be doing fertiliser applications in your simulation.
Crops
Crops can be dragged from the
Standard Toolbox and dropped onto a paddock. A crop can be deleted by selecting it and pressing Delete. Crops typically don't have any editable parameters. It is important to remember that the crop parameters LL (Lower Limit/Wilting Point), KL and XF (Both KL and XF are root growth parameters) come under the
soil. This is because they are soil properties even though they depend upon the specific crop.
Simulation management
The
Manager folder component contains all the management rules for the
simulation.
e.g.
- sowing
- fertilising
- irrigation
- tillage
- resetting of water and nitrogen
- rotations

These rules can be dragged from the
Standard toolbox (under
Management folder in the
Standard toolbox) and dropped under a
Manager folder within a
paddock.

The properties of the management rule can then be edited on the right. The management rule in the toolbox cover the same sort of functionality as the older APSFront software.
It is also possible to drag an
Operations Schedule component from the
Standard toolbox and drop it on a paddock. This component lets you exactly specify your own manager operations for sowing, harvesting, etc. This will be familar to you if you have used control / parameter files in the past.
Reporting
APSIM is capable of producing an ASCII space separated output file containing whatever APSIM variables you want. In fact you need to exactly specify which variables you want output to the file. This is all configured from the
Outputfile component.
Variables
Expand the outputfile component and click
Variables

The top pane allows you to enter some text to put at the top of the output file. This is usually used to
put some constant values that you have used in your simulation.
The bottom left pane lists which variables are to go into the output file (date, biomass yield etc) as columns. These variables can be deleted and reordered up and down in the same way as the components in the simulation.
The bottom right pane gives you the variables that can be dragged onto the variable list in the left pane (adding them to the list; you can also double click them). The variables are grouped according to the components currently plugged into the simulation. To see the variables belonging to each component, simply choose the component from the "Component filter" drop down list.
Some variables are layer variables or profile variables
e.g.extractable soil water. Look for "Yes" or "No" in the
Array? column to see if a variable is or not. These variables that are, when dropped onto the variable list will produce a number for each layer in the output file.
If you want the sum of all layers, put a () in alongside the variable name in the
Variable name column of the left pane. Other options include a (1-3) for the first 3 layers, or a (5) for the fifth layer.
(click the
? button in the left pane for more information)
Reporting Frequency
The frequency of output is controlled by the
Reporting Frequency sub component. The left pane contains a list of events. Whenever these specified events occur in the simulation, a line with the current values of the variables will be written to the output file.

In the example above, a line of output will be produced every time the simulation harvests a crop.
Just like with variables, use the "Component filter" drop down list on the right hand pane to see the events for each component that can be dragged to the left hand pane.
If you want Daily output this can be achieved by dragging
end_day event to the left had pane. The end_day event can be found by selecting the
clock component from the drop down list in the right pane.
APSIM is also capable of producing multiple output files. The user simply needs to drag and drop multiple
outputfile components onto the simulation tree from the
Standard toolbox (Or duplicate an existing outputfile). Each can then be configured independently.
Precisely specifying outputs can quickly become tedious. If you frequently use common outputs, why not create a toolbox and drag your configured
outputfile component and drop it onto your toolbox. You can then easily reuse this configured outputfile in your next simulation.
To see how to do this,
read the overview on toolboxes.
Multiple Simulations
Simulations can be saved to any folder by clicking the
Save button.
Likewise, running a simulation is as simple as clicking
Run on the button bar. The user interface is capable of hosting multiple simulations within the single simulation tree. The example we've been working through here has a single simulation called
Continuous Wheat. You can add another simulation by simply dragging this simulation and dropping it onto on the top level node
Simulations - a copy will be made and there will be two simulations in the simulation tree.

Notice the second simulation called
Continuous Wheat1 at the bottom. This simulation will be identical to the first simulation. Usually you would change a parameter in the second simulation to see what effect this parameter has on the result compared with the first simulation. Before you run the simulations the second simulation should be renamed to a more suitable name.
Running the Simulation(s)
Click the
Run button on the toolbar at the top of your screen to run the simulation.
Something to note is, if you have multiple simulations, and you only wish to run one of them, just click on the simulation that you wish to run so that it is highlighted like
Continuous Wheat1 is in the image above. Then click the
Run button. This will cause only the
Continuous Wheat1 simulation to run. If you wish to run both simulations, just click on the very top
simulations component to highlight it and then click the run button. This will cause all the simulations in your tree to be run.
Often APSIM will produce a fatal error as a result of an invalid configuration or parameterisation. In this instance, it is important to consult the summary file that APSIM produces. Clicking on the
summaryfile
component will give quick access to the contents of this file. When looking for errors, always scroll down to the first error and fix that first.

Once the simulation has sucessfully run just click on the
outputfile component to see your output file.
Note: The output file and summary files are just plain text files. As such the output files can be used as input for statistics software packages such as R, SYSTAT, MATLAB, GENSTAT etc. Also they can be opened in any text editor. After a run you will find the output files and summary files in the same folder that you have saved the simulation to. The user interface automatically names the output and summary file. It uses the simulation name in the tree (eg.
Continuous Wheat Simulation) then adds the name of the output file (eg. outputfile)(nb. you are allowed to rename
outputfile). The suffixes .out and .sum are used for the output and summary files respectively. This automatic naming ensures you can easily identify which output and summary files belong to which simulations.
Graphing the output and Exporting to Excel¶
If you do not already have a
graph component in your simulation tree, then you can drag one there from the
Graph toolbox.
There are different types of graph components availible allowing you to choose the type of graph you wish to use. In the image below we have choosen an
XY graph component.

The
graph component is able to find any output file on the same level or lower in the simulation tree. So dropping a
graph component on the top
Simulations node will allow it to find all the output files in all the simulations. Dropping on a specific simulation will allow it to find all the output files in the simulation and dropping it on a paddock will allow it to find all of them in that paddock. If you just drop it on a specific output file it will only be able to find that outputfile.
To graph the output file, first fully expand the
graph component by clicking the + symbol next to the
graph component then work your way up from the bottom configuring each sub component. You can usually ignore the very bottom component
ApsimFileReader . Then to view the graph all you have to do is click the
graph component. Depending up the type of graph component it was, you will see that type of graph in the properties pane.
APSIM has a button on the main application toolbar to send the output file to Microsoft Excel.

To send an output file or multiple output files to Excel, just select them in the simulation tree and click the
Excel button
The help system
The button at the end of the main toolbar (at the top of the screen) gives quick access to the APSIM Documentation.
A lot of documentation, including the science documentation and how some of the modules perform at different locations (i.e. sensibility tests), can be found under
Module documentation.
NOTE: The documentation you get when you click on this button is a copy saved to your hard drive that came when you installed APSIM. It is provided for when you do not have an internet connection.
For a more up to date copy of the documentation please see the
Documentation on our website (http://www.apsim.info/Wiki/APSIM-Documentation.ashx)
2 Exercises
Exercise 1: Fallow Water Balance
In this exercise you will explore the major elements of interest in soil
water balance during a fallow - soil water storage, drainage, runoff, and
evaporation. Changes will be examined over a one year period in the Dalby area.
The examples assume you have read and walked through the previous document:
How to Build, Run and Graph a Simulation
- Create a new simulation using Continuous Wheat Simulation as a starting
point.
- Rename the simulation to something more meaningful: Brookstead Fallow
- Save the simulation file as Fallow.apsim
- Choose Goondiwindi weather (C:\Program Files\Apsim73-r1387\Examples\MetFiles\Goond.met)
- Starting date: 1/1/1989 Ending date: 31/12/1989
- Open the "Soils" toolbox (it may take some time to load, so be patient). Drag a "Grey Vertosol-Cecilvale (Brookstead No004)" soil onto the simulation, removing the
old soil (You can find it under Soils->Australia->Queensland->Darling Downs). Rename the soil to something short like "Soil".
If you like you can also reorder the soil component so it comes straight under the paddock.
- Set the starting water to 10% full - filled from the top. (expand the Soil to see InitWater)(by expand I mean click the "+" next to the Soil)
- Set the starting NO3 to 50.34 (kg/ha) and starting NH4 to 3.23
(kg/ha), spread evenly throughout the profile. (You spread NO3 and NH4 evenly throughout the profile by only having one layer in the soil and making this layer span the entire soil depth) (ie. from 0cm to 200cm) (To only specify one layer you must first, using the mouse block all the layers you don't want and delete them [right mouse click, then delete]. Then in the remaining layer just click on the cells in the table and change them)

- Check that the default initial residue type is wheat and the mass is 1000
kg/ha. (under 'surface organic matter')
- Delete the Fertiliser, Wheat and Manager components
out of the simulation. They are not needed for a fallow run.
- Choose these variables to report (removing old ones):
|
Component |
Variable name |
|
dd/mm/yyyy as Date |
| Clock |
Day |
|
Year |
| Met |
Rain |
| Soil |
ESW - Extractable
soil water (mm) |
|
ES - Evaporation |
|
Runoff |
|
DRAIN - Drainage |
|
NO3 - summed over
profile (Do this by putting () next to the name in the "Variable name" column) eg. no3() (click "?" button next to variable list for more info) |
|
DLT_N_MIN - N
mineralised - summed over profile |
| Surface organic
matter |
SURFACEOM_WT -
Weight of all surface organic materials. |
|
SURFACEOM_COVER -
Fraction of ground covered by all surface organic materials. |
- Choose "end_day" reporting frequency for the output file. This can be found under Clock.
- Run the simulation.
- Create a graph of Date vs ESW and Rain(Right Hand Axis). To do this Click on the Graph toolbox to open it.
Expand the "Graphs" folder. Then drag in an XY component onto the output file in your simulation. Click on the "+" symbol next to XY component to expand the node. Click on
the Plot component. Now in the Plot window click on the X variables square to make sure the background of the square is pink. Now
click on the "Date" column heading. It should appear in the list in the square. Now click on the Y variables square to make its background pink. Then
click on the esw column heading, then the rain column heading. They should be added to the list in the square. Now to make the "rain" appear on
the right hand axis, click rain in the square to highlight it, and then "right" mouse click on it again. In the popup menu click on "Right Hand Axis".
Now we want a nice clean line to be plotted with no points so now under "Point type" choose "None". Now just click on the XY component to view
the graph.
The graph should show the ESW (in mm) increasing with day of
year. The sudden increases are due to rainfall events and the declines to
evaporation and drainage loss. Daily rainfall will show this more clearly.

- Create a graph of Date vs Runoff and Rain(right hand axis). This time in the Plot window under "Type" choose "Dot line" as well as "Point type" to "None".
The effect of runoff on the water balance.
Runoff is affected by weather and soil water storage capacity. This run will
take an additional soil into account, and compare runoff from both soil types.
The user interface still contains all the specifications provided for the
previous simulation.
If you drag the Brookstead Fallow node in the Simulation Tree to the
top node Simulations), a copy of it will be made and your file will then
have 2 simulations in it. e.g.

This second simulation can then be modified to add the characteristics of a
Macalister, Bongeen soil.
- Rename the simulation to Bongeen Fallow. Click Save
- Drag the "Black Vertosol-Bongeen (Macalister No026)" soil onto the paddock in the
simulation tree (located under Soils->Australia->Queensland->Darling Downs) and then delete the old soil.
- Rename your soil to something shorter. (eg. Soil)
- Since now we have a new soil we will need to go and set the initial soil water (InitWater) to 10% filled from top and initial soil nitrogen (InitNitrogen) to NO3 to 50.340 kg/ha and NH4 to 3.230 kg/ha.
- Save the simulations
- Run APSIM.
- Graph both the output files by dragging an XY graph onto the top node Simulations in the simulation tree.
Create a graph of day vs runoff(cumulative) and rain(right hand axis). To make the runoff be cumulative it is the same procedure as to make
the rain appear on the right hand axis. Only select "Cumulative" from the popup menu instead of "Right Hand Axis". Set "Point Type" to "None".

Exercise 2: The effect of residue cover on soil water storage during fallow
Tracking the decline of cover as residues decompose
APSIM simulates the influence of crop residues on the efficiency with which
water is captured and retained during fallows. But residue cover declines as
residues decompose. Residue decomposition is simulated in APSIM in response to
weather, as well as the chemical composition of the residues. By doing this
simulation you will reinforce skills learned in previous exercises and learn to do some
basic editing of default values to ‘customise’ your simulations.
The examples assume you have read and walked through the previous document:
How to Build, Run and Graph a Simulation
This simulation will demonstrate how surface residue decomposes over time.
You should use the previous simulation as a starting point for this simulation.
You need to add an initial amount of surface residues.
- Reopen the previous file (Fallow.apsim)
- Save the file as Residue.apsim (reminder don't forget to use the Save as button NOT the Save, or you will save these changes to Fallow.aspim)
- Remove the Brookstead Fallow simulation. We're going to use Bongeen Fallow as our starting point for this exercise. Also remove
the graph component.
- Make a copy of the Bongeen Fallow simulation by dragging to the top
node in tree (Simulations).
- Rename second simulation to Bongeen Residue
- Set the initial surface residue to 3000 kg/ha in the second
simulation.
- Run the simulation
- Create a graph of day vs surfaceom_cover and rain(right hand axis) for just the Bongeen Residue simulation.
Just drag an XY graph from the Graph toolbox onto the output file. Remember to set "Point type" to "None".
To find out how to modify a graph see How To: Modify a Graph component

It can be seen that periods of high decomposition rate match with higher
rainfall and low decomposition with dry periods.
The effect of cover decline on runoff and evaporation
In this activity, a comparison will be made of two simulations: ‘Bongeen
Fallow’ and ‘Bongeen Residue’.
- Graph both output files with Date vs runoff(cumulative) and rain(this time on the same axis as the runooff. NOT right hand axis)

The effect of residue type on speed of decomposition
The APSIM residue model will decompose residues at differing rates according
to the C:N ratio of the material. To demonstrate this we will reproduce the
previous simulation but apply legume residues in the place of the wheat
residues.
- Save the file as Chickpea Residue.apsim (reminder don't forget to use the Save as button NOT the Save)
- Create another copy of the Bongeen Residue simulation and call it
Bongeen Chickpea Residue. Also remove the graph component.
- Change the residue parameters to 3000 kg/ha of Chickpea (type) residue. Set the C:N ratio to 25. (Remember you may want to change the Organic Matter pool name to something like chickpea as well)
- Run this new simulation. (If you just select this simulation in the tree and click the run button it will only run this simulation instead of all of them)
- Graph all three residue simulations with residue cover as a function of time
(eg date).

Exercise 3: Nitrogen cycling
In this exercise you will observe the fate of fertiliser nitrogen in a fallow
situation: Urea to ammonium to nitrate and the loss of soil nitrate via
denitrification.
This simulation will introduce us to editing a simple Manager rule and to more
advanced features of graphing simulation results. Firstly we need to set up our
weather and soil data. The simulation is on Brookstead,Anchorfield soil in the Dalby area.
The examples assume you have read and walked through the previous document:
How to Build, Run and Graph a Simulation
- Start with a new simulation based on Continuous Wheat Simulation
- Change simulation name to Tipton N Fallow
- Save the file as Tipton N Fallow.apsim
- Choose Dalby weather. (C:\Program Files\Apsim73-r1387\Examples\MetFiles)
- Starting date 1/1/1989 Ending date: 31/12/1989
- Choose "Black Vertosol-Bongeen (Tipton No116)" soil. (Soils->Australia->Queensland->Darling Downs) (remember to rename it)
- Set the Starting water to 50% full. Set it as evenly distributed.
- Set the Starting nitrogen to 19 kg/ha NO3 and 0 kg/ha NH4, evenly distributed.
- Set the initial surface organic matter to 1000 kg/ha wheat.
- Remove all manager rules under the Manager folder but leave the folder itself.
- Drag a Fertilise on fixed date to your Manager folder component. (Standard toolbox->Management->Manager (common tasks) )
- Change the fertiliser management parameters to apply 100 kg/ha of urea_N on
10-Jan. (leave the "Don't add fertiliser if N in top 2 layers exceeds (kg/ha)" property, and set the "Module used to apply the fertiliser" to "fertiliser")
- Make sure your simulation contains a Fertiliser component in your paddock.
Even though it doesn't have any changeable properties it is still necessary
when fertiliser is to be applied.
- Choose these variables to report:
|
Component |
Variable name |
|
dd/mm/yyyy as Date |
| Clock |
Day |
|
Year |
| Met |
Rain |
| Soil (whatever you renamed it to) |
Depth - layered (mm)
(NB. Certain variables in the output list are Array variables. These are variables that don't have a single value but instead have a value for every layer of the soil. The Array? column in the output list tells you if a variable is an Array variable or not.
When we specify layered in these notes, we mean just drop the array variable
as is onto the variable list. This will create a separate column in the output file for each layer in the soil).
(NB. The array variable for depth of each layer is dlayer) |
|
Drainage (mm) (drain) |
|
Extractable
Soil Water (mm) |
|
NO3 sum over
profile and change alias to NO3Total.
(NB. To sum over the profile, there are methods to sum various numbers of layers of an Array variable to get just a single value [click "?" button next to variable list for more info].)
(NB. To alias any variable use the "as" keyword.
eg. no3() as NO3Total.
[Once again click "?" button next to variable list for more info]) |
|
NH4 sum over
profile and change alias to NH4Total |
|
NO3 layered |
|
NH4 layered |
|
DNIT sum over
profile |
|
UREA
sum over
profile |
- Change reporting frequency to end_day.
- Run simulation
- Create a graph of day vs urea, total ammonium and total nitrate. Drag an XY graph component onto the simulation.
On the Plot node set "Point type" to "None" and leave "Type" as "Solid line".

Question: Why does the above graph look the way it does?
Illustrating the extent and conditions required for denitrification losses
Create a new chart of Day vs Rain, DNIT (on Right Hand Axis), ESW and NO3Total.

From this chart you can see that significant nitrogen is lost via
denitrification when large amounts of nitrate is available in saturated soil
conditions.
Exploring vertical movement of nitrate, after fertilisation, through the
soil profile
Let's look at the distribution of nitrate through the soil profile at 21 days after fertilisation, and again at 5 months.
- Create a depth graph of dlayer vs no3 for 31/01/1989 and 10/06/1989.
NB. Depth plots can only
be done when the simulation has dlayer in the output file along with at least one other
layered Array variable. This is why we included no3 and nh4 as layered variables in the output file and not just include NO3Total and NO4Total.
Drag a Depth component onto the simulation. Expand the Plot node to get the Depth node. Tick the dates mentioned above.
In the Plot node, add "no3" and "nh4" as the X variable and leave the Y variable as "Depth"
Now below the graph untick the checkboxes for the "nh4" lines.

From this chart you can see the distribution of nitrate in the soil profile
just 21 days after the addition of fertiliser and at 5 months.
Exercise 4: A sorghum crop simulation
Response of crop to N fertiliser
In this exercise you will observe the growth a crop over a single season.
You will learn a bit more about specifying a Manager template, execute more than
one run in batch mode and use the simulator to do a “what-if” experiment with
fertiliser rates. These skills can also be used to “experiment” with time of
planting, rate of sowing, crop comparisons and different starting soil moisture
conditions.
The examples assume you have read and walked through the previous document:
How to Build, Run and Graph a Simulation
- Start a fresh simulation using Continuous Sorghum Simulation as a template
- Rename the simulation as Sorghum Nil Fertiliser. Save the filename as Sorghum Fertiliser.apsim
- Choose the Dalby weather 1/1/1988 - 30/6/1988
- Select the Black Vertosol-Mywybilla (Bongeen No001) Soil. (Soils->Australia->Queensland->Darling Downs)(remember to rename it)
- Set the Starting water to 25% full - filled from top.
- Set the Starting nitrogen to 12 kg/ha of NO3 and 3 kg/ha of NH4, evenly distributed.
- Change the sowing rule to:
set sowing date to 1-Jan by setting both the
‘window start’ and ‘window end’ to 1-Jan and ‘Must Sow’ to ‘yes’.
set sowing density to 8
set sowing depth (mm) to 30
set cultivar to early
set row spacing to 1000mm
skip row to solid
leave all the other parameters as they are.
- Check that the harvest rule indicates that Sorghum should be
harvested.
- Remove the Sowing fertiliser rule from the
Manager component.
- Choose these variables to report:
|
Component |
Variable name |
|
dd/mm/yyyy as Date |
| Clock |
Day |
|
Year |
| Soil (whatever you renamed it to) |
Depth -
layered (mm) |
|
Soil water -
layered (mm/mm) (sw) |
| Sorghum |
DaysAfterSowing |
|
LAI |
|
Biomass |
|
Yield |
- Choose a end_day reporting frequency.
- Make a copy of the simulation by dragging Sorghum Nil Fertiliser node
to the Simulations node at the top of the simulation tree.
- Rename this copy to
Sorghum 30 kg N Fertiliser.
- Add a Fertilise at sowing rule to the Manager folder
component. Apply 30 kg urea_n fertiliser, making sure to change the
"On which module should the event come from" name from wheat to sorghum.
- Make another copy of the simulation, this time adding 60 kg/ha of
fertiliser. Call the simulation Sorghum 60Kg N Fertiliser
- Run all 3 simulations.
- Graph all 3 output files creating a Date vs Yield chart using a graph component. Click on the Graph toolbox.
Drag an XY Chart onto the top node Simulations.

Rate of water extraction from soil profile
Create a new depth chart of dlayer vs sw with 2 dates 15 Mar (crop is growing) and 31st May (after the harvest).
Drag a Depth component onto the top Simulations node. Expand the Plot node to get the Depth node. Tick the dates mentioned above.
In the Plot node, add "sw" as the X variable and leave the Y variable as "Depth"

Exercise 5: Chickpea sowing rates - 10 year runs
In this exercise you will use sowing rules to plant Chickpea crops and
observe yield probabilities for a 10 year period given a half soil moisture
profile at sowing. You can compare two sowing rate strategies for these
conditions. (Basically looking at strategies to maximise yield - different weather each year but same starting point)
By doing this simulation you will learn about rule based sowing, long term
simulations, resetting soil moisture and nitrogen at sowing and graphing
probability data.
The examples assume you have read and walked through the previous document:
How to Build, Run and Graph a Simulation
- Start a fresh simulation using Continuous Wheat Simulation as a template
- Save the simulations as Sowing Rates.apsim
- Choose the Goondiwindi weather 1/01/1979 - 30/04/1989
- Select the "Black Vertosol (Garah No10011)" soil (Soils->Australia->New South Wales->North West Slopes and Plains)
and rename it to Vertosol
- Set the Starting water to 50% full - filled from top.
- Set the Starting nitrogen to 20 kg/ha NO3 and 0 kg/ha NH4, evenly distributed.
- Change the surface residue type to sorghum (don't forget to rename the pool name to "sorghum" as well), initial surface residue: 550 kg/ha, C:N ration of 76, leave the Fraction of residue standing as is.
- Replace the wheat crop with chickpea. (Standard toolbox -> Crops)
- Replace the Sowing rule with the Sow using a variable rule
from the toolbox.
- Set the properties of the sowing rule to:
sowing window start date:
1-may
sowing window end date: 1-aug
must sow: no
amount of rainfall: 15
number of days of rainfall: 3
amount of soil water: 200
crop is chickpea
sowing density plants/m2: 10
sowing depth: 30
variety: amethyst
crop growth class: plant
row spacing: 350
- Remove the sowing fertiliser rule.
- Make sure the harvesting rule will harvest chickpea, not wheat.
- Add the rule: Reset water, nitrogen and surfaceOM on fixed date. Use
1-may for the reset. Make sure the name of the soil module and the name of
the surface organic matter module is correct (we renamed the soil to Vertosol). We want to reset water, nitrogen and
surface organic matter to remove the year to year effects.
(move it up to make sure it the first rule under Manager component. The order is important in the Manager Component. It is the order the rules are run in)(right click on the rule and select "Move up")
- Choose these variables to report:
|
Component |
Variable name |
| Clock |
year |
| Chickpea |
yield |
- Make sure the reporting frequency is set to harvesting.
- Rename simulation to Chickpea 10 plants
- Make a copy of the simulation and create a new one with 15 plants/m2
- Rename this copy to
Chickpea 15 plants.
- Run simulations.
- Graph both output files creating a Year vs Yield by using a Graph component. Drag an "XY Chart" onto the Simulations node from the Graph toolbox.

Question 1: Why aren't there any bars in 1982?
- Create a probability of exceedance plot of Yield by using a Graph component. Drag a "Probability Exceedence" component onto the Simulations node from the Graph toolbox. Select the Yield as the X variable and leave Probability as the Y variable. It is that easy.

Exercise 6: Wheat / mungbean opportunity cropping
In this exercise you will use sowing rules to opportunistically plant
mungbean and wheat crops over a 10 year period without resetting water or
nitrogen at sowing. You will observe the effect of this rotation on soil biomass
nitrogen and the response of the rotation to different sowing rules.
The examples assume you have read and walked through the previous document:
How to Build, Run and Graph a Simulation
- Start a fresh simulation using Continuous Wheat Simulation as a template
- Rename simulation to MungbeanWheat. Save the filename to the same name.
- Choose the Goondiwindi weather 1/4/1974 - 30/4/1984
- Select the "Grey Vertosol-Merwood (Croppa Creek No068)" soil (Soils->Australia->New South Wales->North West Slopes and Plains)
and rename it to Vertosol
This soil doesn't have crop lower limits for mungbean, so you will need to add these new crop properties to the soil.
For this exercise, set LL, PAWC, KL and XF values to the following:
Make sure you call the node mungbean.
To find out how to add a new crop to a soil see the following document in this manual (See contents page):
How to: Adding crop properties to a soil .
- Set the Starting water to 50% full - filled from top.
- Set the Starting nitrogen to 140 kg/ha NO3 and 0 kg/ha NH4, evenly distributed.
- Add mungbean to the simulation tree, leaving wheat alone.
- Replace the Sowing rule with the Sow using a variable rule
from the toolbox and rename to Wheat sowing - Janz.
- Set the properties of wheat sowing to:
sowing window start date:
1-Jun
sowing window end date: 14-Jun
must sow: no
amount of rainfall: 15
number of days of rainfall: 3
amount of soil water in profile: 200
crop: wheat
sowing density: 100
sowing depth: 50
cultivar: Janz
crop growth class: plant
row spacing: 250
- We
want to sow an earlier maturing cultivar if the sowing is later so make
a copy of this rule but change the window to 15-jun to 1-aug and the
cultivar to hartog. Rename this new rule to Wheat sowing - Hartog
- Rename the harvesting rule to Wheat harvesting - make sure it
points to wheat.
- Rename the Sowing fertiliser rule to Wheat sowing fertiliser.
Make sure it points to wheat and set the amount to 70kg/ha of urea_n.
- Duplicate one of the wheat sowing rules and rename it to Mungbean
sowing. Set the parameters to:
sowing window start date: 1-Dec
sowing window end date: 15-Jan
must sow: no
amount of rainfall: 20
number of days of rainfall: 3
amount of soil water in profile: 200
crop: mungbean
sowing density: 36
sowing depth: 50
cultivar: Berken
crop growth class: plant
row spacing: 500
- Duplicate the Wheat harvesting rule and rename to Mungbean
harvesting. Make sure it points to mungbean, not wheat.
- Choose these variables to report:
|
Component |
Variable name |
| Clock |
Year |
| Soil (we renamed it to Vertosol) |
BIOM_N - layered. |
| Mungbean or Wheat |
yield (this will output the yield for all the crops in the simulation. Mungbean yields and Wheat yields will BOTH be outputed in different columns) |
- Choose a reporting frequency of harvesting.
- Create a linked copy of this simulation via drag and drop and rename this new one
to MungbeanWheat Early (to find out how to do this see:
How To: Use linking to reduce simulation duplication)
- Unlink the mungbean sowing rule and change sowing window to 1-nov to 1-jan.
- Run simulations.
- Create separate graphs of Year vs Mungbean Yield and Wheat Yield for each simulation. Drag an XY Chart on each simulation.
- Add Titles to each graph identifying them as Mungbean-Wheat and Mungbean-Wheat Early. To find out how to add a title to a graph see How To: Modify a Graph component
- You will notice that your graphs do NOT match the graphs below. In order to make them match the graphs below you need to go back to the Wheat sowing - Hartog rule and change the "Amount of rainfall" to 30 and the "sowing depth" to 30. Because the simulations are linked you only need to make this modification to the Wheat sowing - Hartog rule in one of the simulations. The Wheat sowing - Hartog rule in the other simulation is automatically changed as well. This is the benefit of using linked simulations.
- Run the simulations again and now compare the graphs to the graphs below.
Question: Why is there no wheat yield in 1984?
Exercise 7: SOI phase and Economic analysis
In this exercise, you will examine the effect of SOI phase on yield
probability, and gross margin outcomes. Exercises will also be conducted using
manual generation of a probability distribution and the application of economic
principles.
- Create a new simulation using Continuous Sorghum Simulation.
- Rename simulation to A (we are choosing this short name to save space on the graph later on)
- Choose Goondiwindi weather (long term 1940 to 1989)
- Starting date 01/01/1940 Ending date 31/12/1989
- Choose "Black Vertosol-Anchorfield (Brookstead No006)" soil. (Soils->Australia->Queensland->Darling Downs) (remember to rename)
- Set the starting soil water to 33% full – filled from the top
- Use the following initial soil nitrogen:

Now right click on the column heading to see what this corresponds to in units of ppm.
- Set initial surface organic matter to sorghum and is 1500 kg/ha. (rename the pool name, but leave everything else)
- Modify sowing rule to:
Force sowing to 10-Dec
Enter sowing density at 5 pl/m2
Cultivar as early
Skip row as soild
(leave everything else as is)
- Set fertiliser at sowing to 100 kg/ha of urea_no3. (move this rule up so that it comes before harvesting rule)
- From the Standard toolbox drag in a "Yield moisture correction" and a "Simple gross margin (put before harvesting rule)" rule.
(make sure the "Yield moisture correction" rule comes before the "Simple gross margin" which obviously comes before the harvest rule)
- Report year, yield and Bank in the output file. (Just type "Bank" in manually into the variable list)
- Create a linked copy of this simulation via drag and drop and rename this new one
to B (to find out how to do this see:
How To: Use linking to reduce simulation duplication)
- Unlink the sowing rule and change change the "Skip row" property to "double".
- Graph Yield of both simulations using an SOI Box Plot from the Graph toolbox.
Fully expand the graph component. For the "SOI" component, given we used a sowing date of December, use the SOI from November to split the years.
You may want to shrink the width of your simulation tree window to make the graph more visibile.(just hover the cursor over the dividing line between the simulation window and the display window, when the cursor turns to a resize icon, just click and drag the window to shrink the width)
Give your graph a different label perhaps SOI Solid and Skip Yields To find out how see:
How To: Modify a Graph component)

The output demonstrates the differing probability distributions of solid vs
double skip configuration in negative and positive SOI phases
- Compare with "SOI CDF" and "SOI Probability Exceedence" graphs.
Economic analysis
This simulation has two rules from the Standard toolbox that we dragged in. A "Yield moisture correction" and a
"Simple gross margin" rule.
You also remember how you manually typed in Bank into the output variable list.
To see where it comes from click on the "post" tab of the "Simple gross margin" rule.
You can create your own economic calculations by using these kind of manager rules.
Keep in mind though when using these rules, that yield in APSIM is calculated as dry yield. So this assumes no water content.
Much economic analysis requires a wet yield which is what a farmer will actually harvest from his paddock. This is why in our simulations
we used a "Yield moisture correction" to do a simple calculation to work out this wet yield. (see its "start_of_day" tab)
- Graph gross margin using the SOI graph you have already created. (In "Plot" window delete "Yield", and add "Bank")
- Change the label to SOI Solid and Skip Profits.

Note: Similar output can be obtained via the WhopperCropper program
that allows selection of the required input variables from a pre-determined
set (usually 3 to 6 options for each variable).
Further economic analysis in Excel
- Select the top component Simulations then click the Excel button on the top toolbar.
- You will notice that the output files have been exported to 2 separate Excel windows.
- *** At this point you can manipulate the data however you like in the EXCEL program ***
Exercise 8: Rotations
Creating a wheat long fallow rotation
In this exercise, you will create a wheat long fallow rotation where wheat is
potentially sown every second year.

- Create a new simulation based on Rotation Sample
- Change the name of the simulation to LongFallowV and save to the
same filename.
- Check met file is Goondiwindi 1940-1989 and make the simulation run for
entire length of met file (1/01/1940 to 31/12/1989).
- Change the soil to "Black Vertosol-Waco (Jimbour No016)". (Soils->Australia->Queensland->Darling Downs)(remember to rename it)
- Set starting water to 100% filled from the top
- Set starting nitrogen to 0.1 ppm in every layer for both no3 and nh4
- Delete the cotton and chickpea crops from the simulation. (we will only be doing wheat and summer and winter fallows in this simulation)
- Delete all the sowing rules and harvesting rules for every crop other than Wheat
- Change minimum allowable soil water criteria of the Wheat sowing rule
to 0 so that it doesn't play a part in the sowing criteria.
- Set the crop order in the Rotations rule to the following:
| 1st crop |
wheat |
| 2nd crop |
sf |
| 3rd crop |
wf |
| 4th crop |
nil |
(set 5th and 6th crop to nil as well. Just so you don't get confused later)
You have to type in sw, wf and nil in manually.
sf, wf and nil are standard abbreviations. sf for summer fallow, wf for winter
fallow and nil for the point where the rotation will return to the beginning and
repeat. APSIM will not recognise anything else.
When finished it should like like the following:

- Reorder the rules in the Manager component so that Rotations rule comes first followed by the sowing rules then the harvest rule
- Choose these variables to report:
|
Component |
Variable name |
|
dd/mm/yyyy as Date |
| Clock |
year |
| Wheat |
yield |
- Change the output frequency to harvesting.
- Run APSIM and plot year vs yield using a graph component.

Fixed vs variable rotation
- Duplicate the previous simulation and name it LongFallowF
- Change the wheat sowing rules in the LongFallowF simulation from
must sow = No to Must sow = Yes
- Run this second simulation and plot year vs yield for both simulations on the same graph using a graph component

What are the differences between fixed and variable ?
Off-Setting the Rotations
-
Duplicate the LongFallowF simulation
and name the new one LongFallow0
- Set the crop order in the Rotations rule to the following:
| 1st crop |
wf |
| 2nd crop |
sf |
| 3rd crop |
wheat |
| 4th crop |
nil |

-
Run this simulation.
-
Plot year vs yield for both LongFallowF and LongFallowO on the same graph using a graph component. To do this, do it as if you were going to plot
all the simulations on the one graph. When you view the graph of all three simulations you will notice some checkboxes below the graph. One for
each of the simulations. Just untick the LongFallowV
If you worked out the average yield for LongFallowF and worked out the average yield for LongFallowO, would they necissarily be the same ?
Wheat sorghum rotation

- Save to a new file called SorghumWheat.apsim. (remember to use Save as button NOT Save). Rename LongfallowF simulation to SorghumWheat Rotation and remove the other simulations.
- Add Sorghum crop from the toolbox.
- Add Sorghum sowing rule from the toolbox, rename to SorghumSowing. Set cultivar to early and must sow to yes.
- Rename Fertilise at sowing rule to WheatFertilise. Copy it, and rename the copy SorghumFertilise (make sure to change the
"On which module should the event come from" property to sorghum).
- Add a Harvest Rule from the toolbox, rename to SorghumHarvesting
and change crop from wheat to sorghum.
- Make sure the sowing windows for sorghum and wheat sowing rules match those in the table above.
-
Set Rotation sequence to sf, wf, sorghum, wf, sf, wheat,
nil.
- Add the following variables to your simulation:
- Run simulation and plot year vs WheatYield and SorghumYield using a graph component.
Sorghum Wheat Chickpea rotation (advanced)

In this exercise, you will create a sorghum wheat chickpea rotation that
looks like the above diagram without step by step instructions. Use the
previous wheat / sorghum rotation as a starting point.
Use these default sowing properties for wheat, sorghum and chickpea:
must sow = no, minimum soil water = 0, cultivar for chickpea is "amethyst", default everything
else.

How To
How To: Creating an APSIM met file using EXCEL
APSIM met files consist of a section name, which is always weather.met.weather, several constants
consisting of name = value, followed by a headings line, a units line and then the data. Spacing
in the file is not relevant. Comments can be inserted using the ! character.
At a minimum three constants must be included in the file: latitude, tav and amp. The last two of these
refer to the annual average ambient temperature and annual amplitude in mean monthly temperature.
The met file must also have a year and day column (or date formatted as yyyy/mm/dd), solar radiation (MJ/m2),
maximum temperature (oC), minimum temperature (oC) and rainfall. The column headings to use for these are
year and day (or date), radn, maxt, mint, rain.
Other constants or columns can be added to the file. These then become available to APSIM as variables
that can be reportted or used in manager script.
Example met file:
weather.met.weather
latitude = -33.78 (DECIMAL DEGREES)
tav = 16.47 (oC) ! annual average ambient temperature
amp = 13.71 (oC) ! annual amplitude in mean monthly temperature
| year | day | radn | maxt | mint | rain |
| () | () | (MJ/m^2) | (oC) | (oC) | (mm) |
| 1991 | 1 | 28.0 | 38.9 | 13.4 | 0.0 |
| 1991 | 2 | 24.5 | 37.3 | 17.3 | 15.1 |
To create one of these files in Microsoft EXCEL, open EXCEL and enter data into columns like this:
It is important that the column widths are a bit wider than the data in them. Notice in the figure
the maxt column is wider than it needs to be.
The next step is to save the file as a Formatted Text (Space delimited)(*.prn) file, giving it
a .met file extension. It is recommended that you keep your toolboxes, met files etc in a
folder not under the APSIM installation directory. Perhaps you could
create a folder called c:/apsim_toolboxes for storing these types of
files.
Easy way to calculate the tav and amp constants
The software team provides a tool called TAV_AMP that will calculate these 2 constants and insert them
into a met file. To download the tool goto: http://www.apsim.info/apsim/Downloads/tav_amp.exe
Full instructions for using the tool can be found here: http://www.apsim.info/apsim/Products/tav_amp.pdf
How To: Create your own or Add someone else's toolbox
Quite often you may find yourself parameterising components the same way over
and over again in your simulations. The user interface allows you to easily
reuse these components in many simulations via your own toolboxes. You can
create your personal toolbox and then drag components or even entire simulations
to it. Next time you want to create a simulation or a part of a simulation, you
can then goto your toolbox and reuse entities that you've used before.
Toolboxes can also allow you to save and reuse soils that you have created,
although these should be kept in a seperate toolbox to your simulations.
You can also add toolboxes that other people have created, allowing you to
quickly and easily collaborate with colleagues.
Create your own toolbox
To create a new empty toolbox, either for simulations or for soils, click the Options button on the toolbar

You will see the following window,

To create a new toolbox click the following link,

A
Toolbox is just an xml file that you can save anywhere on your hard drive. In the following window select the location and name of the xml file.

NB. The name of the xml file is the name that will appear as the Name of the toolbox in the bottom of your APSIM User Interface. So it pays not to make it too long.
Add a toolbox
After creating a new toolbox you should see the following window.

We now need to add this new toolbox to the Apsim User Interface.
To do this just click the following link,

Just browse to the location of the xml file for the Toolbox and select OK.
Then OK in the "Options" window and the Toolbox will be added to your Apsim User Interface.
See below,

Add someone else's toolbox
If someone has created/modified a whole bunch of soils for a particular country or region. Or have created a whole bunch of management rules etc., an easy way for them to share this with you is for them to simple give you their Apsim Toolbox.
Any toolboxes that you create can be shared with others by simply giving them a
copy of the .xml or .soils file for the relavent toolbox. Once you have obtained a copy
of the another persons .xml or .soils file it is a very simple process to add it to APSIM.
It is the exact same procedure as above for "Add a toolbox" except that you just browse to the location on your hard drive where you have saved the other persons .xml or .soils file that you wish to add.
How To: Add Soils in a .par file to a Toolbox
Users of past versions of APSIM may have soils in a .par file that they may
whish to use in the latest version of APSIM.
The best way to use these old soils in the new version of APSIM is to add
them as a toolbox. To do this you need to convert the .par file containing the soils
into a .soils file and then add the .soils as a toolbox.
To convert the .par file into a .soils file, you need to use another product that comes with apsim called Apsoil
To open it, click on the Apsim icon on your desktop, then choose Apsoil.
Click OK when the introduction screen comes up.
In the window that appears, click New...

Save the new .soils file to anywhere you like but preferably the same folder that you have saved any previous toolboxes to.
Choose an appropriate filename but also preferably a short one as this is the name that will be used for your toolbox when you add it to ApsimUI later. Click
Save

Now click the Import button on the toolbar at the top of the window, and choose From a .par file

Now you can browse to your folder that contains the .par file with the soils. (nb. if there is more then one .par file in
the folder that contains soils that you wish to add, you can use the "Shift" key to select multiple .par files)

You will now see a Soils folder added to the tree pane. You can expand the tree and click on the soils to see
if they were imported sucessfully. The table is fully editable so you can change any values in it just by clicking on the
cell and typing in a new value.

You can import more soils from other .par files to this .soils file by repeating the previous steps.
You can check to see if the soil or soils you have imported are correct by selecting the soil or the root node in the tree and then clicking on
the Check Soils button on the toolbar.
Cnce you are satisfied that you have all the soils you want added to the .soils file. You can then close Apsoil.
Now that you have created your .soils file with all your soils in it, it is a simple matter of adding the .soils file
as a toolbox in APSIM. See Create your own or Add somone else's toolbox to see how to do this.
How To: Adding crop properties to a soil
It is important to remember that the soil must be parameterised for the crops
that you're going to sow. If your simulation is going to sow wheat, then the
soil must have LL, KL and XF values for wheat.
If the soil you wish to use does not have these values for the crop you desire, then you can add them.
Start by clicking on the soil component in your simulation tree, make sure the Water node is expanded
Under the Water node, copy an existing crop back onto the Water node.

Then Rename the newly created crop to whatever crop you want to add eg. Canola (nb. It must match the name of the crop component that you are going to drag onto the simulation tree exactly).

In the User Interface on the right hand side you should now see that your new crop has been added with default values filled in for LL, PAWC, KL and XF. (these values are the same as whatever crop you copied)
(You may have to use the horizontal scroll bar along the bottom of the table to view your crop.
The table is editable so you may change any of the values in the table. SO BE CAREFUL. (nb. PAWC is not editable becaue is is calculated from DUL - LL)
Once you have changed the values for LL, PAWC, KL and XF to what you want, you are done. You can now continue building the rest of your
simulation or do a run.
Note, you can copy and paste these values from other crops by selecting all the cells you want to copy with the mouse,
and then pressing "Ctrl + C" and then clicking on the top cell of the LL column for the new crop you have added, then pressing "Ctrl + V". OR by just right clicking and selecting Copy, Paste etc.
You can find out more about LL, PAWC, KL and XF in the Science Documentation for SoilWat or SWIM2.
How To: Modify a Graph component and copying the graph or it's data
Modify a graph component
After you have dragged a graph component to the desired location in your simulation tree so that it can see the necessary output files
your next task is to modify the graph component to plot your desired data.
-
You can expand the nodes of the graph component by clicking the "+" symbol next to it. This will reveal its child components. You
should repeat this for each child until you have a fully expanded tree under the graph component.

Each different type of graph component is slightly different in what child components it has, but the general rule for configuring is to start
at the bottom most child component and work your way back up towards the graph component.
Starting at the bottom is usually an "ApsimFileReader" component. This just lists the .out files that it has found and lets you preview the
data. Use the browse button to view other .out files it has found.

The "Plot" component is where you specify which columns from the .out file you want to plot.
It also lets you specify what type of graph you would like to use (solid line, dashed line, bar etc.) and what you want to use to mark the individual points on
the graph.

To specify which column to use as the X axis, you click on the "X variables" square to make its background pink. Then you click on the column
heading of the column you wish to add. You will then see the column name appear in the "X variables" square. To delete it, just click on it
in the square and press the delete button on your keyboard. You add specify the Y axis columns just click on the "Y variable" square to highlight
it pink and once again click on the column heading. If you wish to plot multiple columns on the same graph just keep on clicking more column headings.
If you are plotting multiple columns and you want to plot one of the columns on the Y2 axis instead of on the Y axis. You can just click on
the name in the "Y variables" square and then right mouse click on it again. In the popup menu just click on "Right Hand Axis".
In the same way if you wish a column to be the cumulative total of that column you do the exact same thing as to plot it on the Y2 column
only instead you click on "Cumulative" in the popup menu.

-
You can specify what type of graph and type of point markings you want to use by using the "Type" and "Point type" drop down lists respectively.
Finally, to view the graph just click on graph component in the simulation tree.
-
To give the graph a different label, simply rename the graph component (eg. from "XY" to "Shaun's Graph").
The name of the component is used as the label of the graph.
Copying the graph or it's data
- Right mouse click on the graph and select either "Copy to clipboard" to copy the image, or "Copy data to clipboard" to copy the data that has been plotted.
They can then be pasted just like any other windows application.
Graphing in ApsimUI
Graphs in the UI are structured representations of data - the structure describing where the data is found, and how it is presented. The graph components are built by the same toolbox / Drag and Drop operations as any other component in the simulation, though graphs are updated when displayed - not after the "run simulation" button is pressed.
The graph toolbox has 3 folders - commonly used graph types; individual components used to make a graph, and collections of complex graphs and associated reports. The graph types are:
- XY (or scatterplot) charts allow the user to plot 2 variables from a set of data on different axes (Scatter plot)
- A Probability of Exceedance chart that displays a single set of data against its cumulative frequency
- A Cumulative Distribution Function (CDF) that uses a more formal definition of cumulative frequency
- A box plot where quantiles and extremes of a data set are shown as overlaid rectangles (Box plot)
- 3 SOI Phase (Phases of the Southern Oscillation Index - described in Nature) charts that categorise a dataset in ENSO like groups,
- A Depth plot that describes a layered dataset over a soil profile,
- A Predicted - Observed chart that adds regression statistics to an XY plot,
- A R graphics chart that uses the R statistical computing language to desribe a graph.
Each of these graph types is a composite of "graph bits" - normal usage is to take one of the graph types, drop it onto your simulation, and customise the "bits" to present the data as you wish. By default, the graph uses whatever data it finds in its position in the simulation tree: if it's dropped on an outputfile component, it will use data from that outputfile; if it's in a paddock, it will use all outputfiles within that paddock, and if it's at the top level
simulations node it will use all the output files in all the simulations.
Basic instructions on modifying components of a simple graph are found
How to Modify a Graph Component.
You will see that CDF and probability charts are a variation of simple XY charts; with a GDProbability object between the data source (ApsimFileReader) and the plot reader. This object calculates the "probability" column that is used as one axis by the chart.
The three SOI chart variants serve to break a dataset into 5 categories, one for each phase of the SOI: positive, rising, zero, negative and falling. Each category serves to create a set of analogues: years when the SOI in a particular month (chosen by the user) is the same. A more detailed description of the methodology can be read here?????
Unlike timeseries (eg X(Date) vs Y) plots, depth plots are a way to look at the soil profile at an instant in time - they present depth on the vertical axis, and a data variable on the horizontal. These are used to great effect when displaying water or nutrient contents. Static values (eg LL, DUL) can be plotted as a guide.
The R graphics component simply calls R to run a script that hopefully leaves behind an image file that is displayed on the first tab. The second tab is where the user enters the script. The third tab displays any error messages from R as it runs the script.
How To: Using linkage to reduce simulation duplication
The APSIM user interface has the ability to create shortcuts to simulation components in much
the same way as Windows Explorer can create shortcuts. Whole simulations, parts of simulations or
individual components can be linked to another comoponent. When a component is modified in
one place, it is automatically updated in all linked copies.
To create a linked copy of a something, Drag the the thing you want to create a linked copy of using the right mouse button and drop it where you want the copy. Then select "Create link here" from the pop up menu.

There is no limit to the number of links that can be created, nor what can be linked.
Take the example were a base simulation has been created for a given scenario. If the intention is to then take this simulation and apply different fertiliser applications or sowing dates or soils to it, the tendancy would be to take a copy of the simulation and change the one attribute
(e.g. fertiliser amount), doing this many times for each permutation. A problem then arises when
the original simulation needs to be changed (e.g. a new variable added). This change then needs
to be propogated through all the permutation simulations.
Instead of creating a copy of the base simulation and changing the copy, the user can create a link to the base simulation. For the simulation example drag a copy of the simulation using the right mouse button and drop it on the parent node in the simulation tree and then select Create link here. This linked simulation is 'linked' to the base simulation. Changing the base
simulation will change the linked version and vise versa.
Once a linked copy has been created, the user can unlink the specific node that needs to be different
to the base simulation. This can be done by right clicking on the linked node and selecting
Unlink.

This unlinked node can then be changed independently from the base node.
As another
example, a folder could be added to the top level "Simulations" node where multiple soils could
be dropped into a soil folder. These soils could then be linked into the simulations that needs
them. e.g.
How To: Walkthrough of APSIM Website
If you look across the top of the www.apsim.info homepage you will see some links.
The most important links are:
Downloads -> Download new versions of APSIM and other tools.
Of particular interst is the APSoil database. This is a database of APSIM soils that you may
find useful for choosing a soil in your particular region. There is even a tool that will allow you to view all the soil locationsin Google Earth. Click the following link for a demonstration APSoil database
in Google Earth.
Documentation -> This training manual and the documentation for some of the official APSIM modules. Source code for APSIM. APSIM has gone open source, so now you can get hold of the computer code that is used to create APSIM.
Forum -> An APSIM Google Group where you can ask questions of the Software Engineering Group (SEG) or other users.
Bugs&Tasks -> A link to the Bug Tracking or Feature Requesting website for APSIM. This website allows you to submit bugs or feature requests for APSIM.
For more information click here
Publications -> A list of scientific publications surrounding APSIM. (nb. these are a bit old, we don't update them that often. We just provide a link to do a "Google Scholar" search for the most recent stuff.)
How To: Submit a bug or feature request for APSIM
- Go to www.apsim.info and click the "Bugs&Tasks" link at the top.
On the login page, just click the link called "Continue as "guest" without logging in". It is just below where you type your user name and password.
On the next page, you will see a list of all the bugs and feature requests that have been submitted to APSIM. Both by internal staff and
external users such as yourself. It is suggested that you take a look at this list to see if someone else has already submitted the bug or feature request already.
In the top left corner (as you look at it) click a link called "add a new bug"
This is the page that allows you to submit a bug or feature request. In the Description field just type a brief description,
In the Project field choose which product your request is with regard to. In the Category choose what type of request it is. In Apsim Version
just type in the version of APSIM that you noticed the bug in (if your request is not a bug then just leave it blank). Finally in the Comment
box, write a detailed description of the bug or feature request. IMPORTANT leave your name and contact details (you don't have to but if you don't and we don't understand your request or we can not recreate the bug we will not
be able to act on it).

-
When you are done, before you can create the bug you must first fill in the CAPTCHA. This is to stop automated hacking computer programs from entering fake bugs
into our system.

Then just click the Create button. Once this button is clicked you have sucessfully submitted your bug.
After submitting the bug you will be now taken to the update page for the bug you just submitted. You will see some links on
the left hand side of the page (as you look at it). Most of these are irrelavent to you except for the "add attachment" link. You can click this to add any
files or screen captures to do with your bug. You will also see your previously submitted comments underneath the Comment text box.
If you want to add anything you may have forgotten to put, you can just type it in the Comment text box and click the Update button and it will be
added to the bug.
If you click the "bugs" link at
the top of the page, you will be taken back to the list of bugs page. You will notice that your bug has been added. If you click the link in the
"desc" column, you will be taken back to this "update" page.
You can come back at any time and add more stuff about the bug. If you fix the bug yourself,
or if you made a mistake and it wasn't really a bug, just log back in and you will be taken to the bugs page. Just click the link in the desc column for
the bug you want to update to get to the update page for the bug and add a comment to the bug so we know not to worry about it. You can also add comments
to any other bugs on the bugs page in exactly the same way. Not only the ones you have created.