welcome to the practical exercises

84
Welcome to the Practical Exercises 26.04.2017

Upload: khangminh22

Post on 19-Mar-2023

1 views

Category:

Documents


0 download

TRANSCRIPT

Welcome to thePractical Exercises

26.04.2017

Overview

COSMO/CLM Training Course 2017 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 COSMO-ART next week

The CLM-Community

CLM-Community Structure

COSMO/CLM Training Course 2017 4

Finished

CLM-Community annual events

COSMO/CLM Training Course 2017 5

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

� now!

• COSMO and CLM-Community User Seminar (ICCARUS): presentation of achievements, working and project group meetings

� Next years meeting will be on 26 February – 2 March 2018 in Offenbach.

• 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 19-22 September 2018 in Graz, Austria.

CLM-Community and Support

COSMO/CLM Training Course 2017 6

• 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

Structure of the COSMO-CLM System

CCLM System

COSMO/CLM Training Course 2017 8

GCMcaf… .nc

DKRZ / GCM converter

INT2LMrun_int2lm

CCLMrun_cclm

lffd… .nclffd…c.nc

laf… .nc, lbfd… .nc

ExtEuro044.nc

WebPEPlogfilesOUTPUT

logfilesYUSPECIF

FR_LAND(4 grid points more)

FR_LAND(4 grid points less)

FR_LAND

File Name Conventions

COSMO/CLM Training Course 2017 9

General form of input file to theRegional Climate Model:

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

Example: laf1992072100.nc

g: GMEl: COSMO-Modele: ECMWFc: General

climate model

a: analysisi: analysis

(initialized)b: boundaryf: forecastr: restart

f: full domains: subdomain

For a or i in header:yyyy: yearmm: monthday: ddhh: hour

For b,f or r in header:Ytunit // `string`t: time step modef: forecast mode

ddhhmmssc: climate mode

yyydddhhd: day mode

yyyymmddhh

yextension1 character, optional

ydate

yheader

Now, let‘s have a look at your inputfiles (e.g. caf…nc, etc.)!

Website Tools and Infos

Namelist Tool (Infos on namelist parameter settings)

RedC (Code distribution, forum)

WebPEP (External data preparation)

Namelist - Input

COSMO/CLM Training Course 2017 11

• 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.

Namelist - Groups

COSMO/CLM Training Course 2017 12

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

Namelist - Example

COSMO/CLM Training Course 2017 13

&LMGRIDstartlat_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&RUNCTLdt=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

Namelist - Tool

COSMO/CLM Training Course 2017 14

• 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

RedC – Technical pages

COSMO/CLM Training Course 2017 15

• 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

WebPEP

COSMO/CLM Training Course 2017 16

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

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

Installation of the COSMO-CLM model package

The Starter Package

COSMO/CLM Training Course 2017 18

• is the basis of the exercises in this training 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 in the sub-directory “docs“ and

http://redc.clm-community.eu/projects/cclm-sp/wiki/Documentation

Installation

COSMO/CLM Training Course 2017 19

• In this lesson you will learn

– how to login to and use DKRZ‘s supercomputer, the HLRE-3 “Mistral”

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

– how these components can be installed on a computer

Logging in to mistral

COSMO/CLM Training Course 2017 20

• 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 mistral.dkrz.de

Mistral - DKRZ

COSMO/CLM Training Course 2017 21

• 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)

• Slurm commands:

- sbatch job_name submit a job

- squeue –u username check the queue

- scancel job_id cancel the job

Necessary data

COSMO/CLM Training Course 2017 22

Files and data for these exercises can be accessed via

/hpss/arch/bb0721/training2017/cclm-sp_2.4.1.tgz

Copy this file to your work directory and unpack it

mistral% cd $WORK

mistral% pftp

ftp> cd /hpss/arch/bb0721/training2017

ftp> get cclm-sp_2.4.1.tgz

ftp> quit

mistral% tar -xzvf cclm-sp_2.4.1.tgz

