SYSBAL
The APSIM SYSBAL module checks that simulation mass balance is maintained. It does this by tracking values of carbon, water, nitrogen and phosphorus variables from modules in the simulation, ensuring that there aren’t unexpected gains or losses or mass, Water, N and P.
SYSTEM CALCULATIONS
loss_system = loss_soil + loss_crop + loss_surface
gain_system = gain_soil + gain_crop + gain_surface
state_system = state_surface + state_soil + state_crop
dlt_system = state_system – state_system_yest
error_system = dlt_system + loss_system – gain_system
if (state_system_yest >= 0.00001) then
cum_error_system = cum_error_system + error_system
else
error_system = 0.0
endif
dlt_soil = state_soil – state_soil_yest
dlt_surface = state_surface – state_surface_yest
dlt_crop = state_crop – state_crop_yest
state_system_yest = state_system
state_soil_yest = state_soil
state_surface_yest = state_surface
state_crop_yest = state_crop
Carbon Balance
System states
state_crop = dm_green * gm2kg/sm2ha * 0.4 : + GreenWt * gm2kg/sm2ha * 0.4
: + dm_senesced * gm2kg/sm2ha * 0.4
: + SenescedWt * gm2kg/sm2ha * 0.4
: + dm_dead * gm2kg/sm2ha * 0.4
state_soil = carbon_tot()
state_surface = surfaceom_c
System losses
loss_soil = dlt_fom_c_atm()
+ dlt_hum_c_atm()
+ dlt_biom_c_atm()
loss_crop = dlt_dm_oil_conv_retrans * gm2kg/sm2ha * 0.4
loss_surface = dlt_res_c_atm
System gains
gain_soil = 0.0
gain_crop = dlt_dm_green * gm2kg/sm2ha * 0.4
: + GrowthWt * gm2kg/sm2ha * 0.4
gain_surface = 0.0
Dry matter balance
System states
state_crop = dm_green * gm2kg/sm2ha
: + GreenWt * gm2kg/sm2ha
: + dm_senesced * gm2kg/sm2ha
: + SenescedWt * gm2kg/sm2ha
: + dm_dead * gm2kg/sm2ha
state_soil = carbon_tot() / 0.4
state_surface = surfaceom_wt
System losses
loss_soil = dlt_fom_c_atm() / 0.4
: + dlt_hum_c_atm() / 0.4
: + dlt_biom_c_atm() / 0.4
loss_crop = dlt_dm_oil_conv_retrans * gm2kg/sm2ha
loss_surface = dlt_res_c_atm / 0.4
System gains
gain_soil = 0.0
gain_crop = dlt_dm_green * gm2kg/sm2ha
: + GrowthWt * gm2kg/sm2ha
gain_surface = 0.0
Soil water balance
System states
state_crop = 0.0
state_soil = sw_dep()
state_surface = pond
System losses
loss_soil = es
: + drain
loss_crop = ep
loss_surface = runoff
System gains
gain_soil = 0.0
gain_crop = 0.0
gain_surface = rain
Nitrogen Balance
System states
state_crop = n_green * gm2kg/sm2ha
: + GreenN * gm2kg/sm2ha
: + n_senesced * gm2kg/sm2ha
: + SenescedN * gm2kg/sm2ha
: + n_dead * gm2kg/sm2ha
state_soil = nit_tot()
state_surface = surfaceom_n
: + surfaceom_no3
: + surfaceom_nh4
System losses
loss_soil = dlt_no3_dnit()
: + leach_NO3
: + leach_NH4
loss_crop = 0.0
loss_surface = 0.0
System gains
gain_soil = 0.0
gain_crop = dlt_n_fixed * gm2kg/sm2ha
gain_surface = 0.0
Phosphorus Balance
System states
state_crop = p_green * gm2kg/sm2ha
: + GreenP * gm2kg/sm2ha
: + p_senesced * gm2kg/sm2ha
: + SenescedP * gm2kg/sm2ha
: + p_dead * gm2kg/sm2ha
state_soil = fom_p()
: + hum_p()
: + biom_p()
: + rock_p()
: + unavail_p()
: + labile_p()
: + banded_p()
state_surface = surfaceom_p
: + surfaceom_labile_p
System losses
loss_soil = 0.0
loss_crop = 0.0
loss_surface = 0.0
System gains
gain_soil = 0.0
gain_crop = 0.0
gain_surface = 0.0