Install RegCM4.3

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Package Description

Install Required Software


Obtain Code
Configure
Compile Model

RegCM 4.3 training session I


Installing RegCM4.3rc

G. Giuliani
International Centre for Theorethical Physics - Trieste
Earth System Physics Section

ICTP - Earth System Physics Section

May 6, 2012
ictp-logo

ICTP - ESP Install RegCM4.3rc


Package Description
Install Required Software
Obtain Code
Configure
Compile Model

Description

The model is distributed as Fortran90 source code.


A compiler is needed to transform to executable.
I GNU GNU fortran compiler

I intel Intel
R
ifort fortran compiler
I pgi Portland R
pgf90 fortran compiler
I g95 g95 fortran compiler

Check which one is present on system. 1

ictp-logo
1
Side by side install? Consider Modules package
ICTP - ESP Install RegCM4.3rc
Package Description
Install Required Software
Obtain Code
Configure
Compile Model

Requirements

The model needs at least two libraries:


I netCDF netCDF Library

nc-config --version
I MPI MPI Library
ompi_info --version ompi release
We have an environment for the workshop:
source /home/netapp-clima/users/ggiulian/workshop_env.sh

ictp-logo

ICTP - ESP Install RegCM4.3rc


Package Description
Install Required Software
Obtain Code
Configure
Compile Model

GPL license primer


The usual way to install a package on Linux is to compile the
software. The Free Software distributed with GPL license
empowers the user giving
I the freedom to use the software for any reason
I the freedom to study how it works
I the freedom to modify it to fit any personal need
I the freedom to develop any product depending on it
I the limit to contribute modifications to the original
software developer
I the limit to distribute any derived work with the same
license again as source code ictp-logo

ICTP - ESP Install RegCM4.3rc


Package Description
Install Required Software
Obtain Code
Configure
Compile Model

Software Install on Linux

The normal steps to install software relies usually on GNU


autotools
I Download source package as compressed archive
I Unpack it on disk
I Configure software build
I Translate source code in machine executable
I Install software either on system or user path
I Modify environment to use the software

ictp-logo

ICTP - ESP Install RegCM4.3rc


Package Description
Install Required Software
Obtain Code
Configure
Compile Model

RegCM4.3rc home
The RegCM4.3rc package is distributed by the Gforge site
http://gforge.ictp.it/gf/project/regcm

I Files section on the left sidebar


I Package RegCM4.3rc click on the tar.gz file
Download packed release file, unpack on local disk:
cd Downloads
mv RegCM-4.3-rc.tar.gz /scratch/$USER
cd /scratch/$USER
tar zxvf RegCM-4.3-rc.tar.gz
ictp-logo

ICTP - ESP Install RegCM4.3rc


Package Description
Install Required Software
Obtain Code
Configure
Compile Model

Configure RegCM4.3rc builder


First, we need to check the workshop environment:
gfortran --version
cd RegCM-4.3-rc
Let the configure script do some work for you.
./configure CC=gcc FC=gfortran

I Find the required software listed above in 3


I Set up the correct flag for the compiler
I Add or remove from compilation part of the code
ictp-logo

ICTP - ESP Install RegCM4.3rc


Package Description
Install Required Software
Obtain Code
Configure
Compile Model

Make the executable

How to make what executables?

make install

ictp-logo

ICTP - ESP Install RegCM4.3rc


Package Description
Install Required Software
Obtain Code
Configure
Compile Model

What’s happened?

ls Bin

aerosol GrADSNcPlot icbc regcmMPI sigma2p terrain


average GrADSNcPrepare chem_icbc clm2rcm regrid sst

Now we can start play around with the model.

ictp-logo

ICTP - ESP Install RegCM4.3rc


Package Description
Install Required Software
Obtain Code
Configure
Compile Model

Run Environment

We setup a run environment and start the setup


cd /scratch/$USER
mkdir -p run/{input,output}
cd run
ln -sf /scratch/$USER/RegCM-4.3-rc/Bin .
cp /scratch/$USER/RegCM-4.3-rc/Testing/test_001.in .
gedit test_001.in

ictp-logo

ICTP - ESP Install RegCM4.3rc


Package Description
Install Required Software
Obtain Code
Configure
Compile Model

Running the model

./Bin/terrain test_001.in
./Bin/sst test_001.in
./Bin/icbc test_001.in
mpirun -np 2 ./Bin/regcmMPI test_001.in
We can now go to step 2, analize the output.

ictp-logo

ICTP - ESP Install RegCM4.3rc

You might also like