THE CMW EXTRACTION ALGORITHM FOR MTP/MPEF Yves BUHLER1 and Kenneth HOLMLUND2 EUMETSAT, Pallaswiesenstr. 182, D-64293 Darmstadt, 2ESOC, Röbert-Bosch-Str. 5, D-64293 Darmstadt, Germany ABSTRACT The Cloud Motion Wind (CMW) algorithm planned for the Meteorological Products Extraction Facility (MPEF) of EUMETSAT is presented. This algorithm will be used for operational wind extraction within the frame of the METEOSAT Transition Programme (MTP). It is an evolution of the current operational CMW algorithm from MIEC/ESOC featuring increased modularity and several improved processing solutions and implementation possibilities. After a brief overview of the algorithm's functional structure and its general concept, some of the new features and improvements are discussed in more detail. One of those is the slot-by-slot wind extraction concept suited for real-time wind extraction. This scheme is supported by a multiple correlation peaks search and a a-posteriori optimized wind components combination. Further, alternative implementations of the cross-correlation method are discussed. One of these is based on the Fast Fourier Transform and provides a full-resolution, large-area correlation surface with an increased efficiency. Finally, the new Automatic Quality Control concept that will be used throughout the MPEF is presented for the CMW product. The paper closes with a short overview of the planned future improvements and optimisation possibilities built in the presented CMW algorithm. 1. Introduction CMW extraction has been performed operationally and upgraded at ESOC/MIEC over many years {Schmetz et al., 1993] and has reached a high level of quality that is recognized worldwide [e.g. Thoss, 1992]. As EUMETSAT will take over the operations within the frame of the Meteosat Transition Program (MTP) the meteorological products will be extracted by the new Meteorological Products Extraction Facility (MPEF). The present paper describes some of the aspects of the algorithm that will be used for CMW extraction within MPEF. This algorithm is largely inspired by the existing MIEC algorithm and by the related experience, but numerous improvements have been incorporated like the complete re-thinking of the algorithm structure, the modularity and real-time aspects, but also the building-in of ideas that have been tested but not yet implemented by MIEC. The general goal of this algorithm development is to provide a good basis for further improvements of the operational CMW extraction. The present paper is therefore oriented towards the description of the technical solutions retained for the definition of the new algorithm and the related improvements. Issues like the height assignment scheme or the tracer selection will not be addressed here, as they are largely based on the existing MIEC structures. 2. General presentation of the CMW Algorithm 2.1 Overview 2.1 Overview The Cloud Motion Wind (CMW) product is computed by identifying and localizing the same cloud pattern, or tracer in consecutive METEOSAT images. Using the knowledge of the tracer displacement, combined with the measurement of its temperature, the following values are extracted which constitute the CMW product: wind location, wind speed, wind direction, temperature and pressure level. In order to perform this extraction, the CMW process will be embedded within the MPEF processing structure as shown in Figure 1. The Meteosat full disk rectified image data is received, segmented, and made available to all the products by the Segment Processing. This process of segmentation is the process of applying to the image a segment grid (currently 32 X 32 pixel) with segment-specific information. This process also performs the multi-channel cluster extraction and the correction of the semi-transparency effect, so that the product extraction processes receive full and ready-for-use information about the clusters present in each segment. After the product extraction and its specific Automatic Quality Control (AQC), Manual Quality Control (MQC) is performed as an independent process. It will have available the entire image information and all of the meteorological products, allowing cross-checks between products for verification. Finally, the product is encoded and made available to the user community. METEOROLOGICAL PRODUCTS EXTRACTION FACILITY (MPEF) MPEFPRODUCT The overall internal structure of the CMW process is shown in Figure 2. The first operation performed is the selection of the clusters that will be used as the tracers, based on the information provided by the Segment Processing. This tracer selection is done in a channel-specific way, including cluster merging or rejection when necessary. When a useful tracer has been identified, height assignment is performed and the corresponding wind component can be extracted. The wind-component extraction process comprises the definition of the target and search areas taken from the current and previous image, their enhancement, followed by their cross-correlation. A peak search is performed in the correlation surface, yielding what is called a wind component (Section 3.2). These winds components are combined to generate the raw CMW product. The current baseline is to combine wind components by pairs, such that the raw CMW product is based on a sequence of three images. This raw product is then analysed by the Automatic Quality Control decision network and, if found valid, issued as an intermediate product to the MQC process. 2.2 Real time operation Real time operation has been selected as a baseline for the definition of the CMW algorithm and also of the complete MPEF processing. Realtime systems present the double advantage of early output delivery on one hand, and of an evenly distributed processing load over time on the other hand, resulting in a "smoother" processing. This last point is very attractive for the CMW extraction, where large amounts of data are processed in a computation-intensive way. For this reason, the MPEF and CMW processing are based on a real time "pipelined" processing scheme: the rectified images are received line by line (South to North) in real time by MPEF, they are packed into the segment structure and made available to CMW as a continuous flow of segments. The CMW algorithm performs the wind components extraction in a continuous way, allowing the most computation-intensive process, the correlation, to be spread over the imaging slot duration. As soon as all the required information is computed, these wind components are combined to form the raw CMW product which is then made available to the AQC process. 2.3 Process modularity A basic requirement for the CMW process of MPEF is to be a good basis for further improvements. For this reason, the CMW algorithm has been defined in a modular way, provisions being made for future expansion. To do this, the MIEC algorithm has been analysed, its structure re-defined and the areas of future improvements were identified. Specific modules were created for the identified areas of improvement, and care was taken to separate the bulk-processing from the decision-taking processes into different modules, this having the advantage of clarity, easier testing and future modification. As an example, the decisions related to AQC are regrouped under a common process containing the decision network and do not interfere with the realtime processing. Also, the parameters defining or sizing the processes like thresholds, model parameters, constants, are regrouped within a database allowing configuration control during the validation phase, when the "fine-tuning" of the new algorithm will take place. 3. The Wind components extraction/combination scheme 3.1 Concept The current CMW extraction performed at ESOC/MIEC is based on a triplet of images, i.e. on three subsequent images corresponding to the slots noted N-2, N-l and N in Figure 3. The central image of the triplet contains the Target area (the tracer template), the search being performed in the two other slots (containing the Search areas). The wind vectors corresponding to the displacement of the tracer between slots (N-2, N-l) and between slots (N-l, N) are extracted and combined into the CMW raw product. The process is started when all three images are available. The baseline for the CMW algorithm for MPEF (Figure 3) is exactly the same, with the difference that the wind components are extracted in real time, as soon as the image data gets available. This is followed by their a-posteriori combination. There is clearly a more efficient use of time and computer resources with the advantage that different wind component combinations e.g. combining more than two components will have almost no impact on the processing load (Section 3.4). This part of the algorithm (Figure 4) represents the process with the highest computational load. It performs the bulk processing on the data and it is performed in realtime, segment by segment, using the image data of the current incoming slot (N) and of the previous slot (N-l). The output of the process is the (N-1,N) wind component. Depending on the configuration settings, each of these slots contains either the Target area or the Search area. The first operation of the wind component extraction process is to define the Target area and the Search area that will be used for the correlation. The baseline will be a size of 32x32 pixels for the Target area and 96x96 pixels for the Search area. However, size and position of these areas are configurable and could be adapted to the selected tracer for future improvements (Section 4.1). The second operation is to perform the tracer-specific enhancement of both areas in order to prepare them for the correlation. The enhancement is especially used in the IR channel and is adapted to the number of cloud layers that were identified. In the case of only one or two layers of clouds, the enhancement is based on the masking of pixels combined with histogram modification. In the case where three levels of clouds were identified, an enhancement method based on the Spatial Coherency Method is applied [Hoffman, 1989]. The correlation of the two areas is then performed and the resulting surface is searched for the correlation peak. A multiple peak search algorithm will be applied in order to select a set of relevant candidate peaks. For each of these peaks, the displacement is finally converted to an equivalent wind speed and constitutes one candidate for the wind component. 3.3 The combination of the wind components into a CMW product This process generates the "raw" (i.e. before any quality check) CMW product by averaging the single slot wind components. This combination is done according to a user-configurable schedule defining the slots for which wind components are to be extracted and how they are to be combined. Usually there are several relevant candidates per wind component, so that the first operation will be to define the best matching set of wind components prior to their combination. The main criterion used for matching is the symmetry of subsequent wind components. Figure 5 shows the typical case of a two-component combination, corresponding to a CMW product based on an image triplet. The quality marks of the wind components are combined in the same way in order to generate the quality marks for the raw CMW product. During this combination operation, some new quality marks are generated which are based on the comparison of the two wind components (wind component consistency marks). In the case where a given cloud cluster is tracked in different channels, like for instance clouds present in IR and WV at a similar height, then this process will identify these multiple winds and keep the best-suited one, using the height information and the extraction quality marks. As a conclusion, this concept of single-slot extraction and combination presents the following advantages: - Real-time ability even if CMW is based on several slots - Spreading of the processing load evenly within the slot - Separate the bulk processing from the matching process - A-posteriori decisions taken on reduced data (the extracted wind components 3.4 Timing examples for real-time CMW extraction As already stated, the timing and the configuration for CMW extraction are set by a schedule. This schedule defines the slots from which the CMW products shall be extracted and the way the extracted wind components shall be combined. Figure 6 shows some examples of timings for real-time CMW extractions together with the resulting distribution of processing load. The first case is a typical one: the CMW product is based on an image triplet and is computed at a. 2-hourly rate. Using the notations of Figure 6 (case 1), it can be seen that during the arrival of the image slot N-5 the wind component (N-6,N-5) is extracted with the target area pertaining to the image slot N-5 and the search being performed in the previous image (N-6). During the arrival of the following image (N-4), the processing will be performed between slot N-5 and the incoming data, yielding the wind component (N-5, N-4). The two components are immediately combined, so that the raw CMW product is output during the time of arrival of the image of slot N-4. The schedule can be configured in many ways over one day, the only condition being that there should not be more than one wind component extraction per tracer per slot in every channel. Two limit cases are also shown in Figure 4. One of these cases would correspond to the extraction of a complete CMW product based on an image triplet every hour (Figure 6, case 2). This case implies that two subsequent CMW products are using one common image for the extraction. This case is a limit case because for every slot there is one wind component computation being performed. Finally, the third case shown in Figure 6 is the case when the CMW product is constituted of one single wind component: the half-hourly slot rate is then clearly the maximum rate. The delay for raw CMW generation is then extremely short, the raw product being available during the time of arrival of the second image of the pair. Figure 6: Some timing examples for the real-time CMW production extraction. 4. The cross-correlation 4.1 The Target area, Search area and the correlation surface The correlation surface is the result of the cross-correlation between the Target area and the search area. The baseline sizes of these areas being currently 32x32 pixels for the Target area and 96x96 pixels for the Search area, this yields a 65x65 points correlation surface. The baseline processing is also to perform the cross-correlation on the full surface, without restricting the Search area size by a-priori knowledge like forecast information or previous CMW products. The above sizes are used for the definition of the operational hardware from a performance point of view. It should be noted however that both the sizes and the position relative to the segment grid of Target and Search areas can be modified and adapted to the type of extraction performed, with the following advantages: The Target area size could be adapted to the selected tracer. The Target area position could be centred on the selected tracer for better CMW product location. The Search area size could be modified according to the maximum expected wind speed at the tracer’s pressure level. 4.2 The correlation methods The correlation process alone represents more than 90% of the total CMW processing load and is therefore the most computation intensive process of the whole MPEF. It is also the core mathematical transformation allowing to measure the tracer pattern displacement. Due to this central role played by the correlation, several schemes have been investigated and will be implemented. The goal is on one hand to optimize the use of the hardware resources and possibly to select the correlation scheme best suited to the Target and Search areas characteristics. Currently four methods are foreseen for implementation and are analyzed in the following. All of these methods include the possibility of masking pixels, i.e. certain radiances are not contributing to the correlation results. These four methods are: time/space domain correlation (with either full or reduced resolution), frequency domain correlation and minimum distance matching. These methods should all yield the same principal peak [Duda and Hart, 1973]. a-) Full resolution correlation in the time/space domain This method is the classical time/space-domain implementation of a masked cross-correlation scheme, as defined by the set of equations given in Appendix A-1. The 65x65 points of the correlation surface are computed, providing a full correlation surface in full resolution. The total amount of operations required has been estimated to be of about 26 10s multiplications and 26 106 additions per complete correlation surface. It should be noted that further optimization can be reached by the use of temporary registers or by optimal use of the hardware platform's characteristics, like cache memory, pipelining, etc... Therefore, the efficiency of this method will be strongly dependent on the final implementation, the number of operations given above having to be considered as indicative only. The advantages of this scheme are the full resolution and the total independence of every wind extraction from other influences like previous system states or a-priori information, making it very useful as a reference scheme. It is intended to use this method off-line for the validation of other correlation and/or peak search methods. b) Reduced resolution correlation in the time/space domain One straightforward method to reduce the amount of computational load is to apply the same scheme as above but not to compute the correlation surface with full resolution. This uses the property of the correlation surface to be rather smooth, allowing therefore to find unambiguously the relevant peak(s) in the sub sampled correlation surface in most cases. A given peak position can then be refined by computing the correlation surface in full resolution in a small neighbourhood around the selected position. The following procedure has been retained for this method: First, the full correlation surface is computed with half the resolution, leading to 33x33 points to be computed instead of 65x65. Then, up to N most relevant peaks (baseline is N=3) are identified and a small area of 7x7 points is computed in full resolution around these N positions. The total amount of correlation points computed is therefore 33x33 + 3x40 = 1209 points. This number applies every time a first wind component is to be computed. In the cases where a second wind component is computed, like in the baseline for the CMW product, these N positions are kept as a prediction for the extraction of the following wind component. Only small areas of 10x10 points in half resolution are computed around the predicted positions, the actual peaks are then searched for and again a small area of 7x7 points in full resolution is computed for peak refinement. The maximum number of points of the correlation surface that are then computed is 3x10x10 + 3x40 = 420 points for the second wind component. The average number of points that are computed per correlation surface in the baseline case (2 components) is therefore (1209 + 420)/2 = 815. This represents an improvement of a factor of about 5 compared to the full resolution implementation. A direct proportional estimation would mean that a little more than 5 106 multiplications and 5 106 additions have to be performed per correlation surface on average, the peak being 7.5 106 multiplication and 7.5 106 additions for the first component. In fact the saving will even be less than that due to the extra overhead implied by the iterations, the decisions taking and the more complex addressing. This scheme has been selected as the baseline for realtime operational use. In a general way, it is well-suited for small Target areas, especially if those are combined with smaller Search areas, cases where methods based on transforms become clearly less efficient. Nevertheless, this implementation has a certain number of drawbacks: There is still an uneven distribution of the load between the extraction of the first and the second component of a CMW product. The system has a memory due to the prediction of the second component of the CMW product, and therefore the independence of subsequent wind components is somewhat limited. The concept mixes a high load process (the computation of the correlation points) with control, addressing and decisiontaking processes. c) Fast Fourier Transform based implementation The use of Fast Fourier Transform (FFT) for efficient implementation of large area correlation is a well-known solution in digital signal processing. Also, the use of frequency-domain information for Cloud Motion estimation has been investigated as early as 1978 [Arking, Lo and Rozenfeld, 1978]. In our case, the implementation of the cross-correlation using FFTs is complicated somewhat by the presence of space-varying masking (as it is the case for the time/space domain method as well). For this reason, the formulas are given under appendix A-2. This solution has been investigated in order to resolve the drawbacks of the previous method. This implementation has the advantage of being well-suited for large area sizes and is therefore complementary to the time/space domain method. It provides a full correlation surface with full resolution and the results for subsequent wind components are totally independent. Detailed load estimations done in [ASD] were made for the baseline sizes of Target and Search areas and were based on the use of 128x128 pixels, 2-D FFTs. These estimations were of about 3.3 106 multiplications/divisions and 7.9 106 additions/sub tractions, for the computation of a full correlation surface of 65x65 points. This scheme appears as very efficient, using a small number of operations but keeping all the advantages of the full resolution time/space domain approach. However, the final efficiency of this implementation might be very dependent on the hardware characteristics, especially due to the handling of larger arrays. After prototyping and verification of the predicted performance, this scheme might very well be used as the primary scheme when large Target and Search areas are selected. This scheme presents also some specific advantages that go beyond those of a full resolution scheme: First the Search area size can be extended to 128x128 pixels without increase of the computational load. Then, there is the possibility to easily implement frequency filtering or feature analysis in the frequency domain (e.g. for the detection of regular patterns like banded clouds, cumulus fields, etc.). d) Minimum Distance matching (Euclidian distance) As another alternative to cross-correlation in the time/space domain or the FFT-based correlation, the minimum distance matching will be considered and implemented. The minimum distance matching can be defined by: Where T, S represent respectively the Target and the Search area. The indices (n,m) define the position in the "correlation" surface where the matching is computed. The square root can be omitted for our purposes and hence the matching function becomes: The matching is in this case extremely fast. However, the introduction of masking complicates the formula that becomes: Where MT and MS represent the binary masking areas for the Target and Search area. A value of 0 corresponds to a masked, a value of 1 to an unmasked pixel. The implementation is somewhat faster than the crosscorrelation, yielding a total of 17 106 multiplications and 13 106 additions/subtractions per full resolution matching surface of 65x65 points. As for all the previous schemes, this method will also be strongly dependent on the actual use of the hardware platform capabilities. This scheme has also interesting characteristics that makes it a real alternative to the cross-correlation. The first one is that this matching provides a surface which is smoother than the cross-correlation surface, and therefore a reduced resolution implementation of this scheme might provide very reliable results. This scheme is also well-suited for areas that need no masking; in this case the reduction in processing load is very high for this implementation. 5. The AQC concept 5.1 The general AQC concept within MPEF For all of the products extracted in MPEF, the Automatic Quality Control on a given product is an integral part of the product generation. The general concept is that each of the processes that participate to the product extraction also generate one or more so-called quality marks which are a measure of the process confidence in its output. One example (for CMW) are the quality marks generated by the tracer selection process: these are based on the tracer entropy and size in the Target area. All the quality marks are gathered by the AQC process for every individual product and combined to a global processing mark. The AQC process then perform a battery of consistency checks on the product (temporal, spatial, forecast) each of these checks generating a specific mark. The AQC process then assigns a final quality indicator to the product together with the decision flag (passed/rejected). The products which did not pass the AQC are nevertheless made available to the MQC, allowing the shift meteorologist to reinstate the product if desired. 5.2 The AQC process for CMW The AQC process within the CMW product generation is presented in Figure 7. In the following, the quality marks that are generated during the processing and during the consistency checks are detailed. It has to be noted that the geometrical quality of the input image is not considered here. This information is only available at the end of the image slot, so that in order not to delay the processing, this information is used a-posteriori before encoding the CMW product. a) The CMW processing quality marks In the course of the wind component extraction, quality marks are generated. The following ones are generated for every relevant peak (up to three) that has been identified in the correlation surface: Tracer entropy and normalized tracer size in Target area Correlation coefficient value of the peak Number of non-masked pixels used at the correlation peak Means of the Target and Search areas at the correlation peak Standard deviation, Min. and Max. gradients of the correlation surface in the peak area The above marks apply to each wind component. When the raw CMW product is produced by combining the individual wind components, marks equivalent to these above are generated by combining the marks of the components. The raw CMW generation allows definition of new quality marks, based on the comparison of the two (or more) components. These marks add to the above, together they constitute the Ml set of the CMW processing marks: Wind components direction consistency Wind components speed consistency Wind components correlation consistency Wind components height consistency b) The CMW consistency checks Once the raw CMW product is available, it is checked for consistency with the "exterior" information. This information is typically the forecast information corresponding to the same location, pressure level and time. Another useful information for checks are the CMW products which have been extracted in neighbouring segments at the same time and pressure level. Finally, the previous CMW product which has been extracted for the same segment at the same pressure level is also used. The following quality marks are generated: Forecast consistency mark Spatial consistency mark Temporal consistency mark Product Height consistency mark The detailed definition and the mathematical formulations of all these marks can be found in [PDD, ASD]. The AQC process finally computes a weighted sum of this information and generates the CMW product quality indicator. A final threshold is then applied in order to take the AQC decision. 5.3 The quality indicators for CMW The CMW product is distributed together with a certain number of quality indicators which are a measure of the confidence in the product. These indicators apply on the constituting parameters of the CMW product: CMW location quality CMW speed quality CMW direction quality CMW temperature quality CMW pressure level quality 6. Conclusion and future improvements The presented wind vector extraction scheme which will be implemented in the MPEF is a state of the art application. It incorporates all of the foreseen future improvements of the present MIEC scheme, e.g. the use of local consistency checks in the quality control. The development at MIEC is however continuous, implying that by the time of the transfer of operations from MIEC to MPEF, new ideas will have evolved and might even have been implemented in the MIEC processing. The MPEF CMW process, due to its high modularity and its computer resources reserves, will be capable of incorporating these new ideas, as well as any improvement developed before or after the transfer. The system will be able to derive winds every half an hour in all three spectral channels. At present it is foreseen that a wind field will be disseminated at a one and half hour interval. The visible wind vector extraction will in the first stage be performed using the same image resolution as for the water vapour and infrared, but due to the architecture of the MPEF based on distributed processing, the expansion to full resolution visible tracking can be achieved without any structural changes to the system. Due to the specified setup, including different complementary correlation methods, it is not foreseen that any major improvement will occur in this heavy processing area. There are several candidates for an operational matching method, but the final selection will depend on the speed and/or quality performance of the different methods. It is worthwhile mentioning that the FFT-based correlation offers, with negligible effort, the possibility of filtering in the frequency domain. The main focus of research is at present within height assignment and quality control. The height assignment problems which contribute significantly to the differences as compared to radiosondes, are related to the semitransparency correction of thin clouds, the relationship between cloud top height and cloud motion level, and also to the height assignment for vectors derived from the water vapour and visible images. Some possibilities to improve the height assignment are already being investigated. These include height correction derived using information retrieved from different parts of the clouds with different optical depth, and height assignment follow level clouds using cloud base instead of cloud top temperature. In quality control, the further extensions include evolving and changing clouds and tracers as well as tests relating to the reliability of the height assignment and vector derivation processes. Acknowledgement: Numerous persons contributed to the definitions of this algorithms through discussions, reviews and at various stages. The authors wish to express their gratitude to all who participated to this definition, but are especially indebted to Joel Hoffman for his strong involvement in the very early phases of this project. REFERENCES ARKING, A., LO, R., and ROZENFELD, A., (1978) A Fourier Approach to Cloud Motion Estimation, Journal of Applied Meteorology, Volume 17, June 1978, pp 735-744. ASD: Algorithms Specification Document (ASD) for MTP/MPEF, EUMETSAT document Nr MTP.SPE.030, Issue 1.1, 1 July 1993. DUDA, HART, (1973) Pattern Classification and Scene Analysis, John Wiley & Sons, New York. PDD: Products Definition Document (PDD) for MTP/MPEF, EUMETSAT document Nr. MTP.SPE.Oll, Issue 1.1, 27 January 1993. HOFFMAN, J, (1989) Cloud Motion Wind retrieval in multilayered areas, Personal communication. THOSS, A., (1992) Cloud motion winds, validation and impact on numerical weather forecast, Proc. Workshop on Wind Extraction from Operational Meteorological Satellite Data, Washington D.C. EUMETSAT EUM P 10, pp 105-112. SCHMETZ, J., et al (1993) Operational Cloud-Motion Winds from Meteosat Infrared Images, Journal of Applied Meteorology, Volume 32, No 7, July 1993, pp 1206-1225. APPENDIX A-1 Equations for time-domain masked cross-correlation The masked, time domain cross-correlation between a Target area (noted T) and a Search area (noted S) is defined by the following set of formulas. MT and MS represent the binary masks that are applied respectively to the Target and the Search area (0 corresponding to a masked, 1 to an unmasked pixel). CCnm defines the element (n,m) of the cross-correlation surface. A-2 Equations for FFT-based masked cross-correlation Replacing these partial correlations in the above formulas yields the following condensed expression of the cross-correlation surface CC. As can be seen, a given element CCNM of the cross-correlation surface is then simply a scalar combination of the same (n,m) elements of the above partial correlation surfaces. The problem of optimizing the processing load has been transferred to the problem of optimizing the set of partial correlations shown above. This an easy step, as optimized FFT-based correlation of real (as opposed to complex) 2-D arrays is well-known.