4.25 hopefully is one of the last big steps to COSMO-Model 5.0. Several bigger modifications have been implemented, e.g. the new tracer module, the possibility for asynchronous NetCDF I/O and a modified and optimized asynchronous GRIB(1) I/O.
A generic handling of Tracers has been implemented into the COSMO-Model. This handling is already implemented for the microphysics tracers: qv, qc, qi, qr, qs and qg
A detailed documentation of how to use this new tracer module will be published soon as a COSMO Technical Report.
Only the interfaces to the 2-moment scheme (together with some other necessary changes) have been implemented to the COSMO-Model using ifdef TWOMOM_SB (two-moment scheme from Seifert and Beheng). If this parameter is not defined during compilation, the model does not change at all.
To get the source code and further documentation of the code, please contact the colleagues at DWD.
The module mpe_io.f90 serves a number of GRIB1 I/O related purposes in the COSMO-Model.
There have been several changes now to the asynchronuous GRIB1 I/O module mpe_io.f90. Because of these changes also some interfaces have been modified. Therefore we decided to choose a new name for this module: It is now called mpe_io2.f90 (other models at DWD still use mpe_io.f90).
The modifications are:
New Namelist parameter in /IOCTL/:
Group | Name | Meaning | Default |
---|---|---|---|
/IOCTL/ | lprefetch_io | Enables reading of boundary files ahead of time, i.e. when the forthcoming I/O operation will be reading a GRIB file, then this can be done simultaneously with the preceding compute steps. Prefetching can only be enabled with true asynchronous I/O. (lasync_io=.TRUE.) | .FALSE. |
An asynchronous solution for output of NetCDF files has been implemented. By namelist configuration, asynchronous I/O for NetCDF can be enabled reserving some dedicated I/O PEs that will receive output levels from compute PEs and record them (asynchronously) into disk.
The switch lasync_io is used to enable the asynchronous mode. There are two new namelist switches, to control the configuration of the asynchronous Netcdf I/O in the group /RUNCTL/:
Group | Name | Meaning | Default |
---|---|---|---|
/RUNCTL/ | num_asynio_comm | To choose the number of asynchronous I/O communicators for NetCDF. With several communicators it is possible to parallelize the output over the files to be written (the GRIBOUT namelists). | 0 |
num_iope_percomm | To choose the number of asynchronous I/O processes per communicator for NetCDF I/O. With several processes per communicator it is possible to do a parallel writing of single files. This is only possible, if the parallel NetCDF library is available and the code has been compiled with the preprocessor directive -DPNETCDF | 0 |
If both namelist switches are > 0, and lasync_io=.TRUE., asynchronous NetCDF I/O is selected as I/O strategy. Note, that the code for sequential netcdf I/O (lasync_io=.FALSE.) has not been modified.
NOTE:
Using num_iope_percomm=1 and nc_asyn_io=1 may give good performance results in most of the cases where the amount of data being written is moderate.
A switchable gathering of vertical levels (2D fields) on the compute PEs has been implemented. Up to now a communication is started for every level. The new option allows to gather nproc levels at the same time (where nproc is the number of processors used).
To choose the desired option, a new Namelist switch itype_gather has been implemented in the group /IOCTL/:
Group | Name | Meaning | Default |
---|---|---|---|
/IOCTL/ | itype_gather | To choose the type of gathering output fields:
|
1 |
The new option has been tested using debug options to give bit-reproducible results for a run with original code, a run with new code using itype_gather=1 and a run with new code using itype_gather=2. The benefit of using this optimization for a full COSMO-2 24h forecast on a Cray is a decrease of the total simulation time by 8%.
On the NEC SX-9 with using only 16 CPUs, no significant changes can be seen between the two options (Uli Schaettler).
To avoid numerical instability caused by very low snow surface temperatures in the case of very thin snow heights, a minimal critical value of snow height is introduced which depends on the timestep and on the heat fluxes through the upper and lower boundaries of snowpack. If snow height is smaller than this critical value, the multi-layer snow model switches to an algorithm similar to single-layer snow model.
The correction of the surface outgoing long-wave radiation flux with due regard for the low frequency of the radiation routine calls is introduced. The call of the subroutine "normalize" is eliminated in order to reduce computational costs. Its functionality is transferred to the subroutine "terra_multlay"
This is a REAL field, but contains values that should be INTEGERs. In several routines comparisons with integer values are done. All these comparisons are now implemented with NINT (soiltyp)
All calls to exchg_boundaries contain a tag for the identification of the message. In most calls this tag is connected to the time step of the model and in case of climate runs this could be a very large number.
Some MPI implementations have a strict handling of the maximal value a tag can have and the model is running into problems here. Therefore all calls were changed and the time step ntstep has been changed by a variable nexch_tag, which is set as MOD (ntstep, 24*3600/INT(dt)).
An interface has been implemented for the IFS convection scheme in organize_physics using conditional compilation: ifdef CLM
The source code of the scheme itself is not distributed with the official COSMO versions, but has to be obtained by the CLM community. If the code is compiled with -DCLM, the IFS convection scheme can be activated by setting itype_conv=2.
If itype_conv=2 is chosen, the averaging of the convective forcing cannot be activated, lconf_avg has to be .FALSE. then. If it is .TRUE., the model resets it to .FALSE. again.
Official Grib1 numbers have been given to the variables of the multi-layer snow model: Up to now these variables had been given element numbers from table 250, which is used at MeteoSwiss, and the new vertical level type 211. This level type is now officially accepted by WMO. But the element numbers are now chosen according to the variable, i.e. T_SNOW_MUL has the same element number as T_SNOW, but just a different level type: And all variables just get an '_M' to indicate the multi-layer variable.
For the 2-Moment scheme, one new field for the total vertically integrated hail content has been introduced.
Name | Meaning | iee | itabtyp | ilevtyp |
---|---|---|---|---|
T_SNOW_M | Snow temperature | 203 | 201 | 211 |
H_SNOW_M | Snow depth in m (per layer) | 66 | 2 | 211 |
RHO_SNOW_M | Snow density in kg / (m**3) | 133 | 201 | 211 |
W_SNOW_M | Water equivalent of accumulated snow | 65 | 2 | 211 |
WLIQ_SNOW_M | Liquid water content in the snow | 137 | 201 | 211 |
TQH | Total hail content vertically integrated | 136 | 201 | 211 |
There were new Namelist variables in the following groups:
Group | Name | Meaning | Default |
---|---|---|---|
/RUNCTL/ | num_asynio_comm | To choose the number of asynchronous I/O communicators for NetCDF. With several communicators it is possible to parallelize the output over the files to be written (the GRIBOUT namelists). | 0 |
num_iope_percomm | To choose the number of asynchronous I/O processes per communicator for NetCDF I/O. With several processes per communicator it is possible to do a parallel writing of single files. This is only possible, if the parallel NetCDF library is available and the code has been compiled with the preprocessor directive -DPNETCDF | 0 | |
/IOCTL/ | lprefetch_io | Enables reading of boundary files ahead of time, i.e. when the forthcoming I/O operation will be reading a GRIB file, then this can be done simultaneously with the preceding compute steps. Prefetching can only be enabled with true asynchronous I/O. (lasync_io=.TRUE.) | .FALSE. |
itype_gather | To choose the type of gathering output fields:
|
1 |
The following changes influence the results: