Documentation of the Changes in the COSMO-Model
Version 5.1

31.07.2014

After releasing Version 5.0 of the COSMO-Model in autumn 2013, the development is going on and many contributions could be gathered for Version 5.1.

Contents:

  1. Work on Dynamics
  2. Advection and Horizontal Diffusion of TKE
  3. COSMO-ICON microphysics
  4. Stochastic Perturbation of Physics Tendencies (SPPT)
  5. Changes in the Assimilation
  6. Changes in the I/O
  7. Interface to the Radar Forward Operator EMRADSCOPE
  8. Removal of Inconsistencies for the Tracers
  9. Single Precision Version
  10. Online Trajectory Module
  11. Technical Adaptations
  12. Technical Changes and Bug Fixes
  13. Changes to the Namelists
  14. Changes of Results


1. Work on Dynamics

(by M. Baldauf)

Targeted diffusion to avoid cold pools:

A new subroutine targeted_diffusion_cold_pools was included in the module hori_diffusion.f90, which performs a second order diffusion on the temperature only for those gridpoints, where the temperature deviation from the reference state T' is more than 10K smaller than the T'-average of the surrounding 4 gridpoints.

Experience shows that this criterion is fulfilled rather seldom. Nevertheless, this method prevents unrealistic cold temperatures in narrow valleys. The computational costs of this subroutine are very low.

This can change the results slightly, but only, if such cold pools are developing.

Reformulation of divergence damping coefficients in the new fast-waves solver:

Modifications in the subroutine init_div_damping_coeff to improve the determination of the divergence damping coefficient alpha_div over steep slopes. This measure should increase the numerical stability in very complex/irregular terrain.

This changes the results slightly!

Adaptation of Runge-Kutta dynamical core to SPPT:

The call to subroutine coriolis has been shifted after the vertical diffusion to facilitate the calculation of stochastic physics tendencies (i.e. a clearer distinction between physics and dynamics tendencies)

This changes the results slightly!

Lateral Davis-Relaxation:

(by W. Schneider, A. Arteaga, O. Fuhrer, M. Baldauf)

Due to further code simplifications in src_setup.f90 (mainly interchange of multiplications and divisions) the results are mathematically equivalent but not bit-identical. Apart from this, no principal changes of results happen if crltau=1 (=default) is used.

Cache Optimizations for fast_waves_sc.f90:

Analogous to the Cray optimizations done for fast_waves_rk in the Benchmark version.

Some more technical adaptations:

Back to Contents


2. Advection and Horizontal Diffusion of TKE

(by U. Blahak)

Advection of TKE has been added for the prognostic TKE scheme also for the option itype_turb=3 and for all advection variants of the Runge-Kutta core. It is switched on by the already present namelist switch lprog_tke from /PHYCTL/, which is now also applicable in case of itype_turb=3. In this case, the advected quantity is SQRT(2*TKE), otherwise (alternative prognostic turbulence schemes 5-8) it is the TKE itself.

A new field tket_adv has been introduced for the advective tendency. It has been added to the restart variables and to the variable table (in setup_vartab: TKET_ADV).

Also, the horizontal diffusion of TKE has been activated for the prognostic TKE schemes in case of 3D-turbulence (l3dturb=.TRUE.) and additional horizontal shear mode (itype_sher = 3).

Modified files:

Back to Contents


3. COSMO-ICON microphysics

(by X. Lapillonne, U. Schättler)

DWD has the plans to unify the physical parameterizations used in the COSMO-Model and the new global model ICON, so that they can be used by both models. The idea behind the unification is, that all parameterizations used up to now are only working in a vertical column. For the unification, several issues have to be addressed:

The first unified package is now introduced in the COSMO-Model, which is the microphysics. There are several new modules:

The new microphysics is now called (hard coded) in organize_physics (action='finish_compute'). The old microphysics in src_gscp.f90 can still be activated by commenting out the new scheme (for backward compatibility).

Together with the new COSMO-ICON microphysics, also some changes to the contents of cloudice and graupel have been introduced:

Back to Contents


4. Stochastic Perturbation of Physics Tendencies (SPPT)

(by L. Torrisi, C. Schraff)

The stochastic perturbation of physics tendencies (SPPT) scheme introduced is mainly based on Buizza et al. (1999) and Palmer et al. (2009).

3-D fields of random numbers are produced on a coarse grid and at certain random number time steps. In the vertical, these fields of random numbers are constant, except if vertical tapering is applied. In the horizontal and in time, the same random number is used for all model grid points within a coarse grid box and (random number) time step. Options are available for bi-linear interpolation from the coarse grid to the COSMO grid and for linear temporal interpolation between random number time steps.

In any case, the mesh width of the coarse grid and the random number timestep increment determine approximately the spatio-temporal correlation scales of the random number field. In order to combine both large and small scales, it is possible to superpose up to npatmax = 5 of these random field patterns. The random numbers are drawn either from a uniform distribution or from a Gaussian distribution (with an upper limit for absolute values). The random number stream(s) is/are initialised by a seed and thus defined by a date/time, the ensemble member number, and an external seed number. Optionally, the stream is re-initialised at each random number time step in such a way, that temporal correlations of the random fields can be maintained across analysis steps e.g. in a data assimilation cycle.

Given a certain random number at a model grid point and model timestep, this (same) value is applied to perturb the physical tendencies of both t, u, v and qv, and optionally also of qc, qi, or additionally of qr, qs, qg.

A new module has been introduced to produce randam fields for SPPT: src_stoch_physics.f90

The module mo_random.f90 (a random number generator) has been moved from the nudging part to the regular part of the COSMO-Model.

There are quite some new Namelist variables. Take a look in Changes to the Namelists.

Back to Contents


5. Changes in the Assimilation

Porting to the Cray XC30 system

(by Christoph Schraff)

Some Fixes were necessary to run the assimilation mode on the Cray XC30 system:

Latent Heat Nudging

(by Klaus Stephan)

Back to Contents


6. Changes in the I/O

(by U. Schättler)

Modifications to read HHL and P from the initial file in GRIB2:

The first implementation of using GRIB2 in INT2LM and the COSMO-Model was in a way that a special file containing the HHL-fields (height of half levels) has been processed at the beginning of the program start. For practical reasons this is not very comfortable, so it was agreed that the hhl-fields are passed within the initial file.

And because the reference atmosphere parameters are not available any more in the GRIB2 meta data, it was also agreed, that the full pressure P is passed within the initial file, and not the pressure deviation.

In order not to loose to much precision because of the grib packing, these fields are now packed with 3 bytes (24 bits).

The I/O routines have been adapted accordingly (data_io.f90, organize_data.f90, src_input.f90, src_output.f90, src_setup_varta.f90)

Note, that P and HHL are only passed within the initial file, if GRIB2 is used. For all other data formats nothing has changed.

Modifications because of missing vertical coordinate parameters in GRIB2:

In GRIB2 we are now using the new level type generalVertical. There are no meta data any more in GRIB2, to store the vertical coordinate parameters, although they are (still) used by some routines of the COSMO-Model. Still, the vcoords themselves (height of the model levels above sea level) can be stored in the scaledValueOfSecondFixedSurface and scaleFactorOfSecondFixedSurface part of the HHL-fields (every level k stores the corresponding vcoord(k) value). But the value for vcflat (where levels become flat again) cannot be stored any more.

To have some reference profile for hhl available, a new 1D variable has been introduced (hhl_prof), which stores such a profile. The profile is determined by looking for the lowest grid point above sea level. If a sea grid point is available, this profile just contains the height of the levels above sea level (thus the vcoord values). If only land points are in the computational domain, this profile of course is different from the vcoords.

Several subroutines have been modified to work with the reference profile hhl_prof now, instead of the values of vcoord:

Modifications because of missing reference atmosphere parameters in GRIB2:

If the full pressure is passed within the initial file (and also the boundary files), the COSMO-Model has to set up a reference atmosphere on its own. Therefore, new Namelist variables have been introduced in the group /LMGRID/ (read in src_setup.f90), to define these parameters (according to the variables in INT2LM):

The call to SR set_refatm_defaults to initialize the corresponding structures in vgrid_refatm_utils.f90 has been moved from organize_data.f90 to src_setup.f90

Other GRIB2 and grib_api adaptations

Back to Contents


7. Interface to the Radar Forward Operator EMRADSCOPE

(by. U. Blahak)

Interfaces to run the Efficient Modular RADar SCanning forward OPErator (EMRADSCOPE) have been implemented into the COSMO-Model. This operator was developed by Ulrich Blahak (DWD), Yuefei Zeng (KIT), Dorit Jerger (KIT) and Daniel Leuenberger (MeteoSwiss) to simulate synthetic radar images of networks of volume-scanning meteorological radars.

The whole package of radar specific files and a README.radar is available from Ulrich Blahak. The README.radar is also available in the DOCS directory of the COSMO-Model.

The operator must be activated during compile time with the directive -DRADARFWO and during run time with the new namelist parameter luse_radarfwo in the group /RUNCTL/.

There were some specific modifications to the existing source files:

If the model is compiled without the operator (-DRADARFWO not set), there are no changes to the results. Otherwise, same results as before can be obtained by choosing the option dbz%itype_refl=4 in /GRIBOUT/ namelists.

Back to Contents


8. Removal of Inconsistencies for the Tracers

Back to Contents


9. Single Precision Version

(by Stefan Rüdisühli, Oliver Fuhrer, Ulrich Schättler)

From the beginning of the development, the COSMO-Model had been designed to be able to run in both precisions: single and double precision. Therefore, the real variables are all defined using a KIND parameter, named ireals in the module data_parameters.f90. But only the double precision version was developed and tested, nobody ever used or tried a single precision version.

But single precision programs run faster on computers, because of less memory traffic, therefore MeteoSwiss tested to run the COSMO-Model also in single precision. Which did not work in the first instance. Some effort had to be put in adapting the model for single precision runs. Concurrently, the name of the KIND parameter was unified with the ICON-Model to wp, indicating working precision.

The main changes are:

It turned out, that the radiation cannot be run in single precision (at least the routines coe_th, inv_th, coe_so, inv_so). Therefore it was decided to run the subroutine fesft and all subroutines called below in double precision. The necessary variables are defined with the kind parameter dp.