cclm-sp – Main directories

COSMO/CLM Training Course 2017 23

cclm-sp

├EE src

F ├EE cclm

F ├EE cfu

F GEE int2lm

├EE data

F ├EE ext

F GEE gcm

GEE other_systems

GEE SX8-DWD

cclm-sp

├EE step_by_step

F ├EE cclm_to_cclm

F GEE gcm_to_cclm

GEE chain

├EE arch

├EE extensions

├EE cclm_to_cclm

├EE gcm_to_clm

├EE scratch

GEE work

Initialize cclm-sp

COSMO/CLM Training Course 2017 24

Initialize the starter package by

mistral% init.sh

It initializes several scripts with the basic directory.

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

Compilations

COSMO/CLM Training Course 2017 25

Do the necessary adaptations (see chapter 1.5 in the tutorial) and type makein 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

Compilations succeeded

COSMO/CLM Training Course 2017 26

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

Preparing External, Initial and Boundary Data

For cclm-sp

COSMO/CLM Training Course 2017 28

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

Input Data Structure

COSMO/CLM Training Course 2017 29

GCMcaf… .nc

DKRZ / GCM converter

INT2LMrun_int2lm

CCLMrun_cclm

lffd… .nclffd…c.nc

laf… .nc, lbfd… .nc

ExtEuro044.nc

WebPEPlogfilesOUTPUT

logfilesYUSPECIF

FR_LAND(4 grid points more)

FR_LAND(4 grid points less)

FR_LAND

General Remarks

COSMO/CLM Training Course 2017 30

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, ERA20C, JRA55 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)

External Parameters

COSMO/CLM Training Course 2017 31

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.

Essential External Parameters

COSMO/CLM Training Course 2017 32

! Set list of external parameters that should be readylistextpar( 1) = 'HSURF 'ylistextpar( 2) = 'FIS 'ylistextpar( 3) = 'FR_LAND 'ylistextpar( 4) = 'SOILTYP 'ylistextpar( 5) = 'ROOTDP 'numlistextpar = 5

IF (itype_ndvi /= 2) THENylistextpar( 6) = 'Z0 'ylistextpar( 7) = 'PLCOV_MX 'ylistextpar( 8) = 'PLCOV_MN 'ylistextpar( 9) = 'LAI_MX 'ylistextpar(10) = 'LAI_MN 'numlistextpar = 10IF (itype_ndvi == 1 .AND. linitial) THENnumlistextpar = numlistextpar + 1ylistextpar(numlistextpar) = 'NDVI_MRAT '

ENDIFELSEIF (itype_ndvi == 2) THENylistextpar( 6) = 'Z012 'ylistextpar( 7) = 'PLCOV12 'ylistextpar( 8) = 'LAI12 'numlistextpar = 8

ENDIF

Running COSMO-CLM in a step-by-step mode

Scripts - Location

COSMO/CLM Training Course 2017 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_int2lmCCLM run script: run_cclm

Scripts - Structure

COSMO/CLM Training Course 2017 35

The general structure of the scripts is

1. Batch settings

2. Namelist settings (cat INPUT*-Files)

3. Call of the binary

#SBATCH --nodes = 1 #SBATCH –-ntasks = 24#SBATCH --output = sp_int2lm.o$j #SBATCH --error = sp_int2lm.o$j

&LMGRIDielm_tot=101, jelm_tot=111, kelm_tot=40,pollat = 39.25, pollon = -162.0, dlon=0.44, dlat=0.44, startlat_tot = -24.09, startlon_tot = -25.13,..

/END

srun -l … ${SPDIR}/src/int2lm/bin/int2lm.exe

INT2LM namelist settings

COSMO/CLM Training Course 2017 36

• 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_cressman use cressman scheme for interpolation

COSMO/CLM Training Course 2017 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)

Post-processing andVisualizing netCDF files

Post-Processing

COSMO/CLM Training Course 2017 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

COSMO/CLM Training Course 2017 40

→ Tutorial chapter 5

