The Generic Messy Submodel Tendency (v1.0) for Process-based Analyses in Earth System Models

The tendencies of prognostic variables in Earth system models are usually only accessible, e.g. for output, as a sum over all physical, dynamical and chemical processes at the end of one time integration step. Information about the contribution of individual processes to the total tendency is lost, if no special precautions are implemented. The knowledge on individual contributions, however, can be of importance to track down specific mechanisms in the model system. We present the new MESSy (Modular Earth Submodel System) infrastructure submodel TENDENCY and use it exemplarily within the EMAC (ECHAM/MESSy Atmospheric Chemistry) model to trace process-based tendencies of prog-nostic variables. The main idea is the outsourcing of the tendency accounting for the state variables from the process operators (submodels) to the TENDENCY submodel itself. In this way, a record of the tendencies of all process–prognostic variable pairs can be stored. The selection of these pairs can be specified by the user, tailor-made for the desired application , in order to minimise memory requirements. Moreover , a standard interface allows the access to the individual process tendencies by other submodels, e.g. for on-line di-agnostics or for additional parameterisations, which depend on individual process tendencies. An optional closure test assures the correct treatment of tendency accounting in all sub-models and thus serves to reduce the model's susceptibility. TENDENCY is independent of the time integration scheme and therefore the concept is applicable to other model systems as well. Test simulations with TENDENCY show an increase of computing time for the EMAC model (in a setup without atmospheric chemistry) of 1.8 ± 1 % due to the additional subroutine calls when using TENDENCY. Exemplary results reveal the dissolving mechanisms of the stratospheric tape recorder signal in height over time. The separation of the tendency of the specific humidity into the respective processes (large-scale clouds, convective clouds, large-scale ad-vection, vertical diffusion and methane oxidation) show that the upward propagating water vapour signal dissolves mainly because of the chemical and the advective contribution. The TENDENCY submodel is part of version 2.42 or later of MESSy.


Introduction
In Earth system models (ESMs) individual processes are described by various numerical algorithms for solving the underlying mathematical equations.Here, the term "process" describes any abstraction of a mechanism which alters the state of the system -these could be of physical, dynamical, chemical, biogeochemical, or even socio-economical nature.A corresponding "operator" describes the processes' algorithmic formulation, which yields a deterministic output for any given (reasonable) input.Finally, within the Modular Earth Submodel System (MESSy) (Jöckel et al., 2005) we define any coded realisation of the corresponding operator as a "submodel"1 .Thus, in a certain sense, the terms "process", "operator" and "submodel" can be used as synonyms (and will be hereafter throughout the text).
The method of choice for the combination of the individual processes is the so-called operator splitting concept.In this method the contributing processes modifying a specific prognostic variable are calculated in sequence, each adding its individual contribution to the overall change over time (i.e. the total tendency).Depending on the chosen time integration scheme, these individual process tendencies (of a specific prognostic variable) depend on the initial condition (or the state of the prognostic variable at the end of one or more time steps before), and the sum of the process tendencies at the same time step in the sequence of operators before.Commonly in ESMs only the total tendency is analysed and the information about the individual contribution of a certain process to the change of a state variable is lost.Understanding the effects of individual processes on the state variables, however, is important for unravelling the driving mechanisms of patterns generated by ESMs.Moreover, the process-based tendencies of state variables can serve as input to further calculations of physical or chemical processes.
Approaching the issue by excerpting every process tendency of each state variable directly from the operators would cause a range of technical problems like an excessive memory usage and a very inflexible data handling.Therefore we implemented a comprehensive and easily expandable infrastructure submodel, which is based on the outsourcing of the tendency accounting from every process submodel to it, and name it TENDENCY.Beginning with version 2.42 of MESSy (Jöckel et al., 2010) TENDENCY is part of the overall model infrastructure.TENDENCY operates on all prognostic variables, including tracers (generic submodel TRACER, Jöckel et al., 2008).The structure of TEN-DENCY is independent of the time integration scheme used and thus the method is applicable to other model systems as well.Moreover, the process-based diagnostics can be set up by the user via namelist during runtime, tailor-made for the desired application, and thus avoiding a waste of memory.In Sect. 2 the implementation of TENDENCY is described, including specifics of the used EMAC model system (Jöckel et al., 2010).The benefits and the methods of the user-controlled diagnostics are described in Sect.3. Furthermore, an optional closure test is explained, which is included in the TENDENCY submodel and makes the model less error prone.A runtime performance analysis was carried out to determine the additional computing time arising from the increased usage of subroutine calls.Section 4 describes the test method and the results which indicate an overhead of 1.8 ± 1 %.Exemplary results of the method are presented in Sect. 5.
A detailed reference manual of TENDENCY is available as a Supplement.

