Documentation of the Changes in INT2LM
DWD-Internal Version 2.02a

24.06.2016



NOTE: This is a DWD-internal intermediate version 2.02a. The changes are part of the official realease 2.03.

Contents:

  1. SSO-parameter 'SSO_STDH' now always required – need for external parameters based on ASTER-orography

  2. Hydrostatic pressure balancing consistent with COSMO RK core

  3. Correct moisture for newer GFS input'

  4. New fields AHF and FR_PAVED/ISA for TERRA_URB

  5. Determination of boundary layer height for ICON input

  6. New option to interpolate convective rain and snow rates from ICON

  7. New experimental aerosol fields for COSMO PP T2(RC)2

  8. Other technical changes and bug fixes

  9. All version Comments of changes and bug fixes

  10. Changes in the Namelists

  11. Changes of the Results


1. SSO-parameter 'SSO_STDH' now always required – need for external parameters based on ASTER-orography

(by Ulrich Blahak)

For the new ICON-version of the blocked turbulence code, which is available since COSMO 5.04 as an option,
the field "SSO_STDH" is needed. To keep things simple, this field is now always required in COSMO
and INT2LM and must be present in the external parameter files, even if lsso=.FALSE.

Therefore, new external parameter files should be generated (preferably using ASTER orography)
also for (sub)km-scale high resolution runs!

OTHERWISE NO CHANGE OF RESULTS!

2. Hydrostatic pressure balancing consistent with COSMO RK core

(by Ulrich Blahak)

Effective, if lbalance_pp = .TRUE.

New option to ensure consistency of hydrostatic balanced pressure with the

COSMO RK-core if one has chosen "lbalance_pp = .TRUE.". Uses hydrostatic pressure integration
routines from COSMO src_artifdata.f90, which correctly take
into account the type of the dynamical core.

New namelist parameters "itype_balance_pp" (1=old, 2=new=default) and
"itype_fast_waves_lm" (integer, choose consistent to "itype_fast_waves" in COSMO).

Changes the results if "itype_balance_pp" is 2 (default).

3. Correct moisture for newer GFS input

(by Ulrich Blahak)

Input of "RELHUM" in case of GFS input data. Previously only QV was read,
but since 01/2015 GFS data switched to "RELHUM".
Changes the completely wrong moisture (1 %) to the correct values
after the switch date of GFS data. (Helmut Frank)

„REPAIRS“ THE MOISTURE FOR GFS INPUT AFTER SOME DATE IN 2015!
 

4. New fields AHF and FR_PAVED/ISA for TERRA_URB

(by Hendrik Wouters, Ulrich Blahak)

For TERRA_URB: Added copying of the fields AHF and FR_PAVED respectively ISA
from the COSMO external parameters to the analysis.

Currently only works for COSMO external parameters in grib1 or netcdf format,
and if grib1, the reading has to be done by the old "libgrib1" and not by grib_api
(ylmext_form_read = 'grb1', not 'apix'!).

New namelist switch "lterra_urb".

OTHERWISE NO CHANGE OF RESULTS!

5. Determination of boundary layer height for ICON input

(by Ulrich Blahak)

Changed/fixed determination of boundary layer height for ICON.

Previously, the PBL height was determined by the minimum layer index k over all PE domains
for which the PE-domain max. pressure is just above 850 hPa. This is problematic for elevated
domains without sea points and surely fails if the entire domain is a high plain.

This has been changed: Now we search for the highest level below the pressure level 
"ps - 150 hPa * (1-min(hsurf)/vcflat_icon)" at the point(s) which have the domain minimum orography
height. If more than one such points exists, the one(s) with the maximum surface pressure
at these points are chosen. If again more than one such point(s) exist(s), the point
with the lowest level index wins.
     
For this: new namelist parameter "vcflat_icon" (default 16000 m), because this parameter cannot
be obtained from any ICON input file.

MAY CHANGE THE RESULTS OF THE PROGNOSTIC MODEL VARIABLES DEPENDING ON MODEL DOMAIN AND ACTUAL SURFACE PRESSURE FIELD, BECAUSE OF THE "ps-150 hPa" INSTEAD OF "fixed 850 hPa" VALUE.

6. New option to interpolate 3D convective rain and snow rates from ICON

(by Ulrich Blahak)

If a convection-resolving high resolution COSMO is driven by ICON initial
and boundary data, it has been observed
that the moisture/precipitation is somewhat lower in COSMO as compared to
coarse COSMO input. One hypothethis is that this is due to the more active
Tiedke-Bechthold convection scheme in ICON, which removes more moisture
from the atmospheric columns instantaneously. This leads to somewhat drier
initial and boundary conditions for COSMO and a pronounced precipitation
spinup zone at the inflow boundary. To compensate for this effect in a practical
way, the convective precipitation rate (3D) at each grid point can be
used in COSMO (STILL UNOFFICIAL AND EXPERIMENTAL CODE THERE!) to retain
the moisture contained in this precipiation either in the humidity field
or in the grid scale rain- and snow hydrometeors.