� Basic tool for inquiring netcdf files: ncdump command (comes withnetCDF 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

COSMO/CLM Training Course 2017 41

Use evince as pdf, ps or eps viewer

Load modules for post-processing:

module avail

module load cdo/1.8.0-magicsxx-gcc48 nco/4.5.0-gcc48

module load ncview/2.1.4-gcc48

module list

Output can be found in:

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

ncdump

COSMO/CLM Training Course 2017 42

Show information about netCDF files

ncdump -h file.nc

→ only header information (variables, dimensions...)

ncdump -v 'var1' file.nc

→ prints output of variable 'var1'

Quicklook using ncview (1)

COSMO/CLM Training Course 2017 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.

Quicklook using ncview (2)

COSMO/CLM Training Course 2017 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.

NCO – netCDF Operators

COSMO/CLM Training Course 2017 45

� 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

NCO exercises

COSMO/CLM Training Course 2017 46

• 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 tocdo mergetime 2000_0?/T_2M_ts.nc T_2M_ts_all_cdo.nc)

• Cut out a domain:

e.g. ncks –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

To check if it is a netCDF4-File with internal compression, type “ncks –m”

ncks -m europe_0440.nc

CDO – Climate Data Operators

COSMO/CLM Training Course 2017 47

� 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>

CDO – some commonly used commands

COSMO/CLM Training Course 2017 48

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

CDO exercises – statistics (1)

COSMO/CLM Training Course 2017 49

• 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_fm_tm.nc

• Show output:

cdo outputts T_2M_fm_tm.nc

CDO exercises – statistics (2)

COSMO/CLM Training Course 2017 50

• IMPORTANT:

cdo throws 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. However, it deletesthe „coordinates“ attribute and the variables „lon“ and „lat“.

You can correct this as in the following 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 thesevariables)

There are sometimes problems with internal compressed netCDF fileswhen using CDO! You can overcome this problem by uncompressingthese files with

nccopy –k 2 infile outfile

CDO exercises – remapping (1)

COSMO/CLM Training Course 2017 51

• Show data of T_2M_ts_all.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 sp001_c.nc clmlsm.nc

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

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

CDO exercises – remapping (2)

COSMO/CLM Training Course 2017 52

• 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_obs.nc

• Extract only the land points out of the remapped CCLM T_2M time seriesfile:

cdo add T_2M_obs.nc clmlsm2.nc T_2M_obs1.nc

CDO exercises – remapping (3)

COSMO/CLM Training Course 2017 53

• Extract the simulation domain out of the observational data:

cdo ifthen T_2M_obs1_ym.nc EOBS_T_2M_AV_2000-2000_K_ymonmean.nc EOBS_T_2M_AV_2000-2000_K_ymonmean_sim.nc

(Note: T_2M_obs1_ym.nc has only one timestep! It is the year mean.)

And similar:

cdo ifthen EOBS_T_2M_AV_2000-2000_K_ymonmean_sim_ym.nc T_2M_obs1_mm.nc T_2M_obs1_mm_obs.nc

• Add unit “Kelvin“ to temperature:

ncatted –O –h –a units,tg,m,c,K EOBS_T_2M_AV_2000-2000_K_ymonmean_sim.nc

• Compare your results with the temperature observations using ncview! (Hint: cdo monmean …)

• You can do a similar exercise with the precipitation time series andcompare your results to GPCC!

CDO exercises – remapping (4)

COSMO/CLM Training Course 2017 54

SAMOA (1)

COSMO/CLM Training Course 2017 55

� SAnity check for MOdels of the Atmosphere

� Developed by A. Ferrone at KIT, latest version available by request from KIT (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)

SAMOA (2)

COSMO/CLM Training Course 2017 56

� Calling example:samo.sh [Arguments] ${input_path}/files*

� Extract of samoa.list

