Numerical models of weather and climate need to compute grid-box-averaged rates of physical processes such as microphysics. These averages are computed by integrating subgrid variability over a grid box. For this reason, an important aspect of atmospheric modeling is spatial integration over subgrid scales.

The needed integrals can be estimated by Monte Carlo integration. Monte Carlo integration is simple and general but requires many evaluations of the physical process rate. To reduce the number of function evaluations, this paper describes a new, flexible method of importance sampling. It divides the domain of integration into eight categories, such as the portion that contains both precipitation and cloud, or the portion that contains precipitation but no cloud. It then allows the modeler to prescribe the density of sample points within each of the eight categories.

The new method is incorporated into the Subgrid Importance Latin Hypercube Sampler (SILHS). The resulting method is tested on drizzling cumulus and stratocumulus cases. In the cumulus case, the sampling error can be considerably reduced by drawing more sample points from the region of rain evaporation.

Introduction

Coarse-resolution atmospheric models of weather and climate do not solve differential equations; they solve integro-differential equations, that is, equations containing both derivatives and integrals. Although a derivation of an atmospheric model starts with differential equations, such as the Navier–Stokes or advection–diffusion equations, those equations are coarse-grained or filtered before being discretized e.g.,. Typically, a spatial running-mean filter is used, producing equations similar to Reynolds-averaged equations e.g.,. Each term in the filtered equations is spatially averaged over a grid box. For instance, in a prognostic equation for grid-averaged rain mixing ratio, the grid-averaged rain is updated by grid-averaged microphysical process rates. Schematically, we may give an example of such a filtered equation: r¯t=h¯+, where r¯ denotes grid-averaged rain mixing ratio, t denotes time, and h¯ denotes the grid-averaged microphysical time tendency of rain mass mixing ratio. Because a grid-box average is an integral (divided by the grid-box volume), the resulting filtered equations are integro-differential equations. Therefore, a central problem in atmospheric modeling is (subgrid-scale, spatial) integration.

Mathematically, the problem is to evaluate integrals of the form h¯h(x)P(x)dx, where x is a vector containing the relevant model fields, h(x) is the time tendency of a physical process, such as autoconversion of cloud droplets to form rain drops, and P(x) is the model-predicted subgrid-scale probability density function (PDF) (i.e., “filtered density function”, ) of the variables. Here, h(x) could be a simple analytic function or a complex numerical subroutine. An integral such as Eq. () ought to be computed for each of the many nonlinear process rates in the model. (However, when the grid box is assumed to be uniform, then the integral is not performed.) The integrals also need to be computed for each grid column in the horizontal and each grid level in the vertical.

To improve the convergence of Monte Carlo integration, many methods have been proposed. Two broad strategies are stratified sampling and importance sampling . Stratified sampling spreads out the sample points in sample space in order to avoid clumping, which leads to poor sampling. One popular stratified sampling method is Latin hypercube sampling, which stratifies along each dimension of the integral e.g.,. Another strategy, importance sampling, preferentially places sample points in important regions of the integration domain . For instance, extra sample points may be placed within cloud because that is where important processes occur, such as the formation and growth of cloud droplets.

Some sampling methods combine stratified and importance sampling. For instance, a prior version of the Subgrid Importance Latin Hypercube Sampler (SILHS) placed sample points preferentially in cloud, and also stratified the within-cloud sample points using Latin hypercube sampling . SILHS similarly stratified the points out of cloud. Although SILHS' importance sampling improved the integration of within-cloud microphysical processes, the importance sampling did not improve the integration of out-of-cloud processes, such as evaporation of rain. This is a drawback in cases where evaporation is an important process. What is needed is a more flexible importance sampling method, one that allows the modeler to sample important processes in a more targeted way.

This paper proposes a new importance sampling method that is highly flexible. It divides the domain of integration into Ncat non-overlapping “categories”, such as the region that contains precipitation and cloud, or the region that contains precipitation but no cloud. This “nCat” method allows the modeler to prescribe the density of sample points within each category. This flexibility allows a modeler to allocate more sample points to a particular process, such as evaporation of rain drops, if evaporation is especially important to the problem of interest. Furthermore, two or more categories can be combined into a single “cluster” if none of the categories in the cluster should be treated preferentially over the others.

This paper will introduce nCat sampling and evaluate it in an idealized, single-column setting. Section  specifies the subgrid probability density function (PDF) that our method will sample. Section  describes how SILHS sampled the subgrid PDF before the nCat method was introduced. Section  details the new nCat method that has been introduced into SILHS. Section  explains the criteria and methodology used to evaluate the new SILHS sampling scheme, including configuration of the model. Section  shows tests using a precipitating shallow cumulus case and a precipitating stratocumulus case. Section  concludes the paper.

The functional form of the PDF from which SILHS draws sample points

SILHS does not generate sample points according to a stochastic rule; rather, SILHS merely draws sample points from a pre-existing subgrid PDF. In this paper, the PDF is calculated by the Cloud Layers Unified By Binormals (CLUBB) parameterization . At each timestep in a simulation, CLUBB diagnoses the subgrid PDF by means of the assumed PDF method. That is, CLUBB prognoses various subgrid higher-order moments, assumes a functional form for the PDF, and diagnoses a particular PDF for each timestep and grid level that is consistent with both the moments and the functional form.

CLUBB's PDF is multivariate. It includes several variates (i.e., variables) that are useful inputs to thermodynamical and microphysical calculations. One of the PDF's variates is the extended cloud (liquid) water mass mixing ratio (χ) . When χ>0, then χ equals the cloud water mass mixing ratio; when χ<0, then cloud water is assumed to be zero, and χ represents the deviation from saturation. The variate χ does not include ice. Another of the PDF's variates, related to χ, is the corresponding orthogonal variable (η) . Together, χ and η are a rotation and rescaling of temperature and total water variables. CLUBB's PDF also includes the vertical velocity w, an extended cloud droplet number mixing ratio (Ncn), and the precipitating hydrometeor mass mixing ratios and number mixing ratios (hm). The cloud droplet number equals the extended cloud droplet number mixing ratio when cloud is present (that is, when χ>0); when no cloud is present, the cloud droplet number is assumed to be zero.

