FE 13 - COSMO-Model System: Interpolation Program INT2LM
11.03.2011
There were several new versions of the INT2LM in the last year with various developments.
After reaching a certain stability again, Version 1.18 is now distributed to the users.
- Modifications (grouped by subject)
- Bug Fixes and Miscellaneous
- Technical Adaptations
- Changes in the Namelists
- Changes of the Results
In the near future, the grib_api from ECMWF will replace the DWD grib(1)
library. With grib_api it is possible to read and write Grib 1 and Grib 2
data. In a first step, grib_api has been implemented in INT2LM only for
reading data.
All references to grib_api routines have been encapsulated with the pragma
#ifdef GRIBAPI. To activate these calls, -DGRIBAPI has to
be specified for the compilation.
NOTE: This implementation must use grib_api-1.9.0 or higher.
To read grib data with grib_api can be specified by the Namelist parameters
- yinext_form_read = 'grax' (other already existing value: 'grb1', 'ncdf')
- yin_form_read = 'grax' (other already existing value: 'grb1', 'ncdf')
Setting these parameters to 'grb1' will activate the DWD grib library which only
can read grib1. Setting these parameters to 'grax' will activate the grib_api.
For reading data, it must not be specified, whether grib1 or grib2 is read, because grib_api will
detect that on its own (therefore the "x").
To read the external COSMO-Model parameters is not yet possible with grib_api. This will be
implemented at a later stage.
A number of changes were necessary to implement grib_api. Here are the highlights:
- Modification of the (grib) variable table for input data in src_gribtabs.f90:
Another element was introduced in the data structure ar_des_input:
CHARACTER (LEN=30) :: ylevtyp ! name of level type
to store the level type in a character string. While in grib1 a product is identified by
tabtyp,ee,levtyp, in grib2 the name and the level type (in characters) are used.
- We already unified the different setup_vartab_xxx routines for the different
input models to one routine setup_vartab_grid_in. A common setup of the
variable table is defined first, and changes for the different grids are
done at the end of this subroutine.
- Module io_utilities.f90:
- Extensions in subroutine open_file and close_file to handle grib_api I/O
- New subroutine read_grib_api to get grib messages using grib_api calls
- New subroutine check_input_grid, which unifies the former subroutines check_xx_grid.
- This subroutine now also uses grib_api calls to get grib meta data from the grib messages.
- Modifications to subroutine check_gme_grid (which remains) to get grib meta data
using grib_api calls.
- The modules src_gme_interpol.f90, src_read_coarse_grid.f90 and
src_read_ext.f90 have been extended to
- open / close grib files
- read grib messages
- get meta data
- and unpack the grib records
using grib_api calls.
Running the INT2LM using grib_api
To learn more about grib_api, please take a look at the manual, which you
can find on the web page of ECMWF:
http://www.ecmwf.int/publications/manuals/grib_api/index.html
The implementation of grib_api in INT2LM is done using the concept of
the short names. To run the INT2LM with grib_api therefore requires the usage
of some grib_api tables. The tables for Version 1.9.5 are distributed with the
new int2lm version as they are used by DWD. (These tables should also work with other 1.9.x
versions of grib_api).
To use these tables, a grib_api environment variable has to be specified before
running INT2LM:
export GRIB_DEFINITION_PATH=..../TABLES_1.9.5_COSMO/definitions.edzw:.../TABLES_1.9.5_COSMO/definitions
While testing this new INT2LM version, there were some problems recognizing
certain variables, because the centre=78 (which means DWD) was specified
for these variables, and when another centre has been specified in the GRIB file
(what is of course done by all other COSMO centres), this did not match.
Therefore we modified the tables now in a way, that it should be possible to
use them in other centres. We are still in the process of learning about grib_api
and maybe these tables and their usage might change in the near future.
Back to Contents
The computation of surface values for isolated points (lakes in the land;
islands in the oceans) was looking up to now for the next grid point with the same
land-sea-mask. Depending on the domain decomposition, this could
lead to different points.
Now, all isolated land points are identified at the beginning of the
program, and for every isolated point, the next grid point in the total
domain of the coarse grid is searched and saved (in subroutine external_data,
Section 4.6: Test whether isolated points are present). All information
on these isolated points are gathered in the variable globl_iso_points,
which is of the structure struct_for_isolated, defined in data_profiles.f90.
In the subroutine interp_l in module interp_utilities.f90, the values of the
special field at the isolated points are gathered from every processor
and are given to all processors, if a "match" interpolation is done.
In the loops over the grid points, the search for the next grid point
with same land-sea-mask is then replaced by just putting the exchanged
variables to the proper COSMO grid points.
This procedure changes the results for the surface variables compared to
former versions and can also influence the atmosphere, because t_s
is used as lower boundary condition for vertical interpolation of temperature.
Back to Contents
Some problems have been reported for the options lec2lm and llm2lm
which were related to the subroutine coor_coarse_grid_lm in the
module src_grids.f90. Therefore, the following modifications have
been implemented:
- While introducing the decomposition independent computation of the
interpolation weights, it was forgotten to take care of a non-staggered
grid like the one from IFS.
(fixed by Stephan Pfahl from ETZ)
- The computations of the interpolation weights has been corrected:
In some cases, when input grid point and COSMO grid point are identical,
it could happen that unrealistic high interpolation weights had been
computed. Now it is ensured that these weights are between 0 and 1.
- The computations of lat and lon-values for the COSMO-model grid points
have been modified to use the startlat_tot, startlon_tot values instead
of startlat, startlot to be domain decomposition independent.
Back to Contents
The possibility to switch the reference atmosphere from the incoming to the
outgoing grid has been implemented in the module src_vert_inter_lm.f90:
The problem was:
- If the incoming model delivers pressure or pressure deviation, the pressure
deviation is used and interpolated to the outgoing grid. But this pressure
deviation belongs to the incoming reference atmosphere.
- If the outgoing reference atmosphere is different, the following adaptation
is done (Section 5 in SR org_vert_inter_lm):
- Compute the incoming reference atmosphere on the outgoing vertical levels
(Variable zp0_lm_refmod: the corresponding formulats from SR
reference_atmosphere_x are used).
- Compute the full pressure on the outgoing grid: p_lm = zp0_lm_refmod + pp_lm
- Compute the pressure deviation for the outgoing reference_atmosphere
pp_lm = p_lm - p0_lm
Back to Contents
Some technical adaptations have been done in src_gribtabs and
src_read_coarse_grid to read and interpolate rain and snow from IFS data.
Note the differences in the names (important for shortnames, when using grib_api):
|
DWD |
IFS |
rain: | QR | crwc |
snow: | QS | cswc |
Back to Contents
- Introduction of lake water salinity
The possibility to process an external parameter for lake water salinity
has been implemented (salt_lk_lm). If this parameter is not available, it
is set to a default value of 0.0. (by Burkhardt Rockel)
- Adaptations for NetCDF I/O of 3D field HORIZON
The NetCDF I/O has been adapted to deal with the three-dimensional external
parameter HORIZON, necessary for the topographical corrections
(by Anne Roches, CH).
Possibility to use other coarse grid data
Data from the japanese model GSM (JMA, Grib2), the US model GFS (NCEP, Grib2) and
the british model UM (UKMO) can now also be used to run the COSMO Model.
But only the atmospheric variables are interpolated from these models, no
soil variables can be used.
Because the number of input models is increasing, the namelist parameters
lgme2lm, llm2lm, lec2lm, lcm2lm, etc. have been eliminated. The variable
themselves are still used as internal model variables.
A new Namelist parameter has been introduced to specify the input model with
a string:
yinput_model: string to identify the input model
Valid options are: 'GME', 'COSMO', 'IFS', 'UM', 'GSM', 'GFS'
- Vectorization of SR moist_split:
The subroutine moist_split has now been written for whole fields.
Therefore no CALL within DO-loops is necessary and the calling routines do vectorize now.
(by Oliver Fuhrer).
- Implementation of a logical switch lurban
If lurban is set to .TRUE., an additional external parameter field
fr_urban_lm is read from the external data and provided to the COSMO-Model
initial fields.
NOTE:
For the INT2LM, as it is provided, this is only a dummy-switch,
because no Urban-Module is provided. But there are several groups
who add this module on their own and can work with this switch now.
- src_read_ext.f90:
broadcast irefatm_in for NetCDF input to all tasks
- src_vert_interpol.f90, src_coarse_interpol.f90
introduced additional debug output
- src_lm_output.f90
corrected the attribute "flag_values" in NetCDF for soiltyp
added characteristic 'i' for inland water lakes
- src_lm_field.f90
corrected the vertical dimension of qg in call to SR vert_int_lm
- src_gribtabs.f90
added characteristic 'i' for inland water lakes
- external_data.f90
initialize the full soiltyp field for option lec2lm
- src_read_coarse_grid
For reading / computing the vertical coordinate parameters of the input grid,
the parameter nlevskip (used for IFS) had been forgotten.
- src_namelists.f90
The default value for nbitmap_d has been doubled because of larger GME grid.
- src_read_coarse_grid.f90
Checking EPS characteristics has now also be implemented for grib_api
- src_lm_output.f90
For the new reference atmosphere, there were undefined values in the gds between
the vertical coordinate and the 2 additional parameters delta_t, h_scal (if SLEVE
coordinate is not used). These values have now be set to 0
For running in ensemble mode, the number of total ensemble members has erroneously
be set to 0. This has been removed.
- src_read_coarse_grid.f90
The fields zt0, zp0hl in SR org_read_coarse_grid, Section 6, must be
allocated with verical dimensions ke_in, ke1in.
(reported by Christian Grams, KIT)
- src_lm_fields.f90
The bottom boundary condition for the vertical interpolation of QR, QS was not
set correctly. This led to non-reproducible results.
Back to Contents
- A new information module info_int2lm has been introduced into the INT2LM
This module has been introduced in all DWD libraries and models and gives
information on the compiler, compiler options, etc.
For more information on this module and how to use it, see the misc.global
in the DOCS direcotory of INT2LM.
- New structure of the Makefile
Some parts of the Makefile have been "outsourced" to external files:
- Fopts: this file includes the compiler calls, options and libraries
- ObjFiles: this file defines the list of object files that have to
be compiled
- ObjDependencies: this file contains the dependencies that have to
be considered when compiling
The user now only has to provide a file Fopts for a special compiler. Some
example files are contained in the new subdirectory LOCAL
Back to Contents
There were the following changes for the Namelist variables:
Group |
Name |
Meaning |
Default |
/CONTRL/ |
lgme2lm
llm2lm
lec2lm etc. |
These variables have been eliminated. To specify the incoming coarse
grid model, a new variable has to be specified now. |
|
yinput_model |
To specify the incoming coarse grid model with a string. Valid settings are:
'GME', 'COSMO', 'IFS', 'UM', 'GSM', 'GFS' |
' ' |
/DATA/ |
yinext_form_read |
A new option has been added to specify reading external parameters
from the coarse grid model with grib_api. Valid settings are:
'grb1', 'grax', 'ncdf' |
'grb1' |
yin_form_read |
new option has been added to specify reading coarse grid model data
with grib_api. Valid settings are:
'grb1', 'grax', 'ncdf' |
'grb1' |
Back to Contents
Because of the changes in the subroutine coor_coarse_grid_lm, the
results can change numerically.
The values for surface values can change because of the new treatment of
isolated points.
The values for QR and QS do change because of a bug fix in the bottom
boundary condition for the vertical interpolation.
Back to Contents