Documentation of the Changes in the COSMO-Model
Version 5.08

23.10.2020

Contents:

  1. Bug Fix in Interpolation to p-levels
  2. Changes in Data Assimilation
  3. Modifications for Re-Unification with CLM
  4. Remove the coarse radiation grid
  5. Modified Hailcast Variable Names
  6. Changes in SPPT
  7. COSMO-EULAG
  8. Update CPP Dycore to GRIDTOOLS 2.0
  9. Update of OpenACC implementation for PGI Compiler 20.4
  10. Technical Changes and Bug Fixes
  11. Changes to the Namelists
  12. Changes of Results


1. Bug Fix in Interpolation to p-levels

(by Ulrich Schaettler, DWD)

When running on the SX-Aurora in single precision, the results of the p-interpolation to the 1000 hPa level have not been correct. This was due to the fact, that the x-axis value of the surface pressure has not been transferred to LOG(ps), as was done for all the other pressure levels of the vertical profile. This has been fixed now.

Back to Contents


2. Changes in Data Assimilation

Modifications in observation handling

(by Christoph Schraff)

Changes of the namelist variables: None

Changes of the results:
Results may be changed slightly if radiosonde descent or aircraft observations are assimilated.

(Only at DWD these modifications have been implemented in a version 5.07d)

Modifications for running assimilation in single precision (kenda only)

(by Stefan Ruedisuehli, Xavier Lapillonne)

When compiling in single precision some computation in the assimilation part were not accurate enough, and several modifications have been introduced. The most relevants are:

A new module assimilation_utilities.f90 has been introduced which contains utilities for computing time boxes and intervals for the data assimilation in single and double precision. The utilities replace code which were repeated in several places in data assimilation code.

Avoid possible division by zero in ps_obs_operator_sing/mult

(by Christoph Schraff, Xavier Lapillonne)

The absolute value of variable zgamma in these routines can get rather small in single precision. Also in double precision this is a potential danger. Therefore it is now checked that the absolute value is larger than an epsilon and another computation is chosen for small ABS(zgamma).

Back to Contents


3. Modifications for Re-Unification with CLM

New Diagnostics implemented by CLM

(by Ronny Petrik, Ulrich Schättler)

Wind Sector Classes

New variables have been implemented, which are related to wind speed and wind direction for 16 (or nwdirsec) special wind sector classes in the height of 10 meter. The technical implementation in the code is by three-dimensional variables, where the third dimension holds the 16 different sectors.

For NetCDF a new dimension for classes of wind direction (windsector) is defined (entry 18 in idims_id_out).

For Grib (1 and 2) we define a new level type 233, where the interpretation of the levels are just the different sectors.

These new definitions need some additions in the modules io_metadata.f90, netcdf_io.f90 and organize_data.f90. The diagnostics are computed in module near_surface.f90.

Sunshine Duration

Additional solar fluxes are computed in radiation_interface.f90.

Instead of the (now eliminated) variable sodwddm, swdir_sn is used to calculate the sunshine duration in module near_surface. This has two effects:

This modifies the results of the diagnostic variables DURSUN and DURSUN_R slightly.

New Output Fields

The following list gives the I/O shortnames, some GRIB 1 meta data and the new variable names:

Shortname Element Number Table type Level type Time Range Indicator Variable Name
DD_10M 31 21050wdirgeo_10m
DD_10M_SECFREQ 31 22333wdirgeo_10m_freq
SP_AV 32 21103vabs_av
SP_10M_AV 32 21053vabs_10m_av
SP_10M_SECAV 32 22333vabs_10m_secav
SP_10M_SECMAX 32 22332vabs_10m_secmax
CLCT_AV 71 2 13clct_av
DEN 89 21100 --
ASWDIR_SN 28201 13aswdir_sn
ASWDIR_SNO 220201 13aswdir_sno
SUN_EL 250202 10sun_el
SUN_AZI 251202 10sun_azi
TURB_INTENS_MAX2522021102turb_intens

DWD already uses the following shortnames. Up to now no variables were implemented, but the values were only calculated temporarily for output. With the modifications in near_surface.f90, it makes sense to implement also variables for these fields:

Shortname Element Number Table type Level type Time Range Indicator Variable Name
DD 31 21100wdirgeo
DD_10M 31 21050wdirgeo_10m
SP 32 21103vabs
SP_10M 32 21053vabs_10m

Additional CLM Modifications

New tuning (namelist) variables:

Usage of ldiniprec in organize_physics.f90:

Contributions from ETH Zürich

New Hydrology Scheme

The implemented groundwater and runoff scheme is documented in the following publication:

Schlemmer, L., Schär, C., Lüthi, D., and Strebel, L. (2018). A groundwater and runoff formulation for weather and climate models. Journal of Advances in Modeling Earth Systems, 10(8), pp. 1809-1832. https://doi.org/10.1029/2017MS001260