Implementation
ESMs aim to represent the physical and chemical processes of the real world as realistically and completely as possible.
To approach this aim these processes are solved numerically by individual algorithms.In the model the algorithms perform sequentially as operators which alter the prognostic variables.The common method of choice for the sequential combination of the operators is the operator splitting concept, which is illustrated in Fig. 1.
According to this principle a total tendency is computed for a given state variable (X in Fig. 1) by the different operators (OP 1 . . .OP n in Fig. 1) in sequence and the sum (∂X/∂t) is added at the end of the time step to the value from the beginning of the time step (X(t − 1)).We explain exemplarily the operator sequence controlling the specific humidity q in EMAC.The first operator to be called is advect (OP 1), which simulates the advection of water vapour.As all the tendencies are set to zero at the beginning of the model time step, the advect tendency is based solely on the initial value (X(t − 1)).The next operator, e.g.vdiff (representing vertical diffusion), computes a tendency based on the initial value and the tendency calculated by the advect operator.The operator OP n, which in our example is cloud, hence is based on the initial value and the sum of the tendencies of all the previous operators.At the end of each time step the sum of all the tendencies calculated by the individual submodels results in the total change of the prognostic variable.The individual process tendencies, however, are commonly computed within the respective operators and afterwards not used any more.Thus these values are overwritten in the following time step and hence the information is lost.
Always extracting all process tendencies for all state variables with a straightforward approach by making them globally available would cause several technical problems, for instance an excessive memory requirement.A more flexible method is therefore required.Hence, in order to retrieve the process-based model tendencies of the state variables in a standardised and configurable manner, additional code has to be included throughout the model system.Apart from the development of the TENDENCY module itself (for details see Sect.2.1), every subroutine which computes tendencies has to be modified: the tendency accounting is relocated to the TENDENCY module, where a user-defined record is kept.Details of the implementation are given in Sect.2.2 and special notes concerning the EMAC model are documented in Sect.2.3.
Each MESSy submodel comprises subroutines for the initialisation, the time integration and the finalising phase.The submodels are connected via standardised interfaces and are controlled by a central unit (generic submodel SWITCH/CONTROL) calling one after the other.During the initialisation phase, among other things, the memory is set up, while during the integration phase the actual development of the state variables in space and time is calculated.The memory in the EMAC model is managed via the MESSy submodel CHANNEL (Jöckel et al., 2010), which we also utilise for TENDENCY.
Commonly, within each prognostic submodel a process tendency for a specific state variable is calculated and added directly to the total tendency.The TENDENCY submodel is based on the outsourcing of this tendency accounting (i.e. the addition to the total tendency) from the submodels to the TENDENCY module.Figure 2 illustrates this concept.The addition of the process tendency to the total tendency in a specific submodel is replaced by a call to an interface subroutine of TENDENCY, thus handing over the control over the tendency (Tend in Fig. 2).This allows us to keep a record of the process-based tendencies of state variables.The output and corresponding memory requirements, however, can now be controlled via a namelist by the user.This generalised access to the process tendencies is less error prone and more user friendly, because no recoding is required for tailor-made tendency diagnostics.Additional submodels can easily be equipped with the TENDENCY feature by following the recipe in Sect.2.2.The principle of the TENDENCY submodel is independent of the time integration scheme and therefore can be applied to every model system.An overview of the TENDENCY module is given next.

