Glam output

= Output from GLAM =

Selecting output from GLAM
GLAM outputs 2d and 3d variables in files glam.2df and glam.3df, respectively (located in subversion repository "glam-matlab"). These files are binary and can be read with MATLAB scripts (see below). The interval between output is selected using the variable nout within glam.nml. The three elements of this array contain intervals for point, 2d and 3d output (the first is no longer used). The unit is years. Note that GLAM will also output at the first (tstr) and final (tstr+trun) time step irrespective of these settings; the actual time integration loop runs from tstr+tinc until trun is exceeded. The variable nstrv</tt> can be used to control when output starts in a time-dependent simulation; output will only be written after nstr</tt> (in years). This is useful if we are only interested in the equilibrium.

The variables that are output can be selected by editing glam.out</tt>. This file contains two arrays (which2d</tt> and which3d</tt>). Output for a particular variable is selected if the appropriate entry in the array is 1 (otherwise set to zero). The variables currently available for output are shown in Tables 1 and 2.

'''Table 2. needs to be done'''

Viewing output from GLAM in MATLAB
The GLAM output files can be loaded using MATLAB scripts glam2d.m</tt> and glam3d.m</tt>. Both are called using [a] = glam3d(N,'PATH');</tt> (where N</tt> is the time step of interest and PATH</tt> is the relative location of the output file, e.g. ‘.’ for same directory). These scripts create a MATLAB structure that can be referenced as follows. For 3d output, use a.NAME(I,J,K)</tt> where NAME</tt> is the variable’s MATLAB name (see Tables 1 and 2), I</tt> and J</tt> are horizontal indices and K</tt> the vertical index. Note that it is often necessary to compress the 3d array to a 2d array for plotting purposes using squeeze</tt>. The command <tt>imagesc(squeeze(a.txz(:,:,end)))</tt> will produce an image of basal traction.