For this, the interpolation of the 3D "PRR_CON" (ICON shortName = "PRR_CON") and "PRS_CON" ("PRS_CON")
from ICON input to COSMO has been implemented for initial and boundary files.

THIS FEATURE IS STILL EXPERIMENTAL AND NOT YET AVAILABLE IN OFFICIAL COSMO!

New namelist switch "lprog_prrcon_prscon".

OTHERWISE, NO CHANGE OF RESULTS!

7. New experimental aerosol fields for COSMO PP T2(RC)2

(by Ulrich Blahak, Harel Muskatel, Marina Shatunova)

- Fields for Kinne (2015) Aerosol climatology (EXPERIMENTAL).

- Fields for MACC aerosols (EXPERIMENTAL).

OTHERWISE, NO CHANGE OF RESULTS!

8. Other technical changes and bug fixes

  - Added new general 4D "tracer" field, to simplify the addition of new
    3D variables which just have to be interpolated without any special treatment in the
    rest of the code. Just add their definition and meta data to
    subroutine "tracer_define()" in "src_gribtabs.f90" and the "rest" will be handled
    automatically.

    The fields for MACC aerosols and "PRR_CON" / "PRS_CON" form ICON have been added
    by this method.

    Does not change results. (Ulrich Blahak)

  - Linear vertical interpolation for some variables can now be
    chosen more easily in the code "src_vert_inter_lm.f90" by changing
    "vert_interp (qr_lm, 'qr', 'ctspline' ... ) " -->  "vert_interp (qr_lm, 'qr', 'linear' ... )"
    Up to now no change of results, because this feature is not yet propagated
    further to the variable definitions in src_gribtabs.f90.

  - In case of BCs on a frame, use a bitmap to reduce compressed file sizes.
    Does not change results. (Lucio Torrisi)

  - Replaced dosleep() by fsleep(), which does an explicit type conversion
    from iintegers to c_int. ("utilities.f90", "environment.f90")
    No change of results.  (Ulrich Blahak)


  - Bugfix in domain corner check in "read_nc_gdefs_ext_lm()" for reading NetCDF data ("src_read_ext.f90").
    Does not change results. (Ulrich Blahak)


  - Bugfix: the existence check for ready-files was within an #ifdef GRIBDWD,
    because of a call to fsleep() from LIBDWD. Now an own fsleep() has been
    created in utilities.f90, which is called instead. ("src_gme_interpol.f90", "src_read_coarse_grid.f90")
    Does not change results. (Ulrich Blahak)


  - Bugfix "src_read_ext.f90": added missing initialization of field_in_file.
    No change of results. (Ulrich Blahak)


  - Some bugfixes from CLM community RedC bugtracker.
    Do not change results. (Ulrich Blahak)


  - Fixed subroutine make_fn(), so that now theoretically also ICON analyses can be interpolated
    and used as initial and boundary conditions for COSMO. For this, the date and
    time in the filename had to be adjusted to absolute time, not forecast range.
    Currently this does not work for ICON analyses from DWD, because some fields are missing there
    ("W", "QV_S", "T_G"). Here, the forecast fields from vv=0 should be used instead.

    To do this, rename the forecast files manually to "igafYYYYMMDDhh" and set
    yinput_type = "analysis" and yicon_input_prefix = "igaf".

    Does not change results. (Ulrich Blahak)


  - Fixed copying of yvarbd_d(:) to youtlist_bd(:) in "src_namelists.f90", where an
    erroneous nzmxini_d instead of nzmxbd_d was used to specify the copy-range.
    Does not change results.  (Ulrich Blahak)


  - Fixed problems with nlevskip if some of the skipped levels do appear in the coarse
    input files. Added some "return" statements in "src_read_coarse_grid.f90".
    Does not change results.  (Helmut Frank, Ulrich Blahak)

9. All version comments of changes and bug fixes:

- utilities.f90:

!  Replaced dosleep() by lm_sleep(), which does an explicit type conversion
!   from iintegers to c_int.
!  Added several routines from COSMO 5.3 src_artifdata.f90 for hydrostatic
!   pressure integration starting from ps.


- src_vert_interpol.f90:

!  Interpolation of new 4D tracer field

- src_gribtabs.f90:

