Difference between revisions of "Using GLIMMER"

From SourceWiki
Jump to navigation Jump to search
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
GLIMMER is available from the [http://forge.nesc.ac.uk/projects/glimmer|GLIMMER project page].
+
===Obtaining Glimmer===
 +
GLIMMER is available from the [http://forge.nesc.ac.uk/projects/glimmer 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.
  
When you build GLIMMER for use with GENIE, be sure to:
+
===Building Glimmer===
 +
More information is provided in the documentation, but the basic build is quite simple:
  
* Set FCFLAGS to -DGLIMMER_SP.  For example if you use BASH or KSH:
+
* First, unpack the tarball:
<pre>export FCFLAGS="-DGLIMMER_SP"</pre>
 
* Run configure with the appropriate arguments.  For example:
 
 
<pre>
 
<pre>
/configure --prefix=/home/ggdagw/glimmer-1.0.4 FC=ifort --with-netcdf=/opt/local/intel_fc_81
+
tar xzvf glimmer-1.0.4.tar.gz
 
</pre>
 
</pre>
 +
* Descend into the resulting directory:
 +
<pre>
 +
cd glimmer-1.0.4
 +
</pre>
 +
* Set the environment variable <tt>FCFLAGS</tt> to <tt>-DGLIMMERSP</tt>. 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 <tt>bash</tt> or <tt>ksh</tt>, do this:
 +
<pre>
 +
export FCFLAGS="-DGLIMMER_SP"
 +
</pre>
 +
* Run <tt>configure</tt> with the appropriate arguments. The <tt>--prefix</tt> specifies where the model will be installed; <tt>--with-netcdf</tt> 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 <tt>lib</tt> and <tt>include</tt> directories. For example:
 +
<pre>
 +
./configure --prefix=/home/ggdagw/glimmer-genie-version \
 +
--with-netcdf=/opt/local/intel_fc_81 FC=ifort F77=ifort
 +
</pre>
 +
* You will need to build GLIMMER separately from GENIE:
 +
<pre>
 +
make
 +
</pre>
 +
* GENIE builds will expect to find the GLIMMER libraries and modules in particular locations. Invoke the <tt>install</tt> target to install GLIMMER:
 +
<pre>
 +
make install
 +
</pre>
 +
 +
===Configuring the GENIE build===
 +
By default, GENIE is expecting to find Glimmer in the directory '''~/glimmer-genie-version''', as specified in the <tt>./configure</tt> command above. If you have installed Glimmer elsewhere, you can either edit the variable <tt>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 <tt>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:
 +
<pre>
 +
ma_flag_icesheet=.TRUE.
 +
</pre>
 +
In addition, the forcing timestep should be specified:
 +
<pre>
 +
ma_kicesheet_loop=1
 +
</pre>
 +
The Glimmer configuration is specified by setting the <tt>gl_config_file</tt> variable in the GENIE config file. For example, in the GENIE/Glimmer test job:
 +
<pre>
 +
gl_config_file=$RUNTIME_ROOT/genie-main/configs/genie_ig_fi_fi_glim_test.glimmer.config
 +
</pre>
 +
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.
  
GENIE is expecting to find glimmer in the dir '''~/glimmer_genie_version''', so you can either edit this 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.
+
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:
 +
* <tt>$EXPID</tt>, the GENIE experiment identifier.
 +
* <tt>$RUNTIME_ROOT</tt>, the genie model code directory, typically <tt>~/genie</tt>.
 +
* <tt>$RUNTIME_OUTDIR</tt>, the main output directory, typically <tt>~/genie_output/$EXPID</tt>.
 +
* <tt>$GLIMMER_OUTDIR</tt>, the Glimmer output directory within <tt>$RUNTIME_OUTDIR</tt>, which is <tt>icesheet</tt> by default.
 +
The GENIE/Glimmer test job configuration file (<tt>genie-main/configs/genie_ig_fi_fi_glim_test.glimmer.config</tt>) demonstrates their use.

Latest revision as of 11:15, 17 February 2009

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:

  • First, unpack the tarball:
tar xzvf glimmer-1.0.4.tar.gz
  • Descend into the resulting directory:
cd glimmer-1.0.4
  • 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:
export FCFLAGS="-DGLIMMER_SP"
  • 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 directories. For example:
./configure --prefix=/home/ggdagw/glimmer-genie-version \
--with-netcdf=/opt/local/intel_fc_81 FC=ifort F77=ifort
  • You will need to build GLIMMER separately from GENIE:
make
  • GENIE builds will expect to find the GLIMMER libraries and modules in particular locations. Invoke the install target to install GLIMMER:
make install

Configuring the GENIE build

By default, GENIE is expecting to find Glimmer in the directory ~/glimmer-genie-version, as specified in the ./configure command above. If you have installed Glimmer elsewhere, you can either edit the variable GLIMMER_DIR 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 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 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:

  • $EXPID, the GENIE experiment identifier.
  • $RUNTIME_ROOT, the genie model code directory, typically ~/genie.
  • $RUNTIME_OUTDIR, the main output directory, typically ~/genie_output/$EXPID.
  • $GLIMMER_OUTDIR, the Glimmer output directory within $RUNTIME_OUTDIR, which is icesheet by default.

The GENIE/Glimmer test job configuration file (genie-main/configs/genie_ig_fi_fi_glim_test.glimmer.config) demonstrates their use.