openalea / WALTer

WALTer is a 3D FSPM Wheat model
Other
4 stars 8 forks source link

Clarify input management #26

Open christian34 opened 6 years ago

christian34 commented 6 years ago

The input management can/should be clarfied, to avoid mixing parameterisation and code in lpy file and to avoid multiple decalration of parameters / register_parameters dict (see eg #22 #21 #20) One way to go could be to define default parameters in a specific module and use it as default params once for all in lpy. For cultivar specific conditions may be one other module can handle such data base

pradal commented 6 years ago

define global variables for sensitivity analysis

def params():
    a = 0 # first param
    b = 0 # second param
    c = [] # 3rd param
    d = locals().copy()
    return d

parameters = params()

for p_name in parameters:
    globals().setdefaults(p_name, parameters[p_name])