Upgrading

From Modular Dispersal in GIS

Jump to: navigation, search

This latest upcoming release is exciting. It features a web based interface allowing research groups to set up a dedicated Linux machine to run simulations while accessing and submitting jobs from a web browser.

A note about the model repository

The latest version of MDiG in Bazaar, soon to be released as version 0.3 "Spade", requires a change in the management on simulation model definitions and their output. Prior to 0.3, there was a model repository directory where all models had their own sub-directory.

However, all models also had their own GRASS mapset and maintaining both a GRASS database and a MDiG model repository seemed redundant (and confusing). Not only that, but various parts of GRASS create their own mapset sub-directories to store data, so it made sense to add another directory for MDiG specific data files. This way it should also be possible to fully package a model definition with all it's supporting GIS data.

Fortunately, when you upgrade, you don't have to manually copy files... MDiG will try to update your files for you. I do however strongly recommend you backup your MDiG repository, and if possible, your GRASS data too. It should be very safe and ask you before doing anything destructive, but best not to risk it.

If you try to run anything in MDiG after upgrading you should get:

No GIS database directory specified, please  edit /home/user/.mdig/mdig.conf and
update the GRASS->GISDBASE value

Which means you have to edit the mdig.conf file and add your GRASS db directory so that MDiG knows where the models and their GIS data is stored. This directory is two levels above the mapsets you've been working with and passing to Grass when you start it up on the command line. If you'll recall, GRASS structures it's directories:

/.../$GISDBASE/$LOCATION/$MAPSET

You want the path up to and including $GISDBASE in your mdig.conf file. If you run MDiG again, you'll get:

Deprecated MDiG repository detected, please run 'mdig.py migrate'

The latter is just telling you that things can't work until you upgrade. So following the instructions of the demanding program:

./mdig.py migrate

MDiG will then tell you which GRASS db locations it wants to copy your MDiG simulation directories to. You are then asked if it makes sense before the files are actually copied. It will also ask you before overwriting any existing files (in case you somehow run migrate twice, although MDiG should detect and prevent you doing that).

If you other repositories or locations beyond the ones specified in your mdig.conf then you can migrate them using:

./mdig.py migrate /path/to/repository /path/to/grass/gisdbase

Web Interface

For a complete description of how to set up and run the web UI, please see the dedicated wiki page.