The functional form of CLUBB's PDF is a compromise between realism and mathematical simplicity. CLUBB's PDF may be written as P(x)=m=1Ncompξ(m)[fp(m)P(m)(χ,η,w,Ncn,hm)+(1-fp(m))δ(hm)P(m)(χ,η,w,Ncn)]. The PDF is split into Ncomp components; currently, in CLUBB, Ncomp=2. Each component m has a weight ξ(m), where m=1Ncompξ(m)=1, and for each m, ξ(m)0. Each component has different means and variances for the variates, and the PDF is a mixture (i.e., weighted sum) of the components. The vector hm contains precipitating hydrometeor species that are prognosed by the microphysics scheme. The exact type and number of hydrometeors depends on the microphysics scheme used. In this paper, the microphysics scheme used is that of , in which the prognosed hydrometeor species are rain mass mixing ratio and rain number mixing ratio. The fraction fp(m) represents the portion of mixture component m that contains at least one precipitating hydrometeor species, where 0fp(m)1. The fraction (1-fp(m)) represents portions of mixture component m that are precipitation-free (and are denoted by δ(hm)) but may or may not contain cloud water.

In the notation used above, δ(hm) is a Dirac delta function and is short for δ(hm1)δ(hm2)δ(hmn).

In the portions of the PDF that contain precipitation, P(m)(χ,η,w,Ncn,hm) is a joint normal-lognormal distribution, where χ, η, and w are normally distributed, and Ncn and all the variables in hm are lognormally distributed . In the parts of the PDF that do not contain precipitation, P(m)(χ,η,w,Ncn) is a joint normal-lognormal distribution, as before, but all the precipitating hydrometeors are zero, rather than lognormally distributed. A simplifying feature of the functional form is that we insist that P(m)(χ,η,w,Ncn)=P(m)(χ,η,w,Ncn,hm)dhm. That is, the marginal distribution of cloud and turbulence within a mixture component, m, is the same both within and outside of the precipitating region. Therefore, integrating over precipitation in Eq. () collapses the two terms per component m into one term.

Prior formulation of SILHS

In both the new and prior versions of SILHS, sample points are drawn from CLUBB's PDF and fed into subroutines that compute microphysical process rates. To reduce the noise associated with the random sampling of processes, both versions of SILHS incorporate stratified sampling (specifically, Latin hypercube sampling) and importance sampling.

The Latin hypercube algorithm is described in many sources e.g.,. Intuitively, the algorithm stratifies the sample points across each variate such that for each variate, exactly one sample point falls into each of Ns intervals of equal size, where Ns is the number of sample points. For instance, if Ns=3, the Latin hypercube sampling chooses low, medium, and high values of, e.g., rain mass mixing ratio.

Importance sampling is useful when a process rate is particularly large and variable within a small portion of the sample space. For instance, autoconversion of cloud droplets occurs only within cloud, which in cumulus cases often occupies a small fraction of the domain. Without importance sampling, the density of sample points in the sample space is given by the PDF P(x). For example, if, according to the PDF, 10 % of the domain is occupied by cloud, then on average only 10 % of sample points will be placed within cloud. Importance sampling is used to change the sampling density so that areas of interest are sampled more frequently than less important regions, regardless of the densities given by the PDF.

The prior version of SILHS used a simple importance sampling scheme that placed half the sample points in cloud and the other half out of cloud. This importance sampling was only performed when, according to the PDF, the amount of the grid box occupied by cloud (the “cloud fraction”) was between 0.5 and 50 %. When cloud fraction was in this range, SILHS preferentially sampled cloud, thereby improving the representation of cloud processes such as autoconversion. In doing so, of course, SILHS' importance sampling degraded the representation of processes that occur out of cloud, such as evaporation of rain.

In both the new and prior versions of SILHS, a sample is first drawn from a starting grid level. This grid level is the only grid level where SILHS explicitly performs importance sampling; it is called the “importance sampling level” in this paper. The importance sampling level is chosen at each timestep to be the height level with the maximum within-cloud cloud water mass mixing ratio. To represent vertical overlap, sample points at other height levels are drawn such that they are correlated with adjacent levels according to a correlation coefficient that decreases exponentially with increasing height see. This process continues to the top and bottom of the domain. The resulting vertical profile of sample points is a “subcolumn” that statistically represents a fraction of the grid column and models vertical overlap. Thus, SILHS does sample at all grid levels, but it explicitly performs importance sampling only at the importance sampling level.

For each of the eight categories, this table lists (1) the category number; (2) whether the category is cloudy, in mixture component 1 or 2, or precipitating; (3) what inequalities must be satisfied for a sample point to lie within the category; and (4) the original probability mass associated with the category, pj.

Category Category description Category selection criteria Category probability pj number 1 In cloud In mixt. comp. 1 In precip χ>0 ud+1<ξ(1) ud+2<fp(1) fc(1)×ξ(1)×fp(1) 2 In cloud In mixt. comp. 2 In precip χ>0 ud+1ξ(1) ud+2<fp(2) fc(2)×ξ(2)×fp(2) 3 Out of cloud In mixt. comp. 1 In precip χ0 ud+1<ξ(1) ud+2<fp(1) (1-fc(1))×ξ(1)×fp(1) 4 Out of cloud In mixt. comp. 2 In precip χ0 ud+1ξ(1) ud+2<fp(2) (1-fc(2))×ξ(2)×fp(2) 5 In cloud In mixt. comp. 1 Out of precip χ>0 ud+1<ξ(1) ud+2fp(1) fc(1)×ξ(1)×(1-fp(1)) 6 In cloud In mixt. comp. 2 Out of precip χ>0 ud+1ξ(1) ud+2fp(2) fc(2)×ξ(2)×(1-fp(2)) 7 Out of cloud In mixt. comp. 1 Out of precip χ0 ud+1<ξ(1) ud+2fp(1) (1-fc(1))×ξ(1)×(1-fp(1)) 8 Out of cloud In mixt. comp. 2 Out of precip χ0 ud+1ξ(1) ud+2fp(2) (1-fc(2))×ξ(2)×(1-fp(2))
The nCat importance sampling method

The nCat flexible importance sampling method is a generalization of the original SILHS importance sampling method described above. It is designed to give the modeler finer control over which parts of the subgrid PDF are preferentially sampled, that is, regarded as “important”.

First, the domain of the PDF is split into a set of disjoint categories, Cj, that span the entire PDF domain. Here, j=1Ncat, where Ncat is the number of categories.