There are three basic ideas to it:

  1. There is a zero-flux boundary condition, which allows for a water table to build up.
  2. From this water table, ground runoff is diagnosed. In this formulation, ground runoff is proportional to the product of subgrid-scale orography, water table height and hydraulic conductivity. The amount of runoff the scheme produces can be tuned with the length scale l_g in sfc_terra_data.f90. Note that despite the equation of runoff is linear, the tuning is highly nonlinear because of the interaction with saturated hydraulic conductivity.
  3. Richards Equation is solved using Flux Corrected Transport for the explicit part (gravitational flow), this ensures mass conservation, i.e. at transitions from saturated to unsaturated soil.

Six new fields have been introduced:

Shortname Element Number Table type Level type Time Range Indicator Variable Name Description
WSOIL_FLX 432031110wsoil_flx soil water flux between layers (-)
Q_ROFF 442031110q_roff ground water runoff, aquifer (m)
WT_DEPTH 45203 10wt_depth water table depth (m)
W_SO_SL 46203 10wso_satlev soil moisture saturation level (level)
W_SO_SAT 472031110wso_sat soil moisture saturation (-)
S_ORO_MAX 8250 10s_oro_max gradient of subgrid scale orography (-)

S_ORO_MAX is needed as input variable, all other variables are diagnostic output.

Two new namelist variables have been implemented:

New Diagnostics

New diagnostics have been implemented by the crCLIM group for clear-sky radiation and for vertically integrated water fluxes. The following list gives the I/O shortnames, some GRIB 1 meta data, the new variable names and also the former names used in the crclim-implementation. These fields have been added in the variable table src_setup_vartab.f90.

Shortname Element Number Table type Level type Time Range Indicator Variable Name old Name
clear-sky diagnostics:
SOBS_RAD_CS234202 10sobcs SOBCS_RAD
THBS_RAD_CS235202 10thbcs THBCS_RAD
SOBT_RAD_CS234202 80sobct SOBCT_RAD
THBT_RAD_CS235202 80thbct THBCT_RAD
ASOB_S_CS 234202 13asobc_sASOBC_S
ATHB_S_CS 235202 13athbc_sATHBC_S
ASOB_T_CS 234202 83asobc_tASOBC_T
ATHB_T_CS 235202 83athbc_tATHBC_T
vertically integrated water fluxes in zonal/meridional direction:
TWATFLXU 94202 10-TWATFLXU
TWATFLXV 95202 10-TWATFLXV
a few other fields added in src_setup_vartab.f90:
SODS_RAD 27201 10--
ASOD_S 27201 13-ASWD_S
TOT_SNOW 123201 14-TOT_SNOW

These are some of the necessary code changes to implement these diagnostics:

Perturb Prognostic Fields

Added option to perturb prognostic fields at start or on every timestep using a specified amplitude. The perturbation can be chosen either relative to precision or using a specified magnitude.

Two new namelist parameters have been implemented:

With the perturbation coefficient, the method of perturbation is chosen:

  1. rperturb ≥ 0.0: relative perturbation with a specified magnitude;
    necessary condition: rperturb ≥ 1.0_wp * rprecision
    Example: if rperturb = 1.0E-5_wp (> rprecision for single and double precision) then the perturbation will be:
    field = field * (1 + 1.0E-5_wp * R)
    where R is a random number from -1.0 to 1.0.
  2. rperturb < 0.0: relative perturbation with a magnitude relative to precision
    necessary condition: rperturb ≤ -1.0_wp
    Example: if rperturb = -10.0_wp (≤ -1.0_wp for single and double precision) then the perturbation will be:
    field = field * (1 + 10.0_wp * 1.0E-16_wp * R) for double precision
    and
    field = field * (1 + 10.0_wp * 1.0E-7_wp * R) for single precision
    where R is a random number from -1.0 to 1.0.

Note:

Changes of Results: In case of itype_pert = 0, the results are not changed.

Check against US standard atmosphere

A plausibility check has been implemented, to check the temperature against the US standard atmosphere. An error is issued, if the differences are too large.

This check should not be used for regions that are far from US mainland, since temperature profiles may differ considerably.

New namelist parameter:

Contributions from MESSy

Tendency diagnostics:

This pull request contains all changes required for the implementation of the full tendency diagnostics of the MESSy submodel TENDENCY. All code blocks are wrapped in preprocessor directives MESSYTENDENCY.

Some more fixes mostly encountered when enabling TWOMOM, CLOUDRAD and RADARFWO for compiling in MESSy. But most of the fixes are not MESSy specific.

Implementation of MPI 3.0 new interfaces

In MPI 3.0 some interfaces have been changed and were given new names. In the COSMO-Model the module environment.f90 is affected, where MPI data types are computed. The new interfaces are implemented with a pragma MPI3, and the old interfaces are retained for installations, which do not yet provide MPI 3.0 standard. To activate the new MPI 3.0 interfaces, compile with -DMPI3.

The following MPI interfaces are affected:

Old name new name
MPI_TYPE_EXTENT MPI_TYPE_GET_EXTENT
MPI_TYPE_HINDEXED MPI_TYPE_CREATE_HINDEXED
MPI_TYPE_HVECTOR MPI_TYPE_CREATE_HVECTOR
MPI_TYPE_STRUCT MPI_TYPE_CREATE_STRUCT