# Varname GRIBLev GRIBno Scale fac. Min. Max.T_2M 2 11.2 1.0 50 500T_2M_AV 3 11.2 1.0 50 500T 4 11.2 1.0 50 500TMAX_2M 1 15.2 1.0 50 500TMIN_2M 1 16.2 1.0 50 500TD_2M 1 17.2 1.0 50 500TD_2M_AV 2 17.2 1.0 50 500U_10M 1 33.2 1.0 -100 100U_10M_AV 2 33.2 1.0 -100 100U 3 33.2 1.0 -100 100

� SAMOA does NOT perform a quality check of the output!

ETOOL – post processing tool (1)

COSMO/CLM Training Course 2017 57

� Postprocessing tool for COSMO-CLM model output from the CLM-Community (Author: Peter Berg, KIT + extensions by others; availablefrom 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

ETOOL – post processing tool (2)

COSMO/CLM Training Course 2017 58

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)

ETOOL – exercises (1)

COSMO/CLM Training Course 2017 59

� See tutorial chapter 5

� Remember: load the cdo and ncview modules

� Get package/work/bb0721/postproc/2017/ETOOL_ex_2017.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_cclmexperiment sp001).

ETOOL – exercises (2)

COSMO/CLM Training Course 2017 60

Tasks:

1. Look at the header of the ETOOL script to see which information youneed to adapt to your specific simulation settings (e.g. run ID, pathnames, …)

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

Running COSMO-CLMin a chain mode

The subchain scripts

COSMO/CLM Training Course 2017 62

subchaincontrol script

prepprepare driving data

int2lminterpolating data to CCLM grid

cclmCCLM simulation

archarchiving postpost processing (time series)

prep

int2lm

cclm

mo

nth

ly lo

op

arch

post

Simplified chain

subchain – directory structure (1)

COSMO/CLM Training Course 2017 63

Experiment_name

├EE jobs

├EE job_settings

├EE subchain

GEE templates

├EE cclm.job.tmpl

├EE int2lm.job.tmpl

├EE post.job.tmpl

GEE prep.job.tmpl

Experiment_name is a unique experimentname

e.g. sp001 and sp002 in the starter package

Subchain – directory structure (2)

COSMO/CLM Training Course 2017 64

sp001

├EE

├EE

├EE

├EE

├EE subchain

├EE job_settings

├EE jobs

├EE

├EE

├EE

├EE

├EE

├EE

GEE templates

├EE arch.job.tmpl

├EE cclm.job.tmpl

├EE int2lm.job.tmpl

├EE post.job.tmpl

GEE prep.job.tmpl

Before the chain starts

subchain – directory structure (3)

COSMO/CLM Training Course 2017 65

sp001

├EE chain_status

├EE check_files.log

├EE check_files1.log

├EE date.log

├EE error_message

├EE subchain

├EE job_settings

├EE jobs

├EE archsp001.job

├EE cclmsp001.job

├EE int2lmsp001.job

├EE postsp001200001.job

├EE prepsp001.job

GEE templates

├EE arch.job.tmpl

├EE cclm.job.tmpl

├EE int2lm.job.tmpl

├EE post.job.tmpl

GEE prep.job.tmpl

After the chain start

subchain – scripts directories

COSMO/CLM Training Course 2017 66

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

job_settings – major general settings

COSMO/CLM Training Course 2017 67

################################################## START global settings#################################################EXPID=sp001 # alphanummeric characters for job identificationPFDIR=/yourpath/cclm-sp/chain/gcm_to_cclmWORKDIR=/yourpath/cclm-sp/chain/workSCRATCHDIR=/yourpath/cclm-sp/chain/scratchARCHIVE_INPDIR=/yourpath/cclm-sp/data/gcm/ncepARCHIVE_OUTDIR=/yourpath/cclm-sp/chain/archRESDIR=${WORKDIR}/${EXPID}/restartsBATCH_CMD=sbatchYDATE_START=2000010100 # start date of simulation YYYYMMDDHHYDATE_STOP=2000030100 # end date of simulation [email protected] # your email addressPROJECT_ACCOUNT=$(cat $HOME/.acct) # this is your default one at DKRZINC_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:00UTILS_BINDIR=/yourpath/cclm-sp/src/cfu # directory of utility binariesetc. chain scripts in directory $PFDIR/$EXPID!

