Using GLIMMER

Obtaining Glimmer
GLIMMER is available from the Glimmer project page. Documentation is also available from this site. It is recommended that the latest version of Glimmer should be used; GENIE will not build with versions of Glimmer prior to 1.0.4.

Building Glimmer
More information is provided in the documentation, but the basic build is quite simple:

tar xzvf glimmer-1.0.4.tar.gz cd glimmer-1.0.4 export FCFLAGS="-DGLIMMER_SP" ./configure --prefix=/home/ggdagw/glimmer-genie-version \ --with-netcdf=/opt/local/intel_fc_81 FC=ifort F77=ifort make make install
 * First, unpack the tarball:
 * Descend into the resulting directory:
 * Set the environment variable FCFLAGS to -DGLIMMERSP. This enables compliation of Glimmer with a single-precision interface, required by GENIE. The mechanism used to set environment variables depends on your shell, but for bash or ksh, do this:
 * Run configure with the appropriate arguments. The --prefix specifies where the model will be installed; --with-netcdf specifies the location of the NetCDF library. The NetCDF installation is expected to be laid out in the standard way, so that the directory specified includes lib and include</tt> directories. For example:
 * You will need to build GLIMMER separately from GENIE:
 * GENIE builds will expect to find the GLIMMER libraries and modules in particular locations. Invoke the install</tt> target to install GLIMMER:

Configuring the GENIE build
By default, GENIE is expecting to find Glimmer in the directory ~/glimmer-genie-version, as specified in the ./configure</tt> command above. If you have installed Glimmer elsewhere, you can either edit the variable GLIMMER_DIR</tt> in genie-main/user.mak or create a symbolic link in your home directory with the name 'glimmer-genie-version' to point to your most recently downloaded version of GLIMMER.

To complete the Glimmer configuration, you also need to set FLAG_GLIMMER=ON</tt> in genie-main/user.mak.

Configuring Glimmer experiments
To configure GENIE to run Glimmer, it must be enabled in the GENIE config file: ma_flag_icesheet=.TRUE. In addition, the forcing timestep should be specified: ma_kicesheet_loop=1 The Glimmer configuration is specified by setting the gl_config_file</tt> variable in the GENIE config file. For example, in the GENIE/Glimmer test job: gl_config_file=$RUNTIME_ROOT/genie-main/configs/genie_ig_fi_fi_glim_test.glimmer.config This points to the location of the Glimmer configuration file, which is constructed as described in the Glimmer documentation. It can itself reference other Glimmer configuration files, if more than one ice sheet instance is to be run.

Within the Glimmer configuration file, it can be helpful to be able to reference some properties of the GENIE experiment. It is not possible to use the full range of variables available in the GENIE configuration file, because of the way the Glimmer file is processed. However, four useful variables are substituted when the Glimmer configuration file is processed: The GENIE/Glimmer test job configuration file (genie-main/configs/genie_ig_fi_fi_glim_test.glimmer.config</tt>) demonstrates their use.
 * $EXPID</tt>, the GENIE experiment identifier.
 * $RUNTIME_ROOT</tt>, the genie model code directory, typically ~/genie</tt>.
 * $RUNTIME_OUTDIR</tt>, the main output directory, typically ~/genie_output/$EXPID</tt>.
 * $GLIMMER_OUTDIR</tt>, the Glimmer output directory within $RUNTIME_OUTDIR</tt>, which is icesheet</tt> by default.