!  Changed landmask flag of EMIS_RAD from 'l' to ' '
!  Add relative humidity for GFS data (HF).
!  Added fields for Kinne climatology: TAUKINNE12, SSAKINNE12, GKINNE12,
!   TAUKINNE, SSAKINNE, GKINNE
!  Added fields for new generic 4D tracer variable and the routine
!   "trader_define()" to define the actual 3D fields contained
!   in the generic 4D field.
!  Added fr_paved_lm and ahf_lm for TERRA_URB (lterra_urb)


- src_vert_inter_lm.f90:

!  Changed determination of boundary layer height for ICON input.
!   Now depends on new namelist parameter vcflat_icon to take into account the
!   terrain following grid stretching.
!  Added new options "itype_balance_pp", "itype_fast_waves_lm" for hydrostatic pressure integration (lbalance_pp)
!  Interpolation of new 4D tracer field

- src_read_ext.f90:

!  Removed reading of nhori from external parameter file according to CLM RedC bug report #32.
!  Bugfix in domain corner check in read_nc_gdefs_ext_lm() for reading NetCDF data.
!  Added fields for Kinne climatology: TAUKINNE12, SSAKINNE12, GKINNE12
!  Added lterra_urb and fields FR_PAVED and AHF for TERRA_URB (UB)
!  Added check of number of grid cells for ICON external parameter file.
!  Added SSO_STDH to the always needed external parameters

- src_read_coarse_grid.f90:

!  Added ensemble types 101-104 for ICON-EDA to EPS check
!  Calculate QV from RELHUM from GFS data if RELHUM was read, but not QV.
!  Bugfix: the existence check for ready-files was within an #ifdef GRIBDWD,
!   because of a call to lm_sleep() from LIBDWD. Now an own lm_sleep() has been
!   created in utilities.f90, which is called instead.
!  Added return statements in check_required_api() in case of nlevskip > 0 (HF).

- src_namelists.f90:

!  New namelist parameter vcflat_icon
!  New namelist parameter itype_balance_pp, itype_fast_waves_lm, lprog_prrcon_prscon
!  Added output fields for Kinne climatology: TAUKINNE, SSAKINNE, GKINNE
!  Added namelist switch lterra_urb and output fields FR_PAVED and AHF for TERRA_URB
!  Add 'SSO_STDH' always to yvarini_d, not only for lsso=.TRUE., because
!   it is needed for the new ICON version of the Raschendorfer turbulence code.


- src_memory.f90:

!  Add allocation of relative humidity rh_in for GFS data (HF).
!  Added allocation of p0hl_lm and t0hl_lm (UB).
!  Allocate fields for Kinne climatology: TAUKINNE12, SSAKINNE12, GKINNE12,
!   TAUKINNE, SSAKINNE, GKINNE (UB, MS)
!  Added allocation for new generic 4D tracer fields tracer_in and tracer_lm (UB)
!  Added allocation for fr_paved_lm and ahf_lm for lterra_urb (UB)


- src_lm_output.f90:

!  In org_lm_output(), check the var_lm(iztable)%levtyp instead of names 'W' and 'HHL'
!   to decide on the number of vertical levels.
!  Two changes related to lbd_frame_cur from Lucio: in case of BC on frames,
!   the output files (GRIB) are written with a bitmap for defined points.
!   In this way the output files have a reduced size.

- src_icon_interpol.f90:

!  Added ensemble types 101-104 for ICON-EDA to EPS check
!  Replaced dosleep() by lm_sleep(), which does an explicit conversion
!   from iintegers to c_int.
!  Added check of number of grid cells of each grib record against grid file
!   in SR check_icon_grid().

- src_gme_interpol.f90:

!  Bugfix: the existence check for ready-files was within an #ifdef GRIBDWD,
!   because of a call to lm_sleep() from LIBDWD. Now an own lm_sleep() has been
!   created in utilities.f90, which is called instead.

- src_cleanup.f90:

!  Deallocate rh_in if necessary (HF).
!  Deallocate fields for Kinne climatology: tau_kinne12_lm, ssa_kinne12_lm, g_kinne12_lm,
!   tau_kinne_lm, ssa_kinne_lm, g_kinne_lm (UB, MS)
!  Deallocate tracer_in and tracer_lm (UB)
!  Deallocate fr_paved_lm and ahf_lm in case of lterra_urb (UB)

- setup_int2lm.f90:

!  Call to "tracer_define" to define the additional tracers in the new 4D tracer field.
!  Initialize new constants rcpv, rcpl, pt00.

- io_utilities.f90:

!  Corrected error messages related to yhead
!  Added treatment of ICON analyses in make_fn, based on
!   yinput_type ('analysis','ana_init' or 'forecast')
!  Added some missing error catches for netcdf routines

