Skip to content

Special Code Lines of Individual Publications

There are individual FarmDyn extensions which were used exclusively for publications and cannot be found on the head revision of FarmDyn. These code parts are therefore not explained in the model description, but below under the respective authors and year.

Journal publications

KUHN, T., SCHÄFER, D., HOLM-MÜLLER, K., BRITZ, W. (2019):

FarmDyn is loosely connected to the crop modeling framework SIMPLACE. This crop model provides cropping activities consisting of different managements and corresponding yields and externalities. They are provided as a gdx file and loaded into FarmDyn. The parameter p_simres contains all information from the crop model for different crops, crop rotations (represented in the set till) and intensities. Intensities represent a whole range of management, consisting of different amounts of fertiliser, straw removal and catch crop growing. The elements of the set contain the information on yields and externalities for the different cropping activities.

The use of the SIMPLACE data is activated in the GUI by selecting the BWA mode. It requires to choose specific farm types and their location in different soil-climate regions. Currently, SIMPLACE data are available for the German Federal State of North Rhine-Westphalia.

First, the shares of different crops in FarmDyn have to equal the crop rotation represented in the SIMPLACE data. Crop rotations can be selected at the GUI.

SimplaceRot_(c_s_t_i(curCrops(crops),plot,curRotTill(till),intens),tCur(t),nCur)
                     $ ( (v_cropHa.up(crops,plot,till,intens,t,nCur) ne 0) $ t_n(t,nCur)
                     $ (not sameas (crops,"idle") )
                     $ (not sameas (crops,"catchcrop") )  ) ..

       v_cropHa(crops,plot,till,intens,t,nCur)

           =e=

             sum ( crops1 $  (c_s_t_i(crops1,plot,till,intens) $ (curCrops(crops1)
                              $ (not sameas(crops1,"idle"))
                              $ (not sameas(crops1,"catchcrop")))),
                     v_cropHa(crops1,plot,till,intens,t,nCur))    *   p_cropShare(till,crops);

The synthetic fertiliser need linked to cropping activities in the SIMPLACE data has to be provided by synthetic fertiliser distribution in FarmDyn.

NMineralSim_(c_s_t_i(curCrops(crops),plot,curRotTill(till),intens),"N",tCur(t),nCur)
                     $ ((v_cropHa.up(crops,plot,till,intens,t,nCur) ne 0) $ t_n(t,nCur)   $   (not sameas (curCrops,"catchcrop") ) $ (not sameas (curCrops,"idle") )    ) ..

           sum ( (syntFertilizer,m) , v_syntDist(crops,plot,till,intens,syntFertilizer,t,nCur,m)  * p_nutInSynt(syntFertilizer,"N")
                           * (1 - p_EFApplMinNH3(syntFertilizer) -  p_EFApplMin("N2O") - p_EFApplMin("NOx") ) )

           =e=

               v_cropHa(crops,plot,till,intens,t,nCur) *  p_SimRes(till,crops,intens,"Nchem")
;

The cropping activities in the SIMPLACE data correspond to the month January to June. Accordingly, manure application has to be conducted in those months. Note that other restrictions such as the Fertilisation Ordinance may restrict application in certain months.

NOrgSpringSim_(c_s_t_i(curCrops(crops),plot,curRotTill(till),intens),"N",tCur(t),nCur)
                  $ ((v_cropHa.up(crops,plot,till,intens,t,nCur) ne 0) $ t_n(t,nCur)  $ (not sameas (curCrops,"catchcrop") ) $ (not sameas (curCrops,"idle") )  ) ..


*                --- NOrg Applied

                  sum( (manApplicType_manType(ManApplicType,curManType),m_spring(m) )
                   $ (v_manDist.up(crops,plot,till,intens,manApplicType,curManType,t,nCur,m_spring) ne 0),
                       v_manDist(crops,plot,till,intens,ManApplicType,curManType,t,nCur,m_spring )
                          * sum(manChain_applic(manChain,ManApplicType), p_nut2inMan("NOrg",curManType,manChain)) * (1 - ( p_EFApplMin("N2O") + p_EFApplMin("NOx")))  )

*               -- NTAN applied minus losses with application

                + sum( (manApplicType_manType(ManApplicType,curManType),m_spring(m) )
                    $ (v_manDist.up(crops,plot,till,intens,manApplicType,curManType,t,nCur,m_spring) ne 0),
                       v_manDist(crops,plot,till,intens,ManApplicType,curManType,t,nCur,m_spring)
                           * sum(manChain_applic(manChain,ManApplicType), p_nut2inMan("NTan",curManType,manChain))
                               * (p_nut2UsableShare(crops,curManType,ManApplicType,"NTAN",m) - ( p_EFApplMin("N2O") + p_EFApplMin("NOx")) )
                                   )
                   =e=

                       v_cropHa(crops,plot,till,intens,t,nCur) *   p_SimRes(till,crops,intens,"NOrgS")

                                        ;

In line with manure application in spring, the manure application in autumn linked to cropping activities in the SIMPLACE data has to be provided by manure application in FarmDyn in the months July to December.

NOrgAutumnSim_(c_s_t_i(curCrops(crops),plot,curRotTill(till),intens),"N",tCur(t),nCur)
                  $ ((v_cropHa.up(crops,plot,till,intens,t,nCur) ne 0) $ t_n(t,nCur)
                   $ (not sameas (crops,"catchcrop") ) $ (not sameas (crops,"idle") )  ) ..


*                --- NOrg Applied

                  sum( ( manApplicType_manType(ManApplicType,curManType),m_autumn(m) )
                   $ (v_manDist.up(crops,plot,till,intens,manApplicType,curManType,t,nCur,m_autumn) ne 0),
                       v_manDist(crops,plot,till,intens,ManApplicType,curManType,t,nCur,m_autumn )
                          * sum(manChain_applic(manChain,ManApplicType), p_nut2inMan("NOrg",curManType,manChain)) * (1 - ( p_EFApplMin("N2O") + p_EFApplMin("NOx")))   )

*               -- NTAN applied minus losses with application

                + sum(  ( manApplicType_manType(ManApplicType,curManType),m_autumn(m) )
                    $ (v_manDist.up(crops,plot,till,intens,manApplicType,curManType,t,nCur,m_autumn) ne 0),
                       v_manDist(crops,plot,till,intens,ManApplicType,curManType,t,nCur,m_autumn)
                           * sum(manChain_applic(manChain,ManApplicType), p_nut2inMan("NTan",curManType,manChain))
                               * ( p_nut2UsableShare(crops,curManType,ManApplicType,"NTAN",m)  - ( p_EFApplMin("N2O") + p_EFApplMin("NOx"))  )
                                     )

                  =e=

                       v_cropHa(crops,plot,till,intens,t,nCur) *  p_SimRes(till,crops,intens,"NOrgA") ;

The cropping activities provided by SIMPLACE do not contain information on P2O5 fertiliser need. Therefore, the following equation ensures that P2O5 removal with the harvested product has to be meet by P2O5 from manure and chemical fertiliser.

PFertilizingSim_("P",tCur(t),nCur)  $ t_n(t,nCur)  ..

                sum( (prods,c_s_t_i(curcrops(crops),plot,till,intens))   $ (  ( not sameas (prods,"WCresidues")) $ ( not sameas (prods,"WBresidues")) $ (not sameas (prods,"SCresidues"))
                                                                             $ (not sameas (curCrops,"catchcrop") )  $ (not sameas (curCrops,"idle") )   )
                            ,  p_SimRes(till,crops,intens,"yield")  * p_nutContent(crops,prods,"P") * 10/1000
                                                                            * v_cropHa(crops,plot,till,intens,t,nCur)   )

                     =l=

$iftheni.man %manure% == true

                      sum( (manApplicType_manType(ManApplicType,curManType),m,c_s_t_i(curCrops(crops),plot,till,intens))  $ (  (not sameas (curCrops,"catchcrop") )  $ (not sameas (curCrops,"idle") )
                         $ (   v_manDist.up(crops,plot,till,intens,manApplicType,curManType,t,nCur,m) ne 0)     ),
                            v_manDist(crops,plot,till,intens,ManApplicType,curManType,t,nCur,m)
                              * sum(manChain_applic(manChain,ManApplicType), p_nut2inMan("P",curManType,manChain))

                             )

                            +

$endif.man

                       sum ( (syntFertilizer,m,c_s_t_i(curcrops(crops),plot,till,intens) ) $(  (not sameas (curCrops,"catchcrop") )  $ (not sameas (curCrops,"idle") )  )
                                   , v_syntDist(crops,plot,till,intens,syntFertilizer,t,nCur,m)  * p_nutInSynt(syntFertilizer,"P")  )
                                                           ;

