sdtaylor / GrasslandModels

MIT License
0 stars 0 forks source link

have return=='all' inside base predict #29

Closed sdtaylor closed 4 years ago

sdtaylor commented 4 years ago

Need to be able to get all state variables out of a model like W and Dt.

Hopefully someway to do it automatically.

maybe

model.state_variables = ['Dt','W','V'] etc.

sdtaylor commented 4 years ago

inside predict()

model_predictions = self.apply_model(blah blah, return='all')
state_vars = {v:model_predictions[i] for f,i in self.state_variables}
if state_vars_to_return = 'all':
    return state_vars
else:
    return state_vars[state_vars_to_return]

or something like that...

sdtaylor commented 4 years ago

30