BISMG:SarahS/glimmer-cism-lanl

How to install netCDF libraries on bigblue1

 * Download the netCDF code netcdf-4.1.2.tar.gz. Steph has a copy
 * Make a directory called netcdf and sub directories ifort and gfortran
 * Un-compress the code in each directory: tar -xzf netcdf-4.1.2.tar.gz
 * In the ifort directory run configure like this: CC=icc CXX=icpc FC=ifort F77=ifort ./configure --prefix=/gpfs/cluster/geog/ggsrs/netcdf/ifort --enable-separate-fortran=no --enable-shared=no --enable-dap=no
 * In the gfortran directory run configure like this: CC=gcc CXX=g++ FC=gfortran F77=gfortran ./configure --prefix=/gpfs/cluster/geog/ggsrs/netcdf/gfortran --enable-separate-fortran=no --enable-shared=no --enable-dap=no


 * 'make check install' will make a verify if the build was successful. If successful there will be a message saying congratulations you now have netcdf libraries!
 * ./configure --prefix= location/of/code --with-netcdf=/gpfs/cluster/geog/ggsrs/netcdf/gfortran FC=gfortran F77=gfortran

Installing glimmer-cism-lanl with trilinos on dartagnan
Serial trilinos
 * To ensure any old object files are deleted type make distclean
 * svn co https://svn.berlios.de/svnroot/repos/glimmer-cism/glimmer-cism-lanl/branches/parallel or
 * svn co http://svn.berlios.de/svnroot/repos/glimmer-cism/glimmer-cism2/branches/glimmer-cism-lanl/ [looks like the most up to date trilinos related check-in's are to this branch]
 * ./bootstrap
 * To build using serial trilinos use;
 * ./configure --prefix=/home/paleo/ggsrs/parallel --enable-tests --with-netcdf=/opt/local/CentOS-64/netcdf/4.0/intel_fc_10.1/  --with-lapack=-llapack --with-blas=/usr/lib64/libblas.a --with-trilinos=/opt/local/CentOS-64/trilinos/trilinos-10.0.4-Source/SERIAL/ FC=ifort F77=ifort

mpi trilinos
 * Add this module openmpi/intel_fc_10.1/1.4.1
 * ./configure --prefix=/home/paleo/ggsrs/glimmer-cism-lanl --with-netcdf=/opt/local/CentOS-64/netcdf/4.0/intel_fc_10.1/ --enable-mpi --with-lapack=-llapack --with-blas=/usr/lib64/libblas.a --with-trilinos=/opt/local/CentOS-64/trilinos/10.6.4/intel_fc_10.1/openmpi_1.4.1 FC=mpif90 F77=mpif90 CXX=mpicxx EXTRA_LDLIBS="/opt/intel/fce/10.1.015/lib/for_main.o"
 * make
 * make install
 * To prevent a run time error link to the shared object file by setting the environment variable
 * export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/local/CentOS-64/trilinos/10.6.4/intel_fc_10.1/openmpi_1.4.1/lib
 * mpirun -np 1 ./simple_glide

Note : some versions in the repository require FCFLAGS="-ffree-line-length-none" when compiling with gfortran. This is because there is a long line of code in glide_io.F90 that the compiler dislikes.

Installing glimmer-cism on dartagnan
Currently using this version of glimmer-cism: https://svn.berlios.de/svnroot/repos/glimmer-cism/glimmer-cism-lanl/trunk


 * Check out code
 * ./bootstrap
 * ./configure --prefix=/home/paleo/ggsrs/lanl_update/trunk/ --with-netcdf=/opt/local/CentOS-64/netcdf/4.0/intel_fc_10.1/ FC=ifort F77=ifort FCFLAGS='-g -traceback -DNO_RESCALE'. The -DNO_RESCALE is necessary if you want to run the Pattyn HO model.
 * make
 * make install

Running the trilinos test

 * There is a test located in the example/TrilinosSolversUnitTest directory
 * Gethin made a Makefile for ifort for this test called Makefile.ifort. This is now in the repository.
 * To run the test case type make -f Makefile.ifort TrilinosSolversUnitTest.exe

Basal water in glimmer-cism

 * 0 Local water balance
 * 1 Local water balance + constant flux
 * 2 None

If you want to setup the model to use different types of parallel solvers, then you need to add a compile flag.
 * For PARDISO use --with-pardiso
 * For UMFPACK use --with-umfpack
 * The default (i.e no flag) uses SLAP library.

How to enable higher order physics
Add [ho_options] to the configuration file

diagnostic_scheme   No time evolution Higher-order velocity computation scheme 0 SIA, no higher order 1 Pattyn unstaggered 2 Pattyn staggered 3 Payne/Price scheme

prognostic_scheme   Time evolution 0 Do not not use higher-order velocities prognostically; compute and output them but use SIA to evolve the ice 1 Pattyn scheme (compute higher-order diffusivities only) 2 Pollard scheme (Not implemented yet) 3 Bueler scheme (Not implemented yet)

basal_stress_input  Flag that indicates how to compute beta, the higher-order basal stress 0 Set to NaN everywhere (no sliding, ice glued to the bed) 1 Set to 1/soft (default) 2 Set to 1/btrc (re-computed at each time step) 3 Set to beta field of input netcdf file basal_stress_type

guess_specified

which_ho_source

include_thin_ice

Price-Payne higher-order (glam) options:

which_ho_babc

which_ho_efvs

which_ho_resid

which_ho_sparse  Flag that indicates method for solving the sparse linear system that arises from the higher-order solver 0 Biconjugate Gradient, Incomplete LU Preconditioner 1 GMRES, Incomplete LU Preconditioner 2 UMFPACK Unsymmetric multifrontal direct solver 3 PARDIOS - Must have pre-compiled libraries installed

which_ho_sparse_fallback

Modifications to Makefile
Remove lines that compile Edinburgh climate driver (i.e eis* )

Remove lines that envoke python:

filename_io.F90 is made on the fly using phthon (generate_ncvars.py) Remove lines in Makefile that remove filename_io.F90 when 'make clean' is used.

Python is still used in the Makefile to check for dependencies.

glimmer-cism-lanl structure
glide.F90 glide_thck.F90 glide_temp.F90 glide_velo.F90 other_glide_files