Welcome to the Practical NWP Exercises Ulrich Schättler, Ulrich Blahak Deutscher Wetterdienst BU Research and Development Department for Numerical Modelling Alexander Smalla Zentrum für GeoInformationswesen der Bundeswehr Gruppe Meteorologie beim DWD
42
Embed
Welcome to the Practical NWP Exercises · Welcome to the Practical NWP Exercises Ulrich Schättler, Ulrich Blahak Deutscher Wetterdienst ... To do the practical exercises, we have
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
Welcome to the
Practical NWP Exercises
Ulrich Schättler, Ulrich Blahak
Deutscher Wetterdienst
BU Research and Development
Department for Numerical Modelling
Alexander Smalla
Zentrum für GeoInformationswesen
der Bundeswehr
Gruppe Meteorologie beim DWD
Welcome to the
Practical NWP Exercises
Ulrich Schättler, Ulrich Blahak
Deutscher Wetterdienst
BU Research and Development
Department for Numerical Modelling
Alexander Smalla
Zentrum für GeoInformationswesen
der Bundeswehr
Gruppe Meteorologie beim DWD
What you will learn this week
Installation of the COSMO-Model package
Preparing External, Initial and Boundary Data
Running the COSMO-Model in NWP mode
Visualizing COSMO-Model output using GrADS (NWP)
Running Idealized Test Cases
Troubleshooting for the COSMO-Model
Individual / Practical Exercises
3 COSMO/CLM/ART Training 2015
Basic Informations
To do the practical exercises, we have got 16 terminals, but we are about
28 trainees. So it would be good to share your terminal.
You need some knowledge in working with Linux / Unix and how to use a
text-editor. If you are not familiar with this, you should look for an
experienced partner.
4 COSMO/CLM/ART Training 2015
Installation
In this lesson you will learn
how to login to and use DWD‘s supercomputers, the Cray XC30, and its
frontend, the xce
what are the necessary compontents of the COSMO-Model software
package
how these components can be installed on a computer
how jobs can be started
what to do with the reference data
And you will do your first simulations based on the reference data.
5 COSMO/CLM/ART Training 2015
Logging in
To the PC
There is a plastic sheet on your desk with the
Username (Benutzername)
Password (Kennwort)
And the Domain (Domäne)
Start Cygwin Server: Click Icon on the Desktop
Start a Putty session (see extra sheet on your desk)
Terminal-Keyboard
Windows- Colours
Connection-SSH-X11
Set host name and save session
Log in to xce (xce00.dwd.de, xce01.dwd.de, xce02.dwd.de, xce03.dwd.de)
Username
Password
6 COSMO/CLM/ART Training 2015
The Computers at DWD
xce[00/01/02/03]
These are special nodes on the Cray XC30 which are used as login-nodes (file handling, compiling, linking, starting jobs, visualization)
There are 3 different filesystems:
/e/uhome/trngxxx: for source code and run-scripts
/e/uwork/trngxxx and /e/uwork/uscratch: for model data
The Cray XC30
INT2LM and the COSMO-Model run on the Cray XC30 machines.
It has 364 compute nodes, each node has 2 Intel processors (IvyBridge) with 10 cores each (adds up to 7280 cores).
You should not use more than 5-10 nodes for a COSMO-Model job (how to that you will see later). INT2LM usually runs on one node.
7 COSMO/CLM/ART Training 2015
The Computers at DWD
The Cray XC40
There is another partition of the computer which is used for ICON
It has 432 compute nodes, each node has 2 Intel processors (Haswell) with 12 cores each (adds up to 10368 cores)
8 COSMO/CLM/ART Training 2015
Compiler Environment and Libraries
Compilers: We use the Cray Compiling Environment (cce/8.3.3)
Grib-API: Pre-installed library: grib_api 1.11.0
NetCDF: Pre-installed library: cray-netcdf/4.3.2
Type
module list for other pre-installed libraries / components
module avail for available libraries / components and their versions
To access the pre-installed libraries, you have to use the environment variables:
$(CRAY_LD_LIBRARY_PATH)
9 COSMO/CLM/ART Training 2015
The Batch System PBS
Jobs are submitted to the Cray XC30 with the batch system PBS (Portable Batch System).
The basic commands are:
qsub jobname: to submit the job described in jobname.
qstat: to query the status of all batch jobs
qstat | grep xc_normal: to query the status of all batch jobs on XC30
qstat –u <usrname>: to query the status of your batch jobs
qdel <jobnr>: to delete the job with the number <jobnr> . <jobnr> is given by qstat.
At the end of each job you get an output file <jobname>.o<jobnr> with status information (possible errors, successful job termination) and standard ASCII output of the program
Use xtnodestat to see, how many nodes are free
Some more information can be found in Appendix A of the Tutorial
10 COSMO/CLM/ART Training 2015
NWP Exercises
Files and Data for these exercises can be accessed via
/e/uhome/fegast3/TRAINING_2015/
auxiliary files that might be necessary for running
cosmoart for COSMO-ART
data the reference data set
docu available documentation
grads files for the visualization exercises
ideal run-scripts for the idealized test runs
source tar-files containing the necessary packages
topo external parameters for COSMO / ICON / GME
troubleshooting files for the troubleshooting exercises
11 COSMO/CLM/ART Training 2015
Files and Data
From /e/uhome/fegast3/TRAINING_2015/source/ you should copy the following files to your home directory:
DWD-libgrib1_110128.tar.gz
int2lm_141125_2.01.tar.bz2
cosmo_141128_5.01.tar.bz2
From /e/uhome/fegast3/TRAINING_2015/data you should copy the following file to your work or scratch directory
reference_data_5.01.tar.bz2
Unzip and de-tar all files and try to install the programs according to theTutorial 1.2 and 1.3 and the reference data according to 1.4
In addition you need:
grib_api: from /e/uhome/fegast3/opt/grib_api/lib, …/include, …/bin
NetCDF library: available as system library
12 COSMO/CLM/ART Training 2015
Installing the
GRIB1 Library
13 COSMO/CLM/ART Training 2015
GRIB
GRIB is a WMO standard for packing and distributing meteorological fields.
GRIB1: GRIdded Binary: still used in the COSMO Software based on
DWD libgrib1.
GRIB2: General Regularly-distributed Information in Binary form:
implemented in the COSMO Software lately based on ECMWF Grib-API
freely available from https://software.ecmwf.int/wiki/display/GRIB/Releases
GRIB coded data consist of sequences of octets (1 octet = 1 byte) and is
not human readable (also not the metadata). You need some tools to examine the data (from grib_api or wgrib)
Save the changes, close the text-editor and type: make
16 COSMO/CLM/ART Training 2015
Big Endian / Little Endian
Most (Unix) supercomputers today use big-endian processors. This means that the most significant (biggest) byte is stored first.
Typical PC (Intel) Processors (with Linux) do it the other way round and store the less significant (smallest) byte first. This is called little endian.
Grib, by definition, is big-endian!
Example: every Grib record starts with 4 bytes, that contain the 4 ASCII signs: G R I B
Representation in big endian: G R I B
Representation in little endian: B I R G
On little endian machines, a byte-swapping has to be done when reading Grib-files. This is implemented in the Grib library and can be switched on by defining –D__linux__
17 COSMO/CLM/ART Training 2015
DWD Specialities for GRIB1
There are two DWD Grib1 specials when working with the DWD Grib1 library that have to be taken care of:
Controlwords between Grib Records: Every Grib record begins with „GRIB“ and ends with „7777“. DWD Grib files contain 8 extra bytes (a controlword) between Grib records. For a proper treatment of these controlwords, an environment variable has to be set: LIBDWD_FORCE_CONTROLWORDS=1
ASCII Bitmaps: Not the full data, but only a subset of the GME data is sent as driving data. The mapping of the data to the grid is done by a bitmap in ASCII format (by GRIB definition it should be binary). To indicate the format, another environment variable has to be set: LIBDWD_BITMAP_TYPE=ASCII
18 COSMO/CLM/ART Training 2015
Installing the
INT2LM
19 COSMO/CLM/ART Training 2015
The Directory Structure
tar xvf int2lm_yymmdd_x.y.tar(.bz2) gives the directory int2lm_yymmdd_x.y with subdirectories and files
1.11.0 / 1.12.3 definition files necessary for grib_api
DOCS change documentations (.htm) and User Guide (.pdf)
LOCAL examples for different compilers
Makefile, ObjDependencies, ObjFiles
Fopts to specify the Compiler Options
runeu2de, rungme2eu, runicon2eu
Run scripts to start the program
RUNSCRIPTS more run-scripts examples
src directory with the source code
obj directory with object files
work
20 COSMO/CLM/ART Training 2015
Makefile
Makefile organizes the compiling and linking of the program. It includes
Fopts see next slide
ObjFiles List of all files that have to be compiled
ObjDependencies Compiler calls for all files
Makefile also defines the possible actions:
parexe build an executable (binary) for a parallel machine
seqexe build an executable for a pure sequential machine
parexe is the default
21 COSMO/CLM/ART Training 2015
Fopts
Fopts contains the compiler and linker calls together with compiler options and the necessary libraries to load. Open the file in a text-editor and set the following variables:
F90 Fortran compiler call with basic options:
special options: -DGRIBDWD –DGRIBAPI -DNETCDF
COMFLGx Options for Fortran compiler
LDPAR Linker call for parallel programs
LDSEQ Linker call for sequential programs
LDFLAG Options for linking
LIB Directories and names of used libraries
OR: choose an appropriate Fopts-example from LOCAL and copy it to ./Fopts
Type make exe or gmake –j 8 exe to create the binary
22 COSMO/CLM/ART Training 2015
About External Libraries: DWD GRIB1 Library
-DGRIBDWD
DWD‘s GRIB1 library is used since the beginning of the COSMO-Model
development and we still recommend to use it for writing GRIB1 files.
The pragma –DGRIBDWD therefore has to be set as compiler option.
If it is not set, all parts using the DWD Grib1 library are not compiled and
used.
23 COSMO/CLM/ART Training 2015
About External Libraries: ECMWF grib_api
-DGRIBAPI
ECMWF‘s grib_api has been implemented into the COSMO-Model and
INT2LM in 2014, but still is not used outside DWD.
We are in the process of writing a comprehensive documentation how to
use the grib_api, but are not yet finished.
But you need grib_api to read DWD‘s GRIB2 data from ICON and GME in the INT2LM, therefore you have to set –DGRIBAPI
The installation process for grib_api takes a longer time, therefore we use
a pre-installed library this week from
/e/uhome/fegast3/opt/grib_api/include include files
/e/uhome/fegast3/opt/grib_api/lib library files
/e/uhome/fegast3/opt/grib_api/bin tools
24 COSMO/CLM/ART Training 2015
About External Libraries: NetCDF
-DNETCDF
INT2LM also needs the NetCDF library, if ICON data have to be read. Therefore you need to compile with the pragma -DNETCDF
If –DNETCDF is not set, the corresponding parts of the code are not
compiled and cannot be used.
If compiling with NetCDF, you can also use NetCDF as I/O format for
reading and writing COSMO-Model data.
The NetCDF library is pre-installed and can be accessed on the Cray by loading the appropriate module: cray-netcdf
25 COSMO/CLM/ART Training 2015
Installing the
COSMO-Model
26 COSMO/CLM/ART Training 2015
The Directory Structure
tar xvf cosmo_yymmdd_x.y.tar(.bz2) gives the directory cosmo_yymmdd_x.y with subdirectories and files
DOCS change documentations (.htm) and User Guide (.pdf)
LOCAL examples for different compilers
Makefile, ObjDependencies, ObjFiles
Fopts to specify the Compiler Options
run_cosmo_eu, run_cosmo_de
Run scripts to start the program
RUNSCRIPTS more run-scripts examples
src directory with the source code
obj directory with object files
work
27 COSMO/CLM/ART Training 2015
Makefile
Makefile organizes the compiling and linking of the program. It includes
Fopts see next slide
ObjFiles List of all files that have to be compiled
ObjDependencies Compiler calls for all files
Makefile also defines actions to build different executables
purpar pure COSMO-Model without Nudging and RTTOV
allpar including Nudging and RTTOV libraries
nudpar COSMO-Model with Nudging but without RTTOV
satpar COSMO-Model without Nudging but with RTTOV
allpar is the default. All binary variants could also be build as sequential executables without message passing (MPI)
28 COSMO/CLM/ART Training 2015
Fopts
Fopts contains the compiler and linker calls together with compiler options and the necessary libraries to load. Open the file in a text-editor and set the following variables:
F90 Fortran compiler call with basic options:
special options: -DGRIBDWD –DGRIBAPI –DNETCDF –D__COSMO__
COMFLGx Options for Fortran compiler
LDPAR Linker call for parallel programs
LDSEQ Linker call for sequential programs
LDFLAG Options for linking
LIB Directories and names of used libraries
OR: choose an appropriate Fopts-example from LOCAL and copy it to ./Fopts
Type make exe or gmake –j 8 exe to create the binary
29 COSMO/CLM/ART Training 2015
About External Libraries
In the COSMO-Model we still recommend to work with DWD‘s GRIB1 library and to set –DGRIBDWD
Grib_api is not really needed then, but it does not harm to also compile with -DGRIBAPI
NetCDF is necessary, if you
want to use it as I/O format (usually done by CLM group)
want to run the Nudging scheme, because observations are now taken as
NetCDF
During this week we compile with –DNETCDF, but we do not use it.
You definitely have to set –D__COSMO__ to use proper parts of the physical
parameterizations (which are shared with the ICON model)