- interp_utilities.f90:

!  In interp_q: clipped neighbouring field indices for quadratic interpolation to
!   prevent crashes when not enough halo points are around the coarse domain.

- external_data.f90:

!  Added checks for fields for Kinne climatology: ltaukinne12_lm, lssakinne12_lm, lgkinne12_lm
!  Added lterra_urb and checks for fr_paved_lm and ahf_lm (UB)
!  Added SSO_STDH to the always needed external parameters

- environment.f90:

!  Replaced dosleep() by lm_sleep(), which does an explicit type conversion
!   from iintegers to c_int.

- data_int2lm_io.f90:

!  Increased nvar_lm from 100 to 200 and nvar_in from 70 to 150

- data_int2lm_control.f90:

!  New namelist parameter itype_balance_pp, itype_fast_waves_lm, lprog_prrcon_prscon
!  Added meta data variables for the new 4D tracer field
!  Added namelist switch lterra_urb

- data_int2lm_constants.f90:

!  Added new constants rcpv, rcpl, pt00 for new option itype_balance_pp=2

- data_grid_in.f90:

!  New namelist parameter vcflat_icon.

- data_fields_lm.f90:

!  Declare fields for Kinne climatology: tau_kinne12_lm, ssa_kinne12_lm, g_kinne12_lm,
!   tau_kinne_lm, ssa_kinne_lm, g_kinne_lm.
!  New generic 4D tracer field tracer_lm (UB)
!  Added fr_paved_lm and ahf_lm for TERRA_URB (UB)

- data_fields_in.f90:

!  Add rh_in for GFS input (HF).
!  New generic 4D tracer field tracer_in (UB)

10. Changes in the namelists:

There are 5 additional namelist variables:

  /GRID_IN/

  - vcflat_icon   (real, default: 16000 m):

      For ICON input data: this parameter (height were levels become flat in
      the ICON data) is needed in the determination of the correct PBL height
      index ("850 hPa layer" = "ground minimum minus 150 hPa times grid
      compression factor for the terrain following coordinate"). Has to be
      consistent to the specification in the ICON model. For DWD ICON
      data, this is usually 16000 m, so no need to explicitly specify
      this parameter.

  /CONTRL/

  - itype_balance_pp (integer, default: 2):

      Type of method for hydrostatic pressure balancing in case of "lbalance_pp = .TRUE.":

      1 = old method: very old code, was perhaps consistent with the Leapfrog core?
      2 = new method: consistent to RK dynamical core, code overtaken from COSMO model
                     (src_artifdata.f90). Depends on new parameter "itype_fastwaves_lm".

  - itype_fastwaves_lm (integer, default: 2):

      Type of fast-waves solver in the COSMO model, relevant in case of
      "lbalance_pp = .TRUE." and "itype_balance_pp=2". same meaning as "itype_fast_waves" in COSMO,
      should be consistent with the COSMO run.

  - lprog_prrcon_prscon (logical, default: .FALSE.):

      For ICON input data: Additional interpolation of the 3D convective rain and snow rates.
      Depends on availability of the ICON 3D-fiels "PRR_CON" and "PRS_CON" in the input data
      and generates fields "PRR_CON" and "PRS_CON" (3-dimensional fields!) in the "laf" and "lbff" files.

  - lterra_urb (logical, default: .FALSE.):
  
      For TERRA_URB: copy the fields "AHF" and "FR_PAVED" respectively "ISA" from the COSMO external
      parameters to the "laf" file. Depends on the availability of these two fields in the
      external parameter data set.

11. Changes of results:

There are changes of results:

- If new external parameters based on ASTER orography are generated (→ SSO_STDH),
    results will change due to the new orography. 

- For GFS input after some date in 2015:
    Now the humidity is ok, before the bug fix it was just 0.01 Rel. Hum. (1%)

- For ICON input: possible changes in all prognostic fields due
    to a different layer index of PBL height for extrapolation of PBL profiles.
    For example, in case of ICONEU input, the level index changes from 49
    to 50 and results change accordingly.

- The new determination of the PBL height from "psurf - 150 hPa * grid stretching factor"
    instead of "fixed 850 hPa" level index might change the results of the
    prognostic model variables depending on the specific model domain and
    actual surface pressure field.

- Changing vcflat_icon from its default might change the results, because the PBL
    height index might change, causing differences in extrapolation
    of vertical profiles below that layer down to the fine grid
    surface height. Of course, vcflat_icon should be that of the
    coarse ICON model. The default 16000 m is valid for DWD ICON and ICON-EU.

- itype_balance_pp = 2 changes the pressure in "laf" and "lbff" files slightly compared
    to the "old" method 1.