Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify input management #26

Open
christian34 opened this issue Dec 18, 2017 · 1 comment
Open

Clarify input management #26

christian34 opened this issue Dec 18, 2017 · 1 comment

Comments

@christian34
Copy link
Contributor

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
Copy link
Contributor

pradal commented Dec 18, 2017

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])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants