Skip to content

Commit

Permalink
Merge pull request #2 from mngauthier/develop_MG
Browse files Browse the repository at this point in the history
Rebuild the dependence of the rate of root senescence to the ontogeny…
  • Loading branch information
mngauthier authored Aug 27, 2020
2 parents 872fddc + 63af320 commit 049cd6c
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 105 deletions.
8 changes: 6 additions & 2 deletions senescwheat/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,18 @@ def calculate_remobilisation_proteins(cls, organ, element_index, proteins, relat
return remob_proteins, delta_amino_acids, delta_Nresidual

@classmethod
def calculate_roots_senescence(cls, mstruct, Nstruct):
def calculate_roots_senescence(cls, mstruct, Nstruct, postflowering_stages):
"""Root senescence
:param float mstruct: structural mass (g)
:param float Nstruct: structural N (g)
:return: Rate of mstruct loss by root senescence (g mstruct s-1), rate of Nstruct loss by root senescence (g Nstruct s-1)
:rtype: tuple [float, float]
"""
return mstruct * parameters.SENESCENCE_ROOTS, Nstruct * parameters.SENESCENCE_ROOTS
if postflowering_stages:
rate_senescence = parameters.SENESCENCE_ROOTS_POSTFLOWERING
else:
rate_senescence = parameters.SENESCENCE_ROOTS_PREFLOWERING
return mstruct * rate_senescence, Nstruct * rate_senescence

@classmethod
def calculate_relative_delta_mstruct_roots(cls, rate_mstruct_death, root_mstruct, delta_teq):
Expand Down
3 changes: 2 additions & 1 deletion senescwheat/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

N_MOLAR_MASS = 14 #: Molar mass of nitrogen (g mol-1)

SENESCENCE_ROOTS = 3.5E-7 * CONVERSION_FACTOR_20_TO_12 #: Rate of root turnover at 12°C (s-1). Value at 20°C coming from Johnson and Thornley (1985), see also Asseng et al. (1997).
SENESCENCE_ROOTS_POSTFLOWERING = 3.5E-7 * CONVERSION_FACTOR_20_TO_12 #: Rate of root turnover at 12°C (s-1). Value at 20°C coming from Johnson and Thornley (1985), see also Asseng et al. (1997).
SENESCENCE_ROOTS_PREFLOWERING = 0 # TODO: should be ontogenic for vegetative stages, 0 in Asseng 1997, but not null in Johnson and Thornley

FRACTION_N_MAX = {'blade': 0.5, 'stem': 0.425} # Threshold of ([proteins]/[proteins]max) below which tissue death is triggered

Expand Down
2 changes: 1 addition & 1 deletion senescwheat/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def run(self, forced_max_protein_elements=None, opt_full_remob=False, postflower
delta_teq = all_axes_inputs[roots_inputs_id]['delta_teq_roots']

# loss of mstruct and Nstruct
rate_mstruct_death, rate_Nstruct_death = model.SenescenceModel.calculate_roots_senescence(roots_inputs_dict['mstruct'], roots_inputs_dict['Nstruct'])
rate_mstruct_death, rate_Nstruct_death = model.SenescenceModel.calculate_roots_senescence(roots_inputs_dict['mstruct'], roots_inputs_dict['Nstruct'], postflowering_stages)
relative_delta_mstruct = model.SenescenceModel.calculate_relative_delta_mstruct_roots(rate_mstruct_death, roots_inputs_dict['mstruct'], delta_teq)
delta_mstruct, delta_Nstruct = model.SenescenceModel.calculate_delta_mstruct_root(rate_mstruct_death, rate_Nstruct_death, delta_teq)
# loss of cytokinins (losses of nitrates, amino acids and sucrose are neglected)
Expand Down
202 changes: 101 additions & 101 deletions test/outputs/desired_roots_outputs.csv
Original file line number Diff line number Diff line change
@@ -1,102 +1,102 @@
t,plant,axis,Nstruct,cytokinins,mstruct,rate_mstruct_death,senesced_mstruct
0,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
1,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
2,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
3,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
4,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
5,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
6,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
7,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
8,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
9,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
10,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
11,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
12,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
13,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
14,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
15,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
16,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
17,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
18,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
19,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
20,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
21,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
22,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
23,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
24,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
25,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
26,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
27,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
28,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
29,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
30,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
31,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
32,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
33,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
34,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
35,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
36,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
37,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
38,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
39,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
40,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
41,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
42,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
43,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
44,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
45,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
46,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
47,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
48,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
49,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
50,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
51,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
52,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
53,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
54,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
55,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
56,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
57,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
58,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
59,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
60,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
61,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
62,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
63,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
64,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
65,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
66,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
67,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
68,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
69,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
70,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
71,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
72,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
73,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
74,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
75,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
76,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
77,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
78,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
79,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
80,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
81,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
82,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
83,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
84,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
85,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
86,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
87,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
88,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
89,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
90,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
91,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
92,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
93,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
94,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
95,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
96,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
97,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
98,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
99,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
100,1,MS,0.00052969949,3.4980155,0.04997165,7.875000000000001e-09,2.8350000000000005e-05
0,1,MS,0.00053,3.5,0.05,0.0,0.0
1,1,MS,0.00053,3.5,0.05,0.0,0.0
2,1,MS,0.00053,3.5,0.05,0.0,0.0
3,1,MS,0.00053,3.5,0.05,0.0,0.0
4,1,MS,0.00053,3.5,0.05,0.0,0.0
5,1,MS,0.00053,3.5,0.05,0.0,0.0
6,1,MS,0.00053,3.5,0.05,0.0,0.0
7,1,MS,0.00053,3.5,0.05,0.0,0.0
8,1,MS,0.00053,3.5,0.05,0.0,0.0
9,1,MS,0.00053,3.5,0.05,0.0,0.0
10,1,MS,0.00053,3.5,0.05,0.0,0.0
11,1,MS,0.00053,3.5,0.05,0.0,0.0
12,1,MS,0.00053,3.5,0.05,0.0,0.0
13,1,MS,0.00053,3.5,0.05,0.0,0.0
14,1,MS,0.00053,3.5,0.05,0.0,0.0
15,1,MS,0.00053,3.5,0.05,0.0,0.0
16,1,MS,0.00053,3.5,0.05,0.0,0.0
17,1,MS,0.00053,3.5,0.05,0.0,0.0
18,1,MS,0.00053,3.5,0.05,0.0,0.0
19,1,MS,0.00053,3.5,0.05,0.0,0.0
20,1,MS,0.00053,3.5,0.05,0.0,0.0
21,1,MS,0.00053,3.5,0.05,0.0,0.0
22,1,MS,0.00053,3.5,0.05,0.0,0.0
23,1,MS,0.00053,3.5,0.05,0.0,0.0
24,1,MS,0.00053,3.5,0.05,0.0,0.0
25,1,MS,0.00053,3.5,0.05,0.0,0.0
26,1,MS,0.00053,3.5,0.05,0.0,0.0
27,1,MS,0.00053,3.5,0.05,0.0,0.0
28,1,MS,0.00053,3.5,0.05,0.0,0.0
29,1,MS,0.00053,3.5,0.05,0.0,0.0
30,1,MS,0.00053,3.5,0.05,0.0,0.0
31,1,MS,0.00053,3.5,0.05,0.0,0.0
32,1,MS,0.00053,3.5,0.05,0.0,0.0
33,1,MS,0.00053,3.5,0.05,0.0,0.0
34,1,MS,0.00053,3.5,0.05,0.0,0.0
35,1,MS,0.00053,3.5,0.05,0.0,0.0
36,1,MS,0.00053,3.5,0.05,0.0,0.0
37,1,MS,0.00053,3.5,0.05,0.0,0.0
38,1,MS,0.00053,3.5,0.05,0.0,0.0
39,1,MS,0.00053,3.5,0.05,0.0,0.0
40,1,MS,0.00053,3.5,0.05,0.0,0.0
41,1,MS,0.00053,3.5,0.05,0.0,0.0
42,1,MS,0.00053,3.5,0.05,0.0,0.0
43,1,MS,0.00053,3.5,0.05,0.0,0.0
44,1,MS,0.00053,3.5,0.05,0.0,0.0
45,1,MS,0.00053,3.5,0.05,0.0,0.0
46,1,MS,0.00053,3.5,0.05,0.0,0.0
47,1,MS,0.00053,3.5,0.05,0.0,0.0
48,1,MS,0.00053,3.5,0.05,0.0,0.0
49,1,MS,0.00053,3.5,0.05,0.0,0.0
50,1,MS,0.00053,3.5,0.05,0.0,0.0
51,1,MS,0.00053,3.5,0.05,0.0,0.0
52,1,MS,0.00053,3.5,0.05,0.0,0.0
53,1,MS,0.00053,3.5,0.05,0.0,0.0
54,1,MS,0.00053,3.5,0.05,0.0,0.0
55,1,MS,0.00053,3.5,0.05,0.0,0.0
56,1,MS,0.00053,3.5,0.05,0.0,0.0
57,1,MS,0.00053,3.5,0.05,0.0,0.0
58,1,MS,0.00053,3.5,0.05,0.0,0.0
59,1,MS,0.00053,3.5,0.05,0.0,0.0
60,1,MS,0.00053,3.5,0.05,0.0,0.0
61,1,MS,0.00053,3.5,0.05,0.0,0.0
62,1,MS,0.00053,3.5,0.05,0.0,0.0
63,1,MS,0.00053,3.5,0.05,0.0,0.0
64,1,MS,0.00053,3.5,0.05,0.0,0.0
65,1,MS,0.00053,3.5,0.05,0.0,0.0
66,1,MS,0.00053,3.5,0.05,0.0,0.0
67,1,MS,0.00053,3.5,0.05,0.0,0.0
68,1,MS,0.00053,3.5,0.05,0.0,0.0
69,1,MS,0.00053,3.5,0.05,0.0,0.0
70,1,MS,0.00053,3.5,0.05,0.0,0.0
71,1,MS,0.00053,3.5,0.05,0.0,0.0
72,1,MS,0.00053,3.5,0.05,0.0,0.0
73,1,MS,0.00053,3.5,0.05,0.0,0.0
74,1,MS,0.00053,3.5,0.05,0.0,0.0
75,1,MS,0.00053,3.5,0.05,0.0,0.0
76,1,MS,0.00053,3.5,0.05,0.0,0.0
77,1,MS,0.00053,3.5,0.05,0.0,0.0
78,1,MS,0.00053,3.5,0.05,0.0,0.0
79,1,MS,0.00053,3.5,0.05,0.0,0.0
80,1,MS,0.00053,3.5,0.05,0.0,0.0
81,1,MS,0.00053,3.5,0.05,0.0,0.0
82,1,MS,0.00053,3.5,0.05,0.0,0.0
83,1,MS,0.00053,3.5,0.05,0.0,0.0
84,1,MS,0.00053,3.5,0.05,0.0,0.0
85,1,MS,0.00053,3.5,0.05,0.0,0.0
86,1,MS,0.00053,3.5,0.05,0.0,0.0
87,1,MS,0.00053,3.5,0.05,0.0,0.0
88,1,MS,0.00053,3.5,0.05,0.0,0.0
89,1,MS,0.00053,3.5,0.05,0.0,0.0
90,1,MS,0.00053,3.5,0.05,0.0,0.0
91,1,MS,0.00053,3.5,0.05,0.0,0.0
92,1,MS,0.00053,3.5,0.05,0.0,0.0
93,1,MS,0.00053,3.5,0.05,0.0,0.0
94,1,MS,0.00053,3.5,0.05,0.0,0.0
95,1,MS,0.00053,3.5,0.05,0.0,0.0
96,1,MS,0.00053,3.5,0.05,0.0,0.0
97,1,MS,0.00053,3.5,0.05,0.0,0.0
98,1,MS,0.00053,3.5,0.05,0.0,0.0
99,1,MS,0.00053,3.5,0.05,0.0,0.0
100,1,MS,0.00053,3.5,0.05,0.0,0.0

0 comments on commit 049cd6c

Please sign in to comment.