23.10.2020
- Bug Fix in Interpolation to p-levels
- Changes in Data Assimilation
- Modifications for Re-Unification with CLM
- Remove the coarse radiation grid
- Modified Hailcast Variable Names
- Changes in SPPT
- COSMO-EULAG
- Update CPP Dycore to GRIDTOOLS 2.0
- Update of OpenACC implementation for PGI Compiler 20.4
- Technical Changes and Bug Fixes
- Changes to the Namelists
- Changes of Results
(by Ulrich Schaettler, DWD)
When running on the SX-Aurora in single precision, the results of the p-interpolation
to the 1000 hPa level have not been correct. This was due to the fact, that the
x-axis value of the surface pressure has not been transferred to LOG(ps), as was done
for all the other pressure levels of the vertical profile. This has been fixed now.
Back to Contents
Modifications in observation handling
(by Christoph Schraff)
- Descending radiosonde observations:
- Correction of lethal bug and more generalized formulation for tagging a
particular level as 'surface level' in the descending radiosonde report.
Now, time and horizontal shift values are allowed to be missing in any
combination.
- Correction of a (minor) bug at horizonal shifting of descending TEMP.
- Slightly more accuracy at the interpolation to superobbing levels.
- Bug fix at loop range for superobbing of flags.
- Multi-level reports (radiosondes, profilers, towers):
- Adaptation to avoid a lethal crash and allow for the mandatory multi-level
variables being missing if all the reports in the cdfin file have zero
observation levels;
in such a case, a Caution message is issued to file YUCAUTN.
- Meaning of internally used entry 'nbtzio' changed from grid point to
geographic coordinates.
- Aircraft observations:
- Stricter criteria for vertical colocation to account for active use of
(correct) short-distance flights below 350 hPa throughout.
- General:
- Variables related to structured grid of COSMO such as r_dlat removed
except in code lines conditioned to ifdef COSMO.
- Some code clean-up.
Changes of the namelist variables: None
Changes of the results:
Results may be changed slightly if radiosonde descent or aircraft observations
are assimilated.
(Only at DWD these modifications have been implemented in a version 5.07d)
Modifications for running assimilation in single precision (kenda only)
(by Stefan Ruedisuehli, Xavier Lapillonne)
When compiling in single precision some computation in the assimilation
part were not accurate enough, and several modifications have been introduced.
The most relevants are:
- fix time interval computations
- introduced epsilon values which depend on the precision
A new module assimilation_utilities.f90 has been introduced which
contains utilities for computing time boxes and intervals for the data
assimilation in single and double precision. The utilities replace code
which were repeated in several places in data assimilation code.
Avoid possible division by zero in ps_obs_operator_sing/mult
(by Christoph Schraff, Xavier Lapillonne)
The absolute value of variable zgamma in these routines can get rather small
in single precision. Also in double precision this is a potential danger.
Therefore it is now checked that the absolute value is larger than an epsilon
and another computation is chosen for small ABS(zgamma).
Back to Contents
New Diagnostics implemented by CLM
(by Ronny Petrik, Ulrich Schättler)
Wind Sector Classes
New variables have been implemented, which are related to wind speed and
wind direction for 16 (or nwdirsec) special wind sector classes in the
height of 10 meter. The technical implementation in the code is by
three-dimensional variables, where the third dimension holds the 16
different sectors.
For NetCDF a new dimension for classes of wind direction (windsector) is
defined (entry 18 in idims_id_out).
For Grib (1 and 2) we define a new level type 233, where the interpretation
of the levels are just the different sectors.
These new definitions need some additions in the modules io_metadata.f90,
netcdf_io.f90 and organize_data.f90. The diagnostics are computed in
module near_surface.f90.
Sunshine Duration
Additional solar fluxes are computed in radiation_interface.f90.
- swdir_sn: direct component of solar normalized flux at surface
- swdir_sno: the same, but without orographic shading effects.
Instead of the (now eliminated) variable sodwddm, swdir_sn is used to calculate
the sunshine duration in module near_surface. This has two effects:
- sodwddm has been calculated with the mean solar zenith angle within a radiation
interval and without orographic shading effects.
- swdir_sn is now calculated in every time step with the actual solar zenith
angle and with orographic shading effects.
This modifies the results of the diagnostic variables DURSUN and DURSUN_R slightly.
New Output Fields
The following list gives the I/O shortnames, some GRIB 1 meta data and
the new variable names:
Shortname |
Element Number |
Table type |
Level type |
Time Range Indicator |
Variable Name |
DD_10M | 31 | 2 | 105 | 0 | wdirgeo_10m |
DD_10M_SECFREQ | 31 | 2 | 233 | 3 | wdirgeo_10m_freq |
SP_AV | 32 | 2 | 110 | 3 | vabs_av |
SP_10M_AV | 32 | 2 | 105 | 3 | vabs_10m_av |
SP_10M_SECAV | 32 | 2 | 233 | 3 | vabs_10m_secav |
SP_10M_SECMAX | 32 | 2 | 233 | 2 | vabs_10m_secmax |
CLCT_AV | 71 | 2 | 1 | 3 | clct_av |
DEN | 89 | 2 | 110 | 0 | -- |
ASWDIR_SN | 28 | 201 | 1 | 3 | aswdir_sn |
ASWDIR_SNO | 220 | 201 | 1 | 3 | aswdir_sno |
SUN_EL | 250 | 202 | 1 | 0 | sun_el |
SUN_AZI | 251 | 202 | 1 | 0 | sun_azi |
TURB_INTENS_MAX | 252 | 202 | 110 | 2 | turb_intens |
DWD already uses the following shortnames. Up to now no variables were implemented, but
the values were only calculated temporarily for output. With the modifications in
near_surface.f90, it makes sense to implement also variables for these fields:
Shortname |
Element Number |
Table type |
Level type |
Time Range Indicator |
Variable Name |
DD | 31 | 2 | 110 | 0 | wdirgeo |
DD_10M | 31 | 2 | 105 | 0 | wdirgeo_10m |
SP | 32 | 2 | 110 | 3 | vabs |
SP_10M | 32 | 2 | 105 | 3 | vabs_10m |
Additional CLM Modifications
New tuning (namelist) variables:
- Converted constant uc1 from data_constants.f90 to a tuning namelist variable.
- Added tuning factors soilhyd and fac_rootdp2 in TERRA
(sfc_terra.f90, sfc_terra_data.f90):
- soilhyd: uniform multiplication factor for hydraulic conductivity and diffusivity in the soil
- default: 1.0
- tested range: [0.1,10.0]
- fac_rootdp2: uniform multiplication factor for the prescribed root depth values
- default: 1.0
- tested range: [0.5,1.5]
Usage of ldiniprec in organize_physics.f90:
- The full block IF (ldiniprec) THEN has been commented, because this cannot
be done in the blocked data structure
- So at the moment the variable ldiniprec does nothing!
- This was introduced years ago when driving models could not provide QR
and QS, but COSMO started to run with prognostic precipitation.
In this way we could provide some better starting values for QR
and QS than 0.0.
Nowadays most models should be able to provide these values and this might not be
necessary any more.
Contributions from ETH Zürich
New Hydrology Scheme
The implemented groundwater and runoff scheme is documented in the following
publication:
Schlemmer, L., Schär, C., Lüthi, D., and Strebel, L. (2018).
A groundwater and runoff formulation for weather and climate models.
Journal of Advances in Modeling Earth Systems, 10(8), pp. 1809-1832.
https://doi.org/10.1029/2017MS001260
There are three basic ideas to it:
- There is a zero-flux boundary condition, which allows for a water table to build up.
- From this water table, ground runoff is diagnosed. In this formulation,
ground runoff is proportional to the product of subgrid-scale orography, water
table height and hydraulic conductivity. The amount of runoff the scheme produces
can be tuned with the length scale l_g in sfc_terra_data.f90. Note that despite
the equation of runoff is linear, the tuning is highly nonlinear because of the
interaction with saturated hydraulic conductivity.
- Richards Equation is solved using Flux Corrected Transport for the explicit
part (gravitational flow), this ensures mass conservation, i.e. at transitions
from saturated to unsaturated soil.
Six new fields have been introduced:
Shortname |
Element Number |
Table type |
Level type |
Time Range Indicator |
Variable Name |
Description |
WSOIL_FLX | 43 | 203 | 111 | 0 | wsoil_flx |
soil water flux between layers (-) |
Q_ROFF | 44 | 203 | 111 | 0 | q_roff |
ground water runoff, aquifer (m) |
WT_DEPTH | 45 | 203 | 1 | 0 | wt_depth |
water table depth (m) |
W_SO_SL | 46 | 203 | 1 | 0 | wso_satlev |
soil moisture saturation level (level) |
W_SO_SAT | 47 | 203 | 111 | 0 | wso_sat |
soil moisture saturation (-) |
S_ORO_MAX | 8 | 250 | 1 | 0 | s_oro_max |
gradient of subgrid scale orography (-) |
S_ORO_MAX is needed as input variable, all other variables are diagnostic output.
Two new namelist variables have been implemented:
- itype_hydmod: type of soil water transport and ground water runoff
- standard
- modified formulation that allows ground water buildup
(Schlemmer et al. 2018, https://doi.org/10.1029/2017MS001260)
- lsoil_init_fill: filling of lowermost active soil layer at initialization.
This determines if the groundwater should be filled up for the hydrologically
passive layers (.TRUE.) or not.
- If you start your run from a soil-moisture distribution derived using
itype_hydmod=0, this variable should be set to .TRUE.
- If you restart the model or initialize the model with a soil-moisture
distribution derived using itype_hydmod=1 it should be set to .FALSE.
New Diagnostics
New diagnostics have been implemented by the crCLIM group for clear-sky radiation
and for vertically integrated water fluxes.
The following list gives the I/O shortnames, some GRIB 1 meta data, the new
variable names and also the former names used in the crclim-implementation.
These fields have been added in the variable table src_setup_vartab.f90.
Shortname |
Element Number |
Table type |
Level type |
Time Range Indicator |
Variable Name |
old Name |
clear-sky diagnostics: |
SOBS_RAD_CS | 234 | 202 | 1 | 0 | sobcs | SOBCS_RAD |
THBS_RAD_CS | 235 | 202 | 1 | 0 | thbcs | THBCS_RAD |
SOBT_RAD_CS | 234 | 202 | 8 | 0 | sobct | SOBCT_RAD |
THBT_RAD_CS | 235 | 202 | 8 | 0 | thbct | THBCT_RAD |
ASOB_S_CS | 234 | 202 | 1 | 3 | asobc_s | ASOBC_S |
ATHB_S_CS | 235 | 202 | 1 | 3 | athbc_s | ATHBC_S |
ASOB_T_CS | 234 | 202 | 8 | 3 | asobc_t | ASOBC_T |
ATHB_T_CS | 235 | 202 | 8 | 3 | athbc_t | ATHBC_T |
vertically integrated water fluxes in zonal/meridional direction: |
TWATFLXU | 94 | 202 | 1 | 0 | - | TWATFLXU |
TWATFLXV | 95 | 202 | 1 | 0 | - | TWATFLXV |
a few other fields added in src_setup_vartab.f90: |
SODS_RAD | 27 | 201 | 1 | 0 | - | - |
ASOD_S | 27 | 201 | 1 | 3 | - | ASWD_S |
TOT_SNOW | 123 | 201 | 1 | 4 | - | TOT_SNOW |
These are some of the necessary code changes to implement these diagnostics:
- radiation_rg.f90
- added new subroutines inv_th_crf, inv_so_crf to compute
the new clear-sky variables.
- added new variables pfltf, pflsf to fesft-interface
(single and double precision).
- radiation_interface.f90
- added new variables zfltf, zflsf as arguments to subroutine fesft.
- save values of zfltf, zflsf to long-term memory variables
sobcs, sobct, thbcs, thbct for output.
- removed PARAMETER attribute from lcrf: this logical is modified
in organize_data.f90, if clear-sky diagnostics should be written.
- near_surface.f90
- added summation of sobcs, sobct, thbcs, thbct
for averaged fields "a..."
- organize_data.f90
- check whether some of the new clear-sky diagnostics are in output lists.
Then set lcrf = .TRUE., to enable their computation.
- add averaged clear-sky diagnostics to the list of statistically processed fields.
- pp_utilities.f90
- Added an optional argument wind in subroutine caliq, to compute zonal and
meridional vertically integrated water fluxes.
(For example, if caliq is called with wind=u_m, the zonal wind on mass grid points
is considered to calculate the results).
- src_output.f90
- call to subroutine caliq with optional argument wind=u_m,v_m
to calculate vertically integrated zonal and meridional water fluxes.
- acc_global_data.f90, data_fields.f90, src_allocation.f90
- definition, allocation, deallocation of new variables.
Perturb Prognostic Fields
Added option to perturb prognostic fields at start or on every timestep
using a specified amplitude. The perturbation can be chosen either relative
to precision or using a specified magnitude.
Two new namelist parameters have been implemented:
- itype_pert: for adding random perturbations to prognostic fields
- none (default)
- at init
- at every step
- rperturb: coefficient for adding perturbations.
With the perturbation coefficient, the method of perturbation is chosen:
- rperturb ≥ 0.0: relative perturbation with a specified magnitude;
necessary condition: rperturb ≥ 1.0_wp * rprecision
Example: if rperturb = 1.0E-5_wp (> rprecision for single and double precision)
then the perturbation will be:
field = field * (1 + 1.0E-5_wp * R)
where R is a random number from -1.0 to 1.0.
- rperturb < 0.0: relative perturbation with a magnitude relative to precision
necessary condition: rperturb ≤ -1.0_wp
Example: if rperturb = -10.0_wp (≤ -1.0_wp for single and double precision)
then the perturbation will be:
field = field * (1 + 10.0_wp * 1.0E-16_wp * R) for double precision
and
field = field * (1 + 10.0_wp * 1.0E-7_wp * R) for single precision
where R is a random number from -1.0 to 1.0.
Note:
- The necessary conditions for a) and b) are checked in src_setup.f90,
when reading the namelist variable rperturb.
- For single precision, rprecision is about 1.0E-7,
for double precision it is about 1.0E-16.
Changes of Results: In case of itype_pert = 0, the results are not changed.
Check against US standard atmosphere
A plausibility check has been implemented, to check the temperature against
the US standard atmosphere. An error is issued, if the differences are too
large.
This check should not be used for regions that are far from US mainland,
since temperature profiles may differ considerably.
New namelist parameter:
- l_t_check: if .TRUE., check plausibility of temperature against
US standard atmosphere.
Contributions from MESSy
Tendency diagnostics:
This pull request contains all changes required for the implementation of the
full tendency diagnostics of the MESSy submodel TENDENCY. All code blocks are
wrapped in preprocessor directives MESSYTENDENCY.
Some more fixes mostly encountered when enabling TWOMOM, CLOUDRAD and RADARFWO
for compiling in MESSy. But most of the fixes are not MESSy specific.
Implementation of MPI 3.0 new interfaces
In MPI 3.0 some interfaces have been changed and were given new names. In the COSMO-Model
the module environment.f90 is affected, where MPI data types are computed.
The new interfaces are implemented with a pragma MPI3, and the old interfaces are
retained for installations, which do not yet provide MPI 3.0 standard.
To activate the new MPI 3.0 interfaces, compile with -DMPI3.
The following MPI interfaces are affected:
Old name |
new name |
MPI_TYPE_EXTENT | MPI_TYPE_GET_EXTENT |
MPI_TYPE_HINDEXED | MPI_TYPE_CREATE_HINDEXED |
MPI_TYPE_HVECTOR | MPI_TYPE_CREATE_HVECTOR |
MPI_TYPE_STRUCT | MPI_TYPE_CREATE_STRUCT |
The MPI_TYPE_STRUCT has been replaced by MPI_TYPE_CREATE_RESIZED.
Back to Contents
(by Ulrich Schättler, DWD)
Some time ago the coarse radiation grid has been implemented into COSMO to
save computational time for the radiation. Since introduction of the blocked
data structure for the physics the implementation of this coarse radiation
grid became very complicated.
To compute the necessary input fields for the radiation, the copy-in/copy-out
mechanism of the blocked data structure was not use, to allow also the computation
of this coarse grid. All COSMO variables were used in the ijk-data structure
to compute the radiation input variables in the blocked data structure.
Also, all output variables of the radiation scheme, which are needed in the
ijk-structure were directly computed in this structure.
But with introduction of the blocked data structure the computational savings
became very limited due to the better cache use of the blocked structure.
Therefore it was decided to remove the coarse radiation grid again.
Now we use the copy-in mechanism and register all COSMO ijk-fields for the
radiation, that are necessary to compute the input variables for the radiation.
But we left the computation of the output variables in the ijk-structure,
as most of these fields are not used in other parameterizations.
The modules radiation_utilities.f90 and radiation_interface.f90
have been adapted to work with the blocked input data now.
Removal of Namelist variables in group /PHYCTL/:
nradcoarse, lradf_avg have been removed.
Back to Contents
(by Ulrich Schättler, DWD))
Official GRIB 2 meta data have been assigned to the new hailcast variables.
In order to better fit into the naming conventions, their shortnames have
been modified. The following table lists the new and the former name, together
with the GRIB meta data (GRIB1: indicatorOfParameter (ee), table2Version (tab);
GRIB2: discipline, parameterCategory, parameterNumber, typeOfStatisticalProcessing):
New name |
Old name |
GRIB 1 |
GRIB 2 |
ee | tab |
disc | cat | nr | StatProc |
DHAIL_AV | DHAILAVE | 136 | 250 |
0 | 1 | 238 | 0 |
DHAIL_SD | DHAILSTD | 137 | 250 |
0 | 1 | 238 | 6 |
DHAIL_MX | DHAILMAX | 138 | 250 |
0 | 1 | 238 | 2 |
W_UP_DUR | WUPDUR | 139 | 250 |
0 | 2 | 210 | - |
W_UP_MASK | WUPMASK | 140 | 250 |
0 | 2 | 211 | - |
The names had to be changed in the files src_setup_vartab.f90, organize_data.f90
and src_output.f90.
Also the Namelist INPUT for the hailcast test has been modified accordingly.
The file YUCHKDAT has been updated, because of changing names.
Back to Contents
(by Carlos Osuna, Andre Walser, MCH))
If targeted diffusion is turned on, the behaviour of SPPT has been changed:
- if an unphysical temperature anomaly is detected (triggering targeted diffusion), SPPT
is switched off on all levels in the corresponding columns. Therefore, the 3d field
pertstoph_mask has been reduced to a 2d field. It improves the consistency of the
perturbed physical tendencies.
- since the conditions for generating such anomalies by the advection scheme are often
long-lasting, SPPT is preferably not turned on again in the next time step after switched
off by targeted diffusion. Therefore, a new switch hinc_reset_pm has been introduced to
control how often the field pertstoph_mask is reset to default (i.e. SPPT on). The default
value is 0 which corresponds to the old behaviour, i.e. a reset every time step. This reset
is global and the increment counts from model start (for simplicity).
New namelist variable in group /EPSCTL/:
hinc_reset_pm (default: 0): increment for resetting pertstoph_mask (in hours)
Changes to the results:
Results might change if SPPT is on
Back to Contents
(by Damian Wojcik, IMGW))
Implemented some fixes:
- Fixed treatment of TKE advection with MPDATA in case itype_turb/=3
- Added clipping of moist fields to improve RTTOV imaging
- Initialized INTENT(OUT) argument ierr in Subroutine
update3dsplitn in src_eulag_parallel.f90
- Initialized INTENT(OUT) variables in subroutine
setCopyListPointer in src_block_fields.f90.
Back to Contents
The CPP Dycore has been adapted to work with GRIDTOOLS 2.0.
This change is bit-reproducible comparing GPU to GPU.
Back to Contents
Modifications to compile and run COSMO with PGI 20.4. There are two fixes in
PGI 20.4 that improve overall performance of COSMO by around 10% compared to
PGI 19.9. These are:
- Inlining across files now works, improving microphysics performance by factor 2
- Performance improvements to Fortran TRANSFER intrinsic, improving output
performance by factor 2
To compile COSMO with PGI 20.4 and make use of these fixes we have to make a few changes:
- Changed all default(present) in pp_utilities.f90 to default(none) and
added explicit data regions. There was a problem with certain fields
(te, qve, prs) without explicit data regions.
- Pass slices with correct size to TRANSFER intrinsic, else performance is
worse by factor of 10-20x. The behaviour of TRANSFER is slightly different
between GNU and PGI, and this implementation should give consistent behaviour
and improve performance for PGI.
Back to Contents
- conv_tiedtke.f90:
Included a NEC Compiler directive for inlining.
- data_constants.f90:
Converted constant uc1 to a tuning namelist variable.
- data_io.f90:
- Old variable nrbit_phhl also used as packrate for hsurf (GdM)
- Set max_bd_fields depending on GHG.
- io_metadata.f90 and associated data_io.f90:
- To prevent differences between HSURF and HHL use the packrate
variable nrbit_phhl=24 to also pack hsurf (GdM).
- Modified setting of istartstep and iendstep in case of assimilation runs, where
the time range indicator is set to 13: now these variables are set in the same
way as for non-assimilation runs. Note that they are now counted relative to the
start date of the assimilation run. (US)
- gscp_cloudice.f90:
Included a NEC Compiler directive for inlining.
- src_bott_dc.f90:
Exchanged loops in subroutine courant_3d_Bott2010 for better vectorization.
- src_block_fields.f90:
- Set blockFieldTableSize depending on GHG.
- Initialize INTENT(OUT) variables in subroutine setCopyListPointer (US).
- src_meanvalues.f90:
Use i8 KIND parameters to compute number of hours (for large time steps).
- src_output.f90:
Fixed a bug in interpolation to pressure level: the surface pressure was not
transferred to LOG-values for variable pexp. (US)
- src_sfcana.f90:
Use variable max_gribrep for scanning setup_vartab (and not hard coded 4).
- src_setup.f90:
Added tuning factors uc1, soilhyd, fac_rootdp2 as namelist variables
- lmorg.f90 and organize_data.f90:
- Consistent naming convention within GHG: rename all occurences of
biogeochemistry, bgc etc. to ghg.
- From Re-Unification: Different computation of nzdays, nzhours
for large number of timesteps.
- Remove argument list of routine initialize_loop: all these variables are
used in lmorg and are known to this module procedure.
Reason: variables nbd1, nbd2 are given as INTENT(IN),
but are modified by organize_data, which is called within initialize_loop.
NEC benchmarkers reported numerical problems.
Back to Contents
Group |
Name |
Meaning |
Default |
/RUNCTL/ |
itype_pert |
NEW |
For adding random perturbations to prognostic fields.
- None (default).
- Adding perturbations at initial step only.
- Adding perturbations at every step.
|
0 |
rperturb |
NEW |
Coefficient for adding perturbations. |
1.0 * rprecision |
l_t_check |
NEW |
If .TRUE., check plausibility of temperature against US standard atmosphere. |
.FALSE. |
/PHYCTL/ |
itype_hydmod |
NEW |
Type of soil water transport and ground water runoff:
- Standard (default).
- Modified formulation that allows ground water buildup
(Schlemmer et al. 2018, https://doi.org/10.1029/2017MS001260).
|
0 |
lsoil_init_fill |
NEW |
Filling of lowermost active soil layer at initialization.
This determines if the groundwater should be filled up for the hydrologically
passive layers (.TRUE.) or not.
- If you start your run from a soil-moisture distribution derived using
itype_hydmod=0, this variable should be set to .TRUE.
- If you restart the model or initialize the model with a soil-moisture
distribution derived using itype_hydmod=1 it should be set to .FALSE.
-
. |
.FALSE. |
nradcoarse, lradf_avg |
DELETE |
Variables used for the coarse radiation grid. |
|
/EPSCTL/ |
hinc_reset_pm |
NEW |
Increment for resetting pertstoph_mask (in hours) |
0 |
Back to Contents
Data Assimilation:
Results may be changed slightly if radiosonde descent or aircraft observations
are assimilated.
SPPT:
Results might change, if SPPT is on
Back to Contents