nismod / smif

Simulation Modelling Integration Framework
http://www.itrc.org.uk
MIT License
22 stars 6 forks source link

Autogenerate a batch of model runs, one for each ensemble realisation #363

Closed willu47 closed 5 years ago

willu47 commented 5 years ago

Child of #353

After successfully configuring the scenarios included within a model run configuration with one variant per ensemble replicate (see #362), a script should automatically generate the required model run configuration files which can subsequently be run as a batch (see #179).

Using a model run configuration as a template e.g.

name: energy_central_001
description:  Energy demand under central scenario, only 2010
stamp: "2017-09-18T12:53:23+00:00"
timesteps:
- 2010
- 2015
- 2020
sos_model: energy
scenarios:
  population: population_med
  water_sector_energy_demand: central
  weather: replicate_001
narratives: {}
<snip>

Generate all the model runs required to run the replicates required for the ensemble scenario.

One approach could be to use a placeholder in the template model run for the replicate name, which is then pasted in using the Python string.Template class. However, this detail should be deferred to the config store - at the store level, the functionality must be generic.

willu47 commented 5 years ago

@tlestang - looks good. Please could you pad the replicate names with zeros so that they are easier to sort?

tomalrussell commented 5 years ago

Closed by #381