From 1ca5347ae4418c2f99687521bb1c7c7720d462c1 Mon Sep 17 00:00:00 2001
From: Marco Matthies <71844+marcom@users.noreply.github.com>
Date: Fri, 6 Dec 2024 15:36:49 +0100
Subject: [PATCH] ALMaSS crop model: rename recalculate_bugs_n_stuff! to
 recalculate_vegetation!

---
 src/crop/almass.jl | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/crop/almass.jl b/src/crop/almass.jl
index 13b5087..f1f3f5a 100644
--- a/src/crop/almass.jl
+++ b/src/crop/almass.jl
@@ -701,7 +701,8 @@ function stepagent!(cs::CropState, model::SimulationModel)
         cs.LAtotal = 1.1 * cs.LAgreen
     end
 
-    recalculate_bugs_n_stuff!(cs, model)
+    # Note: calls `VegElement::RecalculateBugsNStuff()` in the original ALMaSS code
+    recalculate_vegetation!(cs, model)
 
     # TODO ignored: ResetGeese()
     # TODO ignored: Deal with any possible unsprayed margin, transferring info as necessary
@@ -729,7 +730,7 @@ end
 
 # Function in original ALMaSS code:
 #     `void VegElement::RecalculateBugsNStuff(void)` from `Landscape/Elements.cpp`, line 1704
-function recalculate_bugs_n_stuff!(cs::CropState, model::SimulationModel)
+function recalculate_vegetation!(cs::CropState, model::SimulationModel)
     # This is the heart of the dynamics of vegetation elements. It
     # calculates vegetation cover and uses this to determine
     # vegetation biomass.  It also calculates spilled grain and goose
-- 
GitLab