ecohydro / maize-Toff

Repo for modeling analysis of of maize yield variability and tradeoffs between yield and crop failure.
4 stars 2 forks source link

Ensemble simulations #3

Closed kcaylor closed 3 years ago

kcaylor commented 5 years ago

The Model object represents a single simulation, and Model.output() returns a single pandas DataFrame with columns for each simulated variable and rows for each day of simulation. We need to be able to run many simulations (with different climate.rainfall realizations) in order to get ensemble information on crop performance and water balance within a stochastic climate.

What is the strategy to aggregate multiple runs of a model with different climates?

noah-de commented 5 years ago

Playing around with the model just now, I was happy to see that we can:output.to_csv('filename.csv')

I think that would be a straightforward way to run many simulations and output to a file with a naming convention to signify what climate.rainfall input was used.

Having a directory of simulation output files would be easy to churn through.

What do you think @kcaylor ?

noah-de commented 5 years ago

Alternatively, this could be a good use case for introducing xarray (http://xarray.pydata.org/en/stable/)

Ntkrell commented 5 years ago

List of objects...

model_list =[]
    for param_value in list_of_params: