Documentation of the Changes in the COSMO-Model
Version 4.28

11.07.2013

This version contains the interfaces to the ECMWF grib library, the grib_api, to read and write GRIB data in GRIB1 and GRIB2. Besides that, the nudging code has been revised and a modified quality control for surface pressure observations has been implemented.

Contents:

  1. Implementation of grib_api (GRIB1/2)
  2. Bug Fixes in src_runge_kutta.f90
  3. Revision of the Nudging Code and Extension of Quality Control for Surface Pressure Observations
  4. Changes to the asynchronous GRIB-IO: mpe_io2.f90
  5. Changes to the Latent Heat Nudging
  6. Adapted COSMO-ART to new tracer version
  7. Technical Changes and (minor) Bug Fixes
  8. Changes to the Namelists
  9. Changes of Results


1. Implementation of grib_api (GRIB1/2)

(by Ulrich Schättler)

This version of the COSMO-Model now is able to write GRIB data with the grib_api from ECMWF. If GRIB2 is chosen as writing format, the multi-level atmospheric variables are written using the new general vertical coordinate (with level type 150).

Note that at least version 1.11.0 from grib_api is necessary to compile the COSMO-Model with grib_api, because of the use of the new general vertical coordinate.

The usage of GRIB2, the new general vertical coordinate (and most important the local use sections of GRIB2) will be documented on the COSMO-Web Page: grib This page is still under construction. We hope to extend it until end of July 2013 significantly.

Basic changes to implement grib_api

The basic changes have been in the modules:

Two new modules have been implemented:

Implemented new GRIB2 leveltype 'generalVertical' and 'generalVerticalLayer'

The main difference to the other vertical coordinate types 'hybrid' and 'hybridLayer' is, that now there is no computational algorithm how the vertical layers are constructed, but a full 3D file (called a HHL-file for the height of half levels in COSMO) is provided, that has to be processed together with other 3D variables defined on these levels.

With this new vertical level type, also some new keys were introduced for the WMO GRIB2 standard, namely:

HHL-files can only be created by the INT2LM, not by the COSMO-Model.

These keys replace the vertical coordinate parameters, which are present in data with level types 'hybrid' or 'hybridLayer'.

The new general vertical coordinate and its usage in the COSMO-Model system will be documented and explained in detail on the COSMO web page (coming soon).

Changes in the COSMO-Model to implement the new vertical coordinate

New module vgrid_refatm_utils.f90

This new module contains data structures, variables and routines necessary for dealing with the vertical grid and the reference atmosphere. The new data structures are:

This module also contains data and routines, which have been in other modules before: The module vgrid_refatm_utils also contains subroutines to create a UUID and to compare different UUIDs.

Read HHL from an extra file

Implemented possibility to read HHL from an extra file with full precision (but only when reading or writing GRIB2). For that, 2 new Namelist switches have been implemented in group /GRIBIN/:

Group Name Meaning Default
/GRIBIN/ ydirhhl directory which contains the HHL-file ' '
ynamhhl file name for the HHL-file ' '
If a HHL-file has to be read, the readloop in src_input is invoked again after reading the laf-file, to also read the HHL-file.

Transferring the vertical coordinate and reference atmosphere parameters

In GRIB1 (and NetCDF) the vertical coordinate and reference atmosphere parameters are transferred from INT2LM to the COSMO-Model (or from COSMO-Nudging to COSMO-forecast) via the meta data. This is no more possible in GRIB2 because of the new general vertical coordinate. But these informations, which are set in the INT2LM, are still needed in the COSMO-Model to compute the proper reference state for the model.

In order to provide the correct information in both programs, a few sets of default parameters have been implemented in the new module vgrid_refatm_utils.f90. These sets are numbered consecutively and the corresponding number of a special set is written into the localDefinitionNumber of the fields P or PP for reference atmosphere sets and in HHL for the vertical coordinate parameters. In this way, the different programs can determine the correct set of parameters when processing the corresponding variables.

Defining a new set of parameters for either the reference atmosphere or for the vertical coordinate parameters therefore is now more complicated, because it requires to change the source code of the programs. But this is only a first implementation to start the tests with GRIB2. We can think of a better solution for that problem soon.

Up to now only few set of parameters are implemented. We will extend these sets in the near future with all important settings that are in use.

Some more organizational data structures

Introduced arrays to convert some GRIB1 codings to grib_api strings

Back to Contents


2. Bug Fixes in src_runge_kutta.f90

(by Michael Baldauf)

  1. Use of time level nnow (instead of nnew) for the moisture variables in the water loading contribution of the buoyancy.

    In the Runge-Kutta scheme, nnew for the moisture variables actually means the old time level. Therefore, using nnow leads to a better coupling of the dynamics to the moisture physics (concerning this water loading contribution).

    This correction has the potential to improve the precipitation forecast in strongly convective situations.

    This measure is a bug fix and will change the results if itype_fast_waves=2 is used.

  2. Exchange of wadvt in the case ldyn_bbc=.TRUE.:

    This bug fix guarantees reproducibility for different processor configurations in the case itype_fast_waves=2 and ldyn_bbc=.TRUE. . In this case, results are changed.

