Upload
vinhxuann
View
215
Download
1
Embed Size (px)
Citation preview
7/30/2019 Apsim7_3S Asia Training Manual
1/84
South Asia Training Manual
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
1
1
7/30/2019 Apsim7_3S Asia Training Manual
2/84
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)
2
2
7/30/2019 Apsim7_3S Asia Training Manual
3/84
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 orMove 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 knowwhich 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 theAPSIM Forum.
3
3
7/30/2019 Apsim7_3S Asia Training Manual
4/84
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\sample
Closely 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
4
4
7/30/2019 Apsim7_3S Asia Training Manual
5/84
7/30/2019 Apsim7_3S Asia Training Manual
6/84
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 therespective "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.
6
6
7/30/2019 Apsim7_3S Asia Training Manual
7/84
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
7
7
7/30/2019 Apsim7_3S Asia Training Manual
8/84
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.
8
8
7/30/2019 Apsim7_3S Asia Training Manual
9/84
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 configuredfrom the Outputfile component.
Variables
Expand the outputfile component and click Variables
9
9
7/30/2019 Apsim7_3S Asia Training Manual
10/84
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 listof 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.
10
10
7/30/2019 Apsim7_3S Asia Training Manual
11/84
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 SimulationsSimulations 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
11
11
7/30/2019 Apsim7_3S Asia Training Manual
12/84
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.
12
12
7/30/2019 Apsim7_3S Asia Training Manual
13/84
Once the simulation has sucessfully run just click on the outputfile component to see your output file.
Note: The output file and summary fi les are just plain text fi les. 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 fi les in the same folder that you have saved
the simulation to. The user interface automatically names the output and summary fi le. 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 towhich 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 touse. In the image below we have choosen an XY graph component.
13
13
7/30/2019 Apsim7_3S Asia Training Manual
14/84
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 graphcomponent. 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 Excelbutton
14
14
7/30/2019 Apsim7_3S Asia Training Manual
15/84
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 underModule 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)
15
15
7/30/2019 Apsim7_3S Asia Training Manual
16/84
Get started with South Asian data
On the workshop CD you'll see a folder called "Data", an online copy is Here. Copy this to your computer. The
exercises below assume this will be "c:\apsim_workshop", though you can copy it to anywhere on your
computer.
Follow the instructions in Create your own or Add someone else's toolbox to add the toolbox"Rice_management.xml" (located in the Data directory above) to your APSIM User Interface. Don't point
APSIM to the toolbox on the CD - use the copy stored on your local computer.
16
16
7/30/2019 Apsim7_3S Asia Training Manual
17/84
2 Exercises
Exercise 1: Fallow Water Balance
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 Bhola
district of southern Bangladesh. 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 a blank simulation as a starting point1.
Choose a weather file for Bhola (c:\apsim_workshop\met_files\Bhola_1998-07.met)2.
Starting date: 1/1/2001 Ending date: 31/12/20013.
Rename paddock node to field4.
Add a soil to the field node. A suitable soil characterised for the Bhola region would be : "North
Joynags-06 No673.
5.
From Soils toolbox, find and drag a Southern Bangladesh, Bhola district Silt, (Wheat PAWC = 138.5
mm, 1.5m) soil description onto the field node of the simulation tree, (located under Soils >
Bangladesh > Southern Bangladesh > Bhola > Silt (North Joynags-06 No673)). Rename the soil to
something shorter like Silt.
6.
Set the starting water to 100% full - filled from the top. (expand the soil branch to see InitWater i.e.
click the "+" next to Silt)
7.
At the Initial nitrogen node, set the starting NO3 to 10 kg/ha (i.e. 6 and 4 in the 0-20 and 20-200 layers)
and starting NH4 to 5 kg/ha (i.e. 4 and 1 in the two layers)
8.
Add Surface organic Matter to the field:
From Standard Toolbox Soil related, drag a Surface Organic Mattercomponent onto the field node
9.
Check that the default initial OM pool name is rice_stubble and OM type is rice and the mass is 0
kg/ha. (at "surface Organic matter" node)
10.
From the standard Toolbox, drag a Outputfile onto the field node11.
Select the outputfile's Variables subcomponent. Choose these variables to report:
Component Variable name
Clock dd/mm/yyyy as Date
Year
Day
Met Rain
Silt ESW - Extractable soil water (mm)
ES - Evaporation
Runoff
DRAIN - Drainage
NO3 - summed over profile (Do this by
putting () next to the name in the "Variablename" column) eg. no3() (click "?" button next
to variable list for more info)
DLT_N_MIN - N mineralised - summed over
profile
12.
17
17
7/30/2019 Apsim7_3S Asia Training Manual
18/84
Surface organic matterSURFACEOM_WT - Weight of all surface
organic materials.
SURFACEOM_COVER - Fraction of ground
covered by all surface organic materials.
Select the "Outputfile" Reporting Frequencysubcomponent. Delete "daily". Choose end_day reporting
frequency for the output file. This can be found under the Clockcomponent filter
13.
Rename the simulation to something more meaningful: Silt Fallow14.
Save the simulation file as "c:\apsim_workshop\Fallow water balance.apsim"15.
Run the simulation by pressing the "Run" button at the top of the ApsimUI.16.
Create a graph of Date vs ESW.
Hint: To do this, click on the Graph Toolbox at the bottom of the window to open the toolbox. 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. 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.
Click on the esw column heading. It will be added to the Y variables square. To have a clean line plotted
with no points, under "Point type", choose "None". Now click on the XY component to view the graph.
17.
Once you have created a chart it is possible to make modifications by adding new variables. It is also
possible to mix the type of plots used on a graph. As an example, we will add rain as a bar chart on the
Y2 axis. To do this, drag plot onto the XY node to create a duplicate,plot1. Atplot1, remove esw and
add rain as the y variable. To make the "rain" appear on the right hand axis, click rain in the square to
highlight it, then "right" mouse click on it again. In the popup menu click on "Right Hand Axis". Select
bar chart from "type" drop_down menu. Select XY node to see the line and bar chart combination.
18.
Rename the XY graph node to Soil_water_storage
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. The distribution of daily rainfall
amounts helps see this more clearly.
19.
18
18
7/30/2019 Apsim7_3S Asia Training Manual
19/84
Note: You can also examine other components of the simulated soil water balance.
Drag Soil_water_storage to the outputfile node to make a copy of this graphics node. Rename the copy
to Runoff_drainage
20.
At the Plot1 node underneath the Runoff_drainage graph, remove rain from the Y variables box. Add
runoff and drain to the Y variable box. Put both on the right hand axis (right click on the variable) to
create a plot similar to the below figure.
21.
Runoff occurs from the start of the monsoon season early in May-June, continuing through the wet season till
Nov-Dec. Drainage begins sometime after the first runoff, once the soil profile is near full. (Remember, PAWC
for wheat in this soil is 138.5 mm, so the profile is mostly in a saturated state whenever esw is above this
limit).
19
19
7/30/2019 Apsim7_3S Asia Training Manual
20/84
Additional exercise: You could also make a plot of soil evaporation. See if you can do this for yourself.
The effect of soil type on the water balance.
Runoff, es and drainage are affected by weather and soil water storage capacity. This simulation will add anadditional soil and compare runoff from both soil types. The user interface still contains all the specifications
provided for the previous simulation.
If you drag the Silt 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.
Notes:
20
20
7/30/2019 Apsim7_3S Asia Training Manual
21/84
This second simulation can then be modified to add the characteristics of a second silt soil with higher water
holding capacity.
From Soils toolbox, find and drag the Bangladesh -> Southern Bangladesh -> Patuakhali district -> "Silt
(Shially-09 No783)" soil onto the paddock in the simulation tree and then remove the old soil (Hint:highligh the soil to delete and press the "Delete" key. It is important you drag in a new soil BEFORE you
delete the old one, otherwise the simulation will lose all your soil reporting variables. Also remember to
rename your soil to something shorter eg Silt_2
1.
Since now we have a new soil we will need to go and set the initial soil water (InitWater) to 100% filled
from top and initial soil nitrogen (Initial nitrogen) to NO3 to 10 kg/ha and NH4 to 5 kg/ha, as before.
When you delete soils you also delete the initial soil water conditions and initial soil nitrogen conditions
so these will need to be set similar to the conditions of the "Silt" soil.
2.
Rename the simulation to "Silt2 Fallow".3.
Save the simulations. (C:\apsim_workshop\)4.
Run APSIM for the Silt2 soil simulation.5.
Graph both the output files by dragging an XY graph onto the top node Simulations in the simulation
tree. By placing the XY graph under the "Simulations node", all output files in the simulation area will be
available for plotting in this case, the Silt and Silt2 outputs.
6.
Create a graph of date vs esw and runoff(cumulative, right hand axis). To make the runoff 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.
7.
The figure below includes a plot of drainage for the 2 soils. See if you can also add drain as shown above to
your esw-runoff plot. (Hint: create a plot1, do cumulative and right hand axis and choose "circles" under PointType)
21
21
7/30/2019 Apsim7_3S Asia Training Manual
22/84
The silt2 soil has only slightly higher runoff than the silt soil for all simulated events. Cumulative runoff for both
is similar at over 1800mm. Is this what you might expect, given the PAWC of 33mm and the same rainfall and
100% full profiles as starting conditions? What can be seen from the accumulated drainage? Would runoff and
drainage be the same if the initial PAWC for silt2 at the start had been different? (ie. Silt2 InitWater = 50%)
Notes:
22
22
7/30/2019 Apsim7_3S Asia Training Manual
23/84
Notes:
23
23
7/30/2019 Apsim7_3S Asia Training Manual
24/84
Additional exercise: explore the effect of changing curve number on the water balance. eg. for the silt2 soil,
keep previous initial PAWC settings at 50% (Silt2) and change curve number from 94 to 84 in the Soilwat
node. What is the effect on accumulated runoff and drainage?
Changes to the water balance by ponding water on the surface.
In the previous exercises we have investigated the APSIM water balance on free draining soils in
accumulating stored soil water and in simulating effects of runoff, drainage and soil evaporation. The soil
specified in the previous examples reflect a typical soil in a natural (cultivated or uncultivated) state unaffected
by (farmer) imposed physical constraints to the flow of water in the landscape. Rice production particularly
during the wetter months of the monsoon is grown under paddy conditions. The natural structure of the soilsurface has been modified (puddled) to reduce drainage and bunding (ponding) imposed to reduce runoff.
These conditions therefore require some change to parameters in APSIM to simulate the effect of ponded
water above the soil surface. The following exercise will use the 'max_pond' parameter to enable ponding of
surface water and modify 'KS' (hydraulic conductivity) values for each soil layer to restrict the rate of vertical
drainage.
Drag Pond_depth on to the Manager Folder from "Rice Management Toolbox" -> "Rice" -> "Manager
(Pond_depth)"
1.
Change properties to:
Name of your soil module: SiltStart date for ponding: 1-Jun (Start of wet season - bunds constructed)
End date for ponding: 30-Oct (Crop maturing - open bunds)
Maximum depth of pond: 150
Minimum depth of pond: 0
2.
24
24
7/30/2019 Apsim7_3S Asia Training Manual
25/84
Enable irrigation : No (set to No irrigation for the momemt)
Start date for irrigation: 1-Jul
End date for irrigation: 30-Oct
Maximum number of irriagtions allowed: 0
Edit your soil file properties - Water - KS. (hydraulic conductivity in mm/day)to:
Component Variable name
Depth KS
0-15 1.0
15-30 1.0
30-60 24.0
60-90 24.0
90-120 24.0
120-150 24.0
3.
Add additional report variables:Component Variable name
Met rain
Soil DUL(1)
sw(1)
no3()
drain
runoff
4.
Drag Irrigation on to the paddock fieldnode in the "Silt Fallow Ponding" simulation from "Standard
Toolbox" -> "Water Components (Irrigation)"
5.
Run APSIM for the Silt Fallow Ponding simulation.6.
Create a graph of date vs DUL(1) and SW(1) (on Y axis) after deleting previous graphs. Rename this
new graph to Ponding.
7.
Create a second graph by dragging Pondingonto youroutputfile. Select runoff and drain (Cumulative)
on the Y axis. Rename this graph Drainage-Runoff.
8.
25
25
7/30/2019 Apsim7_3S Asia Training Manual
26/84
The Pondinggraph shows the drained upper limit (DUL) of the first soil layer and volumetric soil water
(sw(1)) in mm/mm for the first soil layer. Values above the DUL line indicate soi l water over the drained
upper limit and represent ponded water to a level as defined by "max_pond". The Drainage-Runoff
graph presents simulated values for cumulative runoff (in excess of water stored by "max_pond") and
cumulative drainage from the bottom of the profile as effected by "KS" input values.
26
26
7/30/2019 Apsim7_3S Asia Training Manual
27/84
Additional exercise: Explore the effect of changing 'KS' rates (mm/day) on the level of cumulative
runoff and drainage.
Notes:
27
27
7/30/2019 Apsim7_3S Asia Training Manual
28/84
Exercise 2: Residue Cover Fallow
Tracking the decline of cover as residues decompose
APSIM simulates the influence of crop residues on the efficiency with which soil water is captured and
retained during fallows. But residue cover declines as residues decompose. Residue decomposition issimulated in APSIM in response to weather, as well as the chemical composition of the residues and soil. 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 water balance.apsim. (Hint: c:\apsim_workshop\fallow waterbalance.apsim)1.
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 water balance.apsim)
2.
Remove the Silt2 Fallow simulation. We're going to use Silt Fallowas our starting point for this
exercise. Also remove the graph components. Select the graph component and press "delete" or right
click on the component and select Delete.
3.
Make a copy of the Silt Fallow simulation by dragging to the top node in tree (Simulations).4.
Rename second simulation to Silt rice residue5.
Select the Surface Organic Matternode for editing:
Set Organic Matter pool name: rice_stubble.
Set Organic Matter type: rice.
Set Initial surface residue: 2000 kg/ha.
6.
Run the simulation7.
Create a graph of day vs surfaceom_cover and rain(right hand axis) for the Silt rice Residue simulation.
Drag an XY graph from the "Graph toolbox" -> Graph -> "Graphs (XY)" onto the output file, and rename it
to rice_cover. Remember to set "Point type" to None. To find out how to modify a graph see How To
Modify a Graph Component
8.
28
28
7/30/2019 Apsim7_3S Asia Training Manual
29/84
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
In this activity, a comparison will be made between two simulations: Silt Fallowand Silt Rice Residue.
Drag the rice_covergraph that we've just created onto the simulations node at the top of the tree to
create a copy.
1.
Graph Date vs runoff(cumulative)2.
Rename this graph residues_runoff. Notice that data from both simulations (Silt Fallowand Silt rice
residue) appears.
3.
Drag grahic node Plotto residues_runoffnode to create Plot14.
Graph rain (this time select Type = Bar)5.
29
29
7/30/2019 Apsim7_3S Asia Training Manual
30/84
The effect of residue type on speed of decomposition
The APSIM Surface Organic Matter model will decompose residues at differing rates according to the C:N
ratio of the material, amongst other parameters. To demonstrate this we will reproduce the previous simulation
but apply legume residues in the place of the rice straw residues.
Create another copy of the Silt rice Residue simulation and call it Silt cowpea residue. Delete the
rice_cover graph
1.
Select Surface Organic Matterfor editing:
Set Organic Matter pool name: cowpea_stubble.
Set Organic Matter type: cowpea.
Set Initial surface residue: 2000 kg/ha.
set C:N ratio of initial residue: 20.
(Remember you may want to change the Surface Organic Matter poolname to something like Cowpea
as well)
2.
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.
3.
Create a new graph forSilt rice residue and Silt cowpea residue simulations with residue cover as a
function of time (eg date). Add rain to the right hand axis.
4.
Rename the graph to "residue_type_cover".5.
30
30
7/30/2019 Apsim7_3S Asia Training Manual
31/84
Notes:
31
31
7/30/2019 Apsim7_3S Asia Training Manual
32/84
Exercise 3: Nitrogen cycling
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 silt soil in the
Bhola region in Southern Bangladesh.
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 Wheat1.
Change simulation name to Silt Fertilised2.
Save the file as N Fallow.apsim (C:\apsim_workshop\N fallow.apsim)3.
Choose a weather file for Bhola (c:\apsim_workshop\met_files\Bhola_1998-07.met)4.
Set the clock starting date: 1/1/2001 Ending date: 31/12/20015.
Add a soil to the field node (North Joynags-06 No673)6.
From Soils toolbox, find and drag a Southern Bangladesh, Bhola district Silt, (Wheat PAWC = 138.5
mm, 1.5m) soil file ("Soils" > Bangladesh > Southern Bangladesh > Bhola > "Silt (North
Joynags-06 No673)") onto the fieldnode of the simulation tree. Remove the existing soil description
after the addition. Rename the soil to something short like "Silt". If you like you can also reorder the soilcomponent so it comes straight under the paddock. (Hint: Highlight your soil and use the Ctrl & up arrow
to move a node up the tree)
7.
Set the Starting water to 50% full, evenly distributed.8.
At the Initial nitrogen node, set the starting NO3 to 10 kg/ha (i.e. 6 and 4 in the 0-20 and 20-200 layers)
and starting NH4 to 5 kg/ha (i.e. 4 and 1 in the two layers)
9.
Set the initial surface organic matter to 2000 kg/ha wheat residues.10.
Remove the wheat component from the paddock, and all manager rules from the manager folder.11.
Drag a Fertilise on fixed date to your Manager component. ("Standard toolbox" -> "Management" ->"Manager (common tasks)" )
12.
Select Fertilise on a fixed date to edit:
Enter fertiliser date: 15-Jan.
Don't add fertiliser if N in top 2 layers exceeds: 1000.
Module used to apply fertiliser: fertiliser.
Amount of fertiliser to apply: 100.urea_N.
13.
Make sure your simulation contains a Fertilisercomponent in your paddock. Even though it doesn't
have any changeable properties it is still necessary when fertiliser is to be applied.
14.
Select OutputfileVariables.15.
32
32
7/30/2019 Apsim7_3S Asia Training Manual
33/84
Add the following variables to report:
Component Variable name
Clock dd/mm/yyyy as Date
Year
Day
Met Rain
Soil (Silt)dlayer
The thickness (in mm) of each soil layer
esw
Extractable Soil Water (mm)
drain
Drainage (mm)
NO3() as NO3_Total
Nitrate Nitrogen, summed over profile, aliased
to NO3Total. (the as keyword creates an alias)
NH4() as NH4_Total
Ammonium Nitrogen, summed over profile,
aliased to NH4Total
UREA()
DNIT()
NO3
Nitrate Nitrogen, layeredNH4
Ammonium Nitrogen, layered
16.
Change reporting frequency (underOutputfile) to end_day.17.
Run the simulation18.
Create a graph of date 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.
19.
33
33
7/30/2019 Apsim7_3S Asia Training Manual
34/84
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 Date vs Rain, DNIT (right hand axis), ESW and NO3_Total.
From this chart you can see that some nitrogen is lost via denitrification when large amounts of nitrate is
available in saturated soil conditions. But why do you think the level of denitrification is so low (0.1
kgN/ha/day) in this case?
Exploring vertical movement of nitrate, after fertilisation, through the soil
profile
Let's look at the distribution of nitrate through the soil profile at the day fertiliser is applied and then at 1, 3 and
5 months after fertilisation.
Create a depth graph (from the graph toolbox), and expand all the sub-nodes. Go to the depth node, and
select (so that they show a tick mark) the dates 15/01/2001, 15/02/2001, 15/4/2001 and 15/5/2001. Go
to the Plot node and select NO3 as the X variables. Leave the Y variable as "Depth". Select the top
graph node ("Depth").
Depth plots can only be done when the simulation has "dlayer" in the output file along with at least one
other layered variable. This is why we included no3 and nh4 as layered variables in the output file and
not just the summed variables for NO3() and NO4(). (Hint: adding () to an array variable like "NO3" toform "NO3()" will sum the nitrate values from all the soil layers)
1.
34
34
7/30/2019 Apsim7_3S Asia Training Manual
35/84
From this chart you can see the change (on the X axis) in the distribution of nitrate (NO3) in the soil
profile (Y axis) over time in response to the addition of urea fertiliser and leaching processes at the
start of the wet season. (The default title "Depth" can be changed to something more suitable ie.Change in soil NO3 over time
Question: Why is there little change before the 15th of May?
Repeat the steps above and create another graph this time selecting NH4.
Notes:
35
35
7/30/2019 Apsim7_3S Asia Training Manual
36/84
Question: What has happened to the NH4? Try changing the dates to look at NH4 at 1, 5 and 10 days
after fertiliser has been applied.
From this chart you can see the change in the distribution of NH4 in the profile occurs very rapidly over
the course of a few days. NH4 is converted to NO3.
36
36
7/30/2019 Apsim7_3S Asia Training Manual
37/84
Additional exercise: Try creating another simulation with clock set between 14/01/2001 and
31/01/2001. Create a time series graph of urea(), NO3_total and NH4_total in the profile over a period
of 15 days after fertiliser is applied. Would the simulated process be the same if the fertiliser was
applied in the middle of the wet season (August)?
Movement of Nitrogen between Organic Matter Pools
In this exercise we track the movement of nitrogen in fresh organic matter into soil microbial biomass and
further into mineral nitrogen. We shall compare the flows in these processes for incorporation of two types of
residues wheat and cowpea.
Make a copy of the Silt fertilisedsimulation by dragging to the top node in the tree (Simulations)1.
Delete all the XY and Depth graphs. - This setup already includes wheat residues on the surface at
2000 kg/ha and C:N ratio of80
2.
Change starting NO3-N to 60 kg/ha (36 and 24 in each of the 2 layers), leaving NH4-N at 5 kg/ha3.
Remove Fertilise on fixed date from your paddock component4.
Drag Tillage on fixed date to the Manager folder in your paddock component for this new simulation.
(open "Standard toolbox" -> "Management" -> "Manager (common tasks)" )
5.
Change the Tillage management parameters to: date = 15-Jan
Select Module used to apply the tillage as Surface organic matterorWheatif renamed
Change the Tillage type parameters to: type = tine
Module used to apply the tillage = Surface Organic Matter
Tillage Type = user_defined
6.
37
37
7/30/2019 Apsim7_3S Asia Training Manual
38/84
User defined depth of seedbed preparation = 100 (mm)
User defined fraction of surface residues to incorporate = 1.0
Change simulation name to Silt wheat residues incorp.7.
Choose these variables to report:
Component Variable name
Clock dd/mm/yyyy as Date
Soil (Silt) Biom_n() as biom_n_Tot
Fom_n() as fom_n_TotNO3() as no3_Tot
8.
Create a copy of the Sand wheat residue incorp simulation and call it Sand cowpea residue incorp.9.
Change the initial surface residue parameters to 2000 kg/ha ofCowpea (type) residue. Set the C:N
ratio to 20. (Remember you may want to change the Organic Matter pool name to cowpea as well.
Remember to reflect this change in Tillage on a fixed date - Module used to apply tillage)
10.
Run the two simulations for residue incorporation.11.
Graph both residue incorporation simulations with fom_n_tot (left hand axis), no3_tot and biom_n_tot
(right hand axis), and fom_n_tot. (Drag an XY graph onto the top node (simulations), open the
ApsimReader node and point to the 2 output files)
12.
38
38
7/30/2019 Apsim7_3S Asia Training Manual
39/84
7/30/2019 Apsim7_3S Asia Training Manual
40/84
Exercise 4: Single season rice crop
Single season rice crop
In this exercise we will simulate the biomass and yield of a direct-seeded rice crop using APSIM-ORYZA.
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 and type. These skills can also be used to
experiment with time of planting, rate of sowing and different irrigation rates.
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 Oryza as a template1.
Select the first example Rice to use for this simulation (delete the second example:'Ponding simulation'
for the moment)
2.
Choose the Bhola_1998-07.met weather file3.
Set the clock starting date: 1/1/2001, Ending date: 31/12/20014.
Add a soil to the field node ("North Joynags-06 No673)5.
From Soils toolbox, find and drag a Southern Bangladesh, Bhola district Silt, (Wheat PAWC = 138.5
mm, 1.5m) soil description onto the fieldnode of the simulation tree, (located under Soils >
Bangladesh > Southern Bangladesh > Bhola > Silt (North Joynags-06 No673)) removing the existing
soil description after the addition. Rename the soil to something short like Silt. If you like you can also
reorder the soil component so it comes straight under the field.
6.
Set the Starting water to 100% full - filled from top.7.
Set the Starting nitrogen to 10 kg/ha of NO3 (as 6 and 4 in each layer, respectively) and 5 kg/ha (4 + 1)
of NH4
8.
Drag a Surface Organic Matter componet from Toolbox - Soil related onto your paddock.9.
Select the Surface Organic Mattercomponent for editing: Organic Matter pool name: rice_stubble.
Surface organic matter type: rice.
Initial surface residues: 0.
10.
In the Irrigation component setAutomatic irrigation to off.11.
Drag a fertilisercomponent from the toolbox onto yourpaddock. (You may want to reorder components
above the output file)
12.
In the Managercomponent, delete the Rice sowing rule. Drag a Rice-Direct seedingcomponent from
the Rice Management Toolbox into the Manager.
13.
Change the sowing rule to:
set sowing window START to 1-Jul
set sowing window END to 1-Jul
set Cultivar to local
set number of plants per seedbed to 180
14.
40
40
7/30/2019 Apsim7_3S Asia Training Manual
41/84
Choose these variables to report:
Component Variable name
Clock dd/mm/yyyy as Date
Year
Day
Soil (Silt) ESWNO3() as no3_tot
Rice cropsta as crop_stage
dae
wagt as total_biomass
wso as storage_organs
wrr as rice_yield (Variable not in drop down)
tnsoil as N_avail
15.
Choose an "end_day" reporting frequency.16.
Rename the simulation to Direct_seeded_rice.17.
Save the simulation file as Rice single season.apsim (C:\apsim_workshop\Rice single season.apsim)18.
Run the Direct_seeded_rice simulation19.
Graph total_biomass and rice_yield with an XY graph with Date on the X axis. (Drag or Insert the XY
graph on the top simulation node to plot output from both simulations)
This simulation demonstrates a local rice variety (direct seeded) grown under rainfed conditions during
the monsoon. Simulated rough rice yield and biomass indicate a favourable season for rainfall.
Investigate the rainfall during the growing season by reporting additional variables.
20.
41
41
7/30/2019 Apsim7_3S Asia Training Manual
42/84
Add additional report variables:
Component Variable name
Met rain
Soil (Silt) DUL(1)sw(1)
no3()
nh4()
drain
Irrigation irrigation
21.
Rerun simulation22.
Create a new graph by copying your XY chart onto the 'Outputfile'. Copy 'Plot' onto this XY Chart1 to
create a second Plot1. For Plot select Y variables dul(1) and sw(1) (solid line and no points). For 'Plot1'
select rain (right hand axis and type= Bar).
This graph shows volumetric soil water levels (sw(1) in mm/mm) in the top layer compared with the
drained upper limit(DUL)in layer 1. Soil water in the surface layer is effected by soil evaporation
(decline in SW(1) during the drier winter months of January to March) while surface water occurs only
during the high rainfall period of the monsoon.
23.
42
42
7/30/2019 Apsim7_3S Asia Training Manual
43/84
Single season transplanted rice crop under ponded conditions
In this exercise we will simulate the growth and yield response of transplanted paddy rice. Apply fertiliser at
defined stages in crop development and apply irrigaton as required to maintain adequate water levels in a
paddy.
Make a copy of the simulation Direct_seeded_rice by dragging it to the Simulations node at the top of
the simulation tree.
1.
Rename this copy to Transplanted_paddy_rice.2.
Delete the Rice-Direct seedingmanager from the Manager folder3.
Drag Pond_depth on to the Manager Folder (from "Rice Management Toolbox" -> Rice-> "Manager
(Pond_depth)"
4.
Change properties to:
Name of your soil module: SiltStart date for ponding: 1-Jun (Start of wet season - bunds constructed)
End date for ponding: 30-Oct (Crop maturing - open bunds) Maximum depth of pond: 150
Minimum depth of pond: 50 (Note: This is the trigger for irrigation to be applied)
Enable irrigation : No (set to No irrigation for the momemt)
Start date for irrigation: 1-Jul
End date for irrigation: 30-Oct
Maximum number of irrigations allowed: 6
5.
Edit your soil file properties - Water - KS. (hydraulic conductivity in mm/day)to:
Component Variable name
Depth KS
0-15 24
15-30 24
30-60 24
60-90 24
90-120 24
120-150 1
6.
Drag Rice-Transplant Aman on to the Manager Folder (from "Rice Management Toolbox" -> Rice->"Manager (Rice-Transplant Aman)"
7.
Change properties to:
Enter sowing window START date: 1-Jul
Enter sowing window END date: 1-Jul
Duration of seedbed: 25
Number of plants on hills: 2
Fertiliser type: urea_N
Amount of fertiliser at transplant: 30
8.
Save the file9.
Drag Fertilise on growth stage on to the Manager Folder (from "Rice Management Toolbox" -> Rice->
"Manager (Fertilise on growth stage)"
10.
Change properties to:
Amount of fertiliser to apply: 40
11.
43
43
7/30/2019 Apsim7_3S Asia Training Manual
44/84
7/30/2019 Apsim7_3S Asia Training Manual
45/84
Create a second XY graph using Plot by dragging it onto your 'Outputfile'. Graph dul(1) and sw(1) on the
left axis with rainfall and drainage (Cumulative) on the right hand axis.
Notes:
45
45
7/30/2019 Apsim7_3S Asia Training Manual
46/84
Exercise 5: Crop rotations
Two monsoon rice crops (TAus - TAman)
In this exercise you will simulate two rice crops grown during the monsoon period. TAus rice is transplanted at
the start of the wet season in June and followed by the a TAman crop in late August.
The examples assume you have read and walked through the previous document: How to Build, Run and
Graph a Simulation
Open the previous simulation Rice single season as a template. (C:\APSIM_workshop\Rice single
season.apsim)
1.
Use "Save as" to create a copy of this file in the c:\APSIM_workshop\ directory. Name this simulation
Rotations.
2.
Make a copy ofTransplanted_paddy_rice by dragging it onto the Simulations node.3.
Rename the copy to Rice-Rice.4.
Select the Micrometnode inpaddockand delete (this is not required in these exercises)5.
Select your soil (silt) for editing and change the starting soil waterto 10% full (Evenly distributed)6.
Select the Manager -> Rice-Transplant Aman rule to edit: Enter sowing window START: 1-Aug.
Enter sowing window END: 1-Aug.
Cultivar: BR23.
Duration of seedbed: 25.
Number of plants on hills: 2.
Number of hills: 25.
Number of plants per seedbed: 1000. (Plants/m2)Fertilizer type: urea_N.
Amount of fertilizer at transplant: 100.
7.
Select the Manager -> 'Pond_depth' rule to edit: Name of your soil module: Silt.
Start date of ponding: 15-Apr.
End date of ponding: 30-Oct.
Maximum depth of pond: 150.
Minimum depth of pond: 50.
Enable irrigation: yes.
Start date for irrigation: 15-May.
End date for irrigation: 30-Oct.
Max number of irrigations: 6.
8.
Select the Manager -> Rice-Transplant Aus rule to edit: Enter sowing window START: 15-Apr.
Enter sowing window END: 15-Apr.
Cultivar: BR3.
Duration of seedbed: 30.
Number of plants on hills: 2.
Number of hills: 25.
Number of plants per seedbead: 1000.
Fertilizer type: urea_N.
Amount of fertilizer at transplant: 30.
9.
Run the Rice-Rice simulation.
Graph date (X axis) vs total_biomass and rice_yield (Y axis). ( Hint: Use your XY Chart from the
previous simulation)
Change the 'title' of your graph by renaming your 'XY Chart' to a more siutable name. (Hint:
TAus-TAman rice (biomass and yield))
10.
46
46
7/30/2019 Apsim7_3S Asia Training Manual
47/84
In the above simulation two rice varieties have been selected for their duration to maturity (Medium: BR23
~119 DAE and Medium short: BR3 ~100 DAE) which enabled two rice crops to be planted during the wetter
months of the local monsoon season. Selecting the appropriate variety (duration to maturity) is an importantfactor in constructing any crop rotation or cropping sequence and can effect the outcome of any long-term
cropping sequence scenario. The previous simulations have only considered fixed sowing dates. Under
dryland conditions the opportunity to sow a crop may rely on a rainfall event due to the unavailability of
irrigation. A planting window (window of opportunity) can be defined in the manager with sowing triggered on
meeting a specific condition such as rainfall (ie. 20mm over 3 days) or level of soil water (ie. ESW > 100mm).
Adding a dry season crop (ie. wheat) into the rotation
The previous example demonstrated a simple crop rotation or sequence of two wet season rice crops. In this
exercise you will replace the early rice crop with a dry season crop (ie. wheat) sown into a full profile in mid
November following the TAman rice harvest.
Make a copy of 'Rice-Rice' by dragging it onto the 'Simulations' node.1.
Rename the copy to Rice-wheat.2.
Select clock and change the start and end dates for the simulation: Start date: 1/06/2001 End date:
31/05/2002
3.
Select the Manager -> Rice-Transplant Aus rule and delete:4.
Select the Manager -> Rice-Transplant Aman rule to edit: Enter sowing window START: 15-Jul.
Enter sowing window END: 15-Jul.Cultivar: BR23.
Duration of seedbed: 25.
Number of plants on hills: 2.
Number of hills: 25.
Number of plants per seedbead: 1000.
5.
47
47
7/30/2019 Apsim7_3S Asia Training Manual
48/84
Fertilizer type: urea_N.
Amount of fertilizer at transplant: 50.
From the "Standard Toolbox" select "Crops (wheat)" and drag onto thepaddocknode. (You may want to
reorderwheatto below the rice component)
6.
From the Standard Toolboxselect "management" -> "Manager (common tasks)" -> (Sow using a
variable rule) and drag onto the manager folder in your 'paddock'.
7.
Select Manager folder-> Sow using a variable rule to edit:
Enter sowing window START: 1-Dec.
Enter sowing window END: 1-Dec.
Must sow: yes.
Enter name of crop: wheat.
Enter sowing density: 100.
Enter cultivar: 'prodip.
Enter crop class: plant.
Enter row spacing: 250.
From the "Standard Toolbox" select "management" -> "Manager(common tasks)(Harvesting rule)" and
drag onto the manager folder in yourpaddock.
8.
Select 'Manager folder' -> 'Harvesting rule' to edit:
Enter name of crop to harvest when ripe: wheat.
9.
From the "Standard Toolbox" select "management" -> "Manager(common tasks)(Fertilise at sowing)" and
drag onto the manager folder in yourpaddock.
10.
Select Manager folder-> Fertilise at sowingto edit:
On which module should the event come from: wheat.
On which event: sowing.
Module used to apply fertiliser: Fertiliser.
Amount of starter fertiliser at sowing: 40.
Sowing fertiliser type: urea_N.
11.
From the 'Rice Management Toolbox' select 'Rice' -> 'Manager' -> (Fertilise and Irrigate rabi crop) anddrag onto the manager folder in your 'paddock'.
12.
Select 'Manager folder' -> 'Fertilise and Irrigate rabi crop' to edit:
Crop type: wheat.
DAS to apply fertiliser: 20.
Module used to apply the fertiliser: Fertiliser.
Amount of fertiliser to apply: 30.
Fertiliser type: urea_N.
Amount of irrigation to apply: 60
13.
Add additional report variables:
Component Variable nameWheat biomass as wheat_biom
yield as wheat_yield
14.
Make a copy ofFertilise and Irrigate rabi crop by dragging it onto the Manager foldernode.15.
Select Manager folder-> Fertilise and Irrigate rabi crop1 to edit:
Change DAS to apply fertiliser: 40.
Change amount of fertiliser to apply: 30.
Fertiliser type: urea_N.
Amount of irrigation to apply: 60
16.
From the "Standard Toolbox" select "management" -> "Manager(common tasks)(Irrigate at sowing)" anddrag onto the manager folder in yourpaddock.
17.
Select Manager folder-> Irrigate at sowingto edit:
The module the event come from: wheat.
. Which event should irrigation be applied: sowing.
18.
48
48
7/30/2019 Apsim7_3S Asia Training Manual
49/84
Module used to apply irrigation: Irrigation.
Amount of irrigation to apply: 60.
From the "Rice Management Toolbox" select "Rice" -> "Manager (Rabi residue)" and drag onto the
manager folder in your "paddock".
19.
Select "Manager folder" -> "Rabi residue" to edit:
The module the event come from: wheat.
On which event should tillage be done: harvesting.
Module used to apply the tillage: Surface Organic Matter.Tillage type: user_defined.
User_defined depth of seedbed preparation: 0.
User_defined fraction of surface residue to incorporate: 0.8.
20.
Run the Rice-wheat simulation.
Graph date (X axis) vs total_biomass, rice_yield, wheat_yield and wheat_biom (Y axis). ( Hint: Use
your XY Chart from the previous simulation and add the reporting variables selected for wheat)
Change the 'title' of your graph by renaming your 'Chart' to a more siutable name. (Hint:TAman
rice-wheat rotation)
21.
The above examples introduced a crop rotation or cropping sequence where two crops (rice and wheat) are
grown in series over a single season. The previous exercises have only considered a 12 month period. In the
next exercise you will evaluate a long-term scenario based on the rice-wheat simulation that you have
created. Long-term simulations require a much longer climate record. The Bhola_1998-07.metfile contains
daily records from 1998 to 2007 and enables simulation of this cropping sequence over 9 years.
49
49
7/30/2019 Apsim7_3S Asia Training Manual
50/84
Long-term rice-wheat rotation
Make a copy of 'Rice-wheat' by dragging it onto the 'Simulations' node.1.
Rename the copy to Rice-wheat scenario.2.
Select clock and change the start and end dates for the simulation:
Start date: 1/06/1998.
End date: 31/05/2007.
3.
Run the Rice-wheat scenario simulation.
Evaluate the 'XY Chart' showing total biomass and yield of both wheat and rice.
Change the 'title' of your graph by renaming your 'Chart' to a more siutable name. (Hint:TAman
rice-wheat scenario)
4.
The above graph is an example of a simple "rice-wheat" rotation where crops are sown on fixed planting
dates. In the following example you will evaluate the introduction of an opportunity crop into this long-term
rotation. Opportunity crops rely on a particular event occuring that would enable a crop to be planted. A simple
example of an event is "rainfall". (ie. During a specified window of opportunity, did we get sufficient rainfall to
enable a particular crop to be planted?)
50
50
7/30/2019 Apsim7_3S Asia Training Manual
51/84
Add an opportunity crop (ie.mungbean) to a long-term rice-wheat rotation
Make a copy of 'Rice-wheat scenario' by dragging it onto the 'Simulations' node.1.
Rename the copy to Rice-wheat-mungbean opportunity.2.
From the 'Standard Toolbox' select 'Crops' -> 'mungbean' and drag onto the 'paddock' node. (You may
want to reorder 'mungbean' to below the 'wheat' component) (Hint: Ctrl + up arrow)
3.
Make a copy of your 'Sow using a variable rule' in the 'Manager folder' by dragging it onto the Manager
folder node. Rename the copy to 'Sow mungbean'.
4.
Select 'Sow mungbean' for editing:
Enter sowing window START date: 20-Mar.
Enter sowing window END date: 7-Apr.
Must sow: No.
Amount of rainfall: 20.
Number of days of rainfall: 3.Enter minimum allowable available soil water: 0.
Enter name of crop to sow: mungbean.
Enter sowing density: 45.
Enter sowing depth: 30.
Enter cultivar: berken.
Enter crop growth class: plant.
Enter row spacing: 250.
5.
Make a copy of your 'Harvesting rule' in the 'Manager folder' by dragging it onto the Manager folder
node. Rename the copy to 'Harvesting mungbean'.
6.
Select 'Harvesting mungbean' for editing:Enter name of crop to harvest: mungbean.7.
Change report variables:
Component Variable name
Wheat biomass
yield
8.
Select the water node in your soil (Silt) for editing:
Make a copy ofwheatby dragging it onto the waternode.
9.
Rename this copy to mungbean and select for editing:
Change "xf" values of1 at 0-90 cm and 90-120cm and 120-150cm to 0. (This restricts potential rooting
depth for mungbean to only 60cm)
10.
Run the Rice-wheat-mungbean opportunitysimulation.
Graph date (X axis) vs rice_yield, wheat.yield and mungbean.yield (Y axis). Rename the graph to 'Rice-
wheat-mungbean opportunity' ( Hint: Edit the old XY Chart copied over from the previous simulation)
11.
51
51
7/30/2019 Apsim7_3S Asia Training Manual
52/84
Question: How many years do you get a planting opportunity to sow mungbean?
The previous examples have demonstrated the process for constructing a simple cropping sequence or
rotation (Rice-wheat) based on fixed sowing dates. The rice seedling nursery was sown on the 15th of Julywith transplanting occuring after 25 days. The wheat was sown on the 8th of December allowing time for the
TAman rice harvest and well within the optimal planting window for wheat at "Bhola". Mungbean was included
in this simulation as an example of an opportunity crop. The sowing criteria required 20mm of rainfall to occur
over a 3 day period if the crop was to be sown. As the graph shows, these conditions only occurred in 5 of the
9 years.
Additional exercise: Explore the effects of changing the "Sowing criteria" for mungbeans on the frequency of
a successful mungbean crop.
Notes:
52
52
7/30/2019 Apsim7_3S Asia Training Manual
53/84
Exercise 6: System evaluation
A simple cropping sequence: biomass, nitrogen and water
In this exercise you will construct time series graphs to help in the evaluation and discussion of the following
key components of a rice-wheat cropping system:1. Total above ground biomass and grain production during the season for both rice and wheat crops.
2. Soil nitrogen dynamics in response to applied fertiliser on soil nitrogen availability.
3. Soil water and ponding dynamics in response to rainfall and applied irrigation.
Create a copy of the Rotations.apsim file and rename it to Rice-wheat system.apsim.
(C:\apsim_workshop\Rotations.apsim) Load the new APSIM file into the ApsimUI. Remove all the
additional simulations except forRice-wheatby selecting a simulation node and pressing the Delete
key.
1.
Select the outputfile -> Variables subcomponent. Add additional variables to report:
Component Variable name
Fertiliser fertiliser
Silt NH4()
Rice rlai as LAI(rice)
Wheat wheat.lai as LAI(wheat)
2.
Run the simulation.
TAman rice-wheat rotation: Simulated biomass and grain yield for a transplanted "Aman" rice - wheat
3.
53
53
7/30/2019 Apsim7_3S Asia Training Manual
54/84
cropping sequence.
SelectXY Chart1 and rename to Nitrogen.4.
In the 'Plot' window in addition to the Y variables: no3(), NH4(1) and N_avail add nh4().
Nitrogen: Simulated soil nitrogen dynamics for a TAman rice - wheat cropping sequence.
5.
Add an additional graph to yourOutputfile node.
In the Y variables add the following variables: dul(1)and sw(1) on the lefthand axis. On the righthand
axis add: irrigation. Create an extra plot component by dragging a 'plot' (from "Graph Toolbox" -> Graph
-> "GraphBits (Plot)" onto the 'Outputfile'. Add rain (Righthand axis) into the Y axis in 'Plot1'. Change the
type to Barand select a new colour. Rename this graph to Water.
6.
54
54
7/30/2019 Apsim7_3S Asia Training Manual
55/84
Water: Simulated period of ponding during the monsoon rice crop. Rainfall and irrigation events
occuring over the rice - wheat cropping season.
Create a graph of Leaf Area Index (LAI) for the rice and wheat crops. Plot LAI(rice) and LAI(wheat) on
the Y axis. Add a second 'Plot' component (Hint: See documentation above for the watergraph on
adding a plot component) with Y variables: total_biomass and wheat_biom (right axis). Rename this
graph to LAI.
Notes:
7.
55
55
7/30/2019 Apsim7_3S Asia Training Manual
56/84
LAI: Simulated Leaf Area Index (LAI) for rice and wheat. Plant biomass is also included.
Notes:
56
56
7/30/2019 Apsim7_3S Asia Training Manual
57/84
Exercise 7: Climate change projections
Climate Change projections in APSIM - response to changing CO2
Climate change and agriculture are interrelated processes, both of which take place on a global scale. Global
warming is projected to have significant impacts on conditions affecting agriculture, including temperature,carbon dioxide, glacial run-off, precipitation and the interaction of these elements (http://en.wikipedia.org
/wiki/Climate_change_and_agriculture).
This exercise aims to explore the effects of climate change using a simple wheat cropping system. Firstly, the
response of wheat to elevated CO2 is examined. For this simulation a climate control component needs to be
included.
In this analysis, you will look at seasonal changes in rainfall, evaporation, transpiration and crop yields.
Construct a long term wheat simulation at 'Dinajpur'- use the Rice-wheat simulation in your
'Rotations.apsim' file as a guide. (Hint: Make a copy ofRotations .apsim and rename it to Climatechange.apsim.) Delete all the simulations except for the Rice-wheatsimulation as this will become the
template for the following exercises.
1.
Rename the Rice-wheatsimulation to Wheat-350ppm.2.
Select a new met file. Use the browse button to select the Dinajpur.met file from c:\APSIM_workshop
\met_files\.
3.
Select clockfor editing:
Select the start date: 1/01/1959
Select the end date: 31/12/2009
4.
Drag a ClimateControlcomponent on to the Wheat-350ppm simulation (from "Standard Toolbox" ->
"Meteorological (ClimateControl").
5.
Select ClimateControlfor editing:
Enter window to START: 1-jan.
Enter window END: 31-dec.
Change in maximum temperature: 0.
Change in minimum temperature: 0.
Relative change in daily rainfall: 0.
Relative change in daily radiation: 0.
Atmospheric CO2 Concentration: 350.
(Hint: you may want to move 'ClimateControl' to below the 'met' component. Use Ctrl + up arrow)
6.
Remove all the manager logic used for the previous rice simulation. (Hint: Delete Rice-Transplant
Aman, Pond_depth, Fertilise on growth stage, Rice residue.)
7.
Drag a trackercomponent on to the Manager Folder (from "Standard Toolbox" -> "Management
(tracker)").
8.
Add the following lines to the tracker component:
Tracker variables
sum of rain on start_of_day from sowing to now as RainSinceSowingsum of ep on end_of_day from sowing to now as Transp
sum of es on end_of_day from sowing to now as SoilEvap
9.
57
57
7/30/2019 Apsim7_3S Asia Training Manual
58/84
Choose these variables to report: (underOutput node)
Component Variable name
Clock dd/mm/yyyy as Date
Year
Daywheat wheat.yield as wheat_yield
wheat.biomass as wheat_biom
Soil (Silt) ESW
NO3()
wheat wheat.yield as wheat_yield
wheat.biomass as wheat_biom
met rain
tracker RainSinceSowing
Transp
SoilEvap
10.
Change 'Reporting Frequency' to harvesting. (Hint: Select question mark to display examples for
reporting frequency)
11.
Delete existing XY charts under the 'Outputfile' node.12.
Make a linked simulation of 'Wheat-350ppm' and rename it to "Wheat-450ppm". There are several ways
to make linked simulations:
a) Right click and hold down on the source simulation and drag it to the top level (simulations) node. A
popup menu appears when you let go, select the "Create Link Here" option.
b) Select the source simulation with the left mouse button, hold the keyboards key down, and drag
it to the top level (simulations) node.
The advantage of linked simulations is that changes made to any component are made to all linked
components. More details are in the section Using linkage to reduce simulation duplication.
13.
Select the linked simulation 'Wheat-350ppm1' (in blue) and rename to 'Wheat-450ppm'.14.
Right click on the ClimateControl component and select 'unlink this node' from the drop down box. (The
blue underlined link will change to black text)
15.
Select the ClimateControlfor editing:
Change Atmospheric CO2 Concentration to 450.
16.
Save and run both simulations. (Hint: select the 'Simulations' node at the top and then the run button to
run both simulations at once)
17.
Create a graph comparing wheat yields from each of the simulations . Drag a Probability Exceedence
component on to the 'Simulations node' (from "Graph" -> Graphs-> "Probability Exceedence").
18.
Graph 'wheat_yield' (X axis) vs 'Probability' (Y axis). Rename the graph to 'Wheat response under
climate change scenario
19.
58
58
7/30/2019 Apsim7_3S Asia Training Manual
59/84
In the above example a 'Probability of Exceedence' chart was selected to compare the probability of grain
yields under different background concentrations of atmospheric CO2 (350 ppm and 450 ppm) using 50 yearsof daily climate data from Dinajpur in northern Bangladesh. The graph highlights a yield response by APSIM to
an elevated CO2 level of 450 ppm. However, increasing levels of CO2 are only one aspect to be considered
in any climate change scenario with the IPCC (2007) predicting significant increases in global temperatures
over the next 50 to 100 years.
The next exercise builds on the previous example by creating two additional simulations. The first will consider
current levels of CO2 at 350 ppm but with an increase in minimum temperature of 1.5oC. The second will
maintain an increase in minimum temperature in conjunction with an increase in CO2 to 450ppm.
Climate change response to an increase in minimum daily temperature
Make a linked simulation ofWheat-350ppm and name it Wheat-350ppm+2degC.1.
Select ClimateControlfor editing and right click and "unlink this node".
(The ClimateControlwill change from underlined blue to black text)
2.
Select ClimateControlfor editing: Change in minimum temperature: 2.3.
Run this new simulation.4.
59
59
7/30/2019 Apsim7_3S Asia Training Manual
60/84
The Wheat response under climate change scenario graph now includes the results of this latest
simulation. Create an additional simulation based on 'Wheat-450ppm' using the steps above. Rename
this new simulation to 'Wheat-450ppm+2degC'.
Run new simulation.
Notes:
5.
60
60
7/30/2019 Apsim7_3S Asia Training Manual
61/84
Question: How has increasing minimum temperature affected grain yield in relation to an increase in
the level of CO2?
Additional exercise: Explore the effects of increasing maximum temperature under this scenario.
Changes in biomass and grain yield will have a direct effect on transpiration and soil evaporation.
Create an additional graph from the 'Graph' toolbox or by copying 'Wheat response under climate
change scenario'. Selecting both SoilEvap and Transp on the X axis for graphing.
Notes:
61
61
7/30/2019 Apsim7_3S Asia Training Manual
62/84
Climate change response to rainfall
In this exercise you will investigate changes to wheat yield in response to modifying rainfall, temperature and
CO2 by creating a simple experiment. This simulation experiment requires a control treatment (previous
wheat simulation based on a CO2 concentration of 350 ppm) and a number of additional treatments:
(1) Increasing CO2 to 450 ppm
(2) Increasing minimum temperature by 2oC
(3) Decreasing rainfall by 10%
Drag a Foldercomponent onto the 'Simulations' node (from "Standard Toolbox" -> "Structural (folder)").1.
Rename this folder to Senario.2.
Make a copy the Wheat-350ppm simulation by dragging it on the Scenario folder. Rename thissimualtion to Control.
3.
Copy the Wheat-450ppm simualtion to the Scenario folder and rename it to C450 (CO2:450ppm).
(Unlink the simulation by right clicking and selecting Unlink this node)
4.
Create a copy ofWheat-450ppm+2degC. Rename this copy to C450+T2(CO2:450ppm and minimum
temperature + 2oC).
5.
Create a copy ofC450+T2by dragging it onto the Scenario node. Rename this simulation to
C450+T2-R5(CO2:450ppm and minimum temperature + 2oC and rainfall -10%).
6.
Select the ClimateControlnode in C450+T2-R10for editing:Relative change in daily rainfall: -10.
7.
Run all the simulations in the Scenario folder.
(Hint: Highlight the 'Scenario' folder and press "Run" to run all simulations together)
8.
62
62
7/30/2019 Apsim7_3S Asia Training Manual
63/84
Create a box plot graph showing the results of each treatment. To do this, click on the Graph Toolbox at
the bottom of the window to open the toolbox. Then drag a 'Box Plot' component (from "Graph" ->
"Graphs (Box Plot)") and drop onto the Scenario node.
Hint: To change the Y axis right click on the chart and select Format Graph. Select Axes. For the 'Left
Axis' untick Minimum and change value to 0. Close 'TeeChart editor.
9.
63
63
7/30/2019 Apsim7_3S Asia Training Manual
64/84
64
64
7/30/2019 Apsim7_3S Asia Training Manual
65/84
The "box plots" used in the above graph represent median wheat yield (dotted line) in response to applied
treatments (based on 50 years of simulation). The solid section (25th and 75th percentiles) with whiskers
representing the 10th and 90th percentiles.
Additional exercise: In the above scenario, decreasing rainfall (at CO2 levels of 450ppm) had only a small
influence on median wheat yields due to available irrigation. In this example wheat is a dry season (Rabi) crop
sown into high levels of soil water at the end of the monsoon with additional irrigation applied during the
growing season. Access to available surface or ground water for irrigation under a declining rainfall climate
change scenario may present a challenge for future agriculture. What would the effect of reducing the amount
of applied irrigation or reducing starting soil moisture have on potential grain yield?
Notes:
65
65
7/30/2019 Apsim7_3S Asia Training Manual
66/84
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 ofname = 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 maxtmint 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 foldernotunder the APSIM
installation directory. Perhaps you could create a folder called c:/apsim_toolboxes for storing these types of
66
66
7/30/2019 Apsim7_3S Asia Training Manual
67/84
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
67
67
7/30/2019 Apsim7_3S Asia Training Manual
68/84
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 reuseentities 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 Toolboxis just an xml file that you can save anywhere on your hard drive. In the following window select the
68
68
7/30/2019 Apsim7_3S Asia Training Manual
69/84
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.
69
69
7/30/2019 Apsim7_3S Asia Training Manual
70/84
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,
70
70
7/30/2019 Apsim7_3S Asia Training Manual
71/84
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 verysimple 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.
71
71
7/30/2019 Apsim7_3S Asia Training Manual
72/84
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 Waternode is expanded
Under the Waternode, 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).
72
72
7/30/2019 Apsim7_3S Asia Training Manual
73/84
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 forSoilWat orSWIM2.
73
73
7/30/2019 Apsim7_3S Asia Training Manual
74/84
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 seethe 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.
1.
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.
74
74
7/30/2019 Apsim7_3S Asia Training Manual
75/84
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.
2.
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.
3.
75
75
7/30/2019 Apsim7_3S Asia Training Manual
76/84
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.
4.
If you are plotting multiple columns and you want to plot one of the columns on the Y2 axis instead of on
the Y axi