The TENDENCY module
The TENDENCY module is written in Fortran 95 programming language.It operates in all three phases of the model: the initialisation phase, the time integration phase and the finalising phase.
The main entry points are called once from the base model interface layer (BMIL, for definition see Jöckel et al., 2010).In the initialisation phase the subroutine -main_tendency_initialize reads the TEN-DENCY CPL-namelist and sets up the "handles" and prognostic variable registrations (both explained below) for those processes of the base model, which have not yet been re-implemented as MESSy submodels.
-main_tendency_init_coupling parses the TENDENCY coupling (CPL)-namelist entries and sets up internal data structures and memory (channels and channel objects, Jöckel et al., 2010), depending on the user request in the CPL-namelist.
In the time integration phase the subroutine -main_tendency_global_end performs the internal closure test (explained below), if requested by the user in the CPL-namelist.
-main_tendency_reset resets the internal tendencies to zero at the beginning of the next time step.
And in the finalising phase the subroutine -main_tendency_free_memory frees the nonchannel object related memory and deletes the internal data structures.
Besides these main entry points, TENDENCY provides a number of functions and subroutines, which need to be called from within the various submodels (more precisely from their respective submodel interface layer, SMIL; for definition see Jöckel et al., 2010).During the initialisation phase, each submodel needs to -be associated with a unique integer identifier (which we call "handle").This is accomplished by calling the function mtend_get_handle as provided by the TEN-DENCY submodel.This function requires as argument a unique name of the process, which can be used in the user interface (see Sect. 3.1), i.e. the CPL-namelist.
-register the prognostic variables, which are subject to be modified.This is done by calling the subroutine mtend_register with the process handle and a unique identifier (provided as integer parameter by TENDENCY) of the respective prognostic variable as arguments.
Note that for processes of the base model, which have not yet been re-implemented as MESSy submodels, these two steps are performed within main_tendency_initialize (see above).These initialisation procedures are used to set up an internal logical structure, which is used in combination with the user request (CPL-namelist), to set up the memory (in main_tendency_init_coupling) and to control the tendency accounting during the time integration phase.
During the time integration phase, mainly two subroutines are called by each submodel: -mtend_get_start is called to calculate the up-todate ("start") values of the respective prognostic variable.
-mtend_add is called to add the new process tendency to the total tendency.
Both subroutines need to be called for each prognostic variable to be modified.Details on the argument lists of TEN-DENCY subroutines are documented in the Supplement.
As it is implemented now, the submodel TENDENCY is directly portable only to other MESSy base models (i.e.models equipped with the MESSy infrastructure), since it utilises the two other MESSy infrastructure submodels CHANNEL (for memory management and I/O, Jöckel et al., 2010) and TRACER (for chemical constituents, Jöckel et al., 2008).Still, for porting the concept to another model system, large parts of the code can be reused, as well.The list of prognostic variables, however, needs to be adapted to the respective base model in any case.

Equipping submodels with the TENDENCY feature
Table 1 shows the required submodel modifications exemplarily for the temperature as prognostic variable.As can be seen, the TENDENCY approach has some advantages: the direct access (by Fortran USE) to the central prognostic variables and their corresponding tendencies (in the example tm1 and tte) is no longer required.The same holds for the time step length (time_step_len) for calculating the start value (t), which is potentially (in Table 1 not explicitly shown) required to calculate the process tendency my_tte.This is less error prone, since the correct calculation (last two rows in Table 1) is entirely hidden in the TENDENCY submodel.
As Table 1 shows, equipping a submodel with the TEN-DENCY option requires four main modifications: two during the initialisation phase and two during the time integration phase of the submodel.During the initialisation phase a handle (see Sect. 2.1, in the example my_handle) has to be assigned to each submodel by calling the function mtend_get_handle.Additionally the subroutine mtend_register must be called for every variable which is going to be altered by the submodel (temperature in the example, selected via the identifier mtend_id_t).This registers the respective process-prognostic variable pair in the TENDENCY module and sets an individually assigned logical to "true".This is used for the definition of the respective channel object (memory) as well as for controlling the calculations in the time integration phase.
During the integration phase of the model the computation of the start values of the prognostic variables as well as the addition of the process-based tendencies are replaced by calls of subroutines from the TENDENCY module.The subroutine mtend_get_start now computes the start values and the subroutine mtend_add updates and records the tendencies.The respective start values represent the sum of the initial value (the value from the previous time step) and all the process tendencies of the submodels called prior to this submodel multiplied with the time step length.
Since not all submodels could be modified for TEN-DENCY at once, and also to enable model configurations without the TENDENCY feature, we decided to encapsulate the submodel modifications in pre-processor directives.Additional code is introduced using

#endif
Thus all modifications and the TENDENCY submodel are only active if the model is configured with -enable-MESSYTENDENCY.This structure is also recommended for equipping further submodels with the TEN-DENCY feature.

EMAC-specific implementation details
Since some processes of the physics in EMAC (v2.42) have not yet been re-implemented as independent MESSy submodels, they are still operated directly within the ECHAM5 base model.In the sequence of operations, the MESSy infrastructure initialises the memory before the remaining parts of the base model ECHAM5 are initialised.On the other hand, the process-prognostic variable pair registrations determine the memory (channel objects).Thus the function mtend_get_handle and the subroutine mtend_register would be called too late, if only called from the remaining parts of the ECHAM5 base model.Therefore, these associated process identifiers (namely advect, surf 2 , vdiff, gwspect, ssodrag, dyn) have to be assigned, Table 1.Required modification of submodels.The example shows the modification of the total temperature tendency tte.The left column shows the typical classical code, the right column the TENDENCY approach.The value from the time step before is tm1, the local variable t is the current (start) value, and my_tte is the new, additional tendency, also a local variable.The time step length is time_step_len and modstr denotes the name of the respective submodel.Note that the "_l" suffix of mtend_add and mtend_get_start are due to different possible entry points with access to different ranks of the variables (here 2-D, see Sect. and the possible process-prognostic variable pairs have to be registered already during the initialisation phase of the TEN-DENCY module itself (see also Sect.2.1).
A second EMAC specific is owed to the spectral transform dynamical core of the ECHAM5 base model: the wind speed is usually in units of m s −1 , but to meet the needs of the spectral transform on the sphere, it has to be scaled with the cosine of the latitude.Various physical subroutines in the EMAC model, however, perform with the unscaled wind speed.Within TENDENCY, always the scaled wind speed is used.To avoid inconsistencies, TENDENCY provides the subroutine mtend_set_sqcst_scal, which is used to set an internal logical switch telling TENDENCY whether the incoming wind tendency is scaled or not.
The third EMAC specific is related to the dimensions of the prognostic variables in 3-D grid-point space.The ECHAM5 base model uses a specific order of dimensions ((h 1 , z, h 2 ) where h 1 and h 2 denote the horizontal and z the vertical dimensions) for code optimisation.Hereby some of the processes perform within a loop over the outer horizontal dimension h 2 .Therefore, a distinction had to be made between those processes being called globally (outside the h 2 loop) and those being called locally (inside the h 2 loop).In the TENDENCY submodel this issue occurs during the time integration phase, i.e. concerning the mtend_get_start and the mtend_add subroutines.Here, the arrays have to be of rank 2 ((h 1 , z)), if called inside the local loop, and of rank 3 ((h 1 , z, h 2 )), if called outside.Therefore both subroutines are found twice in the TENDENCY module suffixed by either _l (for local) or _g (for global), and differing only by the rank of the array arguments.

Diagnostic methods with TENDENCY
The implementation of the MESSy generic submodel TEN-DENCY provides several benefits concerning the handling of the process-based tendency data.The CHANNEL infrastructure allows a flexible and user-defined output of the information and thus the memory requirement can be minimised depending on the specific needs.This section describes the independent modes of operation, how the information can be extracted by the user and the optional closure test.
The limitations of the bookkeeping of process tendencies, by design, is the partitioning of the individual processes, according to the operator splitting concept.If a process can be subdivided into further sub-processes, each calculating a distinct contribution to the tendency, those sub-process tendencies can be handled by TENDENCY.This also implies that intermediate tendencies within an implicit scheme cannot be captured by TENDENCY, unless they are explicitly calculated within the scheme.

User interface
The TENDENCY submodel provides various options for the user to receive data output, which have to be set prior to the model simulation.This is realised via two interfaces connected with the module, the corresponding coupling (CPL) namelist and the integrated subroutine mtend_request.
The CPL-namelist contains three logical parameters: -l_full_diag enables the full diagnostic output, i.e. channel objects (in a separate output channel "ten-dency_full") for the tendencies of all possible processprognostic variable pairs are created.This option requires considerably large memory and has been mainly implemented for debugging purposes.
-l_closure enables the internal closure test and creates the additional channel "tendency_clsr" with the two objects required for the closure test (see Sect. 3.2).This test has been implemented to check if all submodels in a given model setup work correctly with respect to the tendency accounting.
-l_clos_diag enables additional output of information during the model simulation into the log file.This contains the external and the internal tendencies (for explanation see Sect.3.2) as well as their difference and is mostly used for development and debugging purposes, e.g. when including a new submodel.
Individual tendency diagnostics can be requested in the CPL-namelist with entries looking like TDIAG(i) = "X", "p1;p2+p3; . ..; pn", where i is an arbitrary but unique number, X is the name of the prognostic variable (or tracer), and p1 to pn are the names of the processes (see Sect. 2.1).TENDENCY creates a new output channel (named "tendency_diag") and one channel object for each semicolon separated list of process sums.These objects either contain the individual tendency of the process-variable pair (example p1), or the sum of tendencies of the corresponding processes (example p2+p3).An additional "unaccounted" object is created, which contains the sum of all process tendencies missing in the list.If the "unaccounted" object is zero for all time steps in every grid box, all processes influencing the variable X are within the set of processes p1 to pn.With this feature, tailor-made diagnostics excerpting only the desired tendencies, thus with a minimised memory requirement, can be set up.
Besides the CPL-namelist controlled generation of new output objects containing individual process tendencies (or sums thereof), TENDENCY also provides an interface subroutine to enable the access to individual process tendencies by other submodels.Calling mtend_request from the entry point "init_coupling" of submodel A with the name of the desired submodel B and the identifier of the desired prognostic variable X will generate a new channel object in the channel "tendency_exch" (for exchange) and return a pointer to its memory.If the corresponding process submodel B will commit its tendency by calling mtend_add, this tendency will be copied into this new channel object and therefore be available in submodel A for further calculations.
As for each of the possible modes of operation of the TEN-DENCY submodel an individual channel is generated, they do not exclude or influence each other, but rather work independently.

Closure test
An optional closure test can be performed with the TEN-DENCY submodel for every time step during the simulation.The test is mainly implemented for development tasks like including new submodels to the TENDENCY structure.If activated via the namelist (see Sect. 3.1), two additional process handles (I_HANDLE_SUM and I_HANDLE_DIFF) are defined.Further, a separate channel "tendency_clsr" is created with corresponding channel objects, two ("sum" and "difference") for each prognostic variable.The "sum" objects are updated every time a tendency is updated in the mtend_add subroutines and thus display the total sum of tendencies, which are calculated only within the TENDENCY module (in the following called "internal tendency").As with TENDENCY the total model tendency (in the following called "external tendency") should be calculated only within the TEN-DENCY submodel, those two values are supposed to be equal.If these two values differ, the respective variable must be altered by another process of which the tendency computation was not relocated to the TENDENCY submodel.Testing this denotes the closure test which is conducted as follows: the channel objects corresponding to the handle I_HANDLE_DIFF are used to store the difference between the two tendency values calculated in the subroutine main_tendency_global_end by subtracting the internal from the external tendency.This difference is used in the subroutine compute_eps_and_clear.In this subroutine an ε is calculated by where xte e denotes the external tendency of the variable or tracer x.Next, the difference between the two tendencies is challenged to be smaller than ε.If so, certainty is given that all processes changing the respective prognostic variable are properly captured by the TENDENCY submodel.If not, an error message will occur in the log file.

Runtime performance analysis
Including the TENDENCY submodel into the EMAC model leads to a number of additional subroutine calls during the simulation.To estimate the extra computing time the EMAC model requires for these, a runtime performance analysis has been conducted.For this, four model simulations (with EMAC version 2.42) over 10 model days with a time step of 15 min were carried out on 1 node with 64 tasks per node on the "blizzard" IBM Power 6 of the DKRZ (Deutsches Klimarechenzentrum) in Hamburg.While in two of the four simulations the TENDENCY submodel was performing, in the other two it was switched off.The model resolution of T42L90MA was chosen with a model setup including only the dynamical core of the ECHAM5 base model and the basic submodels of the MESSy system (namely: cloud, convect, cvtrans, h2o and rad4all) as well as the extra routines for the middle atmosphere (gwspect, ssodrag).In order to receive comparable results, apart from the wall clock no data output was enabled and due to the initialisation phase of the model the first time step was not taken into consideration.For the calculation, the sum of the wall clock time has been taken for every MPI 3 parallel task and for every time step of one model simulation.The equation yields the averaged value of the overhead (O) produced by the additional submodel per time step in percent.Here, n indicates the time step, P the number of MPI tasks and t on and t off represent the wall clock time for the simulations with the TENDENCY submodel either switched on or off.In our tests the use of the TENDENCY submodel results in an additional 1.8 ± 1 % of computing for the EMAC model in the described setup.

Exemplary results
Exemplarily for presenting a possible application of the TENDENCY submodel the analysis of simulated stratospheric water vapour (q) has been chosen.Figure 3 shows the simulated representation of the well-known tropical (5 • N-5 • S) tape recorder signal between 100 and 10 hPa for three simulated years, which was first discovered by Mote et al. (1995Mote et al. ( , 1996) ) and Weinstock et al. (1995).For this, we carried out a model simulation in T42L90MA resolution (2.8 • ×2.8 • , 3 message passing interface In Fig. 4 the total tendency of the water vapour is shown for the simulated time period.Here a fairly clear distinction can be made between reddish (increasing water vapour) and bluish (decreasing water vapour) patches.These in fact correspond to the increasing and decreasing specific humidity over time in Fig. 3. White patches in Fig. 4 correspond to the maxima and minima in Fig. 3.The signal of the total tendency also propagates upward in time, like the actual tape recorder signal.At a pressure lower than 30 hPa, the signal dissolves or mixes in with less clear patterns in the upper stratosphere.
Figures 5-9 show the process-based tendencies retrieved via the TENDENCY submodel.For this the line TDIAG(2) = "q", "vdiff;cloud;convect;advect;h2o", was included into the CPL namelist.As explained in Sect. 3 this generates an output file for the process tendencies of the specific humidity q for each of the five stated submodels, involved in controlling the prognostic development of q.The sixth generated output object accounting for the unaccounted submodels was tested to be zero at any time and location, to assure that all the processes influencing the specific humidity have been captured.
Figures 5 and 6, showing the tendencies caused by largescale clouds (cloud) and convective clouds (convect), show no signal above the tropopause or the lower stratosphere, as expected.The mostly bluish colour at the bottom of the images accounts for condensing and re-sublimating water vapour and cloud formation, which reduces the specific humidity of the vapour.The small red spots (hardly visible) on top of the blue colour are due to water vapour transport in the www.geosci-model-dev.net/7/1573/2014/convection submodel (convect) and due to evaporation and sublimation of transported liquid or ice water in the cloud submodel.
Figure 7 shows the impact of the vertical diffusion (vdiff ).A strong signal goes up to 80 hPa.Above that region, the signal is considerably weaker.The vertical diffusion tendencies are about three orders of magnitude smaller than the total tendencies.Above 50 hPa there are almost no changes caused by vertical diffusion, apart from a downward propagating signal.It seems to be in phase with the quasi-biannual oscillation (QBO), which may influence the strength of the tape recorder signal (Niwano et al., 2003).
The prescribed water vapour production caused by methane oxidation is shown in Fig. 8.The continuous production of water vapour from the chemical reactions increases with height and varies slightly with season.The magnitude of the tendencies are about one order of magnitude smaller than the maxima of the total tendencies.
The advection tendency of the specific humidity can be seen in Fig. 9.It reproduces the tendency tape recorder signal from the total specific humidity tendency in Fig. 4 fairly well, but is weaker.The advection tendency indicates upward propagation from 80 to 30 hPa where it fades out.In the upper stratosphere the advection tendencies also resemble the total tendencies, but with reduced magnitude.
Figure 10 shows the 3-year temporal and zonal averages of the individual tendencies at the Equator, to provide a picture of the net effect of the processes over the entire simulated period.Here again it can be seen that the influence of the two cloud processes and of the vertical diffusion fade out above the tropopause and the water vapour production by methane oxidation simply increases with height.The averaged advection tendency changes from positive to negative values at around 50 hPa and above balances the chemically produced water vapour.As the methane oxidation provides a constant signal it has the same net effect as the advective impact when temporally averaged, even though the maxima are one order of magnitude smaller.Without the chemical  production of water vapour, the advection tendencies would become zero above around 30 hPa, from which point the specific humidity is fairly constant over time for a given altitude.
A variety of studies can be carried out by means of TEN-DENCY.The relevance of certain processes as drivers for changes in the dynamical or chemical state of the atmosphere can be analysed.However, the limitations described in Sect. 3 have to be considered.The relevance of solar activity for a temperature change over time, for instance, can in the EMAC radiation scheme only be investigated by comparing the temperature tendencies from the radiation scheme of two model simulations, one with and one without variations in solar activity.The level of detail that can be investigated with TENDENCY is limited by the specific process formulations.If one process calculates several contributions to a variable, though, these can be examined individually with TENDENCY.

Summary
We developed the generic submodel TENDENCY for accessing process-based tendencies of state variables (including tracers) for Earth system models in a well structured manner, with minimum memory requirements and maximum flexibility and user friendliness.Implemented in the EMAC model this Fortran 95 module enables us to diagnose and to use these process tendencies and thus to simplify the analyses of mechanisms as well as the computation of dependent processes.Another advantage of the new submodel is the reduced error susceptibility of the model system, obtained by the standardisation of the start value calculation and tendency accounting and by the additional, optional closure test.
The implementation is based on the relocation of the state variable tendency accounting from the submodel of the respective process to the tendency module itself.This allows us to directly keep a record of all the process-variable tendency pairs and to output and transfer tailor-made subsets for diagnostics and further analyses.This generalised approach is less error prone and more user friendly, because no recoding is required to set up specific tendency diagnostics.New submodels can easily be equipped with the TENDENCY feature by following a simple coding standard.Due to the independence of the time integration scheme, the concept of TEN-DENCY is also applicable to other base models.
With a computing time overhead of less than 2 % in average for a setup without atmospheric chemistry of the EMAC model due to the additional subroutine calls, we achieved a computationally light implementation of the additional tool.Exemplary results from a 3-year model simulation show the different process tendencies of water vapour in the stratosphere.Here we see that it is the chemical and the advection tendencies which control the dissipation of the tropical tape recorder signal with height over time.

Figure 2 .
Figure 2. Schematic of the MESSy TENDENCY submodel within the framework of the EMAC model system.The addition of the individual process tendencies to the total tendency is now outsourced from the respective submodels to the TENDENCY submodel.A user-controlled namelist provides several possibilities for the output of the process tendencies of state variables.

Figure 3 .
Figure 3.Time series of the average over the 5 • S-5 • N latitudinal band of the specific humidity (in mg kg −1 ).

Figure 4 .
Figure 4. Time series of the average over the 5 • S-5 • N latitudinal band of the total tendency (in ng kg −1 s −1 ) of the specific humidity.

Figure 5 .
Figure 5.Time series of the average over the 5 • S-5 • N latitudinal band of the large-scale cloud tendency (in ng kg −1 s −1 ) of the specific humidity.

Figure 6 .
Figure 6.Time series of the average over the 5 • S-5 • N latitudinal band of the convective cloud tendency (in ng kg −1 s −1 ) of the specific humidity.

Figure 7 .
Figure 7. Time series of the average over the 5 • S-5 • N latitudinal band of the vertical diffusion tendency (in ng kg −1 s −1 ) of the specific humidity.

Figure 8 .
Figure 8.Time series of the average over the 5 • S-5 • N latitudinal band of the methane oxidation tendency (in ng kg −1 s −1 ) of the specific humidity.

Figure 9 .
Figure 9.Time series of the average over the 5 • S-5 • N latitudinal band of the advection tendency (in ng kg −1 s −1 ) of the specific humidity.

Figure 10 .
Figure 10.Zonally averaged process tendencies of the specific humidity (in ng kg −1 s −1 ) at the Equator, averaged over the 3-year time period.