Back to Contents


3. Revision of the Nudging Code and Extension of Quality Control for Surface Pressure Observations

(by Christoph Schraff)

New modules in the nudging code:

Back to Contents


4. Changes to the asynchronous GRIB-IO: mpe_io2.f90

(by Ulrich Schättler)

Besides the implementation of grib_api interfaces, some more changes have been implemented in mpe_io2.f90:

Back to Contents


5. Changes to the Latent Heat Nudging

(by Klaus Stephan)

Revision of data reading procedure, to avoid the former rewind of the radar data files. Now, the data of one file are read only once, shortly after opening the data file. The time assignment is done in a next step, as well as the identification as precipitation or quality data. The change also affects the subroutine lhn_sumrad, where no reading has to be performed anymore. In addition this subroutine has been changed a bit, which is slightly changing the results.

There is a small inconsistency between former and new subroutine considering the precision of KIND=ireals and KIND=irealgrib. In the former version a observation point was added if ds_rad(ind) > 0.0_irealgrib.

In the new version the observation is already converted to ireals (SR lhn_obs_read), therefore the condition is changed to datafield_all(i,j,n) ≥ 0.0_ireals.

The former normalisation term ndata is now space dependend, which better accounted for data outage of single radar stations (ie. datafield_all(i,j,n) < 0.0_ireals).

All input procedures have been extended to work also with grib_api (GRIB1)

Back to Contents


6. Adapted COSMO-ART to new tracer version

(by KIT)

All COSMO-ART and POLLEN tracers are now handled by the new tracer module. Therefore, the corresponding code could be eliminated again in most COSMO-modules.

Back to Contents


7. Technical Changes and (minor) Bug Fixes

Back to Contents


8. Changes to the Namelists

There were new Namelist variables in the following groups:

Group Name Meaning Default
/RUNCTL/ lroutine NEW to indicate an operational run (if .TRUE.). This variable is used to set GRIB2 meta data. .FALSE.
/IOCTL/ nsubcenter NEW originating sub-center identification for GRIB 255
nlocaldefnr NEW to specify local definition number for GRIB local sections. The default value of -1 means,that no local section is present. -1
yform_read new values To specify the format of the input files.
New value apix is now accepted to read GRIB data with ECMWF's grib_api.
-1
/GRIBIN/ ydirhhl NEW directory that contains the HHL-file (which is necessary for reading / writing the GRIB2 general vertical coordinate). ' '
ynamhhl NEW name of the file that contains the HHL field (which is necessary for reading / writing the GRIB2 general vertical coordinate). ' '
/GRIBOUT/ yform_write new values to specify the format of output files New values are now accepted:
  • api1 to write GRIB1 data with ECMWF's grib_api.
  • api2 to write GRIB2 data with ECMWF's grib_api.
'grb1'
ysystem DELETED to specify a data handling system.
But only file was used up to now.
ydbtype DELETED to specify the data base type. But this option is not supported any more.
n_num DELETED to specify the nest number But the nesting was never finally implemented and has been removed now.
/NUDGING/ qcflbcp NEW enhancement factor to the threshold used for the check of surface pressure obs against lateral boundary (LBC) fields (if equal to zero then this LBC-QC is not performed at all). 1.4
irun_osse NEW switch for the model run to derive obs values from the feedback file 'fof':
  • = 0: the original observations are used as obs values (default)
  • > 0: index of model run (in dimension 'd_veri' of 'fof' file) from which the simulated obs are used as obs values;
0
losse_fg NEW decides whether first guess check flags from the feedback file 'fof' is used:
  • = true. : first guess check flags from 'fof' are converted into 'dataset' pre-processing flag; observation status remains 'rejected'
  • = false.: first guess check flags are discarded, and the related observation may be used actively; (default)
.FALSE.
fperturb NEW factor to the obs error variances to define the size of random perturbations added to the observation values (only for (simulated or original) obs values from feedback file 'fof'). 0.0
iseed NEW external seed for random number generator. 0

Back to Contents


9. Changes of Results

Nudging:

With default settings, the main changes, limited to some occasions, are due to the new quality control of surface pressure observations against the fields that provide the lateral boundary conditions (LBC-QC).

Without LBC-QC, changes are usually very small, due various minor bug corrections in the quality control and due to different rounding errors. However, there is no backward bit reproducibility.

Latent Heat Nudging:

The results of the latent heat nudging have been changed slightly due to changes of precision for some variables (see comments above).

Dynamics:

Due to the bug fixes, the results are changed in the case itype_fast_waves=2 (and also for ldyn_bbc=.TRUE. in connection with itype_fast_waves=2). (See above)

Results of applications not using data assimilation or the new fast waves solver have not been changed!

Back to Contents