This version is the next step towards the new version COSMO-Model 5.0, which will be a unified release for NWP and climate mode. Many changes have been done to prepare the implementation of the new tracer module and the 2-moment microphysics. Also, some changes are to clean up the code and make it more modular. There are only very few changes that influence the results.
src_radiation.f90
The code to reduce the cloud cover of ice clouds in the upper troposphere has been modified:
This change does influence the radiation and therefore also the simulation results. Experiments have been conducted at DWD already in late 2011 for COSMO-DE and COSMO-EU. For both applications periods in winter and in early summer have been considered. The verification was neutral.
At least the first modification can be considered to be a bug fix.
All routines related to metric calculations have been gathered to the new module grid_metrics_utilities.f90. This module now contains the subroutines:
The module grid_metrics_utilities.f90 also contains some fields necessary for running, which have been defined in data_fields.f90 before.
These changes do not influence the results.
To avoid multiple copies of the same code in the module src_advection_rk.f90, the positive definite advection of the different fields in a certain space direction have been gathered in new subroutines advection_ef_x, advection_ef_y, advection_ef_z. Depending on the chosen advection scheme, these routines are called in a special order.
At the same time, a bug has been fixed by Oliver Fuhrer in the interfaces of the advection operators. Related problems have also been reported from the Lahey Compiler by Astrid Kerkweg:
Certain subroutines have been called by the COSMO-Model using the same argument twice. For example, the advection operators are written in a form
subroutine advx(s,su)
real, intent(in) :: s
real, intent(out) :: su
tmp = f(s)
su = g(tmp)
end subroutine advx
and are then called via
CALL advx( qv(nnew), qv(nnew) )
to avoid an additional copy. According to the Fortran standard this type of argument aliasing is explicitly forbidden (see for example note 12.34 of the Fortran 2008 standard) and may lead to erroneous results. This actually seems to be the case for the NAG and Lahey Fujitsu compiler. This type of calling is used for advection and cloud diagnostics and different approaches for fixing it have been adopted.
For the advection, the memory copy has been made explicit in the advection driver routine (as has already been done for the SL-advection). This also leads to a reduction in code complexity. The advection routines retain only one argument which is declared as INOUT and do the update in-place.
The changes have been tested for the COSMO-7 and COSMO-2 operational setup at MeteoSwiss and have led to bit-identical results. The performance on the Cray XT4 machines does not seem to be influenced significantly by the modifications and is within the uncertainty of the measurement of a single run on a machine being shared with other users.
Tests at DWD for COSMO_EU and COSMO_DE have also shown that the changes do not influence the results.
New variants of the Bott Advection scheme have been implemented as new options for the Namelist parameter y_scalar_advect in /DYNCTL/:
Strang splitting only at the bottom, in the lowest koffset levels of the atmosphere. The more accurate but also more expensive Strang splitting needs only to be applied near the surface. Using the less expensive advection variants in the higher atmosphere will save computational time.
A new subroutine advection_ef_xyzyx_new has been implemented:
So it is for the upper levels k = 1,...,ke-koffset
And in the lowest levels k = ke-koffset+1, ..., ke Strang Splitting: xyzyx
The diagnosis of dqvdt was intermixed with the computation of vertical diffusion of qv and qc in the subroutine complete_tendencies_qvqcqi_tke (and the subroutine slow_tendencies for the LF-core). This has been separated into two different subroutines (RK) or different code blocks (Leapfrog) in order to make the code more modular and extensible in the future. This required changes to the source files slow_tendencies.f90, src_runge_kutta.f90, and src_slow_tendencies_rk.f90. The changes are of purely technical nature and do not influence the model results.
The modified code has been checked for the MeteoSwiss operational setup (COSMO-2 and COSMO-7) and proven to give bit-reproducible results for the Runge-Kutta applications. It also has been checked for COSMO_EU and COSMO_DE at DWD, where it also gave bit-reproducible results
A remark on the Leapfrog core:
An additional optimization has been made in the LF core (removal of a code sequence
"+qvtens-qvtens"). Therefore, rounding errors can lead to differences in
the range of the numerical precision.
These changes only influence the computation of dqvdt and thus are only
visible if the convection scheme is active (COSMO-7) or in the DQVDT diagnostic output.
The impact on model performance is negligible and cannot be discerned from the jitter
on the machine.
At the same time, the field qvt_diff has been eliminated from the COSMO-Model at all. In qvt_diff, additional diffusive tendencies have been stored, which do not contribute to the simulations, if the three-dimensional turbulence is not switched on.
To unify the treatment of all microphysical species (necessary for the new tracer module), this field has been completely removed from the model.
A warning is issued that explicit diffusion tendencies are not accounted for in dqvdt.
The computation of the total physical tendencies has been moved out of the dynamical cores and to the subroutine organize_physics into the 'compute' section. This avoids duplicated code and simplifies the program structure.
For the Runge-Kutta core these changes are neutral and do give bit-identical results.
For the Leapfrog core, there are rounding differences, because here the order is changed, in which the physical tendencies are added.
The following options and related source code have been removed:
Additional variables have been added in the long meteograph output: SWDIR_S, SWDIFD_S, SWDIFU_S, SNOW_MELT
This changes the format of the M_*-files; everybody working with these files has to adapt the according post-processing programs
In addition, a format for printing the time step has been changed from I5 to I10, to avoid stars in the output in case of climate runs.
For long and for short grid point output, the corresponding grid point variables are allocated only for one step. Only in case of "lgpspec" output, the variables are allocated with #(grid point output steps) as a dimension. In this way, some memory is saved.
The interface for the routine diff_minutes (which replaces the DWDLIB routine DIFMIN) has been extended with an argument icalendar, to specify the calendar in use. The COSMO-Model variable itype_calendar has to be passed, which specifies:
Some additional notes:
First modification:
The switch l_fi_ps_smooth has been renamed to l_fi_pmsl_smooth,
because not ps but pmsl is smoothed in that case.
The actions done are now:
NOTE:
In climate runs, if lbdclim=.TRUE., SST is updated anyhow with
boundaries, but in usual weather forecasts, it is kept constant during
the model run. With lbdsst=.TRUE., boundary values are taken
to update SST over sea only.
New Namelist switch in /DIACTL/ to activate the testsuite: ltestsuite (Default: .FALSE.)
When to do output: at the moment this is hard coded for steps 0,1,2,3 and then every 10th step. For the Leapfrog core, the last time step is not written any more, because at the time of output it has not been Asselin-filtered and will therefore not be reproducible as compared to a longer run.
New routine in src_meanvalues: mean_testsuite
This new routine calls another routine print_testsuite, which gets a COSMO-field
(2D or 3D) as argument. The routine print_testsuite has a generic implementation,
taking care of fields with different dimensions.
The output is written to an ASCII file YUPRTEST.
Prescribed surface albedo values, based on MODIS, are read from the initial file. They have to be provided by INT2LM. New fields have been introduced for that purpose. Different methods have been implemented by the CLM Community and by DWD. They method can be chosen by the new Namelist switch itype_albedo in the group /PHYCTL/:
There are three new fields with the following GRIB1 numbers:
For itpye_albedo=2, ALB_DRY and ALB_SAT are defined as mandatory fields for input. For itype_albedo=3, ALB_DIF is mandatory. These fields are also written to restart files.
In src_radiation.f90, new code has been added to deal with the new methods to determine the soil albedo from the dry and saturated values and relative saturation of the top soil layer or from the diffuse solar albedo.
More detailed description of albedo processing:
The CommunityLandModel provides a file with global soil color data on a regular latitude/longitude grid with a resolution of 0.5 deg. The soil color is then converted in albedo values by 4 lookup tables for two spectral bands (visible and near infrared) and for dry and saturated soils. Since the radiation scheme in CLM doesn't distinguish between different spectral bands for the albedo a weighted mean of the albedo values for the two bands is calculated with a weighting factor of 0.53 for the near infrared band (according to the relative contribution of solar energy from this band). This leaves us with an albedo value for both dry and saturated soil at each land grid point of the original dataset.
An offline program is used to do all these calculations and to interpolate the data to a given CLM grid taking the land-sea-masks of the new grid and the original grid into account.
The treatment of wet soils is also changed with respect to the original scheme that uses a coefficient which depends only on the soil type and which is multiplied with the soil water content in the top soil layer. The product is then added to the albedo value for the dry soil. With the prescribed albedo fields a linear interpolation between dry and saturated values based on the relative saturation is applied, where the pore volume and air dryness point are used to determine the relative saturation.
In cooperation with the ECMWF a monthly mean albedo has been taken out of a 5-year climatology made by compositing, and gap-filling the MODIS BRDF data. Background albedo values are calculated at local solar noon, but can be determined at any desired solar zenith angle. Currently one data set of diffuse albedo is implemented in COSMO external parameters. This can be extended, since MODIS provides direct and diffuse albedo in dependency on different wavelengths.
According to the results of Moody et al. (2008) using five years (2000-04) of spatially complete snow-free land surface albedo data, a dependency of the vegetation albedo on the forest fraction was implemented. Currently the fraction of deciduous and evergreen forest is considered and serves as a proxy of remote sensing derived background albedo data.
The basis for the new RCPs is the agglomerative radiative forcing (RF) (W/m**2) due to all greenhouse gases (GHG) as they are available from the RCP Web-page: http://www.pik-potsdam.de/~mmalte/rcps/
The RF has been converted to an equivalent CO2 concentration (ppm) using the formula
with
This has been done for all four RCPs: RCP2.6, RCP4.5, RCP6, and RCP8.5
Applying fourth order polynome fits (5. order for RCP2.6) for the years 1950
until 2150 the concentrations have been adapted to CCLM.
To take into account the new RCPs the value range of Namelist parameter ico2_rad (group /PHYCTL/) has been extended from 7 to 10:
Because the fitted functions of the new RCPs tend to elope prior and beyond certain years when going outside of the period they were fitted to, they need to be restricted to their original fitting interval. This was not implemented for the SRES scenarios either. Now there is a lower boundary of year 1950, where, when simulate in earlier periods, the forcing is fixed to 1950 values. The upper boundary depends on whether you choose a SRES or a RCP scenario. The upper boundary for SRES is 2100 (as commented in the source code) and 2150 for RCPs. ico2_rad=0 (constant) will not be affected by this change. A message to stdout will be written, when the limiter is active.
This feature is to perform simulations with stabilized GHG forcings, e.g from 2100 on. Two new parameters were added in name list group /PHYCTL/:
In case of itype_aerosol=2, new boundary fields have been introduced for:
The usage of a 365 days calendar is defined by setting the Namelist parameter itype_calendar = 2.
NOTE: The new routines difmin_365, datjul_365, etc. that have been proposed by the CLM community for the treatment of this new calendar, have not been taken.
Instead we did the following:
The routines difmin and datjul from the external GRIB (or MISC) library have
been replaced a new COSMO routine "diff_minutes" (located in utilities.f90)
This routine has been extended with the argument itype_calendar, and the
different calendars are now treated within this routine.
No other routines are necessary now.
Be aware that VABSMX_10M is really the maximum wind speed in 10 m height and not the maximum gust, which is denoted as VMAX_10M!!
Diagnostic Snow melt for output purposes only added.
(Originally done by Uwe Boehm.)
The output variable is called as SNOW_MELT. It is accumulated over the storage
interval. snow_melt includes contributions of melting of snow penetrating the
soil (up to field capacity), and/or contributing to surface run-off.
Therefore it appears already in the water balance equation in both terms.
Several adaptions have been done:
NOTE: official GRIB Numbers have been given by DWD (see below) The names UT_SSO, VT_SSO, TT_SSO have been changed to DU_SSO, DV_SSO, DT_SSO to be consistent with other DWD applications and with the similar quantities from convection DU_CONV, etc.
NOTE:
The GRIB coding of ALL multi-layer snow variables is not yet standard,
because a non-official level type has been chosen. For the moment we left
everything as it is, but there is a good chance that this has to be
changed in the near future.
To avoid that, now every processors computes the necessary sums over all times. If an hourly output is chosen (itype_timing=1/3), then a loop over all hours is done, and the values are only gathered per hour. This results in a much smaller memory footprint, but perhaps a larger compute time, and should not be chosen for production runs. The options itype_timing=2/4 are not affected by that.
There were the following changes for the Namelist variables:
Group | Name | Meaning | Default |
---|---|---|---|
/RUNCTL/ | itype_calendar | a new option has been added
= 2: support for a climatological year with 365 days. |
0 |
/DYNCTL/ | y_scalar_advect | new options have been added:
|
.FALSE. |
nincsn | New switch Nudging to define a time increment for calling the Spectral Nudging. | 1 | |
irunge_kutta |
The option irunge_kutta = 0 has been eliminated! Associated with this option was the src_2timelevel dynamical core, which has been removed from the code. |
1 | |
/PHYCTL/ | itype_albedo | Type of surface albedo treatment. Options are:
|
1 |
ico2_rad | New options have been added for new
CO2 scenarios:
|
0 | |
lco2_stab | New Namelist switch to perform simulations with stabilized GHG forcings | .FALSE. | |
iy_co2_stab | to define the year when GHG stabilization begins (is only in effect, if lco2_stab = .TRUE.) | 2001 | |
lprogprec | This switch has been eliminated. All simulations are now done with prognostic precipitation. | - | |
ltrans_prec | This switch has been eliminated. All simulations are now done with transport of prognostic precipitation. | - | |
itype_conv |
The options itype_conv = 1 / 2 have been eliminated! Associated with these options were the Kain-Fritsch convection (src_conv_kainfri.f90) and the Bechtold convection (which was never implemented. The only choosable options now are = 0 (Tiedtke convection) and = 3 (shallow convection). |
0 | |
/IOCTL/ | lbdsst | new switch to provide boundary values for the Sea Surface Temperature during a weather (not climate) forecast. | .FALSE. |
/GRIBOUT/ | l_fi_ps_smooth | This switch has been renamed! See below | - |
l_fi_pmsl_smooth | This is the new name of the switch l_fi_ps_smooth; because what really is smoothed here is the mean sea-level pressure! | .FALSE. | |
l_fi_filter | new switch to filter the geopotential FI indenpendent of l_p_filter settings. | .FALSE. | |
l_pmsl_filter | new switch to filter the mean sea-level pressure PMSL indenpendent of l_p_filter / l_z_filter settings. | .TRUE. | |
/DIACTL/ | ltestsuite | new switch to activate additional ASCII output, which is used for the technical test suite. | .FALSE. |
The following changes influence the results:
The following has to be considered when running the model and / or post-processing the model output:
Name | Description | Element | Table |
---|---|---|---|
VABSMX_10M | 216 | 201 | |
ALB_DRY | surface albedo field for dry soil | 127 | 202 |
ALB_SAT | surface albedo field for saturated soil | 128 | 202 |
ALB_SAT | diffuse albedo field | 129 | 202 |
DU_SSO | tendency of u due to SSO | 43 | 202 |
DV_SSO | tendency of v due to SSO | 44 | 202 |
DT_SSO | tendency of t due to SSO | 45 | 202 |
USTR_SSO | u-stress due to SSO | 231 | 202 |
VSTR_SSO | v-stress due to SSO | 232 | 202 |
VDIS_SSO | vertical integrated dissipation of kinetic energy due to SSO | 233 | 202 |
NOTE:
The variables of the multi-layer snow model still have un-official Grib numbers,
because the Grib treatment of such variables is not yet standardized!
The following settings are now recommended: