ElmerDEM

From Elmer Wiki
Revision as of 09:23, 26 June 2012 by Tzwinger (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Name of the source code file: ElmerDEM.c
Purpose:
Creates a (horizontally stair-stepped) mesh on a given Digital Elevation Model (DEM) that can contain a bedrock, surface as well as a thickness DEM (where one is redundant if all three are provided).
Compilation command:
Usually cc stands for the system C-compiler. If not so, please, replace with the corresponding command of your system.

cc ElmerDEM.c -o ElmerDEM -lm

the -lm links the math-library (not necessary on some compilers)
Calling command:

ElmerDEM -h

displays information on options if no arguments are given.

ElmerDEM usage:
ElmerDEM bedrock icethickness surface header output-dir layers

Input files have to contain a digital elevation model
of the /bedrock/, the /icethickness/ and the free /surface/;
each consisting of N rows,  containing M columns.
Structure of /header/ file:
-------------------------
minx miny
dxy
NoVal
MinDepth
gamma
-------------------------
/minx/ and /miny/ give define the S-E corner point coordinates.
/dxy/ declares the step-width in horizontal direction
/NoVal/ numeric value declaring missing data
/MinDepth/ is the minimum ice-depth (values below will be reset)

/gamma/ is a nonlinearity factor. (gamma>0 concentrates elements near the bed).

Rows are asumed to be aligned with W-E (x), columns
with N-S (y) direction. Hence quadrilateral shape is asumed.

output is written into directory /output-dir/.

Final mesh will contain /layers/ element levels
WARNING: files in an already existing output-directory may be overwritten!