Some crops require minimum chemical fertiliser doses such as the starter fertilisation of maize. For N, minimum chemical fertiliser needs are reflected in the SIMPLACE results. For P2O5, the following equations ensures that the minimum chemical fertiliser needs is met.

MinChemFertSimplace_(tCur(t),nCur)    $ t_n(t,nCur)  ..

                sum( (c_s_t_i(curcrops(crops),plot,till,intens))   $ (  (not sameas (curCrops,"catchcrop") )  $ (not sameas (curCrops,"idle") )  )
                            ,   v_cropHa(crops,plot,till,intens,t,nCur) * p_minChemFert(crops,"P")
                                         )

                                    =l=

                 sum ( (syntFertilizer,m,c_s_t_i(curcrops(crops),plot,till,intens) )  $ (  (not sameas (curCrops,"catchcrop") )  $ (not sameas (curCrops,"idle") )  )
                                   , v_syntDist(crops,plot,till,intens,syntFertilizer,t,nCur,m)   * p_nutInSynt(syntFertilizer,"P")  )
                                                     ;

The SIMPLACE results contain scenarios, captured in the set intensities, with and without residue removal. Thereby, it is assumed that straw from cereal production can be sold. The following equation maps the cropping activities on the variable v_residuesRemoval which is used in other parts of FarmDyn to calculate the costs and revenues related to residue removal.

ResidRemovalSim_(curCrops(crops),plot,till,intens,tCur(t),nCur)
                 $ ( t_n(t,nCur) $  c_s_t_i(crops,plot,till,intens)  $ (not sameas (curCrops,"catchcrop") )  $ (not sameas (curCrops,"idle"))
                                $ intensResRem(intens)   $ cropsResidueRemo(crops)  ) ..

                     v_residuesRemoval(crops,plot,till,intens,t,nCur)    =e=          v_cropHa(crops,plot,till,intens,t,nCur)  ;

The SIMPLACE results contain scenarios, captured in the set intensities, with and without catch crops. They are linked to the catch crop growing represented in v_cropHa.

CatchCropsSimHa_(plot,curRotTill(till),intens,tCur(t),nCur)
                $ ( t_n(t,nCur) $ (sum (crops, c_s_t_i(crops,plot,till,intens)))     ) ..

            sum (c_s_t_i("catchCrop",plot,till,intens), v_cropHa("catchCrop",plot,till,intens,t,nCur)    )

                                   =e=
                                         sum( c_s_t_i(curCrops(crops),plot,till,intens) $ intensCatchCro(intens),
                                                           v_cropHa(crops,plot,till,intens,t,nCur)
                                                               *  p_SimRes(till,crops,intens,"catCroShare")   )
                                           ;

The SIMPLACE results contain nitrate leaching for the different cropping activities. This externality is summarised in the following equation for the environmental accounting in FarmDyn.

NleachSim_(curCrops(crops),tCur(t),nCur)
                 $ ( t_n(t,nCur) $ sum ( (plot,till,intens), c_s_t_i(crops,plot,till,intens)) $ (not sameas (curCrops,"catchcrop") )  $ (not sameas (curCrops,"idle") )  ) ..


                 v_NleachSim(crops,t,nCur)

                       =e=

                          sum( c_s_t_i(curCrops,plot,curRotTill,intens),  v_cropHa(crops,plot,curRotTill,intens,t,nCur)
                                                                              * p_SimRes(curRotTill,crops,intens,"Nleach")  )  ;

Furthermore, the SIMPLACE results contain a N balance which is summarised in the following equation. Please note that the calculation of this balance differs from the balance calculation under the Fertilisation Ordinance.

NSurplusSim_(curCrops(crops),tCur(t),nCur)
                    $ ( t_n(t,nCur) $ sum ( (plot,till,intens), c_s_t_i(crops,plot,till,intens))  $ (not sameas (curCrops,"catchcrop") ) $ (not sameas (curCrops,"idle") )  ) ..


                 v_NSurplusSim(crops,t,nCur)

                       =e=

                     sum(  c_s_t_i(curCrops,plot,curRotTill,intens),  v_cropHa(crops,plot,curRotTill,intens,t,nCur)
                                                                             * p_SimRes(curRotTill,crops,intens,"NSur") ) ;