In this paper, eight categories are used. The definitions of the categories are based on the following three criteria: in/out of cloud, in mixture component 1/2, and in/out of precipitation. A sample point lies in cloud if and only if χ>0; if χ0, the sample point lies outside cloud. To determine whether a sample point lies within mixture component 1, we generate a random number, ud+1, that is uniformly distributed between (0,1). If ud+1<ξ(1), then the sample is in mixture component 1; otherwise, the sample is in mixture component 2. To determine whether a sample point lies within precipitation, we generate another uniformly distributed random number, ud+2, and check whether ud+2<fp(m), where m is the mixture component number. The eight possible combinations of cloud, mixture component, and precipitation form the eight categories used for importance sampling. The categories are shown in Table .

Each category Cj is associated with a certain amount of PDF mass, called the category's “original probability” and denoted as pj=CjP(x)dx. Since the categories Cj span the entire PDF, we have j=1Ncatpj=1, where Ncat is the number of categories (currently Ncat=8). Each category has pj0; but naturally, categories with pj=0 need not be included in the corresponding integral (Eq. ).

In general, the pj values must be found by performing an integral over the PDF. For example, the amount of PDF mass in the first category (the category with cloud, precipitation, and in component 1) may be found by integrating the PDF in Eq. () over this portion of the PDF: p1=C1P(x)dx=ξ(1)χ>0hm>0[fp(1)P(1)(χ,η,w,Ncn,hm)+(1-fp(1))δ(hm)P(1)(χ,η,w,Ncn)]dhmdχ=ξ(1)fp(1)χ>0P(1)(χ,η,w,Ncn,hm)dχ=ξ(1)fp(1)fc(1). In CLUBB's PDF (see Eq. ), because cloud and precipitation are independent within a component (that is, the marginal distribution of χ, which determines cloud, is the same both in and out of precipitation), the integrals to find the category original probabilities pj involve only simple quantities, such as fc(1) (cloud fraction in mixture component 1), that are already computed elsewhere in CLUBB. In general, computing these constants may involve evaluating complicated numerical functions, such as the error function, which involves computational expense. However, the constants need to be computed only at the importance sampling level (not at each height level) and only once per timestep (not for each sample point), and so the additional expense is tolerable.

The notation introduced so far in this section relates to the PDF itself, rather than importance sampling per se. In order to implement importance sampling, we sample what we regard as the “important” categories preferentially. To do so, we introduce for each category, Cj, a user-defined probability, Sj, called the category's “modified probability”. The modified probability Sj of a given category is the desired probability that any sample will fall in that category. In other words, it is the expected fraction of sample points in the category when importance sampling is used. Therefore, intuitively, it is advantageous to set the modified probabilities such that the categories that are important for a process of interest are sampled more often than the unimportant categories. These modified probabilities must be set such that j=1NcatSj=1. The sampling process is modified such that each category Cj is sampled with probability Sj rather than pj. In order to give a mathematical form for the new PDF that points are drawn from, we introduce some notation. We define a new function, L(x), called the “likelihood ratio”: L(x)j=1NcatpjSj1j(x)j=1Ncatωj1j(x). Here, 1j(x) is the indicator function of category Cj, defined as 1j(x)=1xCj0xCj, and ωj=pjSj is the weight of each sample point in category Cj. Then, the new sampling PDF, denoted Q(x), is defined as Q(x)=P(x)L(x). The new PDF, Q(x), is normalized because j=1NcatSj=1. The integral in Eq. () is written as h(x)P(x)dx=h(x)L(x)P(x)L(x)dx=h(x)L(x)Q(x)dx. Then, the new integral in Eq. () is approximated by drawing Ns sample points from the Q(x) distribution and evaluating h(x)L(x)Q(x)dx1Nsi=1Nsh(xi)L(xi), where xi is the i sample point drawn from the Q(x) distribution. For a sample point xi in category Cj, L(xi)=pjSj=ωj.

To draw sample points from the Q(x) distribution, a uniform variate, 0<uc<1, is picked for each sample point. The value of this uniform variate determines a sample point's category. For example, if 0<uc<S1, then the sample point will be associated with category C1. If S1uc<S1+S2, the sample will be associated with category C2, and so on. Once the category has been determined, the sample point is drawn from the portion of the marginal distribution of P(x) that is within the category. For example, a sample point that is to be in cloud is drawn from the distribution P(x|χ>0).

The weight limiter

Importance sampling allows the modeler to concentrate sample points in areas of the sample space that are considered important. But sample points given to important areas are taken from unimportant areas. Therefore, if importance sampling is applied overzealously, the less important processes can become excessively noisy.

In SILHS, we wish to employ an importance sampling scheme that improves results for important processes (e.g., certain microphysical processes) while still producing reasonably accurate estimates of other “less important” or perhaps less variable processes. One reason that we wish to avoid overdoing the importance sampling is that a favorable sampling distribution at one grid level (altitude) may be unfavorable at another.

The change in accuracy for a given category due to importance sampling can be assessed by noting the weight of sample points in that category. The inverse weight of a sample point in category Cj is given by 1ωj=Sjpj, where pj is the category's original probability and Sj is the category's modified probability due to importance sampling. The weight, ωj, is closely related to L(x) (see Eq. ). The inverse weight, 1/ωj, may be interpreted as the density of sample points per unit probability mass. When 1/ωj<1, the category is sampled less often with importance sampling, and when 1/ωj>1, the category is sampled more often with importance sampling. We are particularly concerned about large values of ωj, because large weights are associated with undersampling and hence degradations in accuracy.

In order to mitigate the negative impact of importance sampling, we now propose a simple method to impose a maximum weight, ωmax, in each category. Intuitively, the algorithm works as follows. For each category Cj, we compute the minimum modified sampling probability: Sj,min=pjωmax. To ensure that the weight of a category, ωj, does not exceed ωmax, the category must be sampled at least as often as Sj,min; that is, SjSj,min. If any categories are undersampled, then Sj must be increased in those categories, and probability mass must be taken from other categories (where Sj>Sj,min) in order to ensure that the Sj probabilities sum to 1. The algorithm takes probability mass from another category in proportion to how much “extra” probability mass the category has.

Formally, the algorithm is constructed as follows. We compute the difference between the category's modified probability, Sj, and its minimum modified probability, Sj,min: Sj,diff=Sj-Sj,min. Let N be the set of all categories where Sj,diff<0 (the categories where Sj needs to be increased) and M be the set of all categories where Sj,diff0 (the categories where Sj can potentially be reduced). If N is the empty set (that is, if no categories have Sdiff<0), then all categories already satisfy the weight limit, and nothing needs to be done. Otherwise, if Sj is the new distribution of modified probabilities, then for all CjN we set Sj=Sj,min, and for all CjM we set Sj=Sj-Sj,diffCiNSi,diffCiMSi,diff. This method will take sampling probability away from the categories with extra probability proportionally to how much extra probability they have (i.e., how large Sj,diff is). It can readily be shown that the fractions Sj are bound to the range [0,1] and sum to 1.

In SILHS, we currently set ωmax=2, which means that on average, a category will be sampled no less than half as often with importance sampling than without importance sampling. Consequently, the variance of the estimate of a quantity is increased (degraded) by no more than a factor of 2 due to importance sampling. (The standard deviation is increased by no more than a factor of 21.4. For this estimate of variance, we assume the usual Monte Carlo convergence rate.)

Optimal allocation of sample points

The success of the nCat method depends on knowing how to allocate sample points to the categories. In some cases, it is easy to see how to allocate points. For example, if it is known that the process(es) of interest are active in only one of the Ncat categories, then we can simply put all sample points in that one category, and use the weight limiter to ensure that other categories are still adequately sampled. However, in the case that processes of interest are active in two or more categories, one needs to know how to distribute (i.e., “allocate”) sample points among these categories.

For a given process rate, h(x), and a given estimator of the variance, it is possible to derive the optimal allocation of sample points . The optimal allocation provides guidance on how to determine the Sj values. In Appendix , it is shown that the optimal modified probabilities are Sj=pjvji=1Ncatpivi. This expression shows that the optimal fraction of samples in category Cj, i.e., Sj, depends on both the original probability pj of category Cj, and on the category-averaged standard deviation, vj.

A simple method of allocating sample points

One could prescribe the modified probabilities Sj directly. However, a key problem with directly prescribing the Sj is that prescribed values cannot scale with the original probabilities pj. For instance, consider the case in which, for some category Cj, we have prescribed Sj>0, but it turns out that for a particular cloud case, pj=0. Then some sample points will be placed in category Cj even though they contribute nothing to the overall sum. (These sample points have a weight of zero.) This is a needless computational expense. Instead, the sample points should be placed in other categories with non-zero pj.

More generally, prescribing each Sj directly is akin to assuming that the contribution of each category to the total sum is constant regardless of what fraction of the PDF is occupied by each category. Instead, a more realistic assumption is that each category contributes to the total sum a constant amount per unit original probability, pj. These prescribed amounts are then scaled by the original probabilities pj to obtain the modified probabilities Sj.

Specifically, we prescribe the following normalized standard deviation of the process rate for each category Cj: γj=vji=1Ncatvi. To make the γj easier to interpret and prescribe, we insist that 0γj1; then the denominator is simply the sum of the numerator in all categories, so that each γj is a fraction with j=1Ncatγj=1. Specifically, γj is the fraction of vj in category Cj. Prescribing γj is accurate and general when each γj varies little in space or time, or from case to case. Note that the numerator of Eq. () is the same as the numerator of Eq. (), but without the pj term.

Given the γj fractions, it is easy to determine the Sj values by dividing the numerator and denominator of Eq. () by i=1Ncatvi. This yields Sj=pjγji=1Ncatpiγi. It is clear from this equation that the Sj values are still in the range [0,1] and still sum to 1.

The prescription (Eq. ) leads to more robust importance sampling than does prescribing Sj values as constants. With Eq. (), the optimal γj in a particular category (say, in cloud and precipitation and mixture component 1) is relatively insensitive to the area occupied by that category (e.g., to the cloud fraction or precipitation fraction). The reason is that in Eq. (), each Sj value weights γj by the original probability pj of category Cj. This means that, for instance, when Cj occupies a small fraction of the domain, and γj is moderate, then the total fraction of sample points Sj in category Cj scales naturally to small values. Prescribing the γj values is akin to prescribing the inverse weights 1/ωj, rather than the sample fractions Sj. To see resemblance of γj and 1/ωj, note from Eqs. () and () that 1ωj=Sjpj=γji=1Ncatpiγi. Both 1/ωj and γj are related to the density of sample points per unit probability mass, pj.

As compared to the previous version of SILHS, the chief advantage of the new nCat method is its flexibility. In particular, the user can individually prescribe the sampling density per unit probability (γj) in each of eight categories, Cj. This flexibility is useful when important processes, such as evaporation of rain, occur in particular categories, such as the region of rain but no cloud.

This flexibility is made possible in part by the fact that the nCat method imposes no restriction on the number of sample points used per timestep. The previous version of SILHS required an even number of sample points per timestep, because one point was placed in cloud and the other was placed outside cloud. Generalizing this method to eight categories would have required a multiple of at least eight sample points per timestep, and would not allow much flexibility in prescribing the relative importance of categories. Instead, the nCat method uses a probabilistic approach to picking a category for each sample point. This allows any number of sample points to be used at each timestep, including the use of fewer than Ncat samples, without causing a biased result.

Summary of steps to implement method

In summary, to implement the new importance sampling method, the following steps should be taken.

Pick a set of categories, Cj, that span the PDF domain. We have proposed eight categories for use, as given in Table .

Pick a set of sampling fractions, γj. A good set of values to use can be obtained by using a simulation to estimate the optimal values, given by the right-hand side of Eq. (), as we do in Sect.  below.

Compute, from the fractions γj, the modified probabilities Sj using Eq. (). Pick sample points from the Q(x) distribution, defined in Eq. ().

Compute the weight in each category, ωj, using Eq. (). Sample points are given a weight corresponding to the category the sample point is in. Limit the weights according to the algorithm in Sect. , if so desired.

Feed the (unweighted) sample points one by one into a physical parameterization (e.g., a microphysics scheme).

Compute a weighted average of the function of interest using Eq. ().

Notable configuration settings for the RICO and DYCOMS-II RF02 simulations performed in this paper.

RICO DYCOMS-II RF02 Timestep (s) 300 60 Vertical levels 128 160 Vertical grid spacing (m) 25–250 10 Radiation None Analytic longwave Cloud droplet concentration (m-3) 70×106 55×106
Methodology of evaluation of the sampling methods

In order to evaluate how well the new importance sampling scheme simulates multiple cloud types, we have simulated two cloud cases. The first is a drizzling shallow cumulus case: Rain in shallow Cumulus over the Ocean (RICO), configured as in the intercomparison of . RICO was a drizzling trade-wind cumulus case observed off the Caribbean islands of Antigua and Barbuda . The second is a drizzling stratocumulus case: Research Flight 2 (RF02) of the DYnamics and Chemistry Of Marine Stratocumulus (DYCOMS-II), configured as in . DYCOMS-II RF02 was a nocturnal drizzling stratocumulus layer observed off the coast of California . A key difference in the sampling of these two cases is that the stratocumulus case has a much larger cloud fraction (>0.95) than the cumulus case (<0.05). Therefore, without importance sampling, nearly all sample points fall in cloud in the stratocumulus case, while almost none fall in cloud in the cumulus case. Finding a single, effective sampling strategy for both the stratocumulus and cumulus cases is challenging.

The following four configurations of SILHS were used for comparison.

“LH-only”. This configuration uses only Latin hypercube sampling. No importance sampling is performed. The nCat method is not used.

“2Cat-Cld”. This configuration is functionally equivalent to the old version of SILHS that placed one point in cloud and one point out of cloud. This configuration uses two categories: in cloud, and out of cloud. The categories (c,p,1), (c,p,2), (c,np,1), and (c,np,2) are all lumped together into the “cloud” category, and the other four categories are analogously lumped into the “clear” category. That is, a point that is in cloud belongs to the cloud category regardless of whether it is in precipitation or which mixture component it is in, and similarly for points in clear air. When cloud fraction is between 0.5 and 50 %, it places 50 % of sample points in each of the two categories. (That is, S1=S2=0.5.) Otherwise, no importance sampling is performed.

“2Cat-CldPcp”. This configuration also uses two categories. The first consists of points that are either in cloud or in precipitation, and the second consists of the complement, namely, points that are neither in cloud nor in precipitation. That is, (nc,np,1) and (nc,np,2) are lumped into the no-cloud-or-precipitation category, and the others are lumped into the cloud-or-precipitation category. Since no microphysical processes act in the area of the domain outside of cloud and precipitation, the sample points are initially prescribed such that all points fall in the cloud-or-precipitation category (i.e., the first category). (That is, γ1=S1=1,γ2=S2=0). After the initial prescription, the weight limiter ensures that S2=p2ωmax=p22.

“8Cat”. This configuration uses all eight categories listed in Table . To determine the sampling fractions γj to use, a simulation was run in which SILHS was used to estimate the quantity in Eq. () at each timestep. One set of sampling fractions, γj, was used for both RICO and DYCOMS-II RF02. This is discussed in Sect. .

The simulations were non-interactive, so that errors in the SILHS simulations did not feed back into the simulated fields. This made it possible to evaluate multiple SILHS simulations against a common analytic solution. Some notable aspects of the simulation configurations are shown in Table .

The microphysics scheme used in the simulations is that of . As a reference solution, an analytically upscaled version of the Khairoutdinov–Kogan microphysics scheme was used, as described in . Comparison with the analytic solution indicates whether SILHS draws sample points from the correct PDF at each grid level. However, the comparison with the analytic solution does not test whether the PDFs at each level are overlapped accurately. Although the overlap assumptions do not affect these test cases, overlap does influence processes such as radiative transfer. Testing the PDF overlap assumptions is left for future research. Nevertheless, the ability to test convergence at each grid level is an advantage. For instance, early convergence tests revealed several bugs in SILHS. Many microphysics schemes in operational use do not permit analytic solution. For these microphysics schemes, a non-analytic integration method, such as SILHS, is necessary.

Each SILHS configuration was evaluated on its ability to estimate the following three microphysical processes.

Autoconversion: the conversion of cloud water to rain water. This process occurs within cloud, both inside and outside of precipitation (rain).

Accretion: the growth of rain droplets by collection of cloud water. This process occurs when both cloud and precipitation are present.

Evaporation: the conversion of rain water to water vapor. This process occurs in areas outside cloud but within precipitation.

Simulations of drizzling cumulus and stratocumulus clouds

In this section, we present results obtained using the new importance sampling method.

Estimation of optimal sampling fractions

Prescribing the γj is a useful general approach only if the γj vary relatively little from case to case. We test this by estimating the optimal sampling fractions, γj, for both the RICO and DYCOMS-II RF02 cases. The optimal γj values are calculated by estimating the right-hand side of Eq. () at each timestep at the importance sampling level. The process used, h(x), is the sum of the autoconversion, accretion, and evaporation tendencies from the microphysics scheme. The importance sampling level is chosen at each timestep to be the level with the maximum within-cloud cloud water mass mixing ratio. The integral defining vj, given in Eq. (), was estimated using 256 SILHS sample points. The γj values, averaged over all timesteps (864 total timesteps for RICO and 360 for DYCOMS-II RF02), are shown in Table .

Estimated optimal sampling fractions (γj) for each importance category, averaged over the entire simulation, for the RICO and DYCOMS-II RF02 cases. These estimates were obtained by using SILHS to estimate the right-hand side of Eq. () for each category. Here “c” denotes “in-cloud”, “nc” denotes “out of cloud”, “p” denotes “in-precipitation”, “np” denotes “out of precipitation”, “1” denotes “in mixture component 1”, and “2” denotes “in mixture component 2”.

Category 1 2 3 4 5 6 7 8 (c,p,1) (c,p,2) (nc,p,1) (nc,p,2) (c,np,1) (c,np,2) (nc,np,1) (nc,np,2) RICO 0.539 0.004 0.223 0.203 0.033 0.004 0.000 0.000 DYCOMS-II RF02 0.351 0.143 0.238 0.061 0.140 0.070 0.000 0.000

We see that in both cases, the optimal γj values are largest in category 1 (in cloud, in precipitation, and in mixture component 1) and in category 3 (out of cloud, in precipitation, and in mixture component 1). As expected, the optimal sampling fractions for the last two categories are zero, since microphysical processes do not act in the region where neither cloud nor rain exists. The other categories show differences, which may or may not be important. To test this, the optimal fractions for DYCOMS-II RF02 shown in Table  are used for both RICO and DYCOMS-II RF02 simulations to be presented. Thereby, the RICO case is used to test the robustness of the DYCOMS-II RF02 sampling fractions.

Results for RICO case

Figure  shows a plot of the root-mean-square error (RMSE) of the SILHS RICO simulations as a function of the number of sample points used. The 8Cat method has the smallest RMSE of all three methods when estimating the sum of autoconversion, accretion, and evaporation.

RICO: the root-mean-square error (RMSE) at the importance sampling level of SILHS simulations as a function of the number of sample points, for the RICO cumulus case. The error is time-averaged over the entire simulation. The 2Cat-CldPcp and 8Cat methods show a large improvement over the 2Cat-Cld and LH-only methods in the estimate of evaporation, but not for autoconvesion and accretion, which are in-cloud processes. Nevertheless, the 8Cat and 2Cat-CldPcp methods both impove the estimate of the sum of the three processes.

The largest improvement of the 8Cat and 2Cat-CldPcp methods over the (old) 2Cat-Cld method is in sampling evaporation. In fact, even the LH-only method (no importance sampling at all) results in a better estimate of evaporation than the 2Cat-Cld method. The reason that evaporation is so poorly sampled in the 2Cat-Cld method is that the 2Cat-Cld method performs importance sampling only within cloud. Indeed, for in-cloud processes, such as autoconversion and accretion, the 2Cat-Cld method equals or improves upon both the 2Cat-CldPcp method and the 8Cat method in the RICO cumulus case. However, the 2Cat-Cld method reduces the number of sample points outside of cloud, degrading the simulation of rain evaporation. In contrast, both the 2Cat-CldPcp and 8Cat methods preferentially sample within the region of the sample space containing evaporation (out of cloud but within precipitation), leading to large improvements.

Table  compares how each of the four sampling methods allocates sample points. The table shows the percentage of sample points allocated to each category, averaged over the simulation. Comparing the allocation between the methods can give insight into the strengths and weaknesses of each method. For example, evaporation is best sampled by the 8Cat and 2Cat-CldPcp methods because they are the only methods that place a sizable number of points in the two categories that are in precipitation and outside cloud. The 2Cat-Cld and 8Cat methods give the best estimate of accretion because they place the largest number of points in the categories that are within cloud and precipitation.

RICO: percentage of sample points allocated to each category by each sampling method at the importance sampling level, time-averaged over the entire simulation. The more sample points placed in a particular category, the better the estimate of processes active in that category.

Category 8Cat 2Cat-CldPcp 2Cat-Cld LH-only (c,p,1) 12.1 5.7 13.6 0.3 (c,p,2) 0.03 0.03 0.04 0.02 (nc,p,1) 16.1 11.0 0.3 0.5 (nc,p,2) 7.9 18.8 0.4 0.7 (c,np,1) 14.8 15.4 36.0 0.7 (c,np,2) 0.2 0.3 0.4 0.2 (nc,np,1) 0.7 0.7 0.7 1.3 (nc,np,2) 48.2 48.2 48.7 96.3

Figure  shows, for the RICO case, time-series plots of the four tendencies at the importance sampling level. Again, the largest improvement can be seen in the sampling of evaporation. Looking at the 2Cat-Cld time series for evaporation, it can be seen that at many timesteps, no points are found in the evaporating region of the sample space (out of cloud and within precipitation), and the estimated evaporation tendency is zero. At the timesteps where one or more sample points are found in the evaporating region, the tendency estimate is very large because the evaporation rate within the evaporating region is much larger than the overall mean evaporation rate. In the 2Cat-CldPcp and 8Cat simulations, the evaporating region of the sample space is well sampled, and sample points in this region have small weights, leading to an estimate that is much more comparable to the overall mean.

RICO: time-series plots of the four tendencies at the importance sampling level. The simulations in these plots use 32 sample points, and the plots show minutes 3321 to 4320 of the simulations. To improve readability, the LH-only method is not plotted. The evaporation tendencies are much more noisy in the 2Cat-Cld method than in the 2Cat-CldPcp or 8Cat methods.

To assess the performance of the sampling methods at levels away from the importance sampling level, profile plots (over height levels) were generated for simulations with 32 sample points. To reduce the role of a “lucky” random seed in the comparison and thereby better distinguish the methods, an ensemble of 12 simulations was used. Figure  shows profile plots of the four tendencies over height levels. These plots are averaged over all 864 timesteps and over the 12 ensemble members, and serve to indicate that SILHS converges to the analytic solution at all height levels and not only the importance sampling level. Figure  shows the RMSE of the SILHS solutions at each height level compared to the analytic solution, for all timesteps and ensemble members. It can be seen that the 8Cat and 2Cat-CldPcp methods show improved results compared to the 2Cat-Cld method at height levels between 1000 and 2500 m. These height levels are where the improvement in the evaporation term is strongest. At levels below 1000 m (which are far below the importance sampling level of about 2000 m), all methods start to show considerable noise. It is interesting that this noise remains even after time and ensemble averaging. This highlights the large degree of variability in cumulus clouds and the need for careful parameterization of this variability.

RICO: mean profile plots of the four tendencies. The simulations in these plots use 32 sample points. For each configuration, an ensemble of 12 simulations is used, each with a different seed. Profiles are averaged over all 864 timesteps of the simulation and all 12 ensemble members. It is seen that all SILHS sampling methods are clearly convergent at all height levels.

We note that, in this paper, only the profile plots display an ensemble average. The time-series plots display a single simulation so that individual sample values can be seen. The plots displaying RMSE vs. the number of sample points are not strongly influenced by the choice of random seed.

Results for DYCOMS-II RF02 case

The other simulated case is DYCOMS-II RF02, a drizzling stratocumulus case. Figure  shows a plot of the RMSE of the SILHS simulations as a function of the number of sample points. The LH-only, 2Cat-Cld, and 2Cat-CldPcp simulations all show approximately the same amount of noise. However, the 8Cat method reduces noise in autoconversion and accretion, thereby also decreasing noise in the sum of the three tendencies.

RICO: profile RMSE plots of the four tendencies. The simulations in these plots use 32 sample points. For each configuration, an ensemble of 12 simulations is used, each with a different seed. RMSE values are averaged over all 864 timesteps of the simulation and all 12 ensemble members. The 8Cat and 2Cat-CldPcp methods show improvement between 1000 m and 2500 m, where the improvement in sampling of the evaporation term is largest. All three methods suffer from extra noise below 1000 m, which is far away from the importance sampling level. The importance sampling level is just under 2000 m for most timesteps in the simulation.

DYCOMS-II RF02: the root-mean-square error (RMSE) of SILHS simulations as a function of sample points for the DYCOMS-II RF02 stratocumulus case. The error is calculated at the importance sampling level and is averaged over all timesteps of the simulation. The LH-only, 2Cat-Cld, and 2Cat-CldPcp methods are expected to have roughly the same behavior in a case like DYCOMS-II RF02 that has cloud fraction near 100 %. The 8Cat method still improves the estimates of autoconversion and accretion because it is able to flexibly allocate points within the cloudy region of the sample space.

The similarity between the LH-only, 2Cat-Cld, and 2Cat-CldPcp methods is expected. The 2Cat-Cld method, like the previous version of SILHS, includes a condition that reverts to straight Latin hypercube sampling in the event that cloud fraction exceeds 50 %. The DYCOMS-II RF02 case is a stratocumulus case, and the cloud fraction is close to 100 % for much of the simulation. Therefore, the 2Cat-Cld method behaves identically to the LH-only method for much of the simulation. The 2Cat-CldPcp reduces the number of sample points in the second category (the category without cloud or precipitation) by only a factor of 2. Since the second category is so small to begin with (that is, p2 is very small), this reduction hardly improves the result at all.

DYCOMS-II RF02. Percentage of sample points allocated to each category by each sampling method at the importance sampling level, time-averaged over the entire simulation. The more sample points placed in a particular category, the better the estimate of processes active in that category.

Category 8Cat 2Cat-CldPcp 2Cat-Cld LH-only (c,p,1) 57.3 35.0 35.1 35.1 (c,p,2) 41.2 63.0 63.0 63.1 (nc,p,1) 0.5 0.5 0.5 0.5 (nc,p,2) 0.2 0.3 0.3 0.3 (c,np,1) 0.6 0.7 0.7 0.7 (c,np,2) 0.2 0.4 0.4 0.4 (nc,np,1) 0 0 0.01 0.02 (nc,np,2) 0.03 0.04 0.07 0.07

The reason for the improvement using the 8Cat method can be inferred from Table . The table shows the percentage of sample points allocated to each category at the importance sampling level, averaged over the entire simulation. The 2Cat-CldPcp, 2Cat-Cld, and LH-only allocations are all similar, but the 8Cat allocation places more points in (c,p,1) than (c,p,2). That is, unlike the other three methods, the 8Cat method is able to preferentially sample from mixture component 1. Component 1, in turn, contains larger cloud (liquid) water mixing ratios. The other three methods necessarily place more points in component 2 than component 1, because component 2 occupies more of the (original) PDF. However, it was shown in Table  that optimally, component 1 has a much higher per-probability sampling density than does component 2. This increased sampling of component 1 is the source of the improvement of the 8Cat method.

Figure  shows time-series plots of the four tendencies at the importance sampling level. The estimate of evaporation is noisy in the three plotted configurations, because evaporation occurs outside of cloud, and the region of the sample space outside cloud is poorly sampled by all three methods. However, evaporation contributes little to the overall sum because the original probability pj outside of cloud is so small.

DYCOMS-II RF02: time-series plots of the four tendencies at the importance sampling level. The simulations in these plots use 32 sample points. The time range plotted includes minutes 161 to 360 of the simulation. The evaporation process is poorly sampled in all three sampling methods, but it is a relatively small term and makes a much smaller contribution to the sum of the three processes than autoconversion and accretion.

Number of sample points needed by each configuration of SILHS to achieve a given RMSE in estimating the sum of the three processes, for the RICO and DYCOMS-II RF02 cases. These numbers are estimated visually from Figs.  and . In RICO, the 2Cat-CldPcp method requires approximately a factor of 4 fewer sample points than the 2Cat-Cld method to achieve an RMSE of 10-8 kg kg-1, and 8Cat method requires approximately a factor of 8 fewer sample points. In DYCOMS-II RF02, the 8Cat method requires approximately a factor of 1.6 fewer sample points than the 2Cat-CldPcp, 2Cat-Cld, and LH-only methods to achieve an RMSE of 4×10-9 kg kg-1.

Method Samples for Samples for 4×10-9 10-8 RMSE (RICO) RMSE (DYCOMS-II RF02) LH-only 700 13 2Cat-Cld 65 13 2Cat-CldPcp 15 13 8Cat 8 8

Figure  shows the mean profile plots of the four tendencies. Once again, an ensemble of 12 simulations was used, and each sampling method overplotted is averaged over all timesteps and 12 ensemble members. All of the lines look similar, which indicates that all three methods do a good job of sampling the three processes with 32 sample points per timestep, perhaps because the DYCOMS-II RF02 stratocumulus case is not highly variable. Figure  shows profile RMSE plots averaged over all timesteps and ensemble members. All sampling methods show the largest RMSE at around 800 m. At this level, the 8Cat method shows smaller error in autoconversion and accretion, but all methods show about the same error in evaporation.

DYCOMS-II RF02: mean profile plots of the four tendencies. The simulations in these plots use 32 sample points. For each configuration, an ensemble of 12 simulations is used, each with a different seed. Profiles are averaged over all 360 timesteps of the simulation and all 12 ensemble members. It is seen that all SILHS sampling methods are clearly convergent at all height levels. All of the lines overlap well, indicating that all three processes are sampled well by all three sampling methods.

DYCOMS-II RF02: profile RMSE plots of the four tendencies. The simulations in these plots use 32 sample points. For each configuration, an ensemble of 12 simulations is used, each with a different seed. RMSE values are averaged over all 360 timesteps of the simulation and all 12 ensemble members. All sampling methods show the largest RMSE at around 800 m. At this level, the 8Cat method shows smaller error in autoconversion and accretion, but all methods show about the same error in evaporation.

Table  shows a quantitative comparison of the four configurations for both the RICO and DYCOMS-II RF02 cases. For each sampling method, Table  lists the approximate number of sample points needed to obtain the given time-averaged RMSE at the importance sampling level. These values are estimated visually from Figs.  and . This table shows that in RICO, the 8Cat method requires approximately a factor of 8 fewer points to achieve a desired RMSE than the 2Cat-Cld method. The 2Cat-CldPcp method requires approximately a factor of 4 fewer sample points than the 2Cat-Cld method. In DYCOMS-II RF02, the reduction of necessary sample points for the given RMSE for the 8Cat method as compared to the others is a factor of approximately 1.6.

Computational cost of the nCat method

An important consideration among Monte Carlo integration methods is their computational cost. The cost of the new nCat method was tested against both the prior SILHS importance sampling method and the cost of CLUBB. Eight SILHS sample points were used in each simulation. Five RICO simulations were performed, and Table  shows the means and standard deviations of the five simulations. Each time is a cumulative total of the respective component of the model over the entire simulation. The two nCat methods (2Cat-CldPcp and 8Cat) show no significant increase in computation time as compared to the original SILHS importance sampling method. All SILHS methods are about twice as expensive as CLUBB when eight sample points are used.

These costs may be compared with other costs in global climate simulations. To this end, tested the cost of SILHS in the Community Atmosphere Model . They show that an adequate cloud climatology can be obtained with as few as four sample points (see Figs. 12 and 13 of ). The extra cost of computing four samples is (1.89–1.69) / 1.69 = 16 % (see Table 2 of ).

Conclusions

We have developed a new (“nCat”) method to sample subgrid variability in atmospheric models. The method divides the grid box sample space into Ncat categories and allows the modeler to prescribe the sampling probability in each category.

The most flexible variant of the nCat method that we consider here breaks the grid box into eight categories, depending on whether a parcel contains cloud droplets or rain droplets, or is within the first mixture component of the PDF. This “8Cat” variant allows a fine degree of control over where the samples are placed.

Another variant has been created by lumping the eight separate categories into two: one that contains either cloud or precipitation, and one that contains neither cloud nor precipitation. This (“2Cat-CldPcp”) variant is useful when the user does not have an estimate of the optimal sampling fraction for each of the eight categories.

We have tested the 8Cat and 2Cat-CldPcp methods on a drizzling cumulus case (RICO) and a drizzling stratocumulus case (DYCOMS-II RF02). The improvement we find relies on two aspects of the method. One aspect is an algorithm that limits the weight of samples and thereby increases the number of samples in “unimportant” but large-probability categories. This helps prevent a user from becoming overzealous with importance sampling, thereby leaving excessive noise in “unimportant” categories. Another aspect is the choice of sampling variable to prescribe. We prescribe γj (see Eq. ), which is related to the density of sample points in a category. This prescription allows the sampling to behave well as the cloud fraction and precipitation fraction vary widely between stratocumulus and cumulus cases.

Cumulative run time of CLUBB and the different SILHS configurations over an 864-timestep RICO simulation. Each SILHS configuration uses eight sample points. The means and standard deviations of five simulations are shown in the table. All times are in seconds. The two nCat methods (2Cat-CldPcp and 8Cat) show no significant increase in computation time as compared to the original SILHS importance sampling method. All SILHS methods, with eight sample points, are more expensive than CLUBB.

Average time (s) SD (s) CLUBB 0.311 0.007 SILHS (old) 0.691 0.013 SILHS (2Cat-CldPcp) 0.701 0.013 SILHS (8Cat) 0.698 0.007

The finer degree of control over the sampling in the nCat method allows us to improve sampling in evaporating (i.e., precipitating but non-cloudy) regions. This turns out to be a key to the improvement in the results. Evaporation of precipitation is an important process in the RICO case, but precipitation evaporates within only a small portion of a grid box, a portion that the nCat method can preferentially sample. Such fine-scale control of the sampling is not possible in less flexible methods, such as the former method in SILHS, 2Cat-Cld, which does not allow importance sampling on precipitation.

Quantitative improvements are realized by the 2Cat-CldPcp and especially the 8Cat allocations. As compared to the 2Cat-Cld method, the 8Cat allocation allows a reduction in the number of sample points, given equal accuracy in the tendency of autoconversion plus accretion plus rain evaporation. The reduction is approximately a factor of 1.6 in DYCOMS-II RF02 and a factor of 8 in RICO (see Figs.  and ). This permits a factor of 1.6 to 8 fewer calls to the microphysics code. If a computationally expensive microphysical parameterization were used, this would result in a considerable reduction in computational cost.

Code availability

The CLUBB-SILHS code is freely available for non-commercial use after registering for an account on the website http://clubb.larson-group.com. The specific version of CLUBB-SILHS used in this paper is available in the SVN repository located at http://carson.math.uwm.edu/repos/clubb_repos/tags/SILHS_flex_importance_sampling_paper_v2. In the repository is a file named README_flexiblesampling that gives instructions for reproducing the plots in this paper.

Derivation of optimal allocation

The modified integral that is estimated by using importance sampling is given in Eq. (). The goal is to minimize the centered variance of the integrand, h(x)L(x), over the new sampling PDF Q(x) (see Eq. ). The variance of the integrand is given by Var=h(x)L(x)2Q(x)dx-μ2, where μ is the value of the integral in Eq. (). The integral in curly brackets (call it I) needs to be minimized. The integral I can be split up over the Ncat categories: I=j=1NcatCjh(x)L(x)2Q(x)dx. Then substituting for L (Eq. ) and Q=P/L (Eq. ), we find I=j=1NcatCjh(x)2pjSj2SjpjP(x)dx=j=1NcatpjSjCjh(x)2P(x)dx. For convenience of notation, we make a substitution: vj=1pjCjh(x)2P(x)dx. Here, vj is normalized by the probability pj of category Cj. The quantity vj represents the non-centered variance of the process rate h(x), averaged over category Cj. Substituting Eq. () into Eq. (), we find I=j=1Ncatpj2Sjvj. Because vj is a within-category average, rather than a domain average, vj may be large even when category Cj represents a small fraction of the domain. Because vj depends on the process rate h(x), vj varies by grid box and timestep.

We would like to find values of Sj that minimize Eq. (). Since the modified probabilities Sj must sum to one, we can use a Lagrange multiplier, which we will denote λ, and express the problem as a minimization of the following function Iλ: Iλj=1Ncatpj2Sjvj+λj=1NcatSj-1. Next we set the Ncat partial derivatives of Iλ with respect to each Sj to zero: IλSjSi,ij=0. This yields -pj2Sj2vj+λ=0. Rearranging, we find Sj=pjvjλ. Here, vj may be interpreted as a sort of non-centered standard deviation of the process rate h(x), averaged over category Cj. The Sj must sum to one, and so λ is determined to be λ=j=1Ncatpjvj2. Hence Sj=pjvji=1Ncatpivi.

Acknowledgements

The authors are grateful for financial support by the Office of Science, US Department of Energy, under grant DE-SC0008323 (Scientific Discoveries through Advanced Computing, SciDAC) and support by the National Science Foundation under grant AGS-0968640. This manuscript benefitted from the helpful comments of the editor, Klaus Gierens, and of two anonymous reviewers. Edited by: K. Gierens