Attributes of Adel object not updated after loading a MTG
rbarillot opened this issue · 1 comments
rbarillot commented
Hi,
The attributes of an Adel object are not updated after loading a pickled MTG.
For instance, the script below,
from alinea.adel.astk_interface import AdelWheat
# Save MTG
adel_wheat_1 = AdelWheat(nplants=10)
g1 = adel_wheat_1.setup_canopy()
adel_wheat_1.save(g1)
print 'saved domain: ', adel_wheat_1.domain
print 'saved nplants: ', adel_wheat_1.nplants
# Loading MTG previously pickled
adel_wheat_2 = AdelWheat()
g2 = adel_wheat_2.load(dir=r'~\adel_saved')
print 'loaded domain: ', adel_wheat_2.domain
print 'loaded nplants: ', adel_wheat_2.nplants
gives:
>>>
'saved domain: ' ((-13.333333333333336, -7.5), (13.333333333333336, 7.5))
'saved nplants: ' 10
'loaded domain: ' ((-1.3333333333333335, -7.5), (1.3333333333333335, 7.5))
'loaded nplants: ' 1
rbarillot commented