A Review of Recursive and Implicit Filters

William H. Raymond Cooperative Institute for Meteorological Satellite Studies, University of Wisconsin, Madison, Wisconsin

Search for other papers by William H. Raymond in
Current site
Google Scholar
PubMed
Close
and
Arthur Garder Department of Mathematics and Statistics, Southern Illinois University, Edwardsville, Illinois

Search for other papers by Arthur Garder in
Current site
Google Scholar
PubMed
Close
Full access

Abstract

Low- and high-pass traditional recursive and implicit filters are reviewed. Some similarities and differences between these two forms are illustrated. The use of recursive filters in signal processing is contrasted with the needs in meteorology. The standard techniques used in building a recursive filter with specified characteristics are described. The desirability of high-order calculations is demonstrated. Some numerical results are presented to illustrate the differences in filter selectivity in the presence of topography. To make the implicit filters competitive with the traditional recursive formalism, efficient numerical matrix inversion procedures are employed in the application of both limited area and cyclic boundary conditions.

Abstract

Low- and high-pass traditional recursive and implicit filters are reviewed. Some similarities and differences between these two forms are illustrated. The use of recursive filters in signal processing is contrasted with the needs in meteorology. The standard techniques used in building a recursive filter with specified characteristics are described. The desirability of high-order calculations is demonstrated. Some numerical results are presented to illustrate the differences in filter selectivity in the presence of topography. To make the implicit filters competitive with the traditional recursive formalism, efficient numerical matrix inversion procedures are employed in the application of both limited area and cyclic boundary conditions.

