Skip to content
Snippets Groups Projects
Commit 5a11fc82 authored by Lemaire Louis's avatar Lemaire Louis
Browse files

Merge branch...

Merge branch '103-feature-grassim-add-cumulated-sum-of-exported-biomass-to-management-attibutes' into 'develop'

Resolve "[feature] GrasSim: Add cumulated sum of exported biomass to management attibutes"

See merge request !28
parents 4012e8f3 00232b17
No related branches found
No related tags found
2 merge requests!32[feature] New module sky_model with Reinhart sky discretization scheme, water balance correction in GrasSim,!28Resolve "[feature] GrasSim: Add cumulated sum of exported biomass to management attibutes"
......@@ -110,6 +110,7 @@ class Management():
self.rotation_periods = self.get_rotation_periods()
self.fert_dates = self.get_fert_dates()
self.fert_periods = self.get_fert_periods()
self.cum_exported_BM = np.zeros(self.grid)
self.cut_today_ = self.cut_today(day, crop)
self.fert_today_ = self.fert_today(day)
......@@ -357,7 +358,8 @@ class Management():
self.exported_BM = crop.BMGV - crop.resBMGV + crop.BMDV - crop.resBMDV + crop.BMGR - crop.resBMGR + crop.BMDR - crop.resBMDR
self.exported_digestibleOM = (crop.BMGV - crop.resBMGV)*crop.OMDGV + (crop.BMDV - crop.resBMDV)*crop.OMDDV + (crop.BMGR - crop.resBMGR)*crop.OMDGR + (crop.BMDR - crop.resBMDR)*crop.OMDDR
self.exported_N = crop.QNGV - crop.resQNGV + crop.QNDV - crop.resQNDV + crop.QNGR - crop.resQNGR + crop.QNDR - crop.resQNDR
self.cum_exported_BM += self.exported_BM
for compartment in compartments:
setattr(crop, f'BM{compartment}', getattr(crop, f'resBM{compartment}')) # update BM of compartments
setattr(crop, f'QN{compartment}', getattr(crop, f'resQN{compartment}')) # update QN of compartments
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment