Top Banner
23.-27.03.2015 COSMO/CLM Training Course 2015 WELCOME to the PRACTICAL EXERCISES
71

WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

Aug 21, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015

WELCOME

to the

PRACTICAL EXERCISES

Page 2: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 2

For the practical exercises you have got a TUTORIAL, with which

you can work most of the time on your own.

There are 6 lessons, in which you will learn about

– Installation of the COSMO-CLM model package (Tutorial Chapter 1)

– Preparing External, Initial and Boundary Data (Tutorial Chapter 2)

– Running the COSMO-CLM in a step-by-step mode (Tutorial Chapter 3)

– Postprocessing and visualizing netCDF files (Tutorial Chapter 5)

– Running the COSMO-CLM in a chain mode (optional, Tutorial Chapter B.3)

– Practical exercises

optional session together with NWP group: Idealized test cases

Extra sessions on 30 th/31st Feb. on Community Land Model and

COSMO-ART

Overview

Page 3: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 3

Introduction

Page 4: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 4

The Starter Package

• is the basis of the exercises in this trainings course

• contains everything that is necessary to perform a climate simulation

on a UNIX system (except the netCDF Library)

• keeps everything under one main directory “cclm-sp”

• can be used to learn how all parts of a climate simulation work

together

• can be used as template for your own simulation

• will be made available under http://redc.clm-

community.eu/projects/cclm-sp

• Documentation under http://redc.clm-community.eu/projects/cclm-

sp/wiki/Documentation

Page 5: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 5

CLM-Community +

Support

• Joint model development and coordination of activities in CLM

community www.clm-community.eu

• if you want to use the model get member

please do not take the code home if you are not a member!!!

• support in the usage in different ways: (see homepage)

– Tutorial

– Forum+Wiki

– bug reporting system

– information on namelist parameters

– tool for preparing initial and boundary data

– further utilities

Page 6: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 6

CLM-Community:

structure

Page 7: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 7

CLM-Community:

annual events

• COSMO/CLM/ART Training: Introduction to all models

now!

• COSMO and CLM-Community User Seminar: presentation of

achievements, working and project group meetings

this years meeting was held 2-6 March 2015.

• CLM-Community Assembly: presentation of achievements, working

and project group meetings, presentation of new model

developments, taking community decisions

The next Assembly is scheduled for September 2015.

Page 8: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 8

Namelist Input

• For both, the INT2LM and the COSMO-Model, you have to specify

a certain configuration.

• This defines, what you want to run: which variant of the dynamics,

which versions for the physical parameterizations, etc.

• To specify the configuration, both programs use NAMELIST input

• The COSMO-Model has more than 500 (!) Namelist variables, the

INT2LM has about 200.

• It is not necessary to know all of them. Approximately 10 % of them

are really important.

Page 9: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 9

Namelist Groups

COSMO INT2LM

RUNCTL CONTRL Specifying the basic configuration

LMGRID

LMGRID

GRID_IN

Specifying the COSMO-Model domain

Specifying the input model domain

IOCTL

GRIBIN

GRIBOUT

DATA Specifying I/O characteristics

DYNCTL To choose the dynamical core variant

PHYCTL To choose the physical parameterizations

DIACTL To choose the diagnostics

Page 10: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 10

Rotated coordinates

Page 11: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 11 11

Example Namelist

&LMGRID

startlat_tot = 0., startlon_tot = 3.5,

pollat = 40., pollon = -170.0,

dlon=0.0625, dlat=0.0625,

ie_tot=60, je_tot=65, ke_tot=40,

/END

&RUNCTL

dt=60,

hstart=0, hstop=744,

ydate_ini='2000010100', ydate_end='2000020100',

nprocx= ${NPX}, nprocy= ${NPY}, nprocio=${NPIO},

hincmxt=24, hincmxu=24,

itype_calendar=0,

lreorder = .FALSE., lreproduce = .TRUE.,

ldatatypes = .FALSE.,

nboundlines = 3,

ncomm_type = 3,

lartif_data = .FALSE.,

ltime_barrier = .FALSE.,

/END

Page 12: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 12

Namelist Tool

• for a new model simulation you need to think about namelist settings

• information on the namelist parameters: see ‘User’s Guide’ of model

documentation (available at http://www.cosmo-model.org/)

• This information is also available in the ‘Namelist Tool’ on the CLM

community homepage

• possibility to

– list all parameters

– search for a parameter

– compare different default settings

– compare your own namelists with default settings

Page 13: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 13

RedC (technical pages)

• Redmine for model development and dissemination

in the CLM-Community

• http://redc.clm-community.eu

• Dissemination of latest model version

• Documentations

• Forum (http://forum.clm-community.eu)

• posting questions

• Bug reporting

Page 14: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 14

WebPEP

Web interface for Preprocessing External data

Parameters

• WebPEP is a front end to the EXTPAR program

• With WebPEP you can:

• Select an appropriate simulation domain

• Create an external data set

Page 15: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 15

Page 16: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 16

Page 17: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 17 17

Page 18: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 18

Installation of the COSMO-CLM

model package

Page 19: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 19

Installation

• In this lesson you will learn

– how to login to and use DKRZ‘s supercomputer, the IBM „blizzard“

– what are the necessary components of the COSMO-CLM model package

– how these components can be installed on a computer

Page 20: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 20

Logging in

• To the PC

– There is a plastic sheet on your desk with the • Login name (Benutzername)

• Password (Kennwort)

• And the Domain (Domäne)

• Start Exceed /Cygwin

• Start a Putty session

– For setting up this session, see the paper sheet on your desk

• Log in to blizzard.dkrz.de

Page 21: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 21

The IBM (DKRZ)

• Available Directories (this course)

- /pf/k/username: for programs

- /work/bb0721: for data, long-term

- /scratch/k/username: for data, short-term

- /hpss/bb0721:tape archive (via pftp)

• Batch commands:

- llsubmit job_name : submit a job

- llq –u username : check the queue

- llcancel job_id : cancel the job

Page 22: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 22

Necessary data

Files and Data for these exercises can be accessed via

/hpss/arch/bb0721/training2015/cclm-sp_1.5.tgz

Copy this file to your work directory and unpack it

blizzard% pftp

ftp> cd /hpss/arch/bb0721/training2015

ftp> get cclm-sp_1.5.tgz

ftp> quit

blizzard% cd $WORK

blizzard% tar -xzvf cclm-sp_1.5.tgz

Page 23: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 23

cclm-sp

Main Directories

cclm-sp

├── src

│ ├── cclm

│ ├── cfu

│ └── int2lm

├── data

│ ├── ext

│ └── gcm

└── other_systems

└──

cclm-sp

├── step_by_step

│ ├── cclm_to_cclm

│ └── gcm_to_cclm

└── chain

├── arch

├── extensions

├── cclm_to_cclm

├── gcm_to_clm

├── scratch

└── work

Page 24: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 24

Initialize cclm-sp

Initialize the starter package by

blizzard% init.sh

It initializes several scripts with the basic directory.

(Here: /work/bb0721/your user name)

Page 25: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 25

Compilations

Do the necessary adaptations (see chapter 1.5 in the tutorial) and

type make in the following directories:

cfu Program in cclm-sp/src/cfu

INT2LM in cclm-sp/src/int2lm

CCLM in cclm-sp/src/cclm

GRIB1 and GRIB-API libraries are not included

Page 26: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 26

Compilations done:

when successful, you should have:

cfu Program: cclm-sp/src/cfu/bin/cfu

INT2LM: cclm-sp/src/int2lm/bin/int2lm.exe

CCLM: cclm-sp/src/cclm/bin/cclm.exe

Please copy /work/bb0721/bin/cclm.exe

as compilation is time-consuming!

Page 27: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015

Preparing External, Initial and

Boundary Data

Page 28: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 28

For cclm-sp

For the test cases the external, initial and boundary data are

already in the cclm-sp directory:

external data: cclm-sp/data/ext

initial & boundary data: cclm-sp/data/gcm/ncep

Page 29: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 29

In General

Initial and boundary data from GCM: Each GCM needs its own conversion program. For a few GCMs you

can find programs on the CLM home page: Home > Model > Preprocessing > Initial & Boundary Data

For ERA40, ERAInterim and NCEP1 reanalyses already

converted data exist at DKRZ, for details visit: Home > Model > Support > CCLM@DKRZ

External data sets: These can be created with the WebPEP tool on the CLM home page Home > Model > Preprocessing > External Data (WebPEP)

Page 30: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 30

External Parameters

preparing and using external parameters:

• use the domain which is given in the namelist LMGRID of the int2lm-Script, but:

• 2 more grid points are needed at each lateral boundary

• The file containing the external parameters has to be specified in the int2lm run script by its name ylmext_lfn and its path ylmext_cat

• The names of the parameters needed for INT2LM input can be found in the

program src_ext.f90. The parameters needed depend on the INT2LM namelist

settings.

Page 31: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

31

Essential

External Parameters

! Set list of external parameters that should be read

ylistextpar( 1) = 'HSURF '

ylistextpar( 2) = 'FIS '

ylistextpar( 3) = 'FR_LAND '

ylistextpar( 4) = 'SOILTYP '

ylistextpar( 5) = 'ROOTDP '

numlistextpar = 5

IF (linitial) THEN

IF (itype_ndvi /= 2) THEN

ylistextpar( 6) = 'Z0 '

ylistextpar( 7) = 'PLCOV_MX '

ylistextpar( 8) = 'PLCOV_MN '

ylistextpar( 9) = 'LAI_MX '

ylistextpar(10) = 'LAI_MN '

numlistextpar = 10

IF (itype_ndvi == 1 .AND. linitial) THEN

numlistextpar = numlistextpar + 1

ylistextpar(numlistextpar) = 'NDVI_MRAT '

ENDIF

ELSEIF (itype_ndvi == 2) THEN

ylistextpar( 6) = 'Z012 '

ylistextpar( 7) = 'PLCOV12 '

ylistextpar( 8) = 'LAI12 '

numlistextpar = 8

ENDIF

Page 32: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 32

General form of input file to the Regional

Climate Model:

yheader // ydate // yextension // ´.nc´

Example: laf1992072100.nc

g: GME

l: COSMO-Model

e: ECMWF

c: General

climate model

a: analysis

i: analysis

(initialized)

b: boundary

f: forecast

r: restart

f: full domain

s: subdomain

For a or i in header:

yyyy: year

mm: month

day: dd

hh: hour

For b,f or r in header:

Ytunit // `string`

t: time step mode

f: forecast mode

ddhhmmss

c: climate mode

yyydddhh

d: day mode

yyyymmddhh

yextension

1 character, optional

ydate

yheader

Now, let‘s have a look in your input files

(e.g. caf…nc, etc.)!

Conventions for File Names

Page 33: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015

Running the COSMO-CLM in a

step-by-step mode

Page 34: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 34

Scripts for step-by-step simulations are under

cclm-sp/step_by_step/gcm_to_cclm for driving CCLM with global model data (NCEP Reanalysis in our test case)

cclm-sp/step_by_step/cclm_to_cclm for driving CCLM with data from a coarse resolution CCLM

INT2LM run script: run_int2lm

CCLM run script: run_cclm

Page 35: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 35

Script structure

The general structure of the scripts is

1. batch settings

2. Namelist settings (cat INPUT*-Files)

3. Call of the binary

# @ node = 1

# @ tasks_per_node = 64

# @ output = sp_int2lm.o$(jobid)

# @ error = sp_int2lm.o$(jobid)

&LMGRID

ielm_tot=101, jelm_tot=111, kelm_tot=32,

pollat = 39.25, pollon = -162.0,

dlon=0.44, dlat=0.44,

startlat_tot = -24.09, startlon_tot = -25.13,

..

/END

poe ${SPDIR}/src/int2lm/int2lm.exe -procs 64

Page 36: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 36

INT2LM namelist

settings

• main switch to choose climate instead of NWP mode: lbdclim=.TRUE.

• some settings are only interesting for climate mode:

– itype_w_so_rel: type of relative soil moisture input

– itype_t_cl: source for climatological temperature

– itype_rootdp: treatment of root depth

– itype_ndvi: treatment of plant cover and leaf area index

– itype_calendar: type of calendar (360 or 365/6 days)

– luse_t_skin: use skin temperature

– l_cressmann: use Cressman scheme for interpolation

Page 37: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 37

For a description of the different namelist parameters, see

chapter 2 and 3 in the Tutorial.

Exercises:

• INT2LM: section 2.8.2

• CCLM: section 3.2.2 (Part I)

Page 38: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015

Postprocessing and Visualizing

NetCDF Files

Page 39: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 39

From the model output and/or observation data you may want to

• check the content of your output

• cut out/interpolate to a region of interest

• produce averages over a certain region or time frame

• calculate statistics.

you need special tools designed for netCDF data and offering

these commands.

Post-processing

Page 40: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 40

In this course:

→ Tutorial chapter 5

Basic tool for inquiring netcdf files: ncdump command

(comes with netCDF package)

Simple viewer for netCDF files: ncview

Collection of operators for postprocessing of climate data:

CDO

Collection of operators for manipulation of netCDF files:

NCO

Special tool for postprocessing of COSMO-CLM model

output: ETOOL

Page 41: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 41

Login to wizard from blizzard for post-processing:

ssh –Y k2060..@wizard

Use evince as pdf, ps or eps viewer

Load modules for post-processing:

module avail

module load cdo/1.6.3 nco/4.4.2-gccsys ncview/2.1.2

module list

Output can be found at:

/work/bb0721/k2060../cclm-sp/chain/work/sp001/post/

Post-processing

preparation

Page 42: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015

ncdump

Show information about netCDF files

ncdump -h file.nc

→ only header information (variables,

dimensions...)

ncdump -v var1 file.nc

→ prints output of variable 'var1'

Page 43: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 43

Go to the directory with the model output (e.g. 2000_01)

cd <path_to_model_output>

Choose one file to display (e.g. T_2M_ts.nc)

ncview <file.nc>

In the dialog window

- choose the variable to display (Var:)

- change the colour palette (default is 3gauss)

- change the range of values to display (Range)

- change the type of data interpolating (Bi-lin|Repl)

- make a snap shot of the image using Print.

Quick look using ncview

Page 44: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 44

Choose multiple files to display

ncview <file*.nc>

In the dialog window

- choose the variable to display (Var:)

- switch between data files using

- click with the left mouse button on any location of the image

(a time-series plot should appear)

- change X Range and Y Range

- make a snap shot of the image using Print.

Quick look using ncview

Page 45: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015

NCO: netCDF Operators

Collection of command-line programs to manipulate and analyze netCDF files

Free tool (open source), homepage: http://nco.sourceforge.net/

Operators for e.g. arithmetics, manipulation of meta data, attribute editor, simple statistics, interpolation, …

Syntax: <command> <options> <ifiles> <ofile>

Some commonly used commands: ncatted attribute editor ncks kitchen sink ncrcat record concatenator ncrename renamer

Page 46: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015

NCO exercises

• Create a common time series file out of your monthly CCLM

output (e.g. 2000_01 and 2000_02):

ncrcat –h */T_2M_ts.nc T_2M_ts_all.nc

(Compare using ncview to cdo mergetime 2000_0?/T_2M_ts.nc

T_2M_ts_all_cdo.nc)

• Cut out a domain:

e.g. ncks –O –h –d rlon,0.39,10.95 –d rlat,0.11,17.27

T_2M_ts_all.nc T_2M_ts_all_cut.nc

• Calculate average of the CCLM output:

ncra */T_2M_ts.nc T_2M_ts_all_ave.nc

Page 47: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015

CDO: Climate Data

Operators

Collection of many command-line operators for standard processing of climate and NWP model output

Free tool from Max Planck Institute Hamburg (Germany); homepage: https://code.zmaw.de/projects/cdo

Different file formats (GRIB, netCDF, …) and grid types

Operators for e.g. file information, file operations, selection, comparison, arithmetics, statistics, interpolation, ...

Syntax: cdo <command>[,val1,val2] <options>

<ifile> <ofile>

Get information for operator: cdo -h <operator>

Page 48: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015

CDO: some commonly used

commands

selvar,<name> Select variable

monmean / monsum Monthly mean/sum

mergetime Combine files with different times

fldmean Area mean of fields

output Show information on output

sellonlatbox,<lon1>,<lon2>,<lat1>,<lat2> Cut out subregion

add / sub Add/substract data

Page 49: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015

CDO exercises: remapping

• Show data of T_2M_ts1.nc:

cdo info T_2M_ts_all.nc |more

• Display the grid information of the temperature observation:

cdo griddes EOBS_T_2M_AV_2000-2000_K_ymonmean.nc

• Put the grid information of the file into a text file:

cdo griddes EOBS_T_2M_AV_2000-2000_K_ymonmean.nc > grid_OBS.txt

• Put the variable FR_LAND from the constant file of the CCLM

output into a new land sea mask file:

cdo selvar, FR_LAND lffd2000010100c.nc clmlsm.nc

• Remap the land sea mask file onto the observational grid:

cdo remapbil,grid_OBS.txt clmlsm.nc clmlsm1.nc

Page 50: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015

CDO exercises: remapping

• Set the sea points to missing values and land points to 0:

cdo ltc,0.5 -setrtomiss,0,.5 clmlsm1.nc clmlsm2.nc

• Remap the CCLM T_2M time series file onto the observational

grid:

cdo remapbil,grid_OBS.txt T_2M_ts_all.nc T_2M_ts_all_obs.nc

• Extract the land points out of the remapped CCLM T_2M time

series file only:

cdo add T_2M_ts_all_obs.nc clmlsm2.nc T_2M_ts_all_obs1.nc

• Compare your results with the temperature observations using

ncview! (Don‘t forget cdo monmean …)

• You can do a similar exercise with precipitation time series and

compare your results to GPCC!

Page 51: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015

CDO exercises: statistics

• Create averaged time series (monthly, yearly):

cdo monmean T_2M_ts_all.nc T_2M_mm.nc

cdo yearmean T_2M_ts_all.nc T_2M_ym.nc

• Create time- and fieldmean:

cdo timmean –fldmean T_2M_ts_all.nc T_2M_tm_fm.nc

• Show output:

cdo outputts T_2M_tm_fm.nc

Page 52: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015

CDO exercises: statistics

• IMPORTANT:

cdo throughs attributes like lat and lon away, to avoid that type:

export IGNORE_ATT_COORDINATES=1

cdo should ignore the coordinates and leave it as it is

To make coordinates correct again do for example:

ncatted –h -a coordinates,T_2M,c,c,"lon lat" T_2M_mm.nc (the

coordinates attribute is created)

ncks -A -v lat,lon T_2M_ts.nc T_2M_mm.nc (the correct lat, lon

values are appended from a file that includes these variables)

• Next:

NOW automate everything and use ETOOL with more scripting!

Page 53: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015

SAMOA

SAnity check for MOdels of the Atmosphere

Developed by A. Ferrone at KIT, available by request from I. Kraut

([email protected]; GNU General Public License)

Bourne-shell script based on CDO commands

Quick check of large output datasets for non-physical results

The script checks for each variable in the GRIB/netCDF files if the min and

max values are within a range specified in a list

Fields containing NANs are also listed

Constant fields (i.e. min=max) are listed (turn off with --equl_val_test_of )

Fields including missing values can be listed (turn on with --miss_val_test_on)

Page 54: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015

SAMOA

Calling example:

samo.sh [Arguments] ${input_path}/files*

Extract of list

# Varname GRIBLev GRIBno Scale fac. Min. Max.

T_2M 2 11.2 1.0 50 500

T_2M_AV 3 11.2 1.0 50 500

T 4 11.2 1.0 50 500

TMAX_2M 1 15.2 1.0 50 500

TMIN_2M 1 16.2 1.0 50 500

TD_2M 1 17.2 1.0 50 500

TD_2M_AV 2 17.2 1.0 50 500

U_10M 1 33.2 1.0 -100 100

U_10M_AV 2 33.2 1.0 -100 100

U 3 33.2 1.0 -100 100

SAMO does NOT perform a quality check of the output!

Page 55: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015

Postprocessing tool for COSMO-CLM model output from the CLM-

Community (Author: Peter Berg, KIT + extensions by others; available

from community homepage)

Shell script based on CDO commands

T_2M, TOT_PREC, TMIN_2M,

TMAX_2M, PMSL, CLCT

Producing monthly statistics

Comparison to E-OBS dataset

(gridded dataset for Europe with 0.25° resolution from ENSEMBLES

project, see: http://www.ecad.eu/download/ensembles/ensembles.php)

and CRU dataset (for CLCT)

Analysis for 'PRUDENCE' regions in Europe

Postprocessing using

ETOOL

Page 56: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015

Postprocessing using

ETOOL Visualization of differences to OBS:

ETOOL-VIS: plotting with NCL (NCAR Command Language, https://www.ncl.ucar.edu/)

(Author: Andreas Walter, DWD +

extensions by others)

Seasonal difference maps

Monthly bias plots (regional means)

Comparison of different simulations:

Bias plots

Taylor diagrams (spatial and temporal

variability)

Page 57: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 57

ETOOL Exercises

See tutorial chapter 5

Remember: login to wizard.dkrz.de and load the cdo and ncview

modules

Get package /work/bb0721/postproc/2015/ETOOL_ex_2015.tar

copy it to your work directory and unpack Observation data: E-OBS v.10.0 dataset ./obs_data/ (precipitation,

mean/min/max temp., msl pressure, orography) ETOOL script from CLM community web page ./ETOOL/

documentation for CDO in./docs/

Use the output of your 2-month chain simulation (gcm_to_cclm experiment sp001).

Page 58: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 58

ETOOL Exercises

58

Tasks:

1. Look at the header of the ETOOL script to see which information you need to

adapt to your specific simulation settings (e.g. run ID, path names, …)

2. Run the ETOOL script using your setting

3. Look at the output files with ncdump and ncview

4. Look at the performance of COSMO-CLM in the different regions

5. *[if you like:] Try to modify the ETOOL script

(e.g.: define additional regions, produce area means, …)

Some important variables:

Variable Meaning

VarName1 Variable name of model output (e.g. T_2M)

RUNID Simulation ID (e.g. sp001)

CLMPath Path of model output

workspace Path for storing temporary files

savespace Path for final results

Page 59: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015

Running the COSMO-CLM in a

chain mode

Page 60: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 60

The subchain scripts

prep

int2lm

cclm

month

ly lo

op

Simplified chain subchain

control script

arch

post

prep

prepare driving data

int2lm

interpolating data to CCLM grid

cclm

CCLM simulation

arch

archiving

post

post processing (time series)

Page 61: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 61

The subchain Directory

structure

Experiment_name

├── jobs

├── subchain

└── templates

├── cclm.job.tmpl

├── int2lm.job.tmpl

├── post.job.tmpl

└── prep.job.tmpl

Experiment_name is a

unique experiment name

e.g. sp001 and sp002 in

the starter package

Page 62: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 62

The subchain Directory

structure

before start of chain

sp001

├──

├──

├──

├──

├── subchain

├── jobs

├──

├──

├──

├──

├──

├──

└── templates

├── arch.job.tmpl

├── cclm.job.tmpl

├── int2lm.job.tmpl

├── post.job.tmpl

└── prep.job.tmpl

Page 63: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 63

The subchain Directory

structure

after start of chain

sp001

├── chain_status

├── check_files.log

├── check_files1.log

├── date.log

├── error_message

├── subchain

├── jobs

├── archsp001.job

├── cclmsp001.job

├── int2lmsp001.job

├── postsp001200001.job

├── prepsp001.job

└── templates

├── arch.job.tmpl

├── cclm.job.tmpl

├── int2lm.job.tmpl

├── post.job.tmpl

└── prep.job.tmpl

Page 64: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 64

Scripts for subchain simulations are under

cclm-sp/chain/gcm_to_cclm/sp001

for driving CCLM with global model data (NCEP Reanalysis in

our test case)

cclm-sp/chain/cclm_to_cclm/sp002

for driving CCLM with data from a coarse resolution CCLM

more info: Tutorial App. B

Page 65: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 65

subchain

Major General Settings

#################################################

# START global settings

#################################################

EXPID=sp001 # alphanummeric characters for job identification

PFDIR=/yourpath/cclm-sp/chain/gcm_to_cclm

WORKDIR=/yourpath/cclm-sp/chain/work

SCRATCHDIR=/yourpath/cclm-sp/chain/scratch

ARCHIVE_INPDIR=/yourpath/cclm-sp/data/gcm/ncep

ARCHIVE_OUTDIR=/yourpath/cclm-sp/chain/arch

RESDIR=${WORKDIR}/${EXPID}/restarts

BATCH_CMD=llsubmit

YDATE_START=2000010100 # start date of simulation YYYYMMDDHH

YDATE_STOP=2000030100 # end date of simulation YYYYMMDDHH

[email protected] # your email address

PROJECT_ACCOUNT=$(cat $HOME/.acct) # this is your default one at DKRZ

INC_DATE=01:00:00 # MM:DD:HH time increment for the CCLM job

# (the other parts of the chain are always monthly)

# valid values are 01:00:00, 00:01:00, 00:02:00, ... , 00:27:00

UTILS_BINDIR=/yourpath/cclm-sp/src/cfu # directory of utility binaries

etc.

chain scripts in dir. $PFDIR/$EXPID!

Page 66: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 66

subchain

Major Model Settings

STARTLAT_TOT=-24.09

STARTLON_TOT=-25.13

POLLAT=39.25

POLLON=-162.0

DLAT=0.44

DLON=0.44

IE_TOT=101

JE_TOT=111

KE_TOT=40

KE_SOIL=9

CZML_SOIL="0.005,0.025,0.07,0.16,0.34,0.7,1.42,2.86,5.74,11.5" # do not use blanks

HINCBOUND=6 # time increment of boundary data

ITYPE_CALENDAR=0 # calendar, 0=standard, 1=climatological(360 d/y)

LSSO=.TRUE. # sub-scale orography

LFOREST=.TRUE. # account for forest

LLAKE=.FALSE. # account for lakes

ITYPE_ALBEDO=2 # albedo type

ITYPE_AEROSOL=2 # erosol type

set -A HOUT_INC 7 03 24 01 03 06 06 24 # time increment for each GRIBOUT

# first numeric is number of GRIBOUT namelists

Page 67: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 67

Exercise

same simulations as before (step-by-step exercise),

but now in chain mode:

1) NCEP CCLM

gcm_to_cclm/sp001

2) nesting CCLM CCLM_finegrid

cclm_to_cclm/sp002

see Tutorial section 3.2.2 Part II of the exercises.

Page 68: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015

Trouble shooting

Page 69: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 69

- The model does not run, when there are YU* files in the current

directory → Delete the YU* files

- Flags for cloud-ice from GCM data are set to TRUE but no data is

available → Set lprog_qi in INT2LM and lana_qi & lbb_qi in

CCLM to FALSE

- 12 monthly vegetation from the external parameter file is not taken

into account

→ set itype_ndvi = 2 in INT2LM

Well known problems (and their probable solutions )

Page 70: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 70

- Model crashes/reports problem with Runge-Kutta and

nboundlines=2→ You need to set nboundlines=3 when using the

Runge-Kutta scheme.

- INT2LM does not run with a too small external parameter file →

The external parameter file must be at least 2 grid points larger than

the target region (at each side)

Well known problems (and their probable solutions )

Page 71: WELCOME to the PRACTICAL EXERCISES · WELCOME to the PRACTICAL EXERCISES . 23.-27.03.2015 COSMO/CLM Training Course 2015 2 For the practical exercises you have got a TUTORIAL, with

23.-27.03.2015 COSMO/CLM Training Course 2015 71

THE END

Thank you for your Attention