In a second step also the name and the contents of the file, which defines the kind parameters was unified with ICON and the assimilation programs at DWD, now being kind_parameters.f90. This file also defines kind parameters for integer variables, which are not yet used in the COSMO-Model. This will be unified in a later step. It replaces the module mo_kind.f90 (and later on also data_parameters.f90.

Back to Contents


10. Online Trajectory Module

Back to Contents


11. Technical Adaptations

Back to Contents


12. Technical Changes and Bug Fixes

Back to Contents


13. Changes to the Namelists

Group Name Meaning Default
/RUNCTL/ lsppt NEW indicates, if stochastic perturbation of physics tendencies (SPPT) is applied (if .TRUE.) and related namelist variables are read from namelist group /EPSCTL/. .FALSE.
luse_radarfwo NEW To activate the radar forward operator. .FALSE.
/DYNCTL/ lhor_pgrad_Mahrer NEW In the new fast waves solver (itype_fast_waves=2) the horizontal pressure gradient (i.e. in the u- and v-equations) is either calculated in the terrain-following system (.FALSE.) or by interpolation of p' to a horizontal plane (Mahrer (1984) MWR) (.TRUE.) (see also Baldauf (2013) COSMO Tech. Rep. 21) .FALSE.
l_3D_div_damping NEW The artificial divergence damping either acts only on the u- and v-equation (.FALSE.) or in a fully isotropic 3D manner (.TRUE.). The latter version is more time consuming (and less tested until now). (see Baldauf (2013) COSMO Tech. Rep. 21 and Baldauf (2013) in ECMWF Seminar proceedings) .FALSE.
crltau_inv RENAMED former name was crltau and the meaning really is crltau_inv = 1/crltau.
Factor for relaxation time 1/tau_r = crltau_inv * 1/dt
The advantage of this replacement lies in the fact, that crltau_inv=0 completely switches off the relaxation (this was not possible before).
1.0
lexpl_lbc DELETED explicit formulation of the lateral relaxation boundary conditions
/PHYCTL/ lsuper_coolw NEW switch to activate effects of supercooled liquid water in the microphysics. .FALSE.
lscm NEW switch to activate the single column model .FALSE.
/GRIBIN/ ydirhhl DELETED was introduced for GRIB2, but is not needed.
ynamhhl DELETED was introduced for GRIB2, but is not needed.
/EPSCTL/ The following new namelist variables in the block /EPSCTL/ are related to the stochastic perturbation of physics tendencies (SPPT) and are effective only if lsppt=.TRUE., and read only if lsppt=.TRUE. or leps=.TRUE.:
itype_qxpert_rn NEW defines, which hydrometeor tendencies are perturbed
  1. qv only
  2. qv, qc, qi
  3. qv, qc, qi, qr, qs, qg
0
itype_qxlim_rn NEW type of reduction/removal of the perturbation in case of negative (for qv, qx) or supersaturated (qv) values
  1. no limitation of perturbed tendencies
  2. If new qv values are negative or super-saturated then T- and qv- tendencies are not perturbed;
    if new qx (qc,qi,qr,qs,qg values) are negative then qx- tendencies are not perturbed;
0
The following variables are related to the generation of the random fields for SPPT:
lhorint_rn NEW
.TRUE.
then the random numbers (as defined on a random number horizontal coarse grid) are horizontally bi-linearly interpolated to the COSMO model grid;
.FALSE.
then the model grid points contained in the same random number coarse grid box have the same random number value.
.TRUE.
ltimeint_rn NEW
.TRUE.
then the 3-D fields of random numbers (available at random number time steps) are interpolated linearly in time;
.FALSE.
then random numbers remain constant in time until the next random number time step.
.TRUE.
lgauss_rn NEW
.TRUE.
then use a gaussian distribution of random numbers;
.FALSE.
then use a uniform distribution of random numbers.
.TRUE.
itype_vtaper_rn NEW type of tapering near surface and in stratosphere:
  1. no vertical tapering
  2. prescribed tapering near surface and in stratosphere
  3. prescribed tapering only in the stratosphere
  4. tapering according to namelist variable vtaper_rn
1
imode_rn NEW
  1. use only one stream of random numbers (for each pattern) for all random number time steps; the same offset of the coarse grid relative to the lower left corner of the COSMO grid is then used for all random number time steps (for a given pattern);
  2. use a new stream of random numbers for every random number time step; this renders the 3-D random number fields valid for a given time reproducible even if produced by successive model runs, and enables temporal correlations in DA cycles across analysis steps; the offset of the coarse grid relative to the lower left corner of the COSMO grid is then different for each random number time step.
1
npattern_rn NEW number of random number patterns with different (4-D) correlation scales used for SPPT (must be ≤ 5) 1
For the following new namelist parameters, npattern_rn values have to be specified:
hinc_rn NEW random number time step (in [hrs]), i.e. timestep increment for drawing a new 3-D field of random numbers; if imode_rn > 0, 24 hours must be divisible by hinc_rn; and if both hinc_rn and ninc_rn are given valid values (> 0) then the value of hinc_rn is used. 6.0
ninc_rn NEW random number time step (in [model timestep] units), i.e. timestep increment for drawing a new 3-D field of random numbers. -1
nseed_rn NEW external part of seed for random number generation. 0
nseed_rn2 NEW only for imode_rn == 1: external part of seed to generate 3-D random number fields valid for times later than the intial time of the model run. 0
dlat_rn NEW random number coarse grid point distance in meridional direction (in [degrees]). 2.5
dlon_rn NEW random number coarse grid point distance in zonal direction (in [degrees]). 2.5
stdv_rn NEW standard deviation of the Gaussian distribution of random numbers. 0.5
range_rn NEW upper limit imposed to absolute value of random numbers (condition: SUM( range_rn2) < 1 (sum over npattern_rn), otherwise the perturbations may change the sign of physics tendencies, which may easily lead to instabilities). 2 * stdv_rn_d
For the following new namelist parameter, ke (number of vertical model layers) values have to be specified
rvtaper_rn NEW only for itype_vtaper_rn == 3: externally specified function (by values ≤ 1 for each model layer from top down) for vertical tapering of the random number. -

Back to Contents


14. Changes of Results

Back to Contents