FEBRUARY 1991 WILLIAM H. RAYMOND AND ARTHUR GARDER 477A Review of Recursive and Implicit Filters WILLIAM H. RAYMONDCooperative Institute for Meteorological Satellite Studies, University of Wisconsin, Madison, Wisconsin ARTHUR GARDERDepartment of Mathematics and Statistics, Southern Illinois University, Edwardsville, Illinois(Manuscript received 22 November 1989, in final form 22 August 1990)ABSTRACT Low- and high-pass traditional recursive and implicit filters are reviewed. Some similarities and differencesbetween these two forms are illustrated. The use of recursive filters in signal processing is contrasted with theneeds in meteorology. The standard techniques used in building a recursive filter with specified characteristicsare described. The desirability of high-order calculations is demonstrated. Some numerical results am presentedto illustrate the differences in filter selectivity in the presence of topography. To make the implicit filters competitivewith the traditional recursive formalism, efficient numerical matrix inversion procedures are employed in theapplication of both limited area and cyclic boundary conditions.1. Introduction Filters are used to extract information from a signal.The discrimination process used by filters separates thedesired from the undesired using a built-in frequencydependence. The simplest type of filter is the nonrecursive. The other class of filters is the recursive. Inthis work recursive filters are reviewed. These filtershave dominated signal processing. However, they arepotentially useful in other areas. Filters that are appliedin a mathematically implicit manner and that requirea matrix inversion are also discussed. These are referredto as implicit filters. The differences between the implicit and recursive forms are shown, and the use offilters in meteorology is contrasted with their use insignal processing. A review of recursive filters is alsoconsidered useful because mathematical techniquesused in their construction can be applied in the designof filters with special characteristics that would be relevant to specific problems in the physical sciences.Consequently, this review presents the mathematicaldetails that enable a large class ofrecursive filters to beconstructed. Since the meteorological literature doesnot contain a thorough description, the importantcharacteristics of recursive and nonrecursive filters arecontrasted. Because the literature about filters is so extensive only selected topics of direct relevance to themeteorological researcher is discussed. Corresponding author address: Dr. William H. Raymond, CIMSS,University of Wisconsin, 1225 W. Dayton Street, Madison, Wl 53706. Recursive filters are defined by a recursive relation y,=f~(xo, Xi, - - ', x/c, yo, y~, - - ',Yn-~). (1)Here the filtered quantities or output are denoted asthe y variables, while the x variables represent the inputor unfiltered quantities. Note that y, is functionallydependent upon all previously filtered values. Thisknowledge is commonly referred to as an infinitememory. In contrast the nonrecursive filters satisfy Y~ = f2(xo, x~, - -., xR). (2)Since the knowledge of the input data over a limitedrange is used to obtain the final filtered value y,, thememory is said to be finite. Another type of filter uses the mathematically implicit approach described by Cy = g. (3)Here C is a banded matrix, and g depends only on theinput. The solution process requires a matrix inversion.Consequently each y,, n = 0, 1, 2, - -., N, dependsupon all other output and all the input. This is expressed functionally byy~ = J~(x0, x~, - -., xN, yo, y~, - ' ', Yn-I, Yn+l, ' ' ', y~v). (4)Note that the expression Eq. (4) is different than thatgiven in Eq. ( 1 ). Thus implicit filters do not satisfy thegeneral recursive formalism, but recursive relationshipsdo occur in the numerical matrix inversion process. There are many special purpose filters. These areidentified by examining the transfer function H. Whenc 1991 American Meteorological Society478 MONTHLY WEATHER REVIEW VOLUME ll9the filter is expressed in terms of a Fourier series thetransfer function is obtained from the ratio of the amplitudes of the filtered and unfiltered quantities. In engineering applications IHI is referred to as the gain;in other fields it is called the amplitude response. Theabsolute value is required since the transfer functionis nonreal for nonsymmetric filters. The resultingexpression is frequency (co) dependent. Because of thefrequency dependence in I H(co)[ all filters can be categorized. For example, the ideal low-pass filter selectively removes high-frequency information, upper limitco = 2/xt ( or 2Ax in the spatial domain), yet leaves thelower frequencies unaffected, i.e.,andIH(2At)I = 0 (Sa)IH(0)I = 1. (Sb)The high-pass filter has just the opposite effect since itattenuates only the low-frequency signals. On the otherhand, band-pass filters remove information from bothends of the spectrum, allowing the intermediate frequencies to pass freely. In applications the idealizednature of the frequency response is only approximatelyrealized since the digital filter is limited to a finitenumber of terms. In some implementations high precision is still necessary. This is especially true in engineering where electronic devices perform filteringfunctions. In section 2 the relevant literature is reviewed. Insection 3 the traditional recursive approach for the"sine," "cosine complement," and "tangent" low-passdigital filters are outlined. The high-pass filter complementary to these are the "sine complement," cosine,and "tangent complement," respectively. It will beshown how these filters are constructed to fit a prescribed transfer function. A similar process can be usedto create other special purpose filters. To complete thediscussion of recursive filters, order-one filters are outlined and the Robert (1966) and Asselin (1972) recursive method for controlling high-frequency noise inleapfrog calculations is reviewed. Appendix B outlinesthe cascade method that is the sequential proceduremost commonly used to implement recursive filters.With it the order of the filter can be increased usingcombinations of first and/or second-order filters. Examples of implicit filters occur in section 4. Thefamily of low-pass and high-pass implicit filters is derived from various combinations of two operators. Themathematical procedures for using the implicit filtersare described for finite area and cyclic boundary conditions. The number of arithmetic operations is discussed, as is the method of application. In the finalsection applications are discussed and some computational results are presented. Appendix A describes aneconomical procedure for inverting a cyclic matrix(periodic boundary conditions).2. Review of the literature The simplest averaging procedure can be viewed asa nonrecursive low-pass filter. The one-two-oneweighting scheme of Shuman (1957) is an example.In the meteorological literature, the well-known Shapiro (1970, 1975) filters represent a family of low-passnonrecursive filters. In general, the nonrecursive filteris expressed as a discrete convolution involving termsthat depend only on the input (Kallmann 1940; Blackman and Tukey 1958, p. 126). Hamming (1983),Vichnevetsky and Bowles (1982), Kunt (1986), andAntoniou (1979) discuss the design and theory ofnonrecursive filters. All approaches can be interpreted interms of a Fourier series. Finiteness requires that theseries be truncated after a limited number of terms.This introduces difficulties in the form of Gibbs oscillations. To remove the Gibbs phenomenon the seriescoefficients can be multiplied by a weighting or a window function (for a meteorological application seeAnderson 1989). Many types of window design exist,e.g., those of yon Hann, Kaiser, Hamming, and Papoulis are popular. (Hamming 1983 and Antoniou 1979have informative discussions.) In another approach,which makes use of linear algebra, the filter coefficientsare evaluated by solving a system of equations determined by specifying the characteristics of the amplituderesponse. Hamming (1983) and -ichnevetsky andBowles (1982) describe how the characteristics of theamplitude response translate into Dirichlet and Neumann boundary conditions. For example, for a lowpass filter the boundary conditions would specify thatthe highest frequency (co = 2/xt) be removed [Eq. (5a)],allow no attenuation at zero frequency (Eq. 5b), andrequire that these limits be approached in a verysmooth manner. The latter condition is satisfied at co= 2At and/or at co = 0 by requiring that the first andhigher derivatives be zero at these frequencies, i.e., d~lH(co)/dcoi=O, i= 1,2, --.,M- 1. (5c)Here the conditions in Eq. (5c) plus the two from Eqs.(5a) and (Sb) can be used to uniquely determine filtercoefficients. The number of boundary conditions thatdetermine a unique solution varies with the order ofthe filter (see Appendix Raymond and Garder 1988;Raymond 1988). The Shapiro filters satisfy Eq. (5c)at the zero-frequency boundary. This procedure is alsoillustrated in Ormsby ( 1961 ). The subject acquired a new perspective with the introduction of linear recursive filters (Butterworth 1930;Holtz and Leondes 1966; Otnes and Enochson 1972,1978; Antoniou 1979). In these the present outcomedepends on the input and on at least one other output(filtered) quantity as indicated by Eq. (1). Electricalengineers make extensive use of recursive filters, especially in signal processing where information mustbe extracted from a signal (Kunt 1986; Childers andDuring 1975; Rabiner and Gold 1975; BeauchampFEnRU^RY 1991 WILLIAM H. RAYMOND AND ARTHUR GARDER 4791973). In these applications it is normally necessaryto process a signal in real time. Thus, recursive filtersare designed to give the updated output based on theinput and previous output (given the knowledge of thetransfer function). Ramsey's (1989) study has furtherclarified the definition of the recursive filter. (He hasalso identified, in special circumstances, multiple andunbounded recursion solutions.) The most commonlyrecognized recursive filter in use in the physical sciencesis the Robert (1966) and Asselin (1972) procedure usedin leapfrog time differencing schemes to prevent numerical solutions from developing two delta time-stepfrequencies. With recursive filters the coefficients are commonlyderived to satisfy an assigned response function (Holtzand Leondes 1966; Otnes 1968). This feature of constructing the filter to conform to an assigned transferfunction makes the recursive filter formulation potentially useful in areas other than signal processing. Fromdifferent amplitude responses, or "gains," a family ofdigital recursive filters, many derived from an analogform, have arisen. The terminology analog implies thatthe transfer functions are continuous and complex valued. Thus, these digital filters are made to satisfy themagnitude of the gain squared (a real quantity). Kaiser(1966) has shown that all members in this family arerelated to the Butterworth filter (Butterworth 1930). In contrast to the recursive filter, the implicit filteris represented in terms of a symmetric matrix withknown filter coefficients. Selected filters have been formulated in this implicit form (Pepper et al. 1979; Raymond and Garder 1988; Raymond 1988, 1989). Thisformulation of a filter uses symmetric differencing andsmoothing operators similar to those in nonrecursiveapproaches (Whittlesey 1964; Hamming 1983). Fromthese two operators a family of implicit high- and lowpass filters can be constructed. The implicit filter is notidentical to the traditional recursive approach, as willbe shown in detail in section 4. This could have beenpredicted from Eqs. (1) and (4). However, the twomethods can produce identical filtering provided therecursive filter is applied twice. For identical responsefunctions, the implicit filter requires slightly fewer numerical operations than two applications of the standard recursive method. In signal processing the filter modifies a stream ofinput data. The filter is applied only in the directionof the monotonically increasing time domain. In meteorology the most common application of filtering isin numerical modeling. To keep the model numericallystable unresolvable noise must be removed from thespatial domain. To this end it is desirable that the filterrecognize the bidirectional coupling between neighbors.This is equivalent in the time domain to using bothpast and future information to calculate the filteredquantity. One filtering approach is to apply the recursive filter twice from opposite directions, a double application that minimizes any chance for phase changes.With only one application the phase relation betweenthe input and output is not the same for all frequencies(Hamming 1983 ). Applying the filter the second timein the reverse direction cancels all phase shifts. Theimplicit filter automatically avoids phase shifts becauseof its symmetric design. Fourier decomposition allows the user to terminatethe signal abruptly at a specified frequency. However,this is not possible with numerical filters. Nonrecursivedigital filters exhibit an amplitude response that isnonzero in a finite interval (finite impulse response,FIR) or, over an unbounded interval (infinite impulseresponse, IIR), that cannot reproduce anything in theneighborhood of a discontinuity in a computationallyefficient manner (Kunt 1986; Childers and Dufiing1975; Rabiner and Gold 1975; Antoniou 1979). Beauchamp ( 1973, p. 300) indicates that 200 filter weightsare required for adequate approximation of a stepfunction, i.e., to represent a filter with the transferfunction [H(co)[ = 1 for co < co~ and H(co)l = 0elsewhere. However, according to Antoniou ( 1979, p.249), the recursive filters require a mufiiplicative factorof 5 to 10 (nearly an order of magnitude) fewer termsthan nonrecursive filters to accomplish the same task.Similar comments apply to the implicit filter, and, inboth, the higher the order, the closer is the transitionin the amplitude response or roll-off to the idealizedstep function.3. Review of recursive low-pass and high-pass filters Holtz and Leondes (1966) list three basic low-passanalog filters: the sine, tangent, and cosine complement. These are defined in terms of ideal filters thathave zero attenuation of the signal for low frequenciesand pass none of the signal for frequencies higher thansome cutoff frequency. In practice this ideal may beapproximated efficiently by difference equations of recursive or implicit type. In the formulation of the digitalrecursive filter Otnes and Enochson ( 1972, 1978) consider difference equations of the form K M yj = ~ bkXj-k- ~ amYj-m. (6) k=O m=l It is customary to use the z transform in the analysisof digital filters (Hamming 1983; section 12.5). Thistransform is a useful generalization of Fourier methodsthat is also notationally convenient. Taking the ztransform of Eq. (6), one obtains the transfer function H(z) = Y(z)/X(z). (7)Here, K M Y(z) = ~ b~,z-k, X(z) = ~ a,,,z-'~, (8) k=0 m=0where z = exp(2~rifT), Tis the sampling interval, andfis the frequency. For time series, one sets co = 2~rf.480 MONTHLY WEATHER REVIEW VOLUME 119[In the examination of spatial features one sets z-- exp(2~rib/Lx), where the wavenumber K = 2~r/Lx,/~ is the grid unit, and Lx is the length scale.] To remainconsistent wit.h the literature on recursive filters timeseries notation is used. The roots of X(z) are calledthe poles of the filter; the roots of Y(z), the zeros. Therepresentation of Eq. (6) in terms of convolutions isdiscussed in Ramsey (1989), as is the general stabilityproperties of the filter. For the special case when the at, i -- 1,2,3 .... inEq. (6) are all zero then Eq. (7) is replaced by K H(z) = ~ bkz-k, (9) k~Owhich describes a filter of the nonrecursive type represented by the difference equation K y~ = ~ bkx~_~. (10) k=0In practice, a symmetric form is preferred so that phasechanges are minimal. Thus, normally the limits in thesummation are between plus and minus K. Note thatthe filter in Eq. (10) depends only on the input givenby the x's. This is in contrast to the recursive filter,described by Eq. (6), which uses previously filtered oroutput quantities Yi-,,, 1 ~< m ~< M, to predict y~. Thus,nonrecursive filters are a special case of recursive. The most common "direct" method for finding thecoefficients in Eq. (6) is illustrated using the secondorder recursive filter yj = boxj - alyj-i - a2Yj-2. ( 11 )With this approach it is necessary to specify the transferfunction. For example, to define the sine filter, it isrequired that (for a known constant coo) [HI2= I + [sin(coT/2)/A]4-l (12)or[HI2 = 4A4[cos2(~0T) - 2 cos(~0T) + 1 + 4A4]-t (13)where A is assigned. For the second-order filter, Eq.( 11 ), the transfer function is H(z) = bo[1 + alz-t + a2z-2]-1, (14)where at, a2, and bo are real. After some algebra andapplication of trigonometric identities it follows fromEq. (14) thatIH(z)l2 = HH* = bo2(1 - a2)2 + al2 + 2[(1 -- a2)at + 2aia2] x cos(mr) + 4a2 cos2(wT)-1. (15)By equating the two forms for I H 2, i.e., Eqs. ( 13 ) and(15), the al and a2 are obtained in terms of b0 andthen the bo in terms ofA. Defining B0 = b02/A4, theequations that determine the coefficients are I - 2a2 + at2 + a22 ---- BoC, (16a) at(a2 + 1) = -Bo/4, (16b) a2 = Bo/16, (16c)where C = (A4 + 1/4). Using Eqs. ( 16a)-(16c), Bo isdetermined to be the roots of the fourth-degree polynomialB04 - 256CB03 + 256( 14 - 32C)B02 + 164(-CBo+ 1)=0, (16d)and bo = A2(B0)t/2 is obtained for A specified. Thus,for a range of A we select quantities associated withthe smallest real root ofEq. (16d). For the user's convenience, in Table I values of at, a2, and bo are presented over a range of values of A that yield usefulcoefficients in Eq. ( 11 )'for filtering. (Plots of the amplitude response for the sine filter will be discussed laterin Fig. 6.) Additional information, like sample computer programs of recursive filters and/or routines todetermine the filter coefficients from prescribed transferfunctions, is found in appendix 3 in Childers and Durling (1975), appendix B in Antoniou (1979), and appendix A of Otnes and Enochson (1978). The procedure above can also be implemented forthe second-order tangent filter (Otnes and Enochson1972, 1978), which is defined by IH(f)l2 = I + [tan(ooT/2)/Al4-', (17)where 21 = tan(woT/2). To obtain a second-order filterin this case, following Otnes and Enochson (1972,1978 ), the more general form,yi = boxy + btx~-! + b2xj-2 - aly~_t - a2yj-2, (18)TABLE 1. Solutions of Eqs. (16a)-(16d) yielding bo, a~, and a2given A, for use in the recursive sine filter defined by Eq. (11).A bo al a22.50 0.99626 -0.00633 0.001592.00 0.98861 -0.01521 0.003821.50 0.96597 -0.04555 0.011521.20 0.92520 -0.10060 0.025801.10 0.90074 -0.13390 0.034641.00 0.86738 -0.17964 0.047020.95 0.84651 -0.20848 0.054990.90 0.82234 -0.24208 0.064420.85 0.79451 -0.28107 0.075580.76 0.73414 -0.36683 0.100970.66 0.65027 -0.48901 0.139280 58 0.57040 -0.60929 0.179690.49 0.46872 -0.76947 0.238190.46 0.43265 -0.82864 0.26129FEBRUARY 1991 WILLIAM H. RAYMOND AND ARTHUR GARDER 481is used so thatH(z) = [Do + big-~ + b2z-2][1 + alz-~ + a2z-2]-1- (19)Once again, by equating the two forms of I H 2 = HH*,a?s and b?s can be obtained by finding the zeroes ofan eighth-degree polynomial. In theory, the procedure outlined above can be usedwith any continuous transfer function. Thus, specialpurpose filters can be constructed. The most commonthree nth-order low-pass recursive filters, i.e., the sine,tangent, and cosine complement, are defined so thatthe square of the magnitude of the transfer functionin the three cases is:(sine) IH(f)l2 = 1 + [sin(wT/2)/sin(cooT/2)]2n-~, (20)(tangent) IH(f)2 = 1 + [tan(oor/2)/tan(o~or/2)]2"-~, (21)(cosine complement) IH(f)l2= 1 + [cos(o~oT/2)/cos(wT/2)]2"-~ (22)However, the cosine complement low-pass filter isconsidered undesirable since it does not meet the standard requirement that the amplitude response be onefor zero frequency (Holtz and Leondes 1966). An analogous set of high-pass recursive filters arealso presented in Holtz and Leondes (1966). They satisfy:( sine complement) IH( C) 12= 1 4-[sin(o~or/2)/sin(ooT/2)]2"-~, (23)(tangent complement) H(f) 12 = 1 + [tan(cooT/2)/tan(~oT/2)]TM -~, (24)( cosine ) IH(f)l2 = 1 + [cos(cor/2)/cos(ooor/2)]2n-'. (25)The sine complement high-pass filter does not meet allthe requirements; hence, it is usually not considered adesirable filter. The formulation of the digital expressions representing these high-pass filters parallels thelow-pass development above. To avoid the increasingly complicated computationsentailed by high-orders in the direct method outlinedabove, Otnes and Enochson (1978) introduce the cascade, or'series form, for recursive filters. It is basedupon the fact that any higher-order filter can be decomposed or factored into a sequence of first and/orsecond order filters. Its application is described in appendix B. The cascade approach reduces the complexity of determining the coefficients for a high-order filterbut increases the number of arithmetic operationsslightly. For a sixth-order sine filter, Eq. (6) requires 13arithmetic operations, while there are five additions ormultiplications associated with each cascade [ Eq. (B3) ]yielding 15 arithmetic operations in the three applications needed to produce a sixth-order filter. Equation(6) implies that 25 operations are required for a sixthorder tangent filter, while from appendix B the cascadetechnique [Eq. (B4)] requires 27. The number of operations to calculate the a's and b's (filter coefficients)are not included in this count since they need only becalculated once and retained. With the cascade methodless information is needed near boundaries in finitearea calculations. This is helpful during the start-upprocess. The direct application of Eq. (6) and the cascade method from appendix B are analogous to thetwo ways in which the higher order Shapiro filters canbe applied; i.e., a large stencil can be used, or alternately, many applications of a three point operator canbe used. Clearly, the latter is advantageous nearboundaries. There are also other "canonical" devices (Kunt1986; Antoniou 1979; Childers and Dufiing 1975) thathelp minimize the number of expected arithmetic operations in the implementation of recursive filters.These approaches introduce an extraneous nonphysicalvariable and are usually avoided, especially in engineering, since they impose severe restrictions on theaccuracy required for the coefficients and/or in thestart-up process (Childers and Dufiing 1975 ). Becausesmall errors in these estimates can propagate (Hamming 1983 ), the start-up process is critical. In addition to the filters previously discussed, thelist of analog filters includes the Bessel, Chebyshev Iand II, and the elliptic or Cauer types. Even thoughmost texts describe these filters in one-dimensionalspace they can also be constructed in two dimensions,as given in Rabinar and Gold ( 1975 ). Band-pass filterscan also be constructed (Whittlesey 1964). Examplesof a band-pass Butterworth filter applied to temporalmeteorological data are found in Murakami (1979)and Krishnamurti and Subrahmanyam (1982). Before leaving the traditional recursive filters, wewant to point out that the first-order low-pass recursivefilter is described by (Blackman and Tukey 1958, pp.40-41; Whittlesey 1964; Otnes and Enochson 1972,1978) yj = cryj_i + (1 - cr)xj. (26)The companion first-order high-pass filter has been described previously in Raymond (1989). The filter parameter a must satisfy 0 < a < I for stability. It may482 MONTHLY WEATHER REVIEW VOLUME 119be useful (Childers and Darling 1975, p. 150) to writea = exp(-p), where p is positive and varies as a function of some intrinsic physical property of the data,which may also vary in time ( or space). Here exp ( - p)may also represent a Gaussian distribution, etc. Thetransfer function of Eq. (26) is H(f) = (1 - a)[1 - a exp(-io~T)]-~. (27)Here i2 = -1. Also, [H(f) = (1 - a)[1 - 2ce cos(wr) + a2]-1/2. (28)From this it can be seen that for zero frequency H(0)I = 1, (29)while at the high-frequency limitJ~ = (2T)-~ IH(J;)I = (1 - a)(1 + a)-~. (30)Note that the right-hand side in Eq. (30) is nonzeroin the stable case (0 < a < 1 ). The major advantage of the first-order filter is itssimplicity of application. However, it is clear from anexamination of the filtering responses that the higherthe order of the filter, the greater is the discriminationbetween attenuated and nonattenuated frequencies,thus enhancing filtering capability. This will be illustrated schematically in the next section. One drawbackof the traditional recursive filter is that the filter coefficients must be recomputed if the transfer function ischanged or irA, or equivalently wo, is assigned a different value. The first-order mcursive filter in Eq. (26)is an exception. Values for a can be selected based onan independent criterion like data distribution, datatype, or grid density (C. M. Hayden and R. Purser,personal communication). The first-order filter is alsoused as the starting point for designing a more optimalfilter that includes statistical information, e.g., the Kalman filter (Anderson and Moore 1979). To emphasize the usefulness of specially designedrecursive filters attention is called to the work of Robert(1966) and Asselin (1972). They eliminated high-frequency noise in the numerical leapfrog time differencing scheme by introducing the recursive filter Yn = x, + '~(x,+~ - 2x, + Yn-~). (31)Here 3' is a filter parameter to be adjusted in order toobtain the desired amount of filtering. For a detailedstudy of this filter see Schlesinger et al. (1983). Theamplitude response satisfies[H(f)l2 = [1 - k~ sin2(wAt/2)] x [1 +k2 sin2(wAt/2)]-t, (32)where k~ = 4(~, - 23/2)/( 1 - 23/+ 3/2) and k2 = 4~/(1 - 2~ + ~2). Schematic representations of this response function will be presented in the next section. Notwithstanding the popularity of the traditionalrecursive filters, an alternative method of application,i.e., implicit filters, is now examined.4. The low- and high-pass implicit filtersa. Operators There are two standard methods used to design recursive filters. The most common is outlined abovewhere the filter coefficients are determined from aspecified transfer function. Another method is to determine the ai's and b[s in Eq. (6) using approximationtheory and trigonometric polynomials (Kaiser 1966)in the solution of the difference equation. On the otherhand nonrecursive filters can be created from derivativeoperators (Antoniou 1979, Rabiner and Gold 1975;Hamming 1983). Hamming points out that nonrecursive filters can also be written as the sum of asmoothing operator (composed of even functions) andthe difference form of a derivative operator (composedof odd functions). Whittlesey (1964) was the first touse the sum and/or the difference of two terms to createhigher-order recursive filters. Applying similar operators in an implicit manner led to the development ofthe high-order implicit low-pass tangent and the tangent complement high-pass filters (Raymond 1988,1989). In fact, a family of analog-digital filters can beconstructed. These are now presented. The operation [L2p]u is introduced, where L isanalogous to a derivative operator, such that:(p= 1) [L2lun ~ (Un-~ + Un+~) -- 2Un, (33a)(p = 2)[Ln]un ~ (un-2 + u.+2) - 4(u~_~ + u~+~) + 6u~, (33b)(p = 3)[Ltlu~ ~ (u~-3 + u~+3) - 6(un-2 + u~+2) + 15(u._~ + Un+t)-- 20U~, (33C)etc. Note that the coefficients in Eq. (33) are identicalto those in the binomial expansion of(a-b)2p. Shapiro( 1975 ) introduced the L operator. Let [S2V]u~ denote an application of a smoothingor averaging operator S, where:(p= l) [S2]un ~-- (Un-I '~- Un+l) + 2Un, (34a)(p = 2)[S4lu. ~ (u.-2 + u~+2) + 4(Un-~ + Un+~) + 6U~, (34b)(p = 3)[St]un m (un-3 + Un+3) + 6(Un-2 + U,+2) + 15(Un-~ + Un+~) + 20Un, (34C)etc. The coefficients in Eq. (34) are the entries in rowFEBRUARY 1991 WILLIAM H. RAYMOND AND ARTHUR GARDER 4832p of Pascal's triangle. The S/2 operator (p = 1 ) definesthe Shuman (1957) filter. Orders p > 1 are known asbinomial filters (Otnes 1968 ).b. Low-pass implicit filter From the L and S operators, implicit filters whoseamplitude response is similar to that given by the traditional recursive representation can be constructed.(Other families of filters may be obtained using different operators.) In this section unr is the filtered variable,while u, is the unfiltered; thus, the low-pass implicitfilters include(sine) unF + (--1)Pe[L2P]UnF= tin, (35)(tangent) [S2']unF+ (-1)P~[L2p]u,~= [S2~']u~, (36)(cosine complement) [S2V]u,~ + ~u,F = [S2p]u,. (37)Here ~ is the filter parameter and the order of the filteris 2p. [Note that the order is n in the recursive filtersEqs. (20)-(25).] The amplitude response H(co) associated with eachimplicit filter is constructed assuming a Fourier expansion for both u~ and u,F. Then, forming the ratioof the amplitudes obtains the responses(sine) H(co) = [1 + ~22~ sin2~'(coT/2)]-~, (38)(tangent) H(~o) = [1 + e tan2V(coT/2)]-~, (39)(cosine complement) H(co) = 1 + e(2)-2V[cos(coT/2)]-2n-~. (40)The cumulative amplitude response of k applicationsof any filter is described by the response of one application raised to the kth power. In Eqs. (38)-(40) the responses are given in a formequivalent to the gain. In contrast,the recursive filtersdescribed in section 2 are categorized by the square ofthe amplitude, as given in Eqs. (20)-(25), because thetransfer function is a nonreal complex number. Thisfollows directly from the fact that in the traditionalapproach the amplitude response is obtained from aform that is not symmetric. Nevertheless, Eq. (21 ) andEq. (39) both describe a tangent filter of order n in theformer and 2p in the latter. The gains however are notidentical. For order 2p, the square of the magnitudeof Eq. (39) is JH(co)2 = [I + e tan2V(cor/2)]-2. (41)To compare this with Eq. (21), assume e = A= tan(cooT/2)-2~. The tangent in the denominator inthe traditional recursive approach always depends onan exponent of 2n, while with the implicit approach aterm with an exponent 2p appears within the expression raised to the -2 power. Thus the square of themagnitude of the response for the implicit tangent filteris equivalent to the recursive tangent filter when p = n,provided two applications of the recursive filter aremade. This is because two applications of a filter givesa filtering capacity represented by the amplitude response squared. Thus the right-hand side of Eq. (21 )is squared and is equivalent to Eq. (41) provided n= p. As indicated in section 2, a double application ofthe traditional recursive filter, once each from oppositedirections, is desirable. The number of arithmetic operations required bythe implicit tangent filter for sixth-order (2p = 6), usingthe Gaussian elimination procedure [Eqs. (All)(A 14 )] described in appendix A, is 22 additions and/or multiplications per grid point; for eighth-order, 28;for twelveth-order, 40. In special cases round-off errormay be minimized by rewriting the filters using un~= u, + -, where 4~ is the unknown dependent variablerepresenting the filter's contribution. This requires oneadditional operation. As indicated earlier, 25 and 27operations are required in Eq. (6) and Eq. (B4) fororder 6. Two applications double these numbers. Forequivalent filtering response functions, as measured bythe square of the magnitude of the response, Eq. (41 ),the arithmetic operational count between the twomethods is 40 for the implicit versus 50 for the recursive. Thus at the higher orders the implicit method isslightly more computationally efficient. One advantage of the implicit approach is that thefilter coefficients are known. Another is that it is trivialto change the degree of filtering by adjusting the filterparameter ~. This can be done locally as desired. Circumstances where this could be useful include situations where it is necessary to accommodate changes inthe forecast model resolution (Raymond and Garder1988) as found when computing with nonuniformspaced grids, or when it is necessary to connect datarich regions with regions of sparse data or data of lowerquality. In the latter case, where filter selectivity is notcritical, the second-order fully two-dimensional implicitfilter described in Raymond and Garder (1988) is appropriate. To maintain consistency with Eqs. (20)-(24), basedon the discussion above, e can be equated withsin-2V( cooT/2 ), tan-2~'(cooT/2 ), or cos2~( cooT/2 ). Herecoo = 2~'J~ whereJ~ is the frequency when the filter possesses a half-power, i.e., the amplitude response has avalue of one-half. Note that the response of the implicitsine filter, Eq. (38), contains a 22v not contained inEq. (20), taking into account that the latter is writtenas the square of the amplitude. Likewise there is anextra factor in the cosine complement response. Bothfactors however can be absorbed into the definition of484 MONTHLY WEATHER REVIEW VOLUME 119e. The traditional recursive filters in Eqs. (20)-(24)may in some cases be viable over a restricted range ofvalues of ~. However, implicit filters allow any positivevalue of e whereas the recursive formulation has limitations on the ranges of suitable parameters, e.g., A inEqs. (16), which are allowable in a filter. From the definition of e, given a desired frequencyJ~ (w0 = 2~rJ~), one can determine the value of e thatwill filter at the intended frequencies. Alternately, ecan be selected from a table or from plots of the amplitude response. The desired magnitude chosen in anystudy is also a function of the number of applicationsof the filter and the source and scale of the noise thatis being removed. The sharpness of the transition, or roll-off, is evidentin Fig. 1, which illustrates the amplitude responsecurves for the implicit tangent low-pass filter of orders(2p) 2, 4, 6, 8 and 10 when e = 1. Here the wavenumberscale is defined by Kb/~r so that a wavenumber 4 featureis associated with 0.5, while 2Ax corresponds to 1 andzero frequency with 0. With a filter parameter of e = 1,a 4~x feature is reduced by one-half with one filterapplication. Note that as the order of the filter is increased the slope of the amplitude response curve increases in the vicinity of 0.5. In contrast, near the endpoints of the wavenumber scale the curve becomes increasingly flat. It is these characteristics that make thehigher-order tangent filters so effective. Also just bychanging the value of ~ the selectivity of the filter canbe changed. This is illustrated in Fig. 2a, which showsan eighth-order filter with e decreasing in powers often from 1 in curve A to 0.0001 in curve E. Decreasingthe value of the filter parameter ~ to less than one shiftsthe midpoint of the amplitude response curve to theright or high-frequency side of the wavenumber scale.Similarly increasing e to greater than one results in ashift to the left or low-frequency side of the scale (Fig.2b). For comparison purposes, the much used Shapirofilters are contrasted with the tenth-order tangent filter(e = 0.01 ) (Fig. 3 ). The differences in the slope of theamplitude response are clear. Note, for comparisonpurposes, that the sixth-order implicit tangent filter requires 22 operations per grid point while the sixteenthorder Shapiro filter requires 25 when written in optimum form. The differences between the amplitude response forthe first-order recursive filter, Eq. (26), and the eighthorder tangent filter is illustrated in Fig. 4. The removal1.0.B.7AMPLITUDE RESPONSE.3.20 0 .~ .2 .3 .4 .5 .6 .7 ./3 .9 ~ .0 ~/AVE NUMBER SCALEFIG. 1. The amplitude response is shown for the low-pass implicit tangent filter with - = 1 for orders (2p) 2, 4, 6, 8 and 10 in curves A through E, respectively.FEBRUARY 1991 WILLIAM H. RAYMOND AND ARTHUR GARDER 4851.0 .9 .8 .7 .b .5 .4 ,3 .2 .1AMPLITUDE RESPONSE,1 .2 ,3 .4 .5 .6 .7 .8 .9 1.0 WAVE NUMBER SCALE1.0 .9 .8 .7.3.2 AMPLITUDE RESPONSE-.1 0, ~ I 0 .1 [ t.2.3 .4 .5 .6 .7 WAVE NUMBER SCALEI ,,, ...= t,9 1.0 ]~IG. 2. The change in the amplitude response with variations in the filter parametere is presented for the eighth-order low-pass implicit tangent filter. In (a) the filterparameter is varied from 1 to 0.0001 in curves A through E, while in (b) the magnitudeof~ increases from 1 to 10 000 in curves A through E.486 MONTHLY WEATHER REVIEW VOLUME 1191.0.9.8.7AMPLITUDE RESPONSE.3.20 0 .1 .2 .3 .4 .5 .6 .7 .B .9 1.0 S/AVE NUHBER SCALE FIG. 3. The amplitude response for the low-pass Shapiro filters of order 2 (curve A), 4 (curveB), 6 (curve C), and 10 (curve D) are illustrated along with that for the tenth-order tangent filterwith e = 0.01.of any 2Ax feature is clearly only partial with the firstorder approach, and the zone in which the filteringtransverses from heavy to light is wide. The response for the Robert ( 1966 )-Asselin ( 1972 )recursive low-pass filter is shown in Fig. 5. These responses are somewhat sharper than those shown forthe first-order scheme in Fig. 4. This special purposelow-pass recursive filter was designed to filter monotonically in time so that no additional data storage isneeded when used in leapfrog time differencingschemes. This is one reason for its great acceptance bynumerical modelers. The implicit sine filter, Eq. (35), is equivalent to animplicit representation of high-order diffusion. Theamplitude responses, Eq. (38), are shown in Fig. 6 fororders 2, 4, 6, and 10 in curves A through D with e= 0.005. Curve E is for the tenth-order tangent filter(e = 0.1 ). For the sine filter the amplitude response isnonzero at the high-frequency boundary; consequently,during any one application all 2Ax noise is not removed. From a comparison of the amplitude responsesof the same order it must be concluded that the selectiveness of the sine filter is less than that of the tangentfilter. In some circumstances this is acceptable. On thepositive side, the computational costs are less for thesine filter since it requires more than one-third fewercalculations per application. This savings is the consequence of the tight-hand side of Eq. (35) requiringno calculations, as noted by Otnes (1968). To relateequivalent implicit and recursive sine filters take A 4= 1/e in Eq. (12). However, in contrast to the implicitfilter, the traditional recursive sine filter described byEqs. ( 11 ) and ( 16a)-(16d) does not exist when An = 1 /0.005 because the roots of Eq. (16d) are all nonreal.c. High-pass implicit filter From the above it is clear that the L or S operatorsin various combinations form the tangent, sine, or cosine complement implicit low-pass filters. These sameoperators can also be used to generate the high-orderhigh-pass implicit filters. The tangent complementhigh-pass filter is given by(--1)V[L2VlUnF + ~[S2P]lgnF= (-l)v[Z2V]ttn. (42)The amplitude response is F(f) = [1 + e cot2V(wT/2)]-~. (43)FEBRUARY 1991 WILLIAM H. RAYMOND AND ARTHUR GARDER 487 AMPLITUDE RESPONSE ~2~ ~.,<~_.~~~~ ~,-,~ ~o~ \.~\ ~'~ X ~.5.~ ~~ i~.2 0 .1 .2 .3 .4 .5 .6 .7 .8 .9 .0 WAVE NUMBER SCALE FIG. 4. Amplitude responses are given for the first-order low-pass recursive filter with a set to0.99 (curve A), 0.5 (curve B), 0.1 (curve C), 0.01 (curve D), and for the eighth-order tangentfilter (curve E) with ~ = 0.01.The sine complement and cosine high-pass filters arenow easily obtained from Eq. (42) by deleting eitherthe L or S operators, respectively. The amplitude response shown in Fig. 7 for e = 1,1.00.80.60.40.20.0 0.0 CI I I I0.2 0.4 0.6 0.8.0wave number scale FIG. 5. Amplitude response for the Robert-Asselin recursive filter[Eq. (30)] for 3' values of 0.1 (curve A), 0.2 (curve B), and 0,4(curve C).10-2, 10-4, and 10-8 for the eighth-order high-passtangent filter is similar to that for the low-pass filtersbut the curve is reversed, i.e., the curve is zero for zerofrequency and one for the highest frequency. In thisframe of reference all the properties noted above forthe low-pass tangent filter apply to the high-pass tangentfilter. Care must be exercised in the application of thehigh-pass filter in finite-area calculations so that theboundary conditions are properly handled (Raymond1989).5. Applications and numerical procedures Here useful applications of filters are elaborated onfurther. For the most part, this discussion will deal withthe application of low-pass filters in numerical modeling. In model simulations it is necessary to removeunresolvable noise by application of a filter or by theaddition of diffusion. Otherwise 2Ax noise generateslinear instability, while 3Ax noise is associated withnonlinear instability (Orszag 1971 ). Thus it is desirableto selectively remove these high-frequency componentswithout damping others within the model's finite-di488 MONTHLY WEATHER REVIEW VOLUME ll9w.9.8.7.6.5.4AMPLITUDE RESPONSE.3.2.10 0 .1 .2 .3 .4 .5 .6 .7 .B .9 14AVE NUMBER SCALEFIG. 6. The implicit sine filter is shown for orders 2, 4, 6, and l0 in curves A through Dusing e = 0.005. Curve E is for the low-pass tangent filter with e = 0.1.mensional system. In the examples the filter calculations are performed using the implicit approach sinceidentical or nearly identical filtering capacities exist forthe recursive and implicit forms. To obtain the filtered quantities with the implicitrepresentation, it is necessary to invert a diagonallybanded matrix. This matrix contains entries in a finitenumber of the principle diagonals, i.e., it is tridiagonalfor Order two, pentadiagonal for order four, etc. Forsparse matrices direct solvers based on Gaussian elimination that use upper-lower triangular decomposition(Atkinson 1978; Forsythe and Moler 1967; Wilkinson1965) are effiicient provided the bandwidth is not toowide. This is the case for orders two through twelve,which are sufficient for most purposes. For the reader'sconvenience this algorithm is presented in appendix Ain Eqs. (A 11 )- (A 14 ) for a bandwidth of 7. However,the Gaussian procedure does not vectorize. Thus, atsome point, as the order of the implicit filter is increased, an alternative numerical procedure is thesemivectorizable cyclic reduction algorithm (Ortegaand Voigt 1985). The traditional recursive filters require no matrixinversion. Nevertheless the number of arithmetic operations remain identical (or larger) provided anequivalent order (n = p) is utilized in two applications,once each from opposite directions, to minimize phasedistortions. The multiple application of the unidirectional procedure is as outlined in section 3, providedthe grid locations are renumbered so that the startingposition always corresponds with location 1. The traditional recursive filters are extremely difficult to vectorize. The high-order filters are applied one dimension ata time. Consequently with two-dimensional fields, thefilter is applied first in one dimension, then the resultingfield is used, and the filter is applied in the other dimension. Raymond and Garder ( 1988 ) present a truesecond-order two-dimensional implicit filter. Generalizations of this procedure to the higher-order implicitfilters might be possible but the benefits may be smallconsidering the selectivity of the high-order filters. Rabiner and Gold (1975) discuss multidimensional traditional recursive filters. In numerical modeling with the primitive equations,the horizontal velocity, temperature, and mixing ratiofields are usually filtered. If filtering is not done at everytime step there is an adjustment or reaction that canFEBRUARY 1991 WILLIAM H. RAYMOND AND ARTHUR GARDER 489 AMPLITUDE RESPONSE .7 . ~ .~ .~ . ~ .~ .6 .7 .8 .9FIO. 7. Sa~e as Fig.: except for the ei~th-order hi~-p~s i~plicit ta,gem filter with ~ et to I (cu~e A), 10-: (cu~e B), 10-~ (cu~e C), and 10-~ (cume D).impact model calculations. A spike signal associatedwith the application of the filter is observed in the normof the pressure (omega) velocity (Raymond 1989 ). Boundary conditions become important with theapplication of filters in a bounded spatial domain. Thisproblem is analogous to the start-up difficulties associated with filtering time series. Additionally, in limitedarea calculations, the boundary may represent the termination of data and not a physical barrier. To illustrate in more detail the difficulties encountered atboundaries consider the first-order traditional recursivefilter given in Eq. (26). Extending the filter one gridlocation past the boundary at subscript location N gives ylv+~ = OlyN + ( 1 - O/)XN+1. (44a)Reversing the direction of application at location Ngives YN = OtyN+I + ( I -- Ot)XN. (44b)Substituting for YN+! in Eq. (44b) from (44a) impliesthat the filtered quantity at the boundary must satisfy YN = [~XN+I ''- XN]/( 1 "[- Ol), (44c)which requires the knowledge of XN+1. If the data isnot known past the boundary at Nthen some assumption must be made. IfxN+~ = xN then y~ = x~, whichmeans no filtering occurs because the unfiltered fieldis smooth. Other options include ignoring XN+~ (XN+~= 0) or assuming that xN+ t = xN- i. The latter conditionis equivalent to replacing N with N - 1 in Eqs. (44a)and (44b) and solving for y~v, this givesYN = [aX~v-~ + XN]/( I + a). (44d)The appropriate procedure may vary with the natureof the problem and the number of filter application.This choice at the boundary is important since it influences interior values through the recursion formula. The amount of information needed to filter adequately at the boundary depends a great deal on thetype of filter. The higher the order the more informationis required. Also more information or assumptions arenecessary to use the high-order tangent filter than arerequired by the same order sine filter. This is becausethe sine filter, Eq. (35), only needs the unfilteredquantity at the center location, which presumably is490 MONTHLY WEATHER REVIEW VOLUME II9known, while the tangent (Eq. 36) requires the unfiltered over the entire stencil. On the other hand, if theunfiltered boundary values are already smooth then nofiltering is necessary and a Dirichlet condition representing no change at the boundary is appropriate forboth sine and tangent filters. Neumann boundary conditions provide another alternative. In either case, decreasing the order of the filter gradually to 2 as theboundary is approached is sufficient to form a wellposed problem. Decreasing the order does reduce theselectiveness. When using the implicit high-pass filterit is best not to reduce the order of the filter near theboundary. By creating fictitious grid points and assuming reflective boundary conditions, the entries in thecoefficient matrix can be properly completed (Raymond 1989). Periodic boundary conditions are required in globalcalculations and are commonly used elsewhere. Withperiodic boundary conditions, Fourier decompositionis possible.~ Fast Fourier transform (FFT) routinesare generally very economical when powers of 2 orfactors of 3 or 5 are involved, e.g., the Fourier transformation and its inverse require as few as 17 numericaloperations per grid point for a grid with 64 nodes. Asindicated earlier, it is impossible with recursive or nonrecursive filters to achieve a step function response withthat number of arithmetic operations. Nevertheless, forthe sake of completeness, appendix A shows the inversion procedure for the matrix obtained for the implicit filter with cyclic boundary conditions. For the implicit filter the cyclic boundary conditiongenerates a matrix that is not strictly banded. The inversion of that matrix is thus slightly more involved.These details are presented in.appendix A for the sixthorder filter. (Generalization to higher order is straightforward.) The majority of the extra computations comefrom Eq. (A8), which necessitates 6 additional arithmetic calculations per grid point. However, with thesolution procedure given in appendix A no fictitiousgrid points need be added as is commonly done withthe nonrecursive or traditional recursive filters. The application of the cyclic boundary conditionwith the sixth-order implicit tangent filter is now illustrated. Sine waves with amplitude 100 for frequency10At and 2At are superimposed on an evenly spacedgrid ti = iAt, where i -- 1, - -., 50. Cyclic conditionsimply that the nonexistent location i -- 51 and gridlocation i --- 1 would be one and the same. The resultsafter one filter application with e = 0.005 are shownin Fig. 8. Note that the 2At wave is completely removed. The filtered solution agrees with the lOAt wavesolution through 3 decimal places. Lower orders are ~ Dirichlet or Neumann boundary conditions can also be handledby fast sine or cosine transformations. However, filtering in finiteregions with Fourier methods requires caution since scales larger thanthe domain will introduce components throughout the spectrum(Raymond 1989).equally efficient for removing the high-frequency 2Atsignal. It is, however, the discriminating power of thehigher-order filters that makes them valuable. A selective filter can be important in model simulations. Here the root-mean-square error, forecast minus radiosonde report, is presented for the geopotentialheights at 500 mb associated with 72-h limited areaforecasts computed with the 10-sigma level version ofthe Penn State/NCAR region model (Anthes andWarner 1978). The model has a staggered grid systemand uses a Lambert conformal mapping to 61 x 46grid points with a spacing of 80 km. This example usesthe initial and boundary OSCAR IV (0000 UTC 22April-25 April 1981 ) datasets. The implicit low-passtangent filter was inserted in lieu of the model's regularfourth-order horizontal diffusion (Anthes and Warner1978). [ The coefficients for the latter are determinedaccording to Smagorinsky (1963).] The order of theimplicit filter is decreased to two as the boundary isapproached. No filtering occurs on the boundary. Thelow-pass filters are applied to the horizontal velocitycomponents, temperature, and mixing ratio fields atevery time step. The time-step size is two minutes. Thisprocedure is described in greater detail in Raymondand Garder (1988).2 The statistics shown in Fig. 9 illustrate the differences between the second- and thesixth-order low-pass implicit tangent filters. Note thatthe statistics are better for the sixth-order filter (e= 0.0075 ) and that the errors associated with the second-order are reduced as the magnitude of the filterparameter e is reduced. In contrast, the error remainsnearly constant even when a larger filter parameter (e= 0.02) is used in the sixth-order approach. These calculations confirm what is obvious in the amplituderesponses shown in Fig. 1, i.e., that the higher-orderfilter calculations are more discriminating and thereforelose less meteorological information. Also shown inFig. 9 is the rms error associated with the regular modelconfiguration, which uses diffusion coefficients computed from the deformation (Smagorinsky 1963). Horizontal smoothing over sloping sigma surfacescan have negative consequences (Alpert and Neumann1984). Therefore, filtering on sigma surfaces must bevery selective. To illustrate this point, four 12-h forecasts using different filters or filter coefficients are madewith the semMmplicit 15-sigma level CIMSS regionalmodel. The CIMSS model is a local version of theAustralian Bureau of Meteorology Research Centre's(BMRC) finite area model (Leslie et al. 1985). In thecalculations, the horizontal boundary values are notfiltered and all filters are reduced to second-order next 2 A coding error in this work gave results that overemphasized therole of the model's horizontal diffusion. Corrected calculations withand without diffusion indicate that the diffusion is responsible fortemperature differences of approximately one degree or less in thelowest sigma levels. These results are essentially in agreement withthe findings in Errico and Baumhefner (1987).FEBRUARY 1991 WILLIAM H. RAYMOND AND ARTHUR GARDER 4913002003100E 0-100-200UnfilteredFilteredExact-300 , I , I , I , I , 0 10 20 30 40 50 Grid Location FiG. 8. Illustrated is the application of the sixth-order implicit tangent filter (e = 0.005) to aproblem with cyclic boundary conditions. Two waves of frequency 10At and 2,xt have beensuperimposed. The curves convey the ability of the filter to remove the high-frequency 2ht signal.The 10at curve is also outlined by the large circles.to the boundary. These 12-h forecasts, shown in Fig.10, begin at 0000 UTC 28 April 1989 and use a horizontal grid resolution of 150 km and a time-step sizeof 10 min. The boundary values are obtained by inoterpolation from the initialized National Meteorological Center's (NMC) spectral model valid at 1200 UTC.As described above, the low-pass filters are applied tothe horizontal velocity components, temperature, andmixing ratio fields at every time step. The two framesof omega values in the top row in Fig. 10 are computedusing the sixth-order sine filter with filter parameter ~= 0.005 and 0.03. The omega values in the lower left,representing a control calculation, are computed usingthe sixth-order tangent filter with ~ = 0.001, while fordemonstration purposes the lower right frame is computed with the fourth-order nonrecursive Shapiro filter.In the right-hand frames note how the pressure (omega)velocity is artificially enhanced in regions with slopingz 40o 30o 20:~ 0 2ND ORDER eplison=0.0075 O----- 2ND ORDER eplison=0.00075 ~ 6TH ORDER eplison=0.0075 %%% 6TH ORDER eplison=0.02~ ~.a 500 mb HEIGHTS 12 24 36 48 60 72TIMEFIG. 9. Illustrated are root-mean-square errors between model forecasts and radiosonde reportsfor a range of filter parameters e for the second- and sixth-order implicit low-pass tangent filter.Also presented for comparison purposes am the results from the regular model configuration thatuses fourth-order diffusion with coefficients determined according to Smagorinsky.492 MONTHLY WEATHER REVIEW VOLUME 11912 HOUR FORECfiST I~G. 10. Four 12-h forecasts are presented to show the influence of filtering on sloping sigma surfaces. In the top row the sixth-orderimplicit sine filter with e = 0.005 (left frame) and 0.03 (right frame ) is utilized. The bottom row was computed with the sixth-order implicittangent filter using e = 0.001 (left frame) and with the fourth-order Shapiro nonrecursive filter (right frame).topography. It is important to remember that low-orderimplicit and recursive filters will also generate fieldssimilar to that shown for the nonrecursive filter in thelower right-hand frame. In the upper right-hand frame,just a small amount of extraneous vertical motion isproduced with the sixth-order sine filter when the filterparameter is larger than needed. This behavior is notobserved in the omega fields in the left-hand frames.Thus, the selectivity of the filter is very important toavoid artificially inducing vertical motion in regionshaving sloping topography. The value assigned to thefilter parameter is also of importance. An examinationof the other meteorological fields (not shown) indicatesthat the smoothing produced by the sixth-order filteris adequate with smaller filter parameters. However, ifthe numerical noise is not suppressed, and if increasingthe magnitude of the filter parameter is not a viableoption, then a higher-order filter should be used.6. Summary This review of high- and low-pass recursive and implicit filters has tried to identify the similarities anddifferences in the two approaches. Also areas of potential difficulty have been identified. Most generally theapplication of filters in meteorology deals with information that is digital and discrete in time or space. Theunidirectional requirements needed to process a timesignal are clearly satisfied by the traditional recursiveapproach. For discrete intervals however it is best toapply the recursive filter twice, once each from oppositedirections, to minimize phase distortions. The versatility of being able to design a filter to satisfy a knowntransfer function is also important, especially in manyengineering applications and for some specific problems in the physical sciences. Thus, with the recursivefilter, the filter coefficients are usually calculated fromthe transfer function.FEBRU^RY 1991 WILLIAM H. RAYMOND AND ARTHUR GARDER 493 On the other hand, it has been shown that the implicit formulation starts with known analytic coefficients that are a function of a filter parameter. Theselection of implicit filters includes the sine and tangentlow-pass and cosine and tangent complement high-passimplicit filters. The range of the filtering capacity islarge and easily varied by changing the order of thefilter and adjusting the filter parameter e. This abilityto vary e is especially important when smoothingboundary transitions as with nested grids, and in connecting regions modified by data with no-data regimes.The implicit filter is symmetric and represents a systemof linear equations with unique solutions. In contrast,the traditional asymmetric recursive filter is expressedas an equation in recursive form. Nevertheless for equalfiltering responses the actual number of required arithmetic operations in the filtering process are slightly lesswith the implicit filters. High-order representations ofeither provide the user with good selectivity. This isespecially important in numerical modeling. Less selectivity is usually required when analyzing data. Inboth implicit and recursive filters, the start-up calculations in time series and the boundary conditions inspatial filtering require special treatment. To assist theuser of the implicit filter the inversion of the matrixassociated with cyclic boundary conditions is describedin detail. For completeness the Gaussian eliminationalgorithm is also presented. The final choice of a filter depends upon the problem,the characteristics of the filter, resources, the numberof filter repetitions, the dimensions, and the type andsource of the noise or information to be removed. Acknowledgments. The authors thank Robert Seaman of the Australian Bureau Meteorology ResearchCentre for assisting in the installation and testing ofthe sine filter in the CIMSS model. This work is supported by National Science Foundation Grant ATM8517139. Computing resources used in this researchare supported by the National Center for AtmosphericResearch, which is sponsored by the National ScienceFoundation, and by CIMSS Contract NA84AA-H00028. APPENDIX A Matrix Inversion-Cyclic Case The implicit filter requires a matrix inversion. Forthe cyclic case the matrix is ofa bandtype, having nonzero elements appearing along the 2p + 1 principaldiagonals, plus nondiagonal entries at or near corners.The inversion ofa tridiagonal cyclic matrix is describedin Ahlberg et al. (1967). For tridiagonal systems anumber of techniques are available (Temperton 1975 ).The Ahlberg et al. algorithm is generalized to includea wider band. The inversion algorithm given below isthat needed with the sixth-order filter (p = 3). Let a system of equations be defined in matrix formby C(;b = g, (AI)where the N x N matrix C is 'c de f z ab' bcdef za abcdef z zabcdef zabcdefand zabcdeff z a bc deef zabcddef zabc(A2)Here x = [xix2' - - x~v-3]r, (A5a)where xi = -i, i ~< i ~< N - 3. Defining vectors, eachcontaining N - 3 elements, SN ~--' [bazO. - - 0z]r, (A5b) sN-, = [az0---0za]r, (ASc) SN-2 = [Z0. - - Ozab] r, (A5d) h = [g~g2' - - gN-3]r, (A5e) g = [gig2' ' ' gn]r. (A3)All other entries are zero. Since the implicit filters are symmetric the matrixC is symmetric. Let f = z, e = a, and d = b. Then ifthe last three rows and columns of matrix C are deletedand written in symmetric form, an N - 3 x N- 3matrix, say I~, is given by 'cbaz bcbaz abcbaz zabcbaz zabcbaz zabcbaz z abc ba zabcb ~ a b c (A4)494 MONTHLY WEATHER REVIEW VOLUME ll9an identical system is obtained with the first N - 3rows in Eq. (A1), which is given by [::X q- SN~bN + SN-Iq~N-! + SN-2q~N-2 -= h. (A6)Letv = I=-~h (A7)then the solution to Eq. (A6)is (AS)Equation (A8) cannot be evaluated since -N, q>N-~,and qb2v-2 are not yet known. The last three equations in the system given by Eq.( 1 ) describe qb~v, -~v-~, and qbj-2. Substituting xis (Eq.A5a) in place of the -is, 1 ~ i ~< N - 3, in Eq. (A8)and writing in terms of v and the transposes of SN,SN-~, and SN-2 gives acll~N-2 + abl2qbN-I + aal3qbN = q~ ab2~qb/v-2 + ac22q~N-i + aa23qS~v = q2 aa3~q)N-2 + ab3205N-! + ac33qbN = q3 (A9)where aaj = c - (SN--3+i)Ti~--IsN--3+j abO = b - (SN--3+i)T[g-IsN-3+j aao = a -- (S~v-3+i)r$:-~s~-3+~ qi = gN-3+i- (s~v-3+/)rv (A10)and 1 ~ i ~< 3, 1 ~<j ~< 3. The 3 x 3 system of equationsgiven in Eq. (A9) can be solved uniquely for -~v, -N-~,and -~v-2. The left-hand side coefficients in the 3 x 3system need only be computed once provided e andthe dimension size remain fixed. The q~ values needupdating with each application. After the values of-~,~v-~, and -N-2 are determined then Eq. (8) can besolved for the remaining elements in 4~. To minimizethe calculations, the values of E-~s~, --~s~v-~ and,I~-~s~v_2 are computed once. The solution of(A7), i.e., I~v = h, is obtained fromGaussian elimination in an upper-lower triangular decomposition. To make the following algorithm as general as possible, the nonsymmetric matrix representation has been retained. For convenience set M = N- 3, then the algorithm for the sixth-order case described above consists of the following steps:1 ) Set Wl = Cl ~2 = b2 /~ = d~/co~ co2 = c: - thb2 71 = el/col ~2 = (d2 - 'Y1~2)/co2 ~rl = A/COl 3/2 = (e2 - 7r1~2)/CO2 ~'2 = A/co2 O~3 = a3 b3 = b3 - 603 = C3 -- "Yla3 - ~3 = (~3 -- ~2~3)/~3 ~3 = A/w3 (A11 ) 2) Compute recursively ai = a~ - zi~i-3 i = 4, 5, - -., M ~ = b~- ai~i-2 - z~i-3 ~ = ~/wi (A12) 3) Compute r~ = h~/w~ r: = (h: - b:r~)/w: r3 = (h3 - b3r~ ri = (hi- biri-~ - a~ri_: - zir~_3)/wi, i=4,5, .-.,M (A~3) 4) Compute the value of v in revere order, using ~M ~ FM ~M-I ~ FM-I ~ ~M-I~M ~M-2 = rM-2 -- ~M~2~M-I ~ ~M-2~MDi = ri - ~i~i+l - ~i~i+2 ~ ~i~i+3, i=M-3, M-4, ---, 1. (AI4)Note that steps 1 and 2 need only be calculated onceand saved provided the dimenfions and the value ofthe filter parameter e remains fixed. Steps 3 and 4 arecomputed each time the filter is applied. APPENDIX B The Cascade Procedure Let the transfer function H(~>(f) have the fo~ H(r)(f) = (bo)~/n/Dr(f) = (bo)~/~(l - a~z-~ - a~z-2)-~, (B1)r = 1, - -., R. Otnes and Enochson (1978) define thec~cade process by factoring the transfer function (p.129), i.e.,FEBRUARY 1991 WILLIAM H. RAYMOND AND ARTHUR GARDER 495 R H(f) = 1'I H(r)(f)- (B2)The recursive sine filter at each grid point j then hasthe form[ u~')]i = ( bo ) ~/R[ u(~-~)]i -- alr[Ig(r)]j_1 -- a2r[u(r)]j-2, (B3)where [u(-)]~ = x~ and [u(R)]~ = y~. Equation (B3) isapplied R times and the filter coefficients a~r, a2r, andb0 can be determined using the procedure outlined inEqs. (11)-(16). For the low-pass tangent filter the cascade procedureanalogous to Eq. (B3) is[u(r)]i = bor[ll(r-~)]j + b~r[ U(r-D]j_1 + b2r[ U(r-D]j_2 -- alr[lt(r)]j_1 -- a2r[U(r)lj_2. (B4)Equation (B4) reduces to Eq. (18) for r = 0. The coefficients used in the cascade process are determined ina manner identical to that outlined above for the second-order filter. When H(r)(f) is independent of r, the cascade reduces to multiple applications of the same low-orderfilter. Here the filter coefficients a~r, b2 ..... are computed only once.REFERENCESAhlberg, H. H., E. N. Nilson and J. L. Walsh, 1967: The Theory ofSplines and Their Applications. Academic Press, 284 pp.Alpert, P., and J. Neumann, 1984: On the enhanced smoothing over topography in some mesometeorological models. Bound,-Layer Meteor., 30, 293-312.Anderson, B. O., and J. B. Moore, 1979: Optimal Filtering. Prentice Hall, 357 pp.Anderson, J. R., 1989: A local, minimum aliasing method for use in nonlinear numerical models. Mon. Wea. Rev., 117, 1367-1379.Anthes, R. A., and T. T. Warner, 1978: Development of hydrody namic models suitable for air pollution and other mesometeo rological studies. Mon. Wea. Rev., 106, 1045-1078.Antoniou, A., 1979: Digital Filters: Analysis and Design. McGraw Hill, 524 pp.Asselin, R. A., 1972: Frequency filter for time integrations. Mon. Wea. Rev., 100, 487-490.Atkinson, K. E., 1978: An Introduction to NumericalAnalysis. John Wiley & Sons, 587 pp.Beauchamp, K.G., 1973: Signal Processing: Using Analog and Digital Techniques. George Allen and Unwin, 547 pp.Blackman, R. B., and J. W. Tukey, 1958: The Measurement of Power Spectra. Dover, 190 pp.Butterworth, S., 1930: On the theory of filter amplifiers. Experimental Wireless, 7, 536-541.Childers, D., and A. Durling, 1975: Digital Filtering and Signal Pro cessing. West Publishing, 539 pp.Errico, R., and D. Baumhefner, 1987: Predictability experiments using a high-resolution limited-area model. Mon. Wea. Rev., 115, 488 504.Forsythe, G. E., and C. B. Moler, 1967: Computer Solution of Linear Algebraic Systems. Prentice-Hall, 148 pp.Hamming, R. W., 1983: Digital Fibers, Second Edition. Prentice Hall, 257 pp.Holtz, H., and C. T. Leondes, 1966: The synthesis of recursive digital filters. J. ACM, 13, 262-280.Kaiser, J. F., 1966: Digital filters. System Analysis by Digital Com puter, F. F. Kuo and J. F. Kaiser, Eds., John Wiley & Sons, 438 pP.Kallmann, H. E., 1940: Transversal filters. Proc. I. R. E., 28, 302 310.Kxishnamurty, T. N., and D. Subrahmanyan, 1982: The 30-50 day mode at 850 mb during MONEX. J. Atmos. Sci., 39, 2088 2095. Kunt, M., 1986: Digital Signal Processing. Artech House, 468 pp. Leslie, L. M., G. A. Mills, L. W. Logan, D. J. Gauntlett, G. A. Kelly, J. L. Mcgregor and M. J. Manton, 1985: A high-resolution primitive equation NWP model for operations and research. Aust. Meteor. Mag., 33, 11-35.Murakami, M., 1979: Large-scale aspects of deep convective activityover the GATE area. Mon. Wea. Rev., 107, 994-1013.Ormsby, J. F. A., 1961: Design of numerical filters with applications to missile data processing. J. ACM, 8, 440-466.Ortega, J. M., and R. G. -oigt, 1985: Solution of Partial Differential Equations on Vector and Parallel Computers. Society for In dustrial and Applied Mathematics, 96 pp.Orszag, S. A., 1971: On the elimination ofaliasing in finite-difference schemes by filtering high-wavenumber components. J. Atmos. Sci., 28, 1074.Otnes, R. K., 1968: An elementary design procedure for digital filters. IEEE Trans. on Audio and Electroacoustics, AU-16, 330-335. , and L. Enochson, 1972: Digital Time Series Analysis. John Wiley & Sons, 467 pp.---, and ,1978: Applied Time Series Analysis. John Wiley & Sons, 449 pp.Pepper, D. W., C. D. Kern and P. E. Long, Jr., 1979: Modeling the dispersion of atmospheric pollution using cubic splines and cha peau functions. Atmos. Envir., 13, 223-237.Rabiner, L. R., and B. Gold, 1975: Theory and Application of Digital Signal Processing, Prentice-Hall, 762 pp.Ramsey, L. T., 1989: Best bounds for the stability of DARMA filters with constant coefficients. SIAM Rev., 31, 365-400.Raymond, W. H., 1988: High-order low-pass implicit tangent filters for use in finite area calculations. Mon. Wea. Rev., 116, 2132 2141. , 1989: High-order high-pass implicit filters for evaluating in formation within finite areas. Mon. Wea. Rev, 117, 2772-278 l.---, and A. Garder, 1988: A spatial filter for use in finite area cal culations, Mon. Wea. Rev., 116, 209-222.Robert, A. J., 1966: The integration of a low-order spectral form of the primitive meteorological equations. J. Meteor. Soc. Japan, 44, 237-244.Schlesinger, R. E., L. W. Uccellini and D. R. Johnson, 1983: The effect of the Asselin time filter on numerical solutions to the linearized shallow-water equations. Mon. Wea. Rev., 111,455 467.Shapiro, R., 1970: Smoothing, filtering and boundary effects. Rev. Geophys. Space Phys., 8, 359-387.--, 1975: Linear filtering. Match. Comput., 29, 1094-1097.Shuman, F. G., 1957: Numerical methods in weather prediction. Part II: Smoothing and filtering. Mon. Wea. Rev., 85, 357-361.Smagorinsky, J., 1963: General circulation experiments with the primitive equations. Part I: The basic experiment. Mon. Wea. Rev., 91, 99-164.Temperton, C., 1975: Algorithms for the solution of cyclic tridiagonal systems. J. Comp. Physics, 19, 317-323.Vichnevetsky, R., and J. B. Bowles, 1982: Fourier Analysis of Nu merical Approximations of Hyperbolic E~tuations. SIAM Studies in Applied Mathematics, Soc. Indust. Appl. Math., 140 pp.Whittlesey, J. R. B., 1964: A rapid method for digital filtering. Comm. ACM, 7, 552-556.Wilkinson, J. H., 1965: The Algebraic Eigenvalue Problem. Clar endon, 662 pp.

Save