install regcm4.3

11
ictp-logo 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 7, 2012 ICTP - ESP Install RegCM4.3rc

Upload: jmatias765428

Post on 21-Jan-2016

350 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Install RegCM4.3

ictp-logo

Package DescriptionInstall Required Software

Obtain CodeConfigure

Compile Model

RegCM 4.3 training session I

Installing RegCM4.3rc

G. GiulianiInternational Centre for Theorethical Physics - Trieste

Earth System Physics Section

ICTP - Earth System Physics Section

May 7, 2012

ICTP - ESP Install RegCM4.3rc

Page 2: Install RegCM4.3

ictp-logo

Package DescriptionInstall Required Software

Obtain CodeConfigure

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

1Side by side install? Consider Modules packageICTP - ESP Install RegCM4.3rc

Page 3: Install RegCM4.3

ictp-logo

Package DescriptionInstall Required Software

Obtain CodeConfigure

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:

bash

source /home/netapp-clima/users/ggiulian/workshop_env.sh

ICTP - ESP Install RegCM4.3rc

Page 4: Install RegCM4.3

ictp-logo

Package DescriptionInstall Required Software

Obtain CodeConfigure

Compile Model

GPL license primerThe usual way to install a package on Linux is to compile thesoftware. The Free Software distributed with GPL licenseempowers 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 originalsoftware developer

I the limit to distribute any derived work with the samelicense again as source code

ICTP - ESP Install RegCM4.3rc

Page 5: Install RegCM4.3

ictp-logo

Package DescriptionInstall Required Software

Obtain CodeConfigure

Compile Model

Software Install on Linux

The normal steps to install software relies usually on GNUautotools

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 - ESP Install RegCM4.3rc

Page 6: Install RegCM4.3

ictp-logo

Package DescriptionInstall Required Software

Obtain CodeConfigure

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-rc1.tar.gz /scratch/$USER

cd /scratch/$USER

tar zxvf RegCM-4.3-rc1.tar.gz

ICTP - ESP Install RegCM4.3rc

Page 7: Install RegCM4.3

ictp-logo

Package DescriptionInstall Required Software

Obtain CodeConfigure

Compile Model

Configure RegCM4.3rc builder

First, we need to check the workshop environment:

gfortran --version

cd RegCM-4.3-rc1

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 - ESP Install RegCM4.3rc

Page 8: Install RegCM4.3

ictp-logo

Package DescriptionInstall Required Software

Obtain CodeConfigure

Compile Model

Make the executable

How to make what executables?

make install

ICTP - ESP Install RegCM4.3rc

Page 9: Install RegCM4.3

ictp-logo

Package DescriptionInstall Required Software

Obtain CodeConfigure

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 - ESP Install RegCM4.3rc

Page 10: Install RegCM4.3

ictp-logo

Package DescriptionInstall Required Software

Obtain CodeConfigure

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-rc1/Bin .

cp /scratch/$USER/RegCM-4.3-rc1/Testing/test_001.in .

gedit test_001.in

ICTP - ESP Install RegCM4.3rc

Page 11: Install RegCM4.3

ictp-logo

Package DescriptionInstall Required Software

Obtain CodeConfigure

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 - ESP Install RegCM4.3rc