LANDIS II

Introduction
Landis is a program (and related model) for long-term forest ecology simulation, developed by the Forestry Landscape Ecology Laboratory an the University of Wisconsin, Madison in collaboration with USFS North Central Research Station. It simulates the succession and of tree population over a large landscape through time and various disturbances.

Structure
Landis consists of a core, which houses the essential data structures of the Landis model. In addition, any of a variety of "extensions" or "modules" can be plugged in to the Landis core. A few of these modules are pre-installed in the downloadable version of Landis (for instance the Age-Only Succession module) as they are likely to be relevant to most work that would be done with the program.

Landis is a command line application (while graphical front ends may be developed, none are forthcoming at the moment), it takes a scenario as input--which is a grouping of a .GIS format raster file which contains a map and related text files which provide details on the map and parameters of the run--and displays progress until the run is completed, at which point it will have outputted multiple datafiles containing the results of the simulation. Thus, while the scenarios themselves are quite complex, the actual syntax of running the simulator is fairly easy.

A graphical tool for viewing .GIS files is now available, and can be downloaded here: http://landscape-restoration.tamu.edu/restoration_tools.jsp It is very simple, but then, so are the raster files. The actual data for interpreting the numerical grid is provided by the text files included with them.

Compatibility
Currently, the versions of Landis-II available are Windows compatible executables, that run on Microsofts .NET platform. This means that to run it, you must already have a version of .NET Platform 2.0 or later running on your machine (said package can be obtained here).

This reliance on the .NET platform also makes it possible to run Landis-II on a Linux machine with relative ease. .NET applications aren't compiled to machine language, but instead are outputted in a machine independent format which follows the Common Language Infrastructure (CLI) specification. Thus, CLI applications are essentially interpreted at runtime, which is why .NET platform is essential. Microsoft .NET is just an implementation of the CLI standard, and a Linux compatible application called MONO is available which attempts to do the same thing for Linux platforms--IE to provide a runtime environment in which compiled CLI applications can be executed.

MONO is free, and well documented, though still in development. Once MONO was installed, the Landis-II executables could be run through it on a Linux system. (We quite simply made a tar-ball out of the finished Windows installation, and unpacked it again on the Linux machine. It ran there without difficulty.)

The Project
The aim of our work on Landis is the find ways of parallelizing the software for greater speed. Source code for Landis itself is currently unavailable, but, via Professor Umbanhowar, faculty at UV Madison suggested the following procedure: first, get Landis running; second, successfully parallelize the age-only succession module (for which code is available); then, having accomplished those tasks, they would consider giving out full source code. However, this project has not enjoyed great success so far. The first step was achieved in a few hours, the second proved much more difficult. Hopefully, what follows will serve to give some guidance to future attempts at this project--and to caution against certain pitfalls.

The first thing to note is that the relevant code is written in C#, which is the language used by the Visual Studio development platform. The language, in basic syntax, is not too dissimilar to C++. The St. Olaf Science Library has some useful resources to get your started, specifically C# essentials by Ben Albahari (CALL NO: QA76.73.C154 A418 2002) which introduces C# and the underlying .Net structure, and includes notes specifically for those already versed in C++ which remark on relevant differences and similarities.

Still, don't let the semi-familiar syntax fool you, the Landis code is not easy to read. While the Landis website includes high level documentation describing the abstract model being used, an end-user manual, and an overview of model architecture and how it relates to the architecture of the core program, it does not provide enough information to allow easy parsing of the code files. The overviews are imprecise, and I was unable to clearly correlate general architecture to specific methods and files.

Alternatively, this page provides links to class architecture diagrams, but doesn't actually describe their use or function as far as might be desired. I'm sure these are helpful for those already familiar with the internal structure of the code, but they are dubious tools for achieving such familiarity.

All this said, somebody embarking on the project should probably prepare in a few ways before beginning. First of all, it is probably necessary to have have a C# editor--which at the moment means a copy of Visual Studio. Moreover, while the CS department has at least one copy of said software, it is a 2003 version, and the DLL files used for module development require a version from 2005 or later. This is one of the pitfalls mentioned above, late in the project, it came as a surprise that we couldn't actually work with the libraries we needed. Two years difference in version do indeed make all the difference.

Also, rather than trying to pick it up as you go, I'd recommend learning C#, and gaining some familiarity with projects in it before even beginning. The attempt to do so significantly slowed down my efforts to understand the code.

Another observation I have is that, in retrospect, it would be really good to start the project by opening lines of comunication with the relevant people as UW. I didn't even attempt this, but looking back, it seems that the documentation is probably most useful for those already familiar with the structure and development of the program -- so it would be really helpful to have some contact with those people when, as I did, you get stuck. It might be wise to consult Professor Umbenhowar on this front.

Relevant Links
MONO project homepage

The official Landis-II wiki (You'll need to register to access many of the relevant pages and downloads)