job_settings – major model settings

COSMO/CLM Training Course 2017 68

STARTLAT_TOT=-24.09STARTLON_TOT=-25.13POLLAT=39.25POLLON=-162.0DLAT=0.44DLON=0.44IE_TOT=101JE_TOT=111KE_TOT=40KE_SOIL=9CZML_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 dataITYPE_CALENDAR=0 # calendar, 0=standard, 1=climatological(360 d/y)LSSO=.TRUE. # sub-scale orographyLFOREST=.TRUE. # account for forestLLAKE=.FALSE. # account for lakesITYPE_ALBEDO=2 # albedo typeITYPE_AEROSOL=2 # erosol typeset -A HOUT_INC 7 03:00:00 24:00:00 01:00:00 03:00:00 06:00:00 06:00:00 24:00:00 # time increment for each GRIBOUT

# first numeric is number of GRIBOUT namelists

Exercise

COSMO/CLM Training Course 2017 69

same simulations as before (step-by-step exercise), but now in chain mode:

1)NCEP � CCLMgcm_to_cclm/sp001

2)nesting CCLM � CCLM_finegridcclm_to_cclm/sp002

� see Tutorial section 3.2.2 Part II of the exercises.

Trouble Shooting

Well known problems (and their probanle solution)

COSMO/CLM Training Course 2017 71

• 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

CCLM Test Suite

Overview

COSMO/CLM Training Course 2017 73

COSMO Standards for Source Code DevelopmentAppendix D: Steps of Code Development for CLM-Community Model Versions

The CCLM test suite consists of two parts:

The technical test suiteis based on the COSMO technical test suite by Meteo Suisse

The climatological test suiteis based on the starter package chain scripts

The test suite can be downloaded fromhttp://redc.clm-community.eu/projects/cclm-test-suite/wiki/DownloadsDocumentation is in the sub-directory „docs“ and athttp://redc.clm-community.eu/projects/cclm-test-suite/wiki/Documentation

The Technical Test Suite

COSMO/CLM Training Course 2017 74

name test_1

checkers Run success

Tolerance

Identity

netCDF output

SAMOA

name test_1r1, test1r2

checkers Run success

Restart Identity

name test_1p

checkers Run success

Identity

netCDF output

General Tests

Restart Tests

Domain compositionTests

Technical Test Suite - Output

COSMO/CLM Training Course 2017 75

cat testsuite.out

Climatological Test Suite

COSMO/CLM Training Course 2017 76

Climatological test simulation (requirement: fast) • 1980-1984 (5 years)• dlon = 0.44, European CORDEX domain• runs over night on Mistral at DKRZ • driving data: laf, lbf provided• includes SAMOA check option• output

- post-processing of daily, monthly, ... values- comparison presently to EOBS13.1 (PMSL,T_2M, - TMAX_2M, TMIN_2M, TOT_PREC) - graphic output option (based on R)

- Bias (Area plots — yearly, seasons) - Bias (Annual Cycle, monthly mean over sub-regions) - QQ (Quantile-Quantile) - PDF (Probability Density Function), absolute and overlap- Taylor (temporal, spatial) - ESBSS (Equal Sided Briar Skill Score) -> RMSS (RMS Score)

Sub-Regions

COSMO/CLM Training Course 2017 77

Equal Sided Brier Skill Score --- RMS Score

COSMO/CLM Training Course 2017 78

Equal Sided Brier Skill Score --- RMS Score

COSMO/CLM Training Course 2017 79

COSMO/CLM Training Course 2017 80

Thank you for your attention !

Additional Material

COSMO/CLM Training Course 2017 82

WebPEP – Example (1)

COSMO/CLM Training Course 2017 83

WebPEP – Example (2)

COSMO/CLM Training Course 2017 84