We used GRASS GIS, a software package with efficient terrain analysis algorithms, to perform each of these transformations. While this package is intended for SMP systems, there is demonstrated interest in merging the high-level functionality of GRASS with the efficiency gains of HPC systems \cite{akhter_grass_2010}. Unfortunately, this interest has largely been manifested in sporadic academic manuscripts and disjointed Wiki-based instruction manuals at the moment, with no systematic, supported methods accompanying the software. Thus, we faced three options for speeding up the DEM transformations, and, specifically, the MUHA and irradiance calculations.
First, we could have attempted to adapt GRASS to a parallel environment using OpenMP or MPI (or another message passing platform). Doing this in a flexible manner is clearly of great value to the larger geospatial community yet represents an effort larger in scope than is afforded by the extent of this project. Second, we could have adapted the specific algorithms of interest to a language of our choice and again used OpenMP or MPI to parallelize this algorithm over the available resources. While likely less time-consuming than the first option, this would fail to leverage all of the significant single-processor optimizations that GRASS has built into its environment. Third, we could use the batch environment to submit individual jobs that would generate intermediate files for the algorithm, and then use job dependencies to have a final job wait on those initial tasks to finish before incorporating those intermediate files into the final calculations. We chose this final option for its ease of implementation and for the ability to incorporate the optimizations already baked into GRASS.
To demonstrate what our chosen approach entails, we present the example processing pipeline for generating irradiance rasters from the raw DEM. First, we had to find the horizon angle from each of the >1 million pixels in each of 12 directions sampled evenly from the full 360 degrees, as well as calculate the slope angle and aspect at each pixel. Following our parallelization strategy, these calculations were submitted as independent jobs to the batch scheduler, each of which wrote an intermediate raster based on the output of the calculation. Then, a final “master” job was submitted that waited on those previous jobs to finish, took the intermediate files as inputs, and produced the final irradiance raster we needed as a feature for our regression models. The process for calculating MUHA was similar, though it involved inverting the DEM and calculating “negative horizon angles” as well, since these are indicative of a propensity for wind scouring.