For ICON as driving model, the height of the boundary layer was hard-wired at 80-nlevskip, which is acceptable for 90 vertical ICON levels. The ICON EU nest only has 60 levels at all. Therefore the following procedure was implemented to search for a layer around the above top of the boundary layer:
The ICON pressure fields are already horizontally interpolated to the COSMO grid and are accessible via (pp(:,:,k)+p0_gl(:,:,k)). A search is done from top to bottom (k=1,...,ke_in), to get the first level, where the maximum of the pressure is larger than 850 hPa. This layer is taken as height of the boundary layer.
(Question: Could this procedure also be taken for llm2lm, lum2lm?)
With the earlier implementation of grib_api (use of local shortname concept, local use sections) it was not possible for centers /= DWD (WMO Code 78) to use GRIB2. Modifications have been implemented, which now allow all centers to run with grib_api (in src_lm_output.f90):
- remove local section before changing the center and set it again afterwards
- set localInformationNumber in local section also for other centers
- use key "backgroundProcess" instead of backgroundGeneratingProcessIdentifier
Also there have been changes to the grib2 definition files that have to be used together with grib_api. These changes are first implemented for the DWD definition files (definitions.edzw) of grib_api-1.13.1.
Some of these definition files are especially written for center=78 (DWD), e.g. local.78.def or grib2LocalSectionNumber.78.table. For other centers we provide a script, which creates links with the centers WMO number to the DWD files, e.g. for the center COSMO=250:
- grib2LocalSectionNumber.250.table -> grib2LocalSectionNumber.78.table
- local.250.def -> local.78.def
In this way all centers can use INT2LM (and COSMO-Model) together with grib_api and the DWD definition files.
Up to now the representative grid distance for the RBF-interpolation of ICON data was hardwired to 13000 meters, but this is not a good solution for other ICON resolutions.
Now the grid specifiation parameters RxxByy are read from the grid file and the grid distance is now computed from these parameters with the correct formula as described in the "ICON database reference manual".
However, for early versions of the ICONSUB program to cut out ICON data for a subregion (minimize data transfer to external partners), these parameters (root division and number of bisections) were not transferred to the grid file of the subregion. To mitigate this, two new namelist parameters „nrootdiv_icon“ (grid_root, xx) and „nbisect_icon“ (grid_level, yy) were introduced, to specify these parameters by namelist. If they are neither found in the grid file nor explicitly in the namelist, an error message (something with "grid_root" or "grid_level") is issued and INT2LM aborts.
If the grid file contains these parameters, they are overtaken from there and overwrite any namelist settings.
Modified file(s):
- data_grid_in.f90:
New namelist parameters nrootdiv_icon and nbisect for ICON grid definition.
- icon_model_domain.f90:
Read new parameters nrootdiv_icon and nbisect_icon from the ICON grid file. If not contained there, overtake their namelist settings.
New subroutine calculate_grid_dist(), which computes the representative ICON grid distance from the RXXBYY grid specification.
- src_namelists.f90:
New namelist parameters nrootdiv_icon and nbisect_icon for ICON grid definition.
The ICON- and COSMO- input contains the full pressure, so a hardcoded reference atmosphere (equals the default) is used to compute PP, which is then horizontally and vertically interpolated. Later, it is checked if the desired reference atmosphere for COSMO output is the same. If not, the PP values are adjusted accordingly. However, here only the itype_refatm was checked for equality, but not the other related parameters (t0sl, p0sl, delta_t, h_scal). As a consequence, the output PP for COSMO is for a wrong reference atmosphere and may lead to totally wrong pressure fields in COSMO!
Modified file(s):
- src_vert_inter_lm.f90:
BUGFIX: Corrected a wrong equality check of input and output reference atmosphere. This failed when both had the same irefatm but differing other parameters. As a consequence, the output pp is for a wrong reference atmosphere and may lead to totally wrong pressure fields in COSMO!
QV_S (qv at surface) on the COSMO orography is computed from interpolated values of the relative humidity at ground level (rh_s_gl) of the coarse model and the T_G (interface temperature) at the COSMO orography. But the computation of rh_s_gl itself for the coarse model was based on T_S (soil surface temperature). This is wrong for (partially) snow covered areas. Now also the coarse models use T_G instead of T_S.
Modified file(s):
- src_coarse_interpol.f90, src_gme_interpol.f90, src_icon_interpol.f90:
Compute relhum. at ground level (rh_s_gl) using t_g instead of t_s.
In case of asynchroneous IO, the ready file to indicate that a certain initial- or boundary data time step is completed, was written after the root processor had completed its share of ouptut, not when all processors were done. This lead to crashes in the DWD operational chain, because COSMO wanted to read empty boundary files and has been corrected.
Modified file(s):
- src_lm_output.f90:
Writing of ready files now by "write_ready_final()" from io_utilities.f90. This correctly takes into account parallel asynchroneous IO.
In this case, the full pressure P is contained in the input data, and a reference atmosphere is needed to decompose P into P0 and PP. The exact type of this reference atmosphere is arbitrary at this point. Up to now, simply the same reference atmosphere as for the output data (specified by the respective namelist parameters) has been used. This fails however, if irefatm=1 for the output has been chosen, but the input model top is above the finite maximum height of this reference atmosphere, which is around 25 - 30 km, depending on t0sl, p0sl and dt0lp. This is now checked, and if it is the case, it is switched to irefatm=2 for the input data, which does not have a finite upper height.
Modified file(s):
- src_read_coarse_grid.f90:
Switch to reference atmosphere 2 for COSMO grib2 input data, if ref. Atm. 1 is chosen for the output data and the model top of the input data is above the finite height of ref. atm. 1 minus 1000 m.
- io_utilities.f90:
The subroutine read_gribapi has been unified with the version in the COSMO-Model (INT2LM contained a special implementation of asynchronous I/O, which has been removed again). Therefore the interfaces in the following modules have to be adapted (removed argument my_cart_id):
- src_icon_interpol.f90
- src_read_coarse_grid.f90
- src_read_ext.f90
- src_read_hhl.f90
- data_parameters.f90:
This module has been written now in the same way as in the COSMO-Model (removed ireals, USE wp, sp, dp from kind_parameters).
- src_2d_fields.f90:
Replaced zcf_snow in tgcom() by global cf_snow
- src_gme_interpol.f90:
Extended floating format for YUCHKDAT
- src_lm_output.f90:
Extended floating format for YUCHKDAT.
Bugfix: proper initialization of iloc_table below and added a CYCLE, if
iloc_table(izlist) points to a field that is in the input but that is
not needed for output.
- src_vert_inter_lm.f90:
Determination of boundary layer height for ICON adjusted to arbitrary vertical level number of ICON.
- src_icon_interpol.f90:
Extended floating format for YUCHKDAT.
- data_grid_in.f90:
New namelist parameters nrootdiv_icon and nbisect_icon for ICON grid definition.
- icon_atmo_model.f90:
New call to subroutine calculate_grid_dist(), which computes the representative grid distance based on the RXXBYY ICON grid specification.
The parameters XX and YY are taken either from the grid file (grid_root and grid_level) or, if not contained there, from the namelist parameters nroodiv_icon and nbisect_icon.
- external_data.f90:
Eliminated dependency on subroutine nearest_neighbors_bfs
- icon_interp_utilities.f90,
Corrected search for a nearest neighbor to work on a regional ICON domain (in Subroutine nearest_neighbors_bfs) (FP).
Made accessibility of types, type components and corresponding variables consistent. (some variables were public, but their type or some components were private)
- icon_model_domain.f90:
Made accessibility of types, type components and corresponding variables consistent
(some variables were public, but their type or some components were private)
Use of netcdf-library: use nf90 names of subroutines directly instead of linking
them to their old nf-names in the USE statement
- int2lm_org.f90:
Memory for external parameters may only be deallocated, if not running
in climate mode (is still needed in climate mode)
- src_cleanup.f90:
Moved deallocation of w_intpol, n_intpol, m_intpol, l_intpol (only needed for GME) out of a llm2lm-block
- src_coarse_interpol.f90:
Avoid horizontal interpolation of HHL, in case it is read from driving model together with all other data
- src_namelists.f90:
Corrected comments for variables czml_xxx variables, which are defined for main layers
- src_read_coarse_grid.f90:
Removed test print outs.
Extended floating format for YUCHKDAT.
- src_read_ext.f90:
SR read_coarse_grid_icon must only be executed for ifdef NETCDF (otherwise error).
There are 3 additional namelist variables:
/DATA/:
- yicon_input_prefix (character*32, default: "igfff")
For ICON data: Prefix of the input data. ICON data do not have strict prefixes for analysis- and forecast-data and do not follow the COSMO logic in this respect. For int2lm, we expect the ICON data to consist of the prefix given in the namelist variable yicon_input_prefix, followed by a forecast time stamp, e.g.,
igfff00000000
igfff00030000
igfff00060000
igfff00090000
…
If this should be not the case with your data, rename your files accordingly or create links using the above name convention.
/GRID_IN/:
- nrootdiv_icon, nbisect_icon (integer, default: -99, the missing value)
Grid specification parameters of ICON (RxxByy) where nrootdiv_icon is "xx" and nbisect_icon is "yy". Only relevant if these parameters are not contained in the ICON grid files. This is the case for regional cut-out files, which have been generated by the ICONSUB utility prior to May 1, 2015. Such files have been distributed to many external partners worldwide.
Therefore, all users should specify these parameters explicitly, just to be sure about them.
If these parameters are neither found in the grid file nor explicitly in the namelist, an error message (something with "grid_root" or "grid_level") is issued and INT2LM aborts.
If the grid file contains these parameters, they are overtaken from there and overwrite the namelist settings.
There are changes of results:
1) Running with ICON-data:
- if, when using the default reference atmosphere (2), at least one of the parameters t0sl, p0sl, delta_t, h_scal is changed from its default setting (this is the case for, e.g., the "tropical setup").
- QV_S will be different for fully and partly snow covered areas
- Slight changes in all fields, because the length scale for the RBF-interpolation does no longer scale with a constant 13000 meters, but with the correct representative grid distance of ICON. In case of R03B07, this is slightly larger (~13150 meters).
2) Running with GME and other global model data:
- QV_S will be different for fully and partly snow covered areas