This version of INT2LM can interpolate data from DWD's new global model ICON to the COSMO grid. ICON is a non-hydrostatic simulation model, which works on an icosahedral global grid. The interpolation is working similar to GME ⇒ COSMO, but there are a few specialities, which are explained below:
To activate ICON ⇒ COSMO in the INT2LM, INT2LM has to be compiled and linked with the NetCDF library. Therefore the pragma -DNETCDF has to be specified for compiling.
ICON forecast data can be given as GRIB2 or as NetCDF files. If GRIB2 is used, INT2LM has to be compiled and linked with the grib_api library. Therefore the pragma -DGRIBAPI has to be specified for compiling.
Reading and interpolating ICON forecast data is implemented in an extra module src_icon_interpol.f90.
The computation of the ICON grid is very expensive (in the order of hours!) and cannot be done by INT2LM. Therefore we read all grid specifications from an external grid file. This file is available only in NetCDF format!
There are two new Namelist variables in the group /GRID_IN/ to specify the ICON grid file and information:
Group | Name | Meaning | Default |
---|---|---|---|
/GRID_IN/ | yicon_grid_cat | Directory of the NetCDF file describing the horizontal ICON grid. | ' ' |
yicon_grid_lfn | Name of the NetCDF file describing the horizontal ICON grid. | ' ' |
In addition, the following namelist variables have to be set in /GRID_IN/:
Group | Name | Meaning | Default |
---|---|---|---|
/GRID_IN/ | ke_in_tot |
number of vertical levels of ICON data: ke_in_tot has to be specified to the number of levels originally used to compute the ICON data, regardless whether ICON vertical levels are skipped by using nlevskip > 0 (see below). Example: If ICON was run with 90 levels, ke_in_tot has to be set to 90 even if you use nlevskip > 0 and your ICON data input file may or may not contain less than 90 levels. |
60 |
nlevskip (optional) |
number of missing levels in input grid:
With nlevskip, the number of vertical layers actually used for computations
can be decreased (counted from model top) to save computing time and memory.
nlevskip has to be smaller than the level index of the first ICON model layer
above the intended COSMO-Model domain. Note that, if using ICON grib2-input format, different values of nlevskip might lead to slightly different results because of the vertical cubic spline interpolation. |
0 |
For every COSMO domain a special ICON grid file will be created, which covers just the specified COSMO domain.
NOTE: This is a new feature. For all other driving models, INT2LM can compute the corresponding grids and takes necessary information from namelist input.
An ICON external data file is needed, which contains the land-sea-mask (FR_LAND) and the ICON soiltyp (SOILTYP) used. Up to now the external file can only be given as NetCDF File.
Also for GME an external file must be specified, but while the GME external file contains the global fields, the ICON external file only contains the fields for a specified COSMO domain, which must correspond to the horizontal grid determined by the ICON grid file (see 2).
The following namelist variables in /DATA/ have to be specified:
Group | Name | Meaning | Default |
---|---|---|---|
/DATA/ | yinext_cat | directory which contains file with ICON external parameters | ' ' |
yinext_lfn | name of the file with ICON external parameters | ' ' | |
yinext_form_read (optional) |
only 'ncdf' possible at the moment. | 'grb1' |
Note that it is not possible to interpolate the ICON external parameters to the COSMO grid. The namelist setting ylmext_lfn = 'interpolate' is not possible with ICON as input model.
ICON as a non-hydrostatic model also uses the new general vertical coordinate (similar to COSMO). To specify the vertical ICON grid, a field called HHL (height of half levels) is necessary for the computations.
HHL can either be available in the first ICON data file, or it must be given by a separate file. The filename of an extra file must be given in namelist group /DATA/ by the variable:
Group | Name | Meaning | Default |
---|---|---|---|
/DATA/ | yin_hhl | name of the input HHL file | ' ' |
The file has to be in the directory yinext_cat, specified for the external parameters.
NOTE: The optional file containing ICON's HHL field has to be in GRIB2 format.
ICON forecast data can be given in GRIB2 or in NetCDF. DWD will only provide GRIB2 data.
The fields necessary from ICON are the same that are necessary from GME, but an additional field for the ground temperature (T_G) is needed.
Fields necessary to produce initial data for the COSMO-Model:
Fields necessary to produce boundary data for the COSMO-Model:
Group | Name | Meaning | Default |
---|---|---|---|
/CONTRL/ | nproma_icon |
Chunk length for ICON fields internally used: With this variable, the size of the innermost loops for ICON variables can be adjusted. On cache based processors, a small value (8-16) is beneficial, while on vector processors, a value representing the machine internal vector length (e.g. 256 for NEC-SX9) would be used. |
8 |
Remark:
|
|||
lcheck_uuidOfHGrid |
To check the unique universal Identifier for ICON's horizontal grid: If .TRUE., the UUID of the records contained in the ICON grid file is checked against the UUIDs of the records read from the ICON forecast data. If they do not match, INT2LM aborts, because it must be assumed that different grids are used. |
.TRUE. | |
Remarks:
|
|||
l_use_vn | Use the normal velocity (VN: velocity normal to edges) instead of wind components U and V. | .FALSE. | |
Remark:
|
The way how INT2LM and the COSMO-Model will work with GRIB2 has been modified compared to versions INT2LM 2.0 and COSMO-Model 5.0. Instead of reading and writing an external file with HHL, this field will be exchanged between INT2LM and the COSMO-Model and also within the COSMO assimilation cycle as a 24-bit packed GRIB2 record in the laf-files.
Also the full pressure will be used instead of the pressure deviation, but also as a 24-bit packed GRIB2 record.
But still an extra file has to be read for getting the HHL fields of the COSMO domain, to get the correct UUID of the vertical grid. A special file could be produced for that, or a laf-file from a former run could be used.
Modified files:
When reading COSMO-Model data from an ensemble using grib_api, some wrong keys were used in src_read_coarse_grid, because only grib2 keys were used here. Now we distinguish between GRIB1 and GRIB2.
Variable | GRIB1 Key | GRIB2 Key |
---|---|---|
iepstyp_bc | localEnsembleIdentification | localTypeOfEnsembleForecast |
iepsmem_bc | localActualNumberOfEnsembleNumber | perturbationNumber |
iepstot_bc | localNumberOfEnsembleMembers | numberOfForecastsInEnsemble |
Writing ensemble mode in INT2LM:
The order of setting the keys had to be adapted, because the same problem occured
as in the COSMO-Model while coding the new general vertical coordinate:
the productDefinitionTemplateNumber has to be set after the typeOfLevel,
while for all other level types it is set before. But otherwise there were problems
for coding the levels of the multi-layer soil model.
(Changes done in src_lm_output.f90.)
Do not set level types for the FLake variables. These are only set implicitly by the shortName. (Changes done in src_lm_output.f90)
The vertical coordinate parameters still were read from the first GME record, whether it was a hybrid/hybridLayer or not. Now they are only read from records with typeOfLevel = hybrid/hybridLayer. This needed some more coordination of the parallel program. (Changes done in src_gme_interpol.f90)
In the GRIB2 coding of the grid values, the original keys are now used instead of the derived keys with "InDegrees" because of possible rounding problems. Also, the keys "iDirectionIncrement" and "jDirectionIncrement" are now set per record, and not only for the sample grib record, because the cloning process did modify the values (most probably also rounding effects in grib_api; seen only on few compilers).
A slightly modified version of the SLEVE coordinate has been introduced as vertical coordinate type ivctype = 4.
Source files adapted:
During this work, a bug has been corrected also for ivctype = 3:
The computation of hsurfs_gl by splitting hhl_gl is not correct!
The hhl_gl field is constructed using a linearly interpolated version of the
hsurfs_in field and since the filter is defined in grid point space, also
hsurfs_gl must be linearly interpolated from hsurfs_in.
This is done now in src_read_coarse_grid.f90
Introduced a new namelist variable hmax_sea in the group /CONTRL/.
Group | Name | Meaning | Default |
---|---|---|---|
/CONTRL/ | hmax_sea |
Maximal height in coastal areas, below which no filtering is done for sea points. This variable influences the filtering of the orography in coastal areas for grid points, which have a fraction of land less than 0.5 (sea points), but are given an orography height higher than 0.0. If such a grid point is surrounded by enough other sea points, and if the orography height is not heigher than hmax_sea, the filtered value is set back to the original height of the orography. (0 ≤ hmax_sea ≤ 20.0) |
10 |
This variable influences the filtering of the orography in coastal areas for grid points, which have fr_land < 0.5 (sea points), but are given an orography height > 0.0. If such a grid point is surrounded by enough other sea points, and if the orography height is not heigher than hmax_sea, the filtered value is set back to the original height of the orography.
Interpolation of number densities has been implemented into INT2LM. These are needed for the 2-moment microphysics scheme, but also for a new microphysics scheme under development.
New namelist parameters in group /CONTRL/:
Group | Name | Meaning | Default |
---|---|---|---|
/CONTRL/ | lprog_qni | Compute initial and boundary values for the number densities QNICE. | .FALSE. |
lprog_qn_crsg | Compute initial and boundary values for the number densities QNCLOUD, QNCLOUD, QNRAIN and QNSNOW. | .FALSE. |
For these variables, the vertical interpolation is done linearily, not by the usual cubic tension splines.
Similar to the COSMO-Model, the module kind_parameters has been introduced and the KIND parameter for real variables (ireals) has been replaced by wp (working precision). Also, the KIND parameters for integer variables (iintegers) has been removed in most modules and replaced by the standard integer. Only in modules also used in the COSMO-Model, iintegers is still present.
NOTE:A real single precision mode has not been tested with INT2LM.
The new module mpe_io2.f90, which has been introduced in the COSMO-Model in version 4.25, has now been introduced also in the INT2LM. But note that not all input for INT2LM is implemented to use this module: Reading GME data is done only by compute PE 0 using direct library calls to DWDLIB or grib_api.
Also the read-ahead mechanism has not been implemented in INT2LM.
The namelist group /DATABASE/ has been eliminated from the input of the INT2LM.
Modified files:
In the following all changes to the Namelists are listed:
Group | Name | Meaning | Default |
---|---|---|---|
/CONTRL/ | yinput_model | New value:'ICON': To activate interpolation of ICON data to the COSMO grid. | ' ' |
nproma_icon |
Chunk length for ICON fields internally used: With this variable, the size of the innermost loops for ICON variables can be adjusted. On cache based processors, a small value (8-16) is beneficial, while on vector processors, a value representing the machine internal vector length (e.g. 256 for NEC-SX9) would be used. |
8 | |
lcheck_uuidOfHGrid |
To check the unique universal Identifier for ICON's horizontal grid: If .TRUE., the UUID of the records contained in the ICON grid file is checked against the UUIDs of the records read from the ICON forecast data. If they do not match, INT2LM aborts, because it must be assumed that different grids are used. |
.TRUE. | |
l_use_vn | Use the normal velocity (VN: velocity normal to edges) instead of wind components U and V. | .FALSE. | |
lprog_qni | Compute initial and boundary values for the number densities QNICE. | .FALSE. | |
lprog_qn_crsg | Compute initial and boundary values for the number densities QNCLOUD, QNCLOUD, QNRAIN and QNSNOW. | .FALSE. | |
hmax_sea |
Maximal height in coastal areas, below which no filtering is done for sea points. This variable influences the filtering of the orography in coastal areas for grid points, which have a fraction of land less than 0.5 (sea points), but are given an orography height higher than 0.0. If such a grid point is surrounded by enough other sea points, and if the orography height is not heigher than hmax_sea, the filtered value is set back to the original height of the orography. (0 ≤ hmax_sea ≤ 20.0) |
10 | |
/GRID_IN/ | yicon_grid_cat | Directory of the NetCDF file describing the horizontal ICON grid. | ' ' |
yicon_grid_lfn | Name of the NetCDF file describing the horizontal ICON grid. | ' ' | |
/LMGRID/ | ivctype | New value:4: Generalized SLEVE coordinate with a modified vertical decay of the topographic signature with height. | 2 |
/DATABASE/ | This group has been eliminated! | 2 |
There are no changes of results for running with driving models GME, IFS and COSMO!