Difference between revisions of "CISM exercise I: build model"

From Interactive System for Ice sheet Simulation
Jump to: navigation, search
(Building CISM)
 
(14 intermediate revisions by one user not shown)
Line 1: Line 1:
 
==Building CISM==
 
==Building CISM==
 +
 +
In this exercise you will build a stand-alone (fully UN-coupled) version of the ice sheet model and apply it to some standard test cases designed to demonstrate the fidelity of the current dynamical core in CISM. Note that this is NOT the current dynamical core in CESM, which still uses "shallow ice dynamics" (and we will demonstrate below why that is far from ideal).
 +
 +
First log onto Mapache,
 +
 +
ssh -t -X wtrw.lanl.gov  (Enter your Cryptocard password)
 +
ssh mp-fe1  (or ssh mp-fe2)
 +
 +
In the Encantado classroom, you will need to bring up Putty and follow the directions in the handout, "Logging into Mapache from Encantado Classroom Terminals".
 +
 +
If you are already logged on to Mapache you should exit and login again, in order to avoid any conflicts with existing environmental variables,
 +
 +
exit
 +
ssh mp-fe1  (or ssh mp-fe2)
  
 
The first step is to acquire the model code. In common with many open-source projects, there are regular ''releases'' of CISM &mdash; these are numbered snapshots of the code and represent stable versions of the model (relative to development versions of the code on the  repository). The latest release can be downloaded from the CISM website<ref>Glimmer-CISM hosted on the BerliOS repository in Germany</ref>:
 
The first step is to acquire the model code. In common with many open-source projects, there are regular ''releases'' of CISM &mdash; these are numbered snapshots of the code and represent stable versions of the model (relative to development versions of the code on the  repository). The latest release can be downloaded from the CISM website<ref>Glimmer-CISM hosted on the BerliOS repository in Germany</ref>:
Line 5: Line 19:
 
:[http://developer.berlios.de/projects/glimmer-cism http://developer.berlios.de/projects/glimmer-cism]
 
:[http://developer.berlios.de/projects/glimmer-cism http://developer.berlios.de/projects/glimmer-cism]
  
Because we are currently working on readying Glimmer-CISM-2.0 for release, the most recent publicly available version on the code does not contain many recent updates that we would like to take advantage of in this coarse. For that reason, we will be working from an intermediate version of the code:
+
Because we are currently working on readying Glimmer-CISM-2.0 for release, the most recent publicly available version on the code does not contain many recent updates that we would like to take advantage of in this coarse. For that reason, we will be working from an intermediate version of the code. To copy the tarball of that code into your working directory and unpack it type
  
:[[Image:CISM-BNU-3-2011a.tar.gz]]
+
cp /usr/projects/cesm/cism/CISM-LANL-4-2011.tar.gz ./
  
Click on the link above and save the tarball to your own CISM directory. To unpack the tarball, type
+
tar -xzvf CISM-LANL-4-2011.tar.gz
  
tar -xzvf CISM-BNU-3-2011.tar.gz
+
We then need to load the necessary modules and set some environmental variables, which we will do by running a script,
  
To build the code, you need to first cd into the correct directory
+
source /usr/projects/cesm/cism/cism-serial-env
  
  cd CISM-BNU-3-2011
+
Now, cd into the top level directory from the unpacked tarball,
 +
 
 +
  cd CISM-LANL-4-2011
  
 
CISM uses autotools to build the code. First, we need to build the build system by typing  
 
CISM uses autotools to build the code. First, we need to build the build system by typing  
Line 21: Line 37:
 
  ./bootstrap
 
  ./bootstrap
  
Next, we need to tell the configure script where to build the code, where to look to find the necessary NetCDF libraries, and which fortran compiler we want to use to build the code:
+
Next, we need to run a configure script which, along with environmental variables we specified above, tells the code where to look to find the necessary NetCDF libraries, compilers, etc:
  
  ./configure --prefix=/path-where-you-want-build-CISM --with-netcdf=/path-to-netCDF-library FC=gfortran F77=gfortran
+
  ./configure  
  
Check to make sure that the configuration step was successful with
+
Once the configure step has finished, check to make sure that it was successful with,
  
 
  tail config.log
 
  tail config.log
  
If you see 'configure: exit 0' as the final line then configure was successful. Now, we type
+
If you see '''configure: exit 0''' as the final line then configure was successful. Now, we build the code by typing,
  
make; make install
 
 
to first compile the various pieces of code and then build the model in the installation directory that you specified in when you ran configure. Note that if you want to build the code in the same directory where it was untarred you can simply do
 
 
./bootstrap
 
./configure --with-netcdf=/path-to-netCDF-library FC=gfortran F77=gfortran
 
 
  make
 
  make
  
The code will take a while to build. When it is done, and assuming you haven't seen any obvious errors, you can confirm a successful build by checking in the ''example-drivers/simple_glide/src/'' directory. If there is an executable file there called ''simple_glide'', then your build was successful. This is the executable we will use to run the various test cases uses the higher-order dynamics version of the model.
+
The code will take a while to build. When it is done, and assuming you haven't seen any obvious errors, you can confirm a successful build by checking in the ''example-drivers/simple_glide/src/'' directory. If there is an executable file there called '''simple_glide''', then your build was successful. This is the executable we will use to run the various test cases using the higher-order dynamics version of the model.
 
+
  
Go to the [[Editing CISM exercise II: run diagnostic test cases|second set of exercises]].
+
Go to the [[CISM exercise II: run diagnostic test cases|second set of exercises]].
  
 
Go to the [[CISM exercise III: add a module to CISM and run prognostic test case|third set of exercises]].
 
Go to the [[CISM exercise III: add a module to CISM and run prognostic test case|third set of exercises]].
  
 
[[International Workshop on Ice Flow Modeling, Beijing Normal University (March 21-25, 2011)|Return to main coarse page]]
 
[[International Workshop on Ice Flow Modeling, Beijing Normal University (March 21-25, 2011)|Return to main coarse page]]

Latest revision as of 15:18, 9 May 2011

Building CISM

In this exercise you will build a stand-alone (fully UN-coupled) version of the ice sheet model and apply it to some standard test cases designed to demonstrate the fidelity of the current dynamical core in CISM. Note that this is NOT the current dynamical core in CESM, which still uses "shallow ice dynamics" (and we will demonstrate below why that is far from ideal).

First log onto Mapache,

ssh -t -X wtrw.lanl.gov   (Enter your Cryptocard password)
ssh mp-fe1   (or ssh mp-fe2)

In the Encantado classroom, you will need to bring up Putty and follow the directions in the handout, "Logging into Mapache from Encantado Classroom Terminals".

If you are already logged on to Mapache you should exit and login again, in order to avoid any conflicts with existing environmental variables,

exit
ssh mp-fe1   (or ssh mp-fe2)

The first step is to acquire the model code. In common with many open-source projects, there are regular releases of CISM — these are numbered snapshots of the code and represent stable versions of the model (relative to development versions of the code on the repository). The latest release can be downloaded from the CISM website[1]:

http://developer.berlios.de/projects/glimmer-cism

Because we are currently working on readying Glimmer-CISM-2.0 for release, the most recent publicly available version on the code does not contain many recent updates that we would like to take advantage of in this coarse. For that reason, we will be working from an intermediate version of the code. To copy the tarball of that code into your working directory and unpack it type

cp /usr/projects/cesm/cism/CISM-LANL-4-2011.tar.gz ./
tar -xzvf CISM-LANL-4-2011.tar.gz

We then need to load the necessary modules and set some environmental variables, which we will do by running a script,

source /usr/projects/cesm/cism/cism-serial-env

Now, cd into the top level directory from the unpacked tarball,

cd CISM-LANL-4-2011

CISM uses autotools to build the code. First, we need to build the build system by typing

./bootstrap

Next, we need to run a configure script which, along with environmental variables we specified above, tells the code where to look to find the necessary NetCDF libraries, compilers, etc:

./configure 

Once the configure step has finished, check to make sure that it was successful with,

tail config.log

If you see configure: exit 0 as the final line then configure was successful. Now, we build the code by typing,

make

The code will take a while to build. When it is done, and assuming you haven't seen any obvious errors, you can confirm a successful build by checking in the example-drivers/simple_glide/src/ directory. If there is an executable file there called simple_glide, then your build was successful. This is the executable we will use to run the various test cases using the higher-order dynamics version of the model.

Go to the second set of exercises.

Go to the third set of exercises.

Return to main coarse page
Cite error: <ref> tags exist, but no <references/> tag was found