The MPI_TYPE_STRUCT has been replaced by MPI_TYPE_CREATE_RESIZED.

Back to Contents


4. Remove the Coarse Radiation Grid

(by Ulrich Schättler, DWD)

Some time ago the coarse radiation grid has been implemented into COSMO to save computational time for the radiation. Since introduction of the blocked data structure for the physics the implementation of this coarse radiation grid became very complicated.

To compute the necessary input fields for the radiation, the copy-in/copy-out mechanism of the blocked data structure was not use, to allow also the computation of this coarse grid. All COSMO variables were used in the ijk-data structure to compute the radiation input variables in the blocked data structure. Also, all output variables of the radiation scheme, which are needed in the ijk-structure were directly computed in this structure.

But with introduction of the blocked data structure the computational savings became very limited due to the better cache use of the blocked structure. Therefore it was decided to remove the coarse radiation grid again.

Now we use the copy-in mechanism and register all COSMO ijk-fields for the radiation, that are necessary to compute the input variables for the radiation. But we left the computation of the output variables in the ijk-structure, as most of these fields are not used in other parameterizations.

The modules radiation_utilities.f90 and radiation_interface.f90 have been adapted to work with the blocked input data now.

Removal of Namelist variables in group /PHYCTL/: nradcoarse, lradf_avg have been removed.

Back to Contents


5. Modified Hailcast Variable Names

(by Ulrich Schättler, DWD))

Official GRIB 2 meta data have been assigned to the new hailcast variables. In order to better fit into the naming conventions, their shortnames have been modified. The following table lists the new and the former name, together with the GRIB meta data (GRIB1: indicatorOfParameter (ee), table2Version (tab); GRIB2: discipline, parameterCategory, parameterNumber, typeOfStatisticalProcessing):

New name Old name GRIB 1 GRIB 2
eetab disccatnrStatProc
DHAIL_AV DHAILAVE136250 012380
DHAIL_SD DHAILSTD137250 012386
DHAIL_MX DHAILMAX138250 012382
W_UP_DUR WUPDUR 139250 02210-
W_UP_MASKWUPMASK 140250 02211-

The names had to be changed in the files src_setup_vartab.f90, organize_data.f90 and src_output.f90.

Also the Namelist INPUT for the hailcast test has been modified accordingly. The file YUCHKDAT has been updated, because of changing names.

Back to Contents


6. Changes in SPPT

(by Carlos Osuna, Andre Walser, MCH))

If targeted diffusion is turned on, the behaviour of SPPT has been changed:

New namelist variable in group /EPSCTL/: hinc_reset_pm (default: 0): increment for resetting pertstoph_mask (in hours)

Changes to the results: Results might change if SPPT is on

Back to Contents


7. COSMO-EULAG

(by Damian Wojcik, IMGW))

Implemented some fixes:

Back to Contents


8. Update CPP Dycore to GRIDTOOLS 2.0

The CPP Dycore has been adapted to work with GRIDTOOLS 2.0. This change is bit-reproducible comparing GPU to GPU.

Back to Contents


9. Update of OpenACC implementation for PGI Compiler 20.4

Modifications to compile and run COSMO with PGI 20.4. There are two fixes in PGI 20.4 that improve overall performance of COSMO by around 10% compared to PGI 19.9. These are:

To compile COSMO with PGI 20.4 and make use of these fixes we have to make a few changes:

Back to Contents


10. Technical Changes and Bug Fixes

Back to Contents


11. Changes to the Namelists

Group Name Meaning Default
/RUNCTL/ itype_pert NEW For adding random perturbations to prognostic fields.
  1. None (default).
  2. Adding perturbations at initial step only.
  3. Adding perturbations at every step.
0
rperturb NEW Coefficient for adding perturbations. 1.0 * rprecision
l_t_check NEW If .TRUE., check plausibility of temperature against US standard atmosphere. .FALSE.
/PHYCTL/ itype_hydmod NEW Type of soil water transport and ground water runoff:
  1. Standard (default).
  2. Modified formulation that allows ground water buildup (Schlemmer et al. 2018, https://doi.org/10.1029/2017MS001260).
0
lsoil_init_fill NEW Filling of lowermost active soil layer at initialization. This determines if the groundwater should be filled up for the hydrologically passive layers (.TRUE.) or not.
  • If you start your run from a soil-moisture distribution derived using itype_hydmod=0, this variable should be set to .TRUE.
  • If you restart the model or initialize the model with a soil-moisture distribution derived using itype_hydmod=1 it should be set to .FALSE.
.
.FALSE.
nradcoarse, lradf_avg DELETE Variables used for the coarse radiation grid.
/EPSCTL/ hinc_reset_pm NEW Increment for resetting pertstoph_mask (in hours) 0

Back to Contents


12. Changes of Results

Data Assimilation:

Results may be changed slightly if radiosonde descent or aircraft observations are assimilated.

SPPT:

Results might change, if SPPT is on

Back to Contents