The meteorological input parameters for urban- and local-scale dispersion models can be evaluated by preprocessing meteorological observations, using a boundary-layer parameterisation model. This study presents a sensitivity analysis of a meteorological preprocessor model (MPP-FMI) that utilises readily available meteorological data as input. The sensitivity of the preprocessor to meteorological input was analysed using algorithmic differentiation (AD). The AD tool used was TAPENADE. The AD method numerically evaluates the partial derivatives of functions that are implemented in a computer program. In this study, we focus on the evaluation of vertical fluxes in the atmosphere and in particular on the sensitivity of the predicted inverse Obukhov length and friction velocity on the model input parameters. The study shows that the estimated inverse Obukhov length and friction velocity are most sensitive to wind speed and second most sensitive to solar irradiation. The dependency on wind speed is most pronounced at low wind speeds. The presented results have implications for improving the meteorological preprocessing models. AD is shown to be an efficient tool for studying the ranges of sensitivities of the predicted parameters on the model input values quantitatively. A wider use of such advanced sensitivity analysis methods could potentially be very useful in analysing and improving the models used in atmospheric sciences.
Any urban- or local-scale dispersion model requires specific information about the state of the atmospheric boundary layer (ABL) as input values. This information can be estimated from available meteorological observations by so-called meteorological preprocessors (e.g. Van Ulden and Holtslag, 1985). This allows for the use of advanced meteorological input data into the models, even when no atmospheric turbulence measurements would be available. These evaluations are commonly done by applying an energy-flux method that estimates turbulent heat and momentum fluxes in the boundary layer to derive desired boundary-layer scaling parameters (e.g. Fisher et al., 2001; Van Ulden and Holtslag, 1985).
The urban-scale dispersion models at the Finnish Meteorological Institute (FMI) rely on advanced meteorological input from a meteorological preprocessor that is mainly based on the boundary-layer parameterisation of Van Ulden and Holtslag (1985). These dispersion models include, e.g. a Gaussian road network dispersion model (CAR-FMI, Kukkonen et al., 2001; Kauhaniemi et al., 2008) and an urban multiple source Gaussian dispersion model (UDM-FMI; Karppinen et al., 2000b). The models are used to model emissions, dispersion, and transformation of pollution for urban-scale areas. The present work focuses on the meteorological preprocessor model and its sensitivity to model input, whereas dispersion models (not discussed here) motivate the study.
Model sensitivity studies can be done with precision using algorithmic differentiation (AD), which is a technique to compute accurate partial derivatives of functions that are implemented by computer programmes. In the context of AD, a computer program is viewed as a complex function that is composed of a sequence of basic mathematical operations. AD is a systematic technique to apply the chain rule of differentiation to this sequence of numerical operations in a manner that does not involve inaccuracies (Griewank and Walther, 2008). In this study, a source-transformation AD tool called TAPENADE (Hascoet and Pascual, 2013) is employed to differentiate the procedures of a meteorological preprocessor. TAPENADE was chosen because it is an easy-to-use Fortran source-transformation tool that is free for academic use, actively supported and developed, and is well documented.
Other source-transformation AD tools for Fortran are also available (e.g. OpenAD) and a representative list can be found from the
community-driven portal for algorithmic differentiation (
AD has applications that span multiple disciplines of science such as engineering, physics, chemistry, and medicine, where it can be used for sensitivity analyses, optimisation, and inverse problem solving, etc. (Griewank and Walther, 2008). In fact, AD has applications wherever partial derivatives of computer programmes can be made useful. It is not the intention to give a full literature review of research that has benefited from AD but rather a brief overview of its applications in geophysical research and in particular using TAPENADE.
The AD tool TAPENADE has been used for a variety of different physics models as follows. A general purpose atmospheric radiative
transfer model for remote sensing applications made use of the superior numerical accuracy of AD, in comparison to finite difference
perturbations, for evaluation of satellite trace gas spectra (Schreier et al., 2014). Moreover, the AD method was later recommended for
the same model due to lower computational cost and greater numerical accuracy when solving non-linear inverse radiative transfer
problem through iteration (Schreier et al., 2015). A meteorology–chemistry coupled model also made use of AD source transformation
when developing a four-dimensional variational data assimilation procedure for the model (Guerrette and Henze, 2015). TAPENADE has also
been used for a sensitivity study of a sea-ice model to determine optimal model parameters in a minimisation algorithm (Kim et al.,
2006). More information and literature on AD can be found at
The sensitivity on input data of the above-mentioned meteorological preprocessing method has not previously been systematically investigated. The aim of this study is to quantitatively determine the sensitivities of meteorological output parameters on model input for the meteorological preprocessor MPP-FMI (Karppinen et al., 1997, 2000a). This procedure is useful for analysing in detail the functioning of the computer program corresponding to the model MPP-FMI. The modelled sensitivities can also be compared to what would be physically feasible, based on a consideration of the relevant atmospheric processes. This will provide a useful additional test regarding the correct functioning of the computer code and the numerical procedures of the MPP-FMI model. Such a thorough and quantitative sensitivity analysis also provides new information and insights regarding the further refinement of such models.
The meteorological preprocessor is used to estimate turbulent fluxes, atmospheric stability, and boundary-layer scaling parameters based on meteorological observations at fixed locations. The scope of this study is to determine the sensitivity of this model for deriving the vertical fluxes in the boundary layer. However, we have not addressed the routines within the MPP-FMI model that deal with the vertical temperature gradient and hence mixing height which are obtained from temperature profiles provided by radiosondes (Karppinen et al., 2001). Mixing height is another key parameter for the modelling of dispersion of pollutants because it determines the spread of pollutants particularly vertically, and so any future dispersion-model sensitivity study, based on the present work, would naturally also use mixing height as an input. The scope of the present study is depicted in Fig. 1.
The meteorological observations used by the MPP-FMI model as input comprise temperature (
A schematic diagram on the flow of information of the meteorological preprocessor MPP-FMI.
MPP-FMI is originally based on the work by Van Ulden and Holtslag (1985) with modifications that make the parameterisation more suitable for high latitudes and urban areas (Karppinen et al., 1997, 2000a). Central to this method is the surface heat-budget
equation:
First, the meteorological preprocessor estimates available energy
According to surface-layer similarity theory, both friction velocity (
Similarly to
In addition to Eqs. (3) and (4),
Finally, the value for
Algorithmic differentiation (AD) deals with the numerical evaluation of derivatives of functions that are implemented in a computer programme. Any computer program, no matter how complex, performs a sequence of arithmetic operations (addition, subtraction, division, etc.) or elementary functions (exponential, trigonometric, etc.) whose derivatives are known. AD exploits this fact by applying the chain rule of differentiation to the entire sequence of operations within the program (Griewank and Walther, 2008). This systematic approach yields numerical derivative values at machine precision, which describe how the program's results (i.e. outputs) depend on its inputs. The AD method performs each differentiation operation at machine precision and does not employ approximate techniques, such as finite differences. For this reason, AD does not suffer from truncation or round-off errors. The evaluation of finite differences is further complicated if input variables differ by orders of magnitude. By choosing the AD method, the tedious and imprecise evaluation can be avoided.
AD is further separated into two modes: a forward mode or a reverse mode (Griewank and Walther, 2008). Here, the discussion will be
limited to the forward mode, which has been employed in this study. As a starting point, consider an arbitrary computer program that
takes
Application of the forward-mode AD to Eq. (6) yields a new implementation of the program, which, in addition to the original function
evaluation, evaluates its differential:
A typical goal in sensitivity analysis is to obtain the full Jacobian. Utilising forward-mode AD, this is achieved by repeating the
computation of Eq. (7)
The source transformation of the computer program was done using the multi-directional tangent (i.e. forward) mode of TAPENADE. The multi-directional mode allows for efficient execution of the program because redundant executions of primal operations are avoided. The source-transformed computer program was thus used to construct full Jacobian matrices and took just 4.5 times longer to run than the original program. Since the Jacobian matrices were not sparse, optimisation based on sparsity was not motivated.
In this work, if an input variable to the model was solely used in a lookup table, that input was replaced by the parameter that
results from the lookup table (Appendix B). Namely, precipitation and state-of-the-ground input data are used in a lookup table to
estimate a value for the Priestley–Taylor moisture parameter
In addition to replacing the lookup table with parameters that result from the lookups, the sunshine fraction has been replaced with
net incoming solar radiation at the surface (
Range of parameters used for studying the sensitivity of
We have selected the ranges of the input parameters for the sensitivity analysis to be the commonly occurring ones in the
meteorological and environmental conditions in the city of Helsinki, Finland. For instance, the ambient temperatures were assumed to
range from
The values in Table 1 were then used to construct the Jacobian (Eq. 8) for every combination of the meteorological input variables. The
rows of interest for this work are those rows in the Jacobian containing the sensitivity information of
The range and units of the input variables vary greatly. Therefore, the intercomparison of partial derivatives of the outputs with
respect to the input data as such is not desirable. In order to make the partial derivatives intercomparable, the partial derivatives
have been normalised by 10 % of the input range of the respective input variables denoted
Sensitivity of inverse Obukhov length (
An obvious conclusion based on the results in Fig. 2 is that the wind speed
The second most important input variable for the preprocessor with regard to
Range of parameters used for studying the sensitivity of
Another important scaling parameter for Gaussian models is
Sensitivity of friction velocity (
As for the corresponding results for
Amongst the input parameters, only
The second most important input parameter for
The sensitivity study of
Figure 4 shows the cross sensitivity between
Cross sensitivity between atmospheric stability (
For unstable conditions (
The sensitivities of the meteorological preprocessor model MPP-FMI on its input values were examined by the means of algorithmic differentiation. The differentiation of the preprocessor was carried out by a source-transformation AD tool called TAPENADE, yielding a program that evaluates the desired sensitivity derivatives with machine precision. We focused on the evaluation of vertical fluxes in the atmosphere and in particular on the sensitivity of the predicted inverse Obukhov length and friction velocity on the model input parameters. These two quantities were selected as they are key parameters in view of air pollution.
The study shows that the predicted inverse Obukhov length and friction velocity are most sensitive to wind speed and, second most importantly, to solar irradiation. The dependency on wind speed is most pronounced at low wind speeds. For both predicted inverse Obukhov length and friction velocity, the third most important factors are the roughness length and the surface albedo, for unstable and stable conditions, respectively. The surface roughness length determines how sensitive the friction velocity is to wind speed.
The presented results have implications for improving the meteorological preprocessing models and for selecting and preparing the
measured input values for such models. For instance, the high sensitivity of the preprocessor to the values of the wind speed at the
height of 10
Finally, another key parameter worthy of study for atmospheric dispersion models is mixing height, because the mixing height describes the depth of lowermost layer in which pollutants disperse.
This study gave more confidence that AD, in general, and the TAPENADE tool in particular are useful tools of assessment for studying quantitatively the ranges of sensitivities of the predicted parameters. The analysis is more comprehensive and versatile compared with the use of previously applied sensitivity analysis methods. The sensitivities could be analysed for a wide range of input conditions both accurately and effectively.
The AD procedure is also useful for analysing the functioning of computer programs, and for improving their optimisation in terms of computing resources. In this study, all the dependencies of the predicted parameters on the model input values were found to be physically understandable and feasible. However, the procedure could also be useful for finding out potential inaccuracies of the numerical solutions, or even mistakes in the structure of the computer codes.
The meteorological preprocessor parameterisation scheme (that is originally based on van Ulden and Holtslag) used in this study is in
fairly common use in other countries within meteorological preprocessors and dispersion models. The initial conditions used in the
model computations corresponded to the climate and environmental conditions in Helsinki. However, the range of conditions at such
a northern latitude vary substantially (for instance, the ambient temperatures were assumed to range from
Future research could address the determination of how the sensitivity of MPP-FMI impacts the modelled concentrations of pollutants. Such research could be done by source transforming a chain of models using AD, instead of only one model. The next chain of models to be investigated could be a combination of a meteorological preprocessor and an urban-scale dispersion model. The sensitivity of the combined modelling system could also be evaluated in terms of other input values of the dispersion model, in addition to the meteorological ones.
The source code for the meteorological preprocessor (MPP-FMI 3.0) is included in the Supplement. The
source-transformed code is also included in the Supplement. The source-transformed code is subject to the TAPENADE
licence agreement which limits the use of the code to academic research (see
The empirical stability functions of Eq. (2) as implemented in the
meteorological preprocessor are
Friction velocity (
This appendix covers the lookup table parameters that are used to estimate the surface albedo (
The state of the ground is used in a lookup table to obtain an estimate for the surface albedo according to surface type and the state of the ground. The lookup table procedure is shown in Table B1.
The Priestley–Taylor parameter estimate is estimated using a lookup table involving weather codes, solar elevation angle, state of the ground, and precipitation during the last 12 h (Karppinen et al., 1997). The lookup table is illustrated by a flow chart in Fig. B1.
Flow chart of how the Priestley–Taylor moisture parameter (
Lookup table for surface albedo (
The authors declare that they have no conflict of interest.
This work was funded by the Maj and Tor Nessling Foundation (grants 2014044, 201600449, and 201700305). Edited by: David Ham Reviewed by: Laurent Hascoet and one anonymous referee