Navigation Menu

Skip to content
Joel Pitt edited this page Feb 6, 2014 · 1 revision

The old way

There used to a MDiG "repository" directory which contained a subdirectory for each model. Within each directory there would be the following directories:

  • analysis - for the results of analyses
  • output
The directory itself would also contain the model.xml (and backups) and various logs.

The new way

Models are now represented by GRASS mapsets and they now also have a "mdig" subdirectory for the xml model definition and logs. This is great, but ideally we need to split instances up because otherwise there are too many individual files in single directories.

Therefore, the proposal is to have a root mapset for each model. This contains all the primary model data, including maps for supporting the simulation. This means that the model and it's dependencies can be easily packaged by archiving the whole directory.



This will work with previous versions because their model instances won't have specified mapset, and default to using the original mapset.

Each instance will create another mapset (using suffix "_i") to store the resulting maps from running that instance.

 [model_name]_[i]/mdig/original # <- txt file with just the original [model_name]

The original file links back to the original mapset, and the completed instance record within model.xml file in the original mapset has an attribute to store the mapset that instance uses:

 <completed mapset="model_name_[012..]">
 ...
 </completed>

In the special case of a model with a single instance, then that completed instance may choose to use the original mapset for it's output.