IMAGE CHARACTERISATION OF MARINE EXPLOSIVE CYCLOCENESIS by B arry Pierce B.E.S., The University of W aterloo, 1993 THESIS SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE DECREE OF MASTER OF SCIENCE in ENVIRONMENTAL SCIENCE © B arry Pierce, 2002 THE UNIVERSITY OF NORTHERN BRITISH COLUMBIA August 2002 All rights reserved. This work may not be reproduced in whole or in p art, by photocopy or other means, w ithout the permission of the author. 1^1 National Library of Canada ue nationale Bibliothèque du Canada Acquisitions and Bibliographic Services Acquisitions et services bibliographiques 395 Wellington street Ottawa ON K1A0N4 Canada 395, rue Wellington Ottawa ON K1A0N4 Canada Your me Voire rélirence The author has granted a non­ exclusive hcence allowing the National Library of Canada to reproduce, loan, distribute or sell copies of this thesis in microform, paper or electronic formats. L’auteur a accordé une licence non exclusive permettant à la Bibliothèque nationale du Canada de reproduire, prêter, distribuer ou vendre des copies de cette thèse sous la forme de microfiche/fîlm, de reproduction sur papier ou sur format électronique. The author retains ownership of the copyright in this thesis. Neither the thesis nor substantial extracts from it may be printed or otherwise reproduced without the author’s permission. L’auteur conserve la propriété du droit d’auteur qui protège cette thèse. Ni la thèse ni des extraits substantiels de celle-ci ne doivent être imprimés ou autrement reproduits sans son autorisation. 0-612-80676-6 Canada APPROVAL Name: Barry Pierce Degree: Master of Science Thesis Title: IMAGE CHARACTERISATION OF MARINE EXPLOSIVE CYCLOCENESIS Examining Committee: Chair: Dr. Robert W. Tait Dean of Graduate Studies UNBC Supervisor: Dr. Peter Jackson Associate Professor, Environmental Studies Program UNBC Committee Member: Dr. Roger Wheate Associate Professor, Geography Program UNBC Member: Dr. Josef Ackerman féte Professor, Environmental Studies Program UNBC External Examiner: Dr. Phil Austin Associate Professor, Earth & Ocean Science Atmospheric Science Program University of British Columbia Date Approved: % - 11 TABLE OF CONTENTS Page LIST OF F I G U R E S ......................................................................................................... v LIST OF T A B L E S ............................................................................................................ vü A B S T R A C T ....................................................................................................................... viii 1 In tr o d u c tio n .................................................................................................................. 1 1.1 Description and h a z a r d .................................................................................... 1 1.2 O perational p ro b le m s ....................................................................................... 2 1.3 Images and p r o c e s s in g .................................................................................... 3 1.4 A u to m a tio n ........................................................................................................ 6 1.5 C h arac te risatio n ................................................................................................. 7 1.6 Research p a r a d i g m ........................................................................................... 10 2 Meteorological R e v i e w ............................................................................................. 12 3 D ataset Development .............................................. 24 3.1 D ata sources and database m a n a g e m e n t .................................................. 24 3.2 D ata assessment and case s e l e c t i o n ............................................................ 28 3.3 Assessment of R adiom etric Inform ation C o n t e n t .................................... 33 Image Processing Background and M ethods D e v e lo p m e n t............................. 37 4.1 Image e n h a n c e m e n t........................................................................................... 37 4.2 R egistration Strategies and Geom etric Analysis of Development ... 41 4.2.1 M anual re g is tra tio n .............................................................................. 43 4.2.2 Cloud frame r o t a t i o n ........................................................................... 44 4.2.3 Principal com ponents on bitm ap a x e s ............................................ 48 4.2.4 Idealised grid t r a c k i n g ....................................................................... 49 R adiom etric Analysis of D e v elo p m e n t......................................................... 52 4 4.3 - Ill Post-P rocessing of Raw R e s u l t s .................................................................... 53 4.4.1 P robe ....................................................................................................... 53 4.4.2 P r e s s u r e ................................................................................................... 53 4.4.3 R adiom etric R e s p o n s e .......................................................................... 54 4.4.4 Vector C a lc u la tio n s ............................................................................... 55 4.5 S tatistical T r e a tm e n t........................................................................................ 56 4.6 Final R e m a rk s ..................................................................................................... 57 R e s u lts ............................................................................................................................ 59 5.1 In tr o d u c tio n ......................................................................................................... 59 5.2 Case Descriptions ........................................................................................... 60 5.2.1 P r e s s u r e ................................................................................................. 61 5.2.2 R a d io m e tric ........................................................................................... 66 5.2.3 V e c t o r ..................................................................................................... 69 Statistical R e s u lts .............................................................................................. 98 5.3.1 T raditional M e t h o d s .......................................................................... 103 5.3.2 Im age-B ased M e t h o d s ...................................................................... 105 D is c u s s io n ..................................................................................................................... 122 6.1 In tro d u c tio n ........................................................................................................ 122 6.2 M ethods Applicable to both C hart and Image D a t a .............................. 122 6.3 M ethods Applicable to C hart D ata O n l y .................................................. 125 6.4 M ethods Applicable to Image D a ta O n l y .................................................. 126 6.5 O ther Significant Im age-based R e s u l t s ...................................................... 128 6.6 C o n c lu s io n s ........................................................................................................ 129 6.6.1 Towards a D e fin itio n .......................................................................... 131 C o n c lu s io n s .................................................................................................................. 132 7.1 The Goals of C h a ra c te ris a tio n ..................................................................... 132 7.2 Image Processing R e s u lts ................................................................................ 132 7.2.1 C haracterisation ................................................................................. 135 7.2.2 P r e d ic tio n .............................................................................................. 136 4.4 5 5.3 6 7 - IV - 7.3 Future C onsiderations ................................................................................... 137 ............................................................................................................. 139 A-1 PCI S c r i p t s ........................................................................................................ 143 A-2 Perl S c r i p t s ........................................................................................................ 151 A-3 C P r o g r a m s ........................................................................................................ 153 A-4 R /S -P lus P r o g r a m s .......................................................................................... 162 A-5 IDL P r o g r a m s .................................................................................................... 172 B-1 PW C MSC Infrared to R adiance C o d e ....................................................... 173 BIBLIOGRAPHY - V - LIST OF FIGURES Figure Page 2.1 Carleson-Cyclone S t r u c t u r e .......................................................................... 18 2.2 H obbs-Cyclone S tr u c tu re ................................................................................ 19 2.3 Neiman and Shapiro-Im age Phases of Explosive D e e p e n e r s ................ 22 3.1 Coverage of P W C ’s G O ES-9 Images ......................................................... 26 3.2 G O ES-9 B and E n e r g y .................................................................................... 29 3.3 Daily C ontact S h e e t s ....................................................................................... 30 3.4 High Cloud to Pressure R e l a ti o n s h i p ......................................................... 31 3.5 Exam ple Cyclonic Index M a s k ...................................................................... 32 3.6 T herm al and Visual B and C o rre la tio n s ...................................................... 34 3.7 Therm al and W ater Vapour B and C o rre la tio n s........................................ 36 4.1 Storm Display E n h a n c e m e n ts ...................................................................... 42 4.2 Frame to Frame C o rre la tio n s.......................................................................... 46 4.3 “Pixels On Target" of R o tated Frames ..................................................... 47 4.4 Principal Com ponent Alignment of Comm a H e a d ................................. 50 4.5 Idealised G rid for Tracking Com m a H e a d .................................................. 51 5.1 Six Hour Development C ontact Sheet-A pril 24, 1996 .......................... 77 5.2 Pressure R ecord-A pril 24, 1996, Case I ...................................................... 78 5.3 Storm G round Tracks-A pril 24, 1996, Case I ........................................... 79 5.4 Ground Track Distance D erivatives-A pril 24, 1996, Case I ................ 80 5.5 Storm G round Tracks-Cases II to V ............................................................ 81 5.6 Ground Track Distance D erivatives-Cases II to V ................................. 82 5.7 Six Hour Development C ontact S h eet-Jan u ary 12, 1997 ....................... 83 5.8 Pressure R ecord-C ases II to V ...................................................................... 84 VI - 5.9 Six Hour Development C ontact S h eet-Jan u ary 28, 1997 ........................ 5.10 Six Hour Development C ontact Sheet-N ovem ber 8, 1997 85 .................... 86 5.11 Six H our Development C ontact Sheet-M arch 6, 1998 ........................... 87 5.12 High Cloud and Cyclonic Index-A pril 24, 1996, Case I ........................ 88 5.13 Cyclonic Index Im age-A pril 24, 1996, Case I ............................................ 89 5.14 Edge Sharpening-April 24, 1996, Case I ...................................................... 90 5.15 High Cloud and Cyclonic Index-C ases II to V ......................................... 91 5.16 Cyclonic Index Im age-C ases II to V ............................................................. 92 5.17 Edge Sharpening-C ases II to V .................................................................... 93 5.18 Geom etric M easures-A pril 24, 1996, Case I ............................................... 94 5.19 G eom etric Measures Time D erivatives-A pril 24, 1996, Case I ............. 95 5.20 G eom etric M easures-Cases II to V 96 ............................................................. 5.21 G eom etric M easures Time D erivatives-Cases II to V ........................... 97 5.22 Regression Equations Plot 1 .......................................................................... 110 5.23 Regression Equations P lot 2 .......................................................................... Ill 5.24 Regression Equations Plot 3 .......................................................................... 112 5.25 Regression Equations Plot 4 .......................................................................... 113 5.26 Regression Equations Plot 5 .......................................................................... 114 5.27 Regression Equations Plot 6 .......................................................................... 115 5.28 Regression Equations Plot 7 .......................................................................... 116 5.29 Regression Equations Plot 8 .................................................. 117 5.30 Regression Equations Plot 9 .......................................................................... 118 5.31 Regression Equations P lot 10 119 ....................................................................... 5.32 Regression Equations Plot 11 5.33 Regression Equations Plot 12 120 ....................................................................... 121 - vil - LIST OF TABLES Table Page 3.1 GOES-9 B and Properties ............................................................................ 27 4.1 Cloud Type T em perature R a n g e s ............................................................... 40 4.2 Frame to Frame C o rre la tio n s......................................................................... 45 4.3 Correlations Under R o ta t io n ......................................................................... 46 5.1 Event D ates-A pril 24, 1996, Case 1............................................................... 73 5.2 Bergeron E stim ates-A pril 24, 1996, Case I .............................................. 73 5.3 Event D ates-Jan u ary 12, 1997, Case I I ........................................................ 73 5.4 Bergeron E stim ates-Jan u ary 12, 1997, Case I I ....................................... 74 5.5 Event D ates-Jan u ary 28, 1997, Case III...................................................... 74 5.6 Bergeron E stim ates-Jan u ary 28, 1997, Case III .................................... 74 5.7 Event Dates-November 8, 1997, Case IV ..................................................... 75 5.8 Bergeron Estim ates-N ovem ber 8, 1997, Case I V .................................... 75 5.9 Event D ates-M arch, 6, 1998, Case V ............................................................ 76 5.10 Bergeron E stim ates-M arch 6, 1998, Case V .............................................. 76 ........................................................................................................ 99 5.11 Regressions C ontinued....................................................................................... 100 5.11 Regressions C ontinued....................................................................................... 101 5.11 Regressions C ontinued....................................................................................... 102 5.11 Regressions - vin ABSTRACT Image C haracterisation of Marine Explosive Cyclogenesis Original work was undertaken to define and explore the theoretical concept of Image Characterisation as an extension of the rem ote sensing concept of signatures of physical m aterials. Character represents a higher-level synthesis of the overall meaning of the image scene or sequence, rath er th an a description of constituent ele­ ments. An applied problem in meteorology was addressed by exploring the character of marine explosive cyclogenesis from satellite image sequences. The work followed m ethods developed by Roger Weldon and by the Meteorological Service of C anada in their P R O B E operational procedure. Image enhancem ents and m ethods for m ea­ suring both radiom etric and geometric changes in the im agery were developed, and applied to five cases. Statistical treatm en t of the results of these m ethods, focused around a four-phase physical model of development, revealed prom ising correlations. The length of the Phase II to Phase IV interval correlated strongly with both the 24 hour Bergeron value and the m inim um recoded case pressure (i?^ = 0.79, p = 0.04 and R'^ = 0.87, p = 0.07 respectively). Three significant findings related the differ­ ence in variables as m easured at the Phase 111 and Phase 11 intervals; storm bearing and je t tilt from im agery predicted th e 24 hour Bergeron value {R? — 0.92, p — 0.01 and R? = 0.86, p = 0.07 respectively); and the m axim um image gradient strength of the storm edge predicted m inim um case pressure {R^ = 0.77, p = 0.05). The results are especially prom ising given th a t these measures could be derived on intervals occuring 20 to 30 hours prior to m axim um storm strength. O ther results suggest th a t the 24 hour interval used to m easure storm intensity, currently p a rt of the standard definition, may be too long to capture the essential character of these systems. These - IX findings partially validated the concept of character, while the m ethods developed may lead to more effective and cost efficient predictions. 1- 1. IN T R O D U C TIO N 1.1 D e sc r ip tio n a n d hazard Com puter analysis of environm ental phenom ena has opened a wide range of po­ tential m ethods for description and prediction of environm ental hazard. In th e held of meteorology, a persistent and im p o rtan t problem is th e need to provide tim ely and accurate prediction of high-im pact storm s. While some powerful systems, such as hurricanes, develop over an extended period of tim e and can be easily tracked, there exists a class of w inter cyclones, colloquially referred to as M arine Bom bs [39] which deepen explosively and which has historically confounded num erical prediction m ethods [39], [4], [13], [34]. Detailed numerical models are hindered by th e sparseness of available meteorologi­ cal d a ta over the deep ocean waters where Bombs typically develop, and by th e unique dynamics th a t drive the explosive development of these cyclones (see C hapter 2). The problem of prediction, while difficult, is nonetheless very signihcant. Yearly economic beneht from hazard avoidance derived from hrst and second day meteorological pre­ dictions has been estim ated to be 2 and 2.8 billion dollars C anadian respectively [28]. In cases of explosive developm ent, hazard is magnified, since coupled w ith their quick development, Bombs typically become strong and long lived cyclonic systems [14]. At their peak of development, they can span several thousand kilom etres horizontally. They move farther and travel faster th an other systems [38], and can have an intense low pressure core of over 200 kilom etres in diam eter [31]. The most often cited technical definition for explosive cyclogenesis is a drop in central pressure of a t least 24 hectopascals (hPa) over a 24 hour period [39]. W hile a deepening of 24 h P a describes a fairly strong storm, it should be noted th a t this is the m in im u m requirem ent for explosive development. M any Bombs continue to 2develop much deeper th a n a drop of 24 hPa, sometimes w ith to tal pressure falls greater th a n 60 hPa. In order to illustrate th e n atu re of a M arine Bomb, a term colloquially adopted by Sanders and Gyakum [39], th e characteristics of some well known storm s will be described. For example, the notorious Queen Elizabeth II storm of 1978 saw a deepening of 60 hP a/2 4 h along the American eastern seaboard resulting in the b atterin g of the Queen Elizabeth I I and loss of the dragger Captain Cosmo [12], while the often studied P resident’s Day storm of 1979 resulted in record-breaking snowfalls in the m ideastern U nited States [4]. A nother cyclone analysed by Neiman and Shapiro [31] sim ilarly deepened 60 h P a /2 4 h, and was approxim ately 5000 km across, w ith a 250 km wide comma shaped cloud region (comma head) around its eye. It was found to be one of the most intense cyclonic systems ever recorded [31]. Surface winds reaching 45 m /s were accompanied by 10 m ocean swells. P u t on a hum an scale, one can im agine a series of th ree-sto ry tall swells of water rushing a t us backed by over 160 k m /h winds - a truly frightening prospect. By way of com parison, circum stance changed hazard into tragedy when a significantly weaker storm led to the sinking of the Ocean Ranger off Newfoundland and the destruction of th e Soviet M ekhanik Tarasov, resulting in the loss of 116 lives [38]. 1.2 O p era tio n a l p ro b lem s Early warning, even as soon as twelve hours prior to m axim um intensification, would help ships reach p o rt or prepare for an incipient storm . Currently, a potentially dangerous situation exists where real-tim e meteorological d a ta are unavailable to initialise numerical models. D ata made available to w eather forecast centres hours after m axim um intensification can only be useful in a post hoc analysis, and cannot help m ariners prepare for or avoid the hazards of explosive developm ent (cf. ]4]). The situation remains the same today, as suggested by Pacific W eather Centre (PW C) staff (Personal com m unication w ith Laurie Neil and Neil M cLennan, Pacific W eather Centre, Meteorological Service of C anada, 1998. See Section 3.1). Further, the irregular nature of transient ship reports makes accurate predictions 3unlikely, even where the d a ta are available in good tim e. Several authors have noted poor d a ta availability as a severe lim it on predictive model performance. Sanders and Gyakum [4] noted sparse d a ta over the Pacific, while Sanders [38] found some events in an A tlantic study were completely missed due to d a ta sparsity. Kuo and Low-Nam [20] suggested b e tte r d a ta coverage would improve model perform ance. Kuo and LowNam [20] and Kuo et al. [21] also indicate th a t Bombs are more sensitive to initial conditions th a n other mesoscale systems: an indication th a t missing d a ta can be expected to have a marked im pact on predictive model perform ance. Neiman et al. [21] identify a need for sensors th a t provide high spatial and tem poral resolution. They further suggested th a t rem ote sensing systems are th e m ost likely operational system to m eet such requirements. 1.3 Im ages an d p ro cessin g T he goal of this work is to investigate the uses of rem ote sensing as an alternative and com plem entary d a ta source for prediction and description of Bombs. Some basic principles Rem ote Sensing follow; these concepts are common knowledge w ithin the field of Rem ote Sensing, but are offered here to provide background inform ation relevant to the work presented here. For a more detailed discussion, cf. [23], [17]. Every year new earth resource satellites are proposed or launched, resulting in a global network of commercial systems th a t is quite large. Fundam entally, there are two types of rem ote sensing satellite systems; near polar orbiters, and geostationary orbiters. The form er have a ground track slightly oblique to the poles of the E a rth to avoid the influence of its m agnetic field. T hey provide coverage over all points w ithin a few degrees away from the poles from once to a few tim es a day depending on orbital characteristics. The ro tatio n of th e E a rth below the satellite allows complete coverage, providing at nadir (straight down) viewing for any point. The la tte r (geostationary satellites) orbit around the equator at a rate th a t is calculated to keep them above the same point on E arth a t all times. As w ith polar orbiters, the field of view depends on the optics involved in specific system s and the altitu d e at which the platform orbits, although geostationary orbits require a much - 4greater elevation, usually allowing for a view of the complete disc of the E arth. The m ain advantage of geostationary systems is th a t they provide continuous coverage of the same frame of view. They share with polar orbiters th e property th a t objects at the extremes of th e fram e will be obliquely sensed and will therefore appear stretched; however, unlike polar orbiters, th e nadir point on geostationary systems is fixed, so there is no way for these platform s to provide true geom etry for other points on E arth in subsequent frames. For this reason, geostationary orbiters provide poor geometric coverage of arctic regions. G eom etric post-corrections can be used with some success to restore proper geom etry to regions w ithin the visible frame. Both polar and geostationary platform s can carry a variety of sensors. Most sys­ tem s use either a ro tatin g m irror to focus light across th e entire sw ath of the scene below onto a photoelectric cell (eg. L an d sat), or have optics th a t sim ultaneously focus the entire swath onto an array of cells called a charge-coupled device (eg. SPO T). Po­ lar orbiters can take advantage of th e m otion of the platform relative to the E a rth to advance the sw ath band: a technique called “push-broom ” scanning. The G eostation­ ary Operational Environm ental Satellite (GOES) series, one of th e m ost commonly used geostationary satellites, scans th e image swath by ro tatio n of th e entire satellite parallel to the E a rth ’s equator. Subsequent scan lines are filled by tiltin g an internal m irror in the optical path. Most common satellite sensors, w ith the exception of radar, passively record re­ flected or em itted radiation. The “bands” of a sensor are determ ined by which wave­ lengths of radiation each sensor element records. A digital intensity level is averaged for each band over a spatial range (the scan resolution), resulting in a series of dis­ crete points w ithin the swath, then swaths are combined to produce a full frame. The choice of bands depends on the intended uses of the digital product. Each band may reveal the same scene in differing ways depending on the energy interactions occurring w ith the object being sensed and w ith any interfering factors, such as atm ospheric scattering and absorption. M eteorologists rely heavily on geostationary scenes, recording in the visible and - 5 therm al infrared spectra. Meteorological satellites are designed w ith relatively coarse spatial resolution, since the phenom ena they are designed to sense are large w ith respect to the image frame. Coarse resolution allows the am ount of d a ta needed to fill a frame to be significantly smaller, allowing a short tu rn -o v er period for transm ission of each scene. The GOES series, for example, provides a full scene each half hour; a significant advantage for tracking developing w eather systems. The GOES system was chosen as th e d a ta platform for th e current study. Visible band images have a higher spatial resolution th an therm al because the intensity of reflected visible light is much higher th an th a t of em itted therm al energy. (See C hapter 3.) The targ et area being sensed a t any given tim e is known as the in ­ stantaneous field of view (IFOV) of th e sensor, and corresponds to the final resolution of each picture element (pixel) in the image scene. Higher energy in the visible band allows the sensor to be saturated when averaging over a smaller targ et area, resulting in a smaller IFOV. For the older GOES-7 satellite series, the difference was between 0.78 kilom etre pixels per pixel side for visible and 7 kilometres per pixel side for th e r­ mal bands. In addition, the visible band was quantised to 8 bits versus 6 for therm al: a difference of 2®=256 and 2®=64 discrete digital levels. (Q uantization is the process of assigning a discreet integer value to digitally represent the signal am plitude, cf. [11], pp. 31-40 for a general reference.) Newer images on the G O ES-9 series are 1 km per side in the visible and 4 km per side in the therm al bands. Q uantization is to 10 bits; a significant perform ance improvem ent (for further details of the im agery used in this work, see Section 3.1). High spatial and spectral visible band accuracy (i.e. small pixel size and sensitivity to radiom etric change) is balanced by the advan­ tages of night-capable imaging, and th e correspondence between vertical development and cloud top tem perature in a developing system , which can be estim ated from the therm al sensor response values. O perational meteorology draws on satellite inform ation prim arily as a source of m anual scene interpretation. A highly trained hum an expert, knowledgeable of the physics used to describe meteorological systems and w ith m any hours of experience - 6viewing image loops of system development, can discern details from im agery th a t perm it a rem arkably accurate subjective analysis-for example, results from 111 cy­ clones analysed w ith the PR O B E m ethod (described below) had an overall Probability of Detection of Bombs of 95%, w ith a False A larm Rate (incorrect assessment of a cy­ clone as a Bomb) of only 8% [27]. Coupled w ith near real-tim e physical m easurem ents, such as wind velocity, tem peratu re profiles and radio soundings, imagery allows th e expert to make a reasonable assessment of current conditions and predict possible future conditions. Even in the d ata-sp arse situation th a t plague real-tim e analysis of rapid deepeners, with d a ta not always available in real-tim e, hum an experts and numerical weather models have m anaged to produce useful predictions. 1.4 A u to m a tio n In 1986, the Pacific W eather Centre (PW C) of the Meteorological Service of C anada (MSC) developed and im plem ented a procedure for m anual detection of rapid deepeners, which they called PR O B E (PRO cedure for Bomb Evaluation). The system was implemented in the autum n of 1988, presented to the W orld Meteorological O r­ ganization in 1989, and was used operationally for several years (cf. [26], [27], [30]). W hile results were encouraging, the system was found to be too operator intensive to m aintain. Funding cuts and tu rn -o v er of experienced staff led to the program m e being shelved. MSC attem pted to salvage som ething from the fruitful results of th eir work on PR O B E by proposing an autom ated system which would reduce the num ber of oper­ ator intensive steps, provide an objective procedure and assist in training new staff. The proposal was to be designed around the “expert system ” concept, and would incorporate the key features of PR O B E. Due to further funding difficulties the sys­ tem was never developed. W hile not directly related to PR O B E or M SC’s proposed expert system, the current work addresses sim ilar problem s and has been developed w ith support and advice from the staff at the PW C in Vancouver. -7 1.5 C h a r a c ter isa tio n In order to assist in Bomb prediction, this work a tte m p ts to formalise a m ethod for com puter-based analysis of image sequences. The framework for this m ethod, and the rem ote sensing concepts it draws on, can be described from the perspective of th e philosophy of logic. In form al logic, an object cannot be directly known, b u t is represented by a set of signs. Signs could be the colour of reflected light, the shape, the texture etc., all of which build an impression or construct in our m inds of w hat the specific object is. In rem ote sensing, we are lim ited to n o n -tactile signs, which are usually restricted to reflected or em itted electrom agnetic radiation. The goal of many remote sensing studies can then be described as the determ ination of a set of unique signs (or electrom agnetic signals, p attern s etc.) th a t “speak for” the object under consideration. In logic, th e requirem ent for a definition of an object through its signs is th a t they be necessary and sufficient to the description; each is a property th a t m u s t belong to the object, and their collection separates th a t object from all others (cf. [32], [18]). It should be noted th a t in the case of satellite sensing of explosive cyclogenesis, the “object” being studied is in fact a hum an construct; th a t is to say, a cyclone does not have an obvious, differentiated physical form w ith rigorously definable tem poral and physical boundaries. Its exact definition and qualities are very much m atters of interpretation. Sensor response p attern s recorded in satellite images are being used to track clouds th a t are associated w ith the interaction of cloud microphysical processes and winds blowing through the system (cf. [46]. Even over a short tim e-fram e, the images depict an energy p attern rath er th an a concrete object (i.e. electrom agnetic waves which are “signs” for heat energy, which represent cloud m oisture and tem pera­ ture) . There is little difficulty for the hum an investigator to determ ine which images in a sequence belong to the set th a t comprise a specific event; however, th e impreci­ sion of the hum an “definition” would make it very difficult for a machine algorithm to make the same assessment. Further, the distinction between common cyclonic sys­ tem s and Bombs is sometimes ambiguous, even to m eteorologists (as discussed in the - 8literature chapter below). Ideally, a set of satellite im age-based signs would exclu­ sively identify the character of the construct under investigation, b u t realistically the design goal of th is work is to find significant correlations between signs and events. The logical requirem ents of necessity and sufHciency in the collection of signs th a t defines an object will be viewed as the “ideal” case. Fundam ental to this study is th e developm ent and testing of the concept of “C har­ acterisation” from image sequences. For m any rem ote sensing studies, the intended final product is a suitable classification of scene elements, which often become th e­ m atic layers for input to a geographic inform ation system (GIS) for further analysis. W hile classification attem pts to find isolated electrom agnetic p attern s th a t represent landscape them es, these them es only represent basic elements of th e landscape itself. We could call a landscape well-ordered (the a u th o r’s term ) if the interm ixing of its constituent elements is low. The order of a scene can be described quantitatively using Landscape Ecology metrics. For example, using the Fragstats spatial analysis package, measures of Contagion and Interspersion yield descriptions of th e complexity of elements in the landscape [25]. For a well-ordered, tim e-stab le landscape, such as an agricultural field, the collection of all them es describes the to ta l character of the individual scene; however, such a collection does not necessarily say anything about fields, the particular type of held, or agricultural activity in a generalised sense. T he object of analysis in the example above is a specihc agricultural held. Using traditional rem ote sensing m ethods, the analyst attem p ts to hnd spectral patterns, or signatures, whose distribution over a localised spatial dom ain is unique to the feature being viewed (cf. [47]). The classiher takes these signature p attern s and attem p ts to generate a best-probability surface th a t discrim inates between feature classes in the overall scene. The character of the overall scene can be effectively captured by descriptive m etrics for the classes found in the scene, since th e object of analysis (the agricultural held) is w ell-ordered and, w ith the exception of long-term studies, geometrically tim e-invariant. Rem ote sensing has been a useful tool for agriculture, forestry, geology, and similar - 9 applications th a t share the property of geometric invariance; however, for applications where there is significant geometric deform ation in the scene over time, trad itio n al m ethods become less applicable cf. [2], [48]. Research in the im age processing litera­ ture has tended towards: p a tte rn recognition, where specific geometric relationships are im portant; object recognition, where p a tte rn is used as a signature for specific, and possibly moving, objects; machine vision, where objects are distinguished and discerned as figure and tracked relative to ground elements in a scene; and image un­ derstanding, a term loosely used to suggest an attem p t a t human-like comprehension of scene features from the above elements (cf. [llj-C h a p te r 9, [19]-pp. 241-242, [24] and the introductory notes to Proceedings in [9]). In 1992, MSC proposed autom ation of th eir manual, subjective PR O B E m ethod­ ology for early Bomb detection [27]. Their proposal identified th e use of com puter expert-system s as a means to capture th e expertise of a hum an operator w ithout need to rigorously define all the steps th a t go into the subjective m anual assessment of overall character. The object of study was explosive cyclogenesis; the features th a t were being analysed in the m anual procedure were satellite cloud p a tte rn s and tra d i­ tional meteorological analyses th a t corresponded to variables describing the physical meteorology such as: baroclinicity, vorticity, translation speed, and deform ation. The system would be “trained” by a hum an operator to arrive a t the same predictions. The concept of characterisation is an a tte m p t to move away from the generic “image understanding” paradigm , by extending the idea of a “signature” to a geo­ m etrically variable object. Thus, character is a general case of the signature concept which incorporates geometric change. The concept also incorporates a wider range of generalisability th a n does “signature”: an o b ject’s character should converge w ith the object’s logical definition in th e ideal case. The term “characterisation” was chosen because the colloquial meaning of the word suggests an appropriate interpretation, and because it is already frequently informally used in th e image processing literature. - 10 1.6 R esea rch p arad igm Given the wide range of disciplines th a t contribute significantly to the rem ote sensing and image processing literature, and th e com plexity of the task of developing com puter-based m ethods to represent hum an expertise, discussion of the research m ethods to be used is presented below. The in itial impulse for the work came from a purely theoretical consideration: an informal survey of th e image processing literatu re alluded to the notion of character as a generalised case of the rem ote sensing con­ cept of a signature. The applied case of explosive cyclogenesis provided a real-w orld example of a problem which m ight be described in term s of character, but no t in term s of signatures alone. Given the im possibility of experim ental controls, or strict reproducibility of ephemeral atm ospheric events, the idealised Popperian hypotheticodeductive approach was not applicable. An em pirical, exploratory approach was used instead. The real issue to consider was the inform ation content of th e d a ta themselves. H um an interpreters have dem onstrated th a t a significant degree of inform ation can be extracted from the satellite image sequences of explosive events. The goal then was to develop a means of capitalising on th e available inform ation content in the imagery, using a com puter-based analysis. Causal claims are avoided in this work, while confounding factors are addressed along w ith predictive ones in an inductive, exploratory approach. In bounding the work in this m anner, the author hopes to avoid confusion th a t could result from the assum ption of a controlled design, and hence the autom atic dem and for an experim ental hypothesis. In the absence of a formal hypothesis, the experim ental expectations were as follows: Given hum an interpreters’ significant success in subjectively inferring the character of explosive cyclogenesis from satellite image loops, it is asserted th at: 1. C om puter-based systems should be able to use the same inform ation to produce sim ilar predictions 11 2. R apid deepeners d o possess identifiable characteristics th a t can be discerned on satellite images and th a t separate them from conven­ tional cyclonic systems 3. Those characteristics can be isolated and used to come up with an alternative “definition” for rapid deepeners 4. The concept of characterisation from images is a valid and useful ex­ tension of the existing spectral signature concept in image processing In proposing and exploring image characterisation, both elucidation and testing of the concept in a sem i-operational environm ent are attem pted. The problem of Bomb prediction is addressed and used to illustrate and direct the research. The study seeks to develop new im age-based m ethods to capture measures th a t reveal the “character” of explosive deepeners and provide guidance for future im age-based early w arning or prediction of explosive events. Due to the m ultidisciplinary n atu re of th e work, pure meteorological and image processing literature are reviewed in separate C hapters. C hapter 2 discusses the meteorological foundation of the research, including the presentation of two models from the literature th a t taken together, tie th e physical effects w ith w hat is observed in image loops. In C hapter 3, th e im agery as a d ata source is explored, including its accuracy and inform ation content. C hapter 4 develops novel m ethods for tracking geometric and radiom etric changes in th e developing system and includes reference to the image processing literatu re in meteorology. These m ethods are then applied to five distinct cases in C hapter 5. A synthesis of statistical treatm en t of the results is presented in C hapter 6, while overall conclusions and future considerations are presented in C hapter 7. - 12 - 2. METEOROLOGICAL REV IEW In attem pting to find a suitable “definition” for explosive cyclogenesis th a t is based on satellite inform ation, a reasonable first step is to look at w hat criteria define this process from a trad itio n al meteorological perspective. Explosive cyclogensis refers to a process of cyclonic development th a t is meteorologically unusual com pared to the m anner in which cyclones typically form. The rapid deepener as a class of events must incorporate a large absolute drop in central pressure coupled w ith unusually fast development. In the literature, the context of w riting usually makes it clear w hether an author is referring to the m axim um pressure drop over th e lifetime of a system or the rate at which pressure changes. To be precise, a convention has been adopted for this work to refer to m axim um absolute pressure falls as the system strength^ and to the rate of pressure change as system intensity. W here appropriate, these term s have been applied when referring to th e findings of other authors where the distinction is not explicitly made. Any definition of rapid deepeners should account for both strength and intensity relative to th e population of all cyclonic systems. The most commonly used definition for rapid deepeners comes from the work of Sanders and Gyakum [39]. They define Bombs as cyclones whose central pressure drops a minim um of 24 m illibars (or hPa) over a 24 hour period. Further, they define a unit called the “Bergeron” to represent this development rate, crediting Tor Bergeron, one of the fathers of synoptic meteorology, w ith the original concept. Since pressure falls are affected by the latitu d e of the system centre, they also require th a t central pressures be m athem atically adjusted to 60 degrees north, reasoning th a t Bergeron’s description of a cyclone whose pressure fell one m illibar (or hPa) per hour for an entire day likely described an event at the 60 degrees north latitu d e of Bergen where Bergeron lived and worked. - 13 W hile m any authors acknowledge Sanders and G yakum ’s definition, they also often choose different rates and stan d ard latitu d es as criteria for determ ining which events in their studies qualify as Bombs (cf. the list th a t follows). In their own work, Sanders and G yakum [39] use 12 h P a /1 2 h a t 4 5 ° as an operational standard. Gyakum et al. [14], [15] also use 12 h P a/1 2 h a t 4 5 ° while Rogers and B osart [37] use 12 h P a/2 4 h irrespective of latitude. These “definitions”, or standards appear to be loosely fit to the specific d atasets these authors were studying. R oebber [36] suggests th a t the intent of all such definitions is to separate extrem e from m oderate events. In this regard he seems to stress the requirem ent for system intensity over its final strength (as defined above), i.e. th a t rates of deepening be in the extreme upper range relative to the statistical population. R oebber’s [36] statistical treatm en t of cyclone intensity showed th a t when no m in­ imum intensity criteria was used, the frequency d istribution was significantly skewed. W hen an intensity threshold was chosen to split the dataset in two, the resulting datasets were both norm ally distributed (G aussian). R oebber took these results to suggest th a t under the reasonable assum ption th a t cyclone intensity is norm ally dis­ tributed, Bombs and non-Bombs belong to separate statistical populations. In addi­ tion, G yakum et al. [14] found th a t Bombs last longer - up to 4 days, and comprise the strongest winter cyclones, while Sanders [38] found they travel faster, at an av­ erage ra te of 18 m etres per second versus 13 m etres per second for norm al cyclones. R oebber [36] further determ ined th a t Bombs have a m ean deepening period of 45 hours versus 24 hours for all cyclones in his study. Such evidence may lead to specu­ lation th a t Bombs are the result of a physically distinct mechanism, hence validating the concept, if not the specific definition of Bombs. H ints to the actual physics behind Bombs can also be inferred from climatological inform ation. First, Bombs are alm ost exclusively m arine phenom ena - nearly all explosive deepening occurs over ocean waters [38]. They develop over a wide range of sea surface tem peratures (SSTs), from 0-23 degrees Celsius, and are thus much less sensitive to SST th an other cyclones [39]; however, Bombs occur preferentially 14 along warm ocean currents such as the K uroshio in the Pacific and th e A tlantic G ulf Stream [14], [36]. It would appear th a t Bombs requiring a strong horizontal tem perature gradient rath er th a n a warm absolute tem p eratu re for developm ent [39], [4]. A second hint is th a t Bombs are prim arily cold-season events, w ith a nearly Gaussian tem poral frequency distribution w ith a Jan u ary m ean (in the northern hemisphere) and tails extending to Septem ber and to April [39]. Spatially, Pacific events are extratropical, occurring between 30 and 50 degrees north and dissipating north of 50 degrees [14]. A tlantic events are more complex, occurring through a large range of latitudes. R oebber [36] found the average latitu d e of Pacific events to be 42.5 degrees north. A p a tte rn emerges when we consider th a t strong cyclones develop in areas of strong m eridional upper level flow [38] - areas where th e je t stream exhibits pronounced sinusoidal oscillations. Strong therm al differences between th e equatorial and polar regions in w inter lead to strong meridional flow in the m id -latitu d e jet stream . Thus, there is good clim atological evidence to link Bombs to upper level flow patterns. The suggestion of upper level influences in Bomb developm ent is also supported by the inability of the classic Norwegian cyclone model, as described in Bjerknes [3], to explain the rate of deepening characterises the Bomb [5]. K inem atic motions, relating to the m om entum and pressure forces th a t move an air parcel, operate a t a tim e scale th a t is far too long to explain explosive development. W hat is needed is an external agent th a t can coincide with, and amplify, kinem atic development; dynamic forcing is a process whereby energy from an upper level je t is transferred to a coincident lower level system, and is a process th a t can explain rapid developm ent while perm itting observed cyclonic development patterns. Petterssen and Smebye’s [33] dichotom ous labelling of “Type A” and “Type B” cyclones can be thought of as separating kinem atic from dynam ic effects. Type A sys­ tem s take energy from a baroclinie lower atm osphere. (Baroclinicity can be thought of as occurring where there is a tem p eratu re gradient along a surface of constant pres­ - 15 sure, and can result in significant therm al advection.) Type B cyclones are driven by im ported energy, prim arily from the je t stream . Since dynam ic forcing can provide th e energy needed to explain deepening rates, it is tem pting to offer a definition of Bombs as, “cyclones th a t are dynam ically forced”; however, Type B dynam ic effects alone are not sufficient to explain long-term development. Since Bombs have a central pressure core moving a t approxim ately 65 k m /h [38], and the phase translation of the shortwave je t oscillation can be much faster, the period of upper and lower level coupling is brief. Thus dynam ic forcing does not appear to account for the extrem ely long duration of m any Bombs [14]. Average relative vorticity advection (the horizontal movement of relative air rotation) which is greatly influenced by dynamic forcing, has been tied to average deepening. Sanders [38], found a direct relationship w ith r = 0.872, and w ith removal of two outliers, a stunning r = .924 . An explanation for how such a brief effect as dynam ic forcing can have long-term im pacts can be found by considering the preconditioning of the surface low. There is good reason to consider the preconditioning by Type A, kinem atic influ­ ences on explosive development. From num erical sim ulations, Kuo and Low-Nam [20] found th a t Bombs are much more sensitive to initial conditions th a n other mesoscale systems. In a study of nine explosive cyclones they concluded th a t 60% of the observed development could be accounted for by dry baroclinie processes. In fact, m axim um system strength for Bombs has been correlated w ith stren g th before the onset of dy­ nam ic forcing a t 39% [15]. As suggested before, m ost often cited preconditioning is the presence of strong sea surface tem perature (SST) gradients before the onset of rapid deepening (or the beginning of dynamic forcing, denoted tO herein). Sanders and G yakum [39] reason th a t the contrast between cold air and warm ocean waters results in strong latent and sensible heat fluxes. L atent heat refers to energy required in a phase change of water (e.g. from evaporation or condensation), and sensible heat refers to energy resulting in an air tem p eratu re change. W arm SSTs destabilise the boundary layer (the region in the atm osphere of sea-atm osphere 16 interface) by heating it from below, and enhance cumulus convection and frontogenesis [21]; vertical convection in tu rn provides a means for lower level convergence (air flowing horizontally towards a common point), vertical ascent, and subsequent upper level divergence (air flowing horizontally away from a common point), which along with frontal zone form ation are key features of the classic description of cyclonic development (cf. Bjerknes [3]). Reed and A lbright [34] assert th a t large laten t heat, small static (vertical) stability and a strong baroclinie boundary layer are all needed for rapid deepening. Signif­ icantly, Kuo et al. [21] found from num erical sim ulations th a t while sensible and latent heat contributed equally to early development, stored laten t heat released by condensation continued to drive deepening long after tO. Thus, if dynam ic forcing is thought of as the starter m otor in a vehicle, laten t heat is the fuel m ixture th a t keeps the engine going after the initial im petus is removed. Jet level influences can also be im p o rtan t even before tO. Uccellini et al. [45], [44] identify three distinct je t flows: th e polar, subtropical and lower-level jets. The jet stream results in convergent and divergent air flow p attern s at the je t stream level. From conservation of mass, upper-level divergence results in upward m otion, which is cyclogenic. As the jet stream curves cyclonically (counter-clockwise) around a trough (the southerly bend in the oscillation) there is convergence aloft as the air enters the trough and divergence aloft as th e air accelerates as it exits the trough. W hen the je t accelerates, reaching a m axim um value, it results in a je t streak. As th e air flows through a jet streak, there is divergence aloft (and upward m otion) at th e right entrance and left exit regions of th e je t streak m axima. Upper level divergence from the subtropical je t can initiate convection in low static stability areas by displacing air aloft, while tem perature and m oisture advection associated w ith the lower-level je t can increase cyclonic potential. D ynam ic forcing occurs when th e frontal system becomes phase m atched with an upper level shortw are [4] or more specifically when the polar jet streak enters the upper level trough [45], [44]. The relationship between th e je t p a tte rn and the lower level cyclone can be pre­ - 17 dieted fairly well. Sanders and Gyakum [39] found th a t Bombs ten d to develop 500 nautical miles dow nstream (eastward) of a je t trough a t the 500 h P a pressure level. A preferred phase m atch of one-quarter wavelength from th e trough also helps iden­ tify the critical region for the onset of dynam ic forcing. The upper level vorticity maximum, which is to the left of the je t streak, exists 36 or more hours prior to the mid-point of the 24 hour period of m axim um deepening; however, the surface vorticity centre only appears 12 to 24 hours before this point [38], and for n o rth Pacific events, maximum deepening appears to occur w ithin 12 hours of surface cyclone form ation [14]. The significance of these development tim es for cyclone prediction is th a t the surface cyclone will tend to be visible a t m o st 12 hours before th e m axim um 24 hour deepening period, and thus lead tim e from predictions based on surface m easures will be short. It appears th a t the best hope for long-term prediction would be to track upper level vorticity m axim a, rath er th an surface pressure changes. A final physical influence on Bomb development is th e effect of stratospheric air. It is not uncommon for the troposphere to become depressed, or folded, resulting in th e extrusion of dry stratospheric air to lower levels. Tropopause folding is typically concurrent w ith rapid development, and there is evidence such folding is im portant to the form ation of upper level fronts [44]. Further, extrusions of stratospheric air are an im portant m echanism for vorticity advection, which augm ents jet level forcing and results in more spectacular deepening. Figure 2.1 shows a schem atic for th e structure of a developing cyclone. Three distinct airstream s are depicted th a t are im portant in cyclonic development; the warm conveyor belt; the cold conveyor belt; and a com bination of upper tropospheric and lower stratospheric air behind th e cold front. T he w arm conveyor transports warm, moist air from the tropical side along th e equatorw ard side of the cold front, which then rises over the warm front. Condensation from this airstream creates the visible comma tail and body. The cold conveyor crosses under th e warm front below the warm conveyor, then rises over the surface low and merges w ith the warm conveyor belt at the jet level downwind. The resulting cloud p a tte rn west of the comma tail - 18 - 40*N COLD CONVEYOm / BELT y %* 30"N 20*N I0"N Fig. 2.1. Airflow through a m id -latitu d e cyclone. From [6]. Solid stream lines show airflow at the top of the warm conveyor. Dashed lines show the cold conveyor. D ot-dashed lines show middle level tropical air. LSW is the lim iting stream line of the warm conveyor. T hin solid stream lines show upper level dry air originating west of the trough. Stippling and scalloping show areas of sustained precipitation and mid to upper level cloud respectively. - 19 - HIGH LIQUiO W ATER C O N T EN T ! HIGH ICE P A R T IC L E CONCENTRATIONS Fig. 2.2. Cyclonic cloud patterns. From [16] defines the visible com m a head, which is sharply defined by interaction w ith the upper level airstream (as per Carlson [6]). Figure 2.2 shows cyclone cloud p attern s in more detail. The low pressure core th a t develops about the frontal triple point, where the advancing cold front m eets the slower moving bent back warm front, can be seen in therm al and visible band images as a prom inent cloud^free area [31]. Here the low is seen in th e upper left portion of the figure, since the figure depicts a m ature system (the low moves westward of the triple point as it develops). A thick cloud mass spirals inward tow ards th e eye, forming the comma head of the cyclone. There is typically deep convection, visible as cumulus towers, preceding the advancing cold front [39], while a rapidly expanding cloud-top field about the surface low indicates the prominence of latent heat release [34]. Scattered convective cells are also often visible behind th e cold front in th e form of cumulus pufi^s. - 20 - U pper level influences are also apparent from satellite images. At the je t level, the co-location of a broad cirrus shield about the subtropical je t and a lesser area of cloud near the exit region of the polar jet are visible. Further, a band of very dry air is visible in therm al infra-red images where th e two je ts merge [44]. The GOES water vapour channel can reveal stratospheric extrusions as low as th e 700 hP a level. This channel is a therm al infra-red product whose response depends on the m oisture content and tem p eratu re of the entire w ater column represented by each pixel (see C hapter 3 for more details). It is useful for tracing m oisture advection and vertical motions [44]. A dry air tongue behind the advancing cold front indicates extrusion of stratospheric air, and is visible on ozone com posites [34]. The presence of ozone, a product of upper atm ospheric radiation, is a strong indicator of stratospheric air, and can be m easured w ith the Total Ozone M apping Spectrom eter (TOMS) aboard the Nimbus satellite series [44]. Ultimately, the utility of satellite observation of cyclogenesis comes from m atching cyclone development to pattern s th a t can be imaged from space. W eldon’s early work provides the classic description of satellite im agery and cyclonic development, as published in “Cloud P attern s and the U pper Air W ind Field” [46]. In 1990, Shapiro and Keyser [43] proposed a frontal cyclone development model th a t was distinct from and com plem entary to the classic Norwegian cyclone model (cf. [3]). Building on both works, Neiman and Shapiro [31] proposed an integrated frontal cyclone model th a t is com patible with physical descriptions of developm ent while describing th e relevant coincident cloud m otions. A physical description as presented by Rogers and Bosart [37] will be denoted model A and presented in tandem w ith th e Neiman and Shapiro model, denoted model B . B oth models describe four stages/phases of development: P h a s e I: A Incipient Stage: before the period of m ost rapid deepening. B Incipient Broad-Baroclinic Phase: characterised by the development of a baroclinie leaf structu re in the cloud field (a leaf-like cloud shape). P h a se II: - 21 - A Explosive Stage: a period of at least 12 m illibar (or hectopascal) deepening in a 12 hour period. B Frontal Fracture: the distinct development of a com m a shaped cloud for­ m ation about the surface low. P h a se III: A Mature Stage: central pressure and storm area are quasi-steady. B B en t-B a ck Front and Frontal T -B o n e : developm ent of a cirrus shield com m a head from th e frontal triple point westward along the bent-back front (the bent-back, or occluded front occurs when a faster cold front overtakes and lifts a slower warm front). P h a se IV: A Decaying Stage: central pressure does not decrease and there is a decrease in storm intensity. B W arm -Core Frontal Seclusion: the b en t-b ack front and comma head spiral inward toward the cyclone centre, encircling th e warm secluded air about the low pressure “eye”. The only cold (usually cirrus) cloud visible on the frontal edge is w ithin 250 kilom etres of the frontal triple point. T he Neiman and Shapiro [31] model is illustrated in Figure 2.3. W hile tem poral correspondence between physical and cloud field events cannot be pinned down for certain from the models presented, it appears th a t a strong connection can be in­ ferred between them . In Phase I, dynam ic forcing has not yet begnn, so cloud field expansion is driven prim arily by convective a n d /o r kinem atic mechanisms. The baro­ clinie “leaf” cloud structure indicates a baroclinie zone (frontal zone). In Phase II, explosive deepening has been in itiated by upper level dynam ic forcing (positive vor­ ticity advection, resulting in divergence aloft and upward m otion), coinciding with the appearance of the developing com m a-cloud structure. The Phase I I I T -b o n e - 22 - Fig. 2.3. Four stages of the N eim an and Shapiro [31] model of explosive development. Top figure-pressure and frontal lines w ith shaded cloud fields; b o tto m figure-isotherm s w ith cold (solid) and warm (dashed) currents. shape may indicate convection along th e occluded front and continuing lower level convergence. Phase I V visually indicates th a t the storm is “draw ing in” on itself as the frontal structures begin to decay, explaining why cold cloud is geographically lim ited in this phase to the proxim ity of the surface low, which lies beneath an upper level low. Based on the Neiman and Shapiro [31] model, and other cloud-field evidence presented above, it would appear th a t the best option for surface level based early warning would be to watch for the critical change from Phase I to Phase II. Specif­ ically, as the “leaf” p a tte rn changes into a “com m a” p attern , it m ay be possible to - 23 detect the onset of rapid deepening. W hile it would be preferable to offer m ariners warnings before tO, the knowledge th a t a developing storm will explosively deepen may help save lives (L. Neil, pers. comm., 1998. See Section 3.1). As m ethods were developed for this work, the tem poral period around and ju st before tO was seen as the critical startin g window for detection. Subsequently pushing back th e prediction window m ust be seen as the ultim ate goal of operationalising image based prediction m ethods. - 24 2(. iJLALTcvsLSiEy]? Having fram ed the n ature of the inquiry for this study, and explored th e relevant meteorological literature, the problem of suitable m ethods needs to be addressed. A useful startin g point and directing influence was to look at the quality and lim itations of available data. By the n atu re of the project topic and the lim itations on o cean based meteorological sources, flnding suitable tim e series of image d a ta was essential. Several online sources, such as NO A A (N ational Oceanic and A tmospheric A dm in­ istration, USA) and NASA (N ational A eronautics and Space A dm inistration, USA) web sites were considered, but rejected because the continuity of image sequences was poor. Subsequently, a variety of CDROM sources were considered. A prom is­ ing source was the ERICA (Experim ent on R apidly Intensifying Cyclones over the A tlantic) project, conducted on the eastern seaboard from December 1988 through February 1989 ([35]). The ERICA d ataset was created speciflcally to study th e be­ haviour of explosive deepeners. U nfortunately, from w ritten requests it appears th a t the raw images were never distributed w ith th e ERICA dataset. Since ERICA d a ta turned out to be unsuitable, focusing generally on Paciflc cases seemed reasonable. A desired m inim um requirem ent was specified as a representative set of im agery which expressed the full range of eastern Paciflc w eather over a t least a single season. Since the climatological review suggested a G aussian frequency dis­ tribution centered on the m onth of Jan u ary [39], im agery from late fall through early winter were expected to be especially valuable. 3.1 D a ta sou rces and d a ta b a se m a n a g em en t M ert H orita, (M anager, Environm ent C anada A pplications and Services) at Van­ couver’s Paciflc W eather Centre (PWC), a branch of th e M eteorological Service of - 25 C anada (MSG) introduced the author to Laurie Neil (Head, Environm ent C anada Meteorological Research and Development), a meteorologist a t th e Centre who has been involved w ith explosive cyclone studies for several years. Laurie arranged th a t a continuous feed of images from GOES-9 West be established, using P W C ’s M etP C software. M etP C offers new im agery every half-hour. A h alf-h o u r frequency shows all m ajor developm ent and is considered quite adequate for tracking large systems. M e tP C s raw im agery is standardised to a 1024 pixel per side raw frame quantised to 8 -bit depth (2® = 256 possible brightness values), and projected into a polar stereographic system w ith origin a t (140° W, 60°N ). R eal-tim e images are transferred autom atically via internet file transfer protocol in compressed form at 512 pixels per side at 6 -b it depth (2®=64 values) using the JP E G (Joint Photographic Experts Group) image form at. JPEG is a “lossy” form at, m eaning th a t the reconstructed uncompressed images are nearly b u t not exactly identical to th e originals. G O ES-9 covers the no rth -eastern Pacific region. The extent of the image frames provided by PW C is shown in Figure 3.1. The system offers five bands (on the Imager, the prim ary instrum ent), as shown in Table 3.1. Pacific W eather Centre provided three of these bands covering the Visible (V IS), th erm al-in fra red (T IR l or T IR from herein) and “w ater vapour” (WV) regions of th e electrom agnetic spectrum . The W V channel falls in the th erm al-in fra red range, and is especially sensitive to therm al re-em ission from w ater in th e vapour phase. It roughly corresponds to the am ount of water vapour in the air column directly below th e sensor element, bu t saturates quickly w ith depth for clouded areas (L. Neil, Pers. Comm. See above.) Thus, unlike the T IR channel, W V is not only a representation of cloud-top bu t can represent the entire depth of the atm osphere below the sensor. The dataset for this study consists of images collected over th e period from Decem­ ber 1996 through A ugust 1998. These images were compiled initially on DAT (digital audio) tape and later sorted and re-archived on CDROM. The CDROM dataset con­ tains 27846 infra-red and 24388 visible band images. It also contains 19141 water vapour images m atching certain of the IR and VIS frames. The lower number of - 26 - TT 4 ON ■ 160W . 150W 140W 3 ON Fig. 3.1. Coverage extents of images from G O ES-9, as provided by Pacific W eather Centre, Meteorological Service of C anada. All satellite frames in this work are from this source. 27 - Table 3.1 GOES-9 (WEST) Band Properties [29]. VIS NIR WV T IR l TIR2 Lower Bound 0.55jj,m 3.80/rm G.bOfxm 10.2/rm 11.5/im U pper Bound 0.75/rm 4.00/xm 7.00/im 11.2//m 12.5/im IFOV 1 km 4 km 8 km 4 km 4 km collected water vapour images was the result of the late realisation of the potential utility of these images. Spatial resolution of the GOES system is constrained by the light collecting ability of the sensor for each specific band. The VIS signal corresponds to reflected sunlight from the 6000 K radiant tem p eratu re of th e sun. Both the T IR and W V channels represent radiation from the earth -atm o sp h ere system rad iatin g a t approxim ately 300 K. Since the Stefan-B oltzm ann Law expresses to ta l rad ian t power as propor­ tional to the fourth power of th e tem p eratu re source over all wavelengths (assum ing a blackbody source), far less rad ian t energy is available from cooler objects radiating predom inantly in the longer wavelengths, such as the T IR and W V channels record (cf. [23], pg. 6). The area of collection of radiant energy a t th e sensor is term ed the instantaneous fleld of view (IFOV), and corresponds to the final resolution of each picture element (pixel) in the image scene. To produce useful returns, the pixels in each image should record values th a t represent the full dynam ic range of the sensor. A specific comparison of available energy at the sensor for a fixed IFOV can be m ade by application of P lanck’s Law, which relates emissive energy to tem perature and wavelength for a given unit area. Figure 3.2 shows the range of four GOES spectral bands and how they relate to energy curves for blackbodies em itting at typical cloud tem peratures. Higher energy in the visible band allows the sensor to be satu rated when averaging over a smaller targ et area, allowing for a sm aller IFOV for equal band widths. High spatial visible band accuracy is traded off versus the advantages - 28 - of night-capable imaging, and the correspondence between vertical development and cloud top tem p eratu re in a developing convective air column, which can be estim ated from therm al response values. 3.2 D a ta a sse ssm e n t and case se le c tio n The prim ary software used in exploratory analysis was the P C I rem ote sensing package (© P C I Enterprises Inc., 1997, Version 6.2.2). P C I offers a wide range of image processing, form at conversion and georeferencing support, as well as a high level scripting language for autom ation of analysis procedures. O ther image processing tasks were perform ed in EN V I/ID L (© R esearch Systems, Inc., 2001). S tatistical analysis was perform ed in the S-P LU S (© M athS oft, Inc., 1996) environment and with the freely distributable R software package (© G N U General Public License, 1998). Both packages are derivatives of A T& T’s S statistical scripting environm ent and share a sim ilar syntax and user interface. A variety of U N IX tools were also used including P E R L language (© L arry Wall, 1998) scripts and C language code to m anipulate datasets, and produce some elem entary image statistics. In order to detect and track weather systems in the dataset, a P E R L and C pro­ cedure was created th a t called image conversion and m anipulation routines from the publicly available ImageMagick package (© E . I. du Pont de Nemours and Com pany Inc., 1998). For b oth T IR and W V bands, available image tim es were sorted and four images where chosen as close as possible to 0, 6, 12 and 18Z (Zulu, or Coordinated Universal Tim e). There were occasional gaps in th e archive due to transm ission or storage problems, causing some approxim ation in the desired six hour interval. These images were averaged to create daily composites, and ImageMagick was called to paste all images for the m onth together into a single contact sheet. An example is shown in Figure 3.3. Raw values greater th a n 68 in th e T IR and less th an 70 in the W V bands were masked out since they im aged areas too warm or too dry to represent cloud cover. C ontact sheets formed a useful way to quickly survey development over a long period of time. A nother procedure was perform ed from th e T IR image set to help find strong 29 - E 2Ü!fIu mUinn II 2 3 4 5 6 7 8 9 10 11 12 13 14 ch 2 ch 3 ch 4 ch 5 Wa«leng1h(|im) Fig. 3.2. The spectral “w idth” of GOES-9 channels 2 through 5. Spectral sterance curves are typical for emissions from terrestrial features and cloud bodies in W / cw? jlim /s te r id ia n . From [7]. 30 ':3^ ' . ^ : T Fig. 3.3. Therm al Infra-R ed and W ater Vapour contact sheets. Each frame is a daily average of 4 images a t 6 hour intervals. Top frames show visible band; bottom frames show W ater Vapour band. - 31 - cP s •40000 80000 1ooooo 120000 li g h C l o u d C o u n t ( p i x e l s ) Fig. 3.4. High cloud counts correlate to m ean surface pressures w ith = 0.37. cyclonic cloud structures. Since the T IR response is proportional to emissive tem per­ ature, a threshold could be chosen to separate “high” from “low” cloud in each image (see Section 4.1 for details). Since cyclonic system s are revealed by highly structured high cloud masses, it was thought th a t the percentage of high cloud pixels in an image m ight be indicative of “storminess”. To partially verify this theory, U.S. government N C E P /N C A R (N ational Centers for Environm ental P red ictio n /N atio n al C enter for Atmospheric Research, USA) re-analysis m ean sea level pressure records in the period of December 12, 1996 through June 29, 1997 were obtained. A correlation between m ean daily high cloud count and mean daily sea surface pressure of = 37% was found over the indicated period (Figure 3.4). Since m ean pressure falls should be highly influenced by large cyclonic m id -latitu d e systems, high cloud counts may be a useful way of locating such systems. High cloud to tals were com puted for each frame in the image set. Assuming a fairly sim plistic geometric representation of a developing system allows - 32 - Fig. 3.5. C entral square mask of area A and eight surrounding squares B, where Y ,B i = A superim posed on a m ature cyclone (raw T IR image: dark areas are cold and cloudy). for another system locator algorithm . A mask was developed th a t compares high cloud counts w ithin a central square polygon w ith those of eight surrounding squares whose areas to ta l to th a t of the central polygon (Figure 3.5). The count of high cloud pixels in area A is divided by high cloud counts from Bi + l(to avoid division by zero) from the surrounding squares. The resulting index has a high value when area A is well filled w ith high cloud and areas Bi are on average free of high cloud. In image processing term s, th e mask defined here is fairly complex and requires significant com putation tim e to apply. Therefore, to increase the execution speed of th e code, counts from area A below 50% were not considered. Counts from area A above 90% were also ignored to avoid large blocks of high cloud th a t do not contain a t least some m id or low level cloud. These criteria are designed to produce a large index value when th e m ask is centered over a large, m ature cyclonic system, as in Figure 3.5. The size of th e final mask (as applied in C hapter 5), was - 33 - scaled to fit a sample of m ature cyclones from th e available system s in the image dataset. 3.3 A sse ssm e n t o f R a d io m e tr ic In fo r m a tio n C o n te n t Diurnal loss of coverage during night hours in th e spatially and radiom etrically superior VIS image product is a serious lim itation to using this band as a surrogate for traditional meteorological inform ation. Com parisons between daytim e values of the VIS and therm al products helps to suggest the extent to which these 24 hour usable images can be substitu ted for th e VIS inform ation. M ethod development for actual cases was undertaken using a full resolution uncom pressed (at 1024 pixels per side) sequence of an explosive event th a t occurred A pril 24-25, 1996. Initial radiom etric investigation of the case d ataset involved a principal components analysis to explore the in te r-b a n d correlations. The A pril sequence contained 21 frames from each of the three bands. Frames one through 19 are in one hour intervals, while frames 20 and 21 are in six hour intervals. O u tp u t from the principal com ponents algorithm yielded covariance and variance values. Dividing the covariances by the product of b oth variances in a band com parison yields the in ter-b an d correlation. Plots of correlation between the T IR and VIS bands indicate th a t frames 6 through 14 have the highest values (Figure 3.6). P lots of W V and VIS correlation show nearly identical results (not shown). Frame 6 represents 1700Z (Zulu or C oordinated Universal Tim e), or 9 a.m. Pacific Standard Time. (S tandard n o tatio n in Meteorology is to indicate < d a y > Z < h o u r> -e g . 12Z24 for 12 hours on th e 24th day, Coordinated Universal Time.) For these images, initial high correlation w ith the visual band corresponds to m orning solar ascent. As expected, fram e 14 was captured a t OlOOZ or 5 p.m. Pacific S tandard Time, corresponding to solar descent. Frames 20 and 21, a t 1200Z and 18G0Z A pril 25, represent increasing solar elevations the following day at 4 a.m. and 10 a.m. Pacific S tandard Time. Note also th a t fram e centre (140°IU) is approxim ately one tim e-zone west of Pacific Standard Tim e, so sunrise is about one hour later. D uring peak sunlight hours, the m ean correlation between T IR and VIS bands 34 - O b s e r v a tio n Fig. 3.6. Correlations between T IR and VIS cycle as VIS image comes into fram e (during daylight hours). Top horizontal axis: sequential fram e num ber. B ottom horizontal axis: C oordinate Universal Tim e in stan d ard notation. 35 was 0.76 with a range decreasing over the day from 0.79 to 0.74. The W V and VIS bands started w ith a lower correlation, increased slightly and th en decreased over the day from 0.67 to 0.61 w ith a mean peak hours correlation of 0.64. By comparison, the T IR and W V correlation (Figure 3.7) remains high through all the frames, with a range from approxim ately 0.88 through 0.85 and a m ean value of 0.86. The plot of the T IR to W V correlation exhibits a definite sinusoidal shape (Figure 3.7) but correlations between the bands do not vary greatly. The correlations suggest th a t T IR is a reasonable radiom etric su b stitu te for VIS in term s of inform ation content for those frames where VIS is not available; however, reduced spatial resolution for T IR remains a liability. Fairly consistent correlations for T IR and W V suggest th a t synthetic principal com ponents from these bands should be consistently interpretable. Since the first principal com ponent of a two-band system will contain th e greatest possible pooled variance, a synthetic product based on such a procedure may offer a rem ediation strateg y for inform ation loss due to the choice of em itted versus reflected imagery. - 36 - s g O b s e rv a tio n Fig. 3.7. Correlation between T IR and W V frames. - 37 - 4. IM AGE PR O C ESSIN G BA C K G R O U N D A N D M ETH O D S D EV ELO PM EN T Traditional rem ote sensing change detection techniques m onitor localised spectral changes in geographically static targets. Since a developing cyclone represents changes in a dynam ically structured target, trad itio n al change detection m ethods are not di­ rectly applicable (see C hapter 1). In particular, since the interactions between mo­ m entum , m oisture, airm ass density, tem p eratu re etc. are continuously evolving over tim e, and since evolution inherently defines a cyclone, some m anner of rectifying ge­ om etric changes from frame to fram e is required before radiom etric changes can be assessed in a spatial m anner. A sim ilar problem has been tackled for “deformable tem plates” such as an expressive hum an face (e.g. [42]). In this section, image en­ hancem ents are presented th a t assist in identifying developing cloud structures, four geometric approaches to defining storm evolution are discussed, and early radiom et­ ric work is presented th a t resulted from a geom etrically controlled sequence of image frames. Finally, m ethods used to process raw o u tp u t of radiom etric and geometric procedures are presented, and, the statistical treatm en t of these d a ta is described. 4.1 Im age e n h a n ce m e n t A m ajor concern for any image rectification procedure is the identification of suitable control or “tie” points. For such points to be located, visually distinct and persistent features m ust be identified. W hen image “targ ets” are not rigid bodies, the problem can be severe; m ajor works such as [42] (winning PhD thesis in th e British “Distinguished D issertations in C om puter Science” series) have been devoted solely to this topic. Since cloud bodies are som ew hat am orphous, and continually evolving, pre-enhancem ent m ethods were critical to developing a means of identifying such - 38 - control points. A survey of the literature suggests image processing work in m eteorology has largely focused on the tracking of cloud masses, and separation of cloud decks. Cloud mass tracking allows w eather p attern s to be discerned from a q u asi-au to m ated anal­ ysis. A rnaud et. al [1] used a tem perature threshold of -40°C to separate high cloud (cloud top tem peratures decrease w ith height; see Table 4.1). Image segments formed from this threshold were labeled and tracked through tim e, following both merging and splitting of distinct cloud masses. Schmetz et. al [40] used a histogram analysis technique to extract representative identiher points from cloud masses to produce cloud m otion vectors. Coakley and Baldwin [8] and E b ert [10] used variations of the histogram -spatial coherence m ethod to extract and use inform ation about cloud deck levels. This m ethod is based on the observation th a t when th e local stan d ard devia­ tion of a small subwindow of pixels is plotted versus th e local rad ian t tem perature, an arch shape is defined. Thick clusters of points in th e plot a t lower stan d ard deviations represent areas w ith spatially coherent sensor response. In the arch shape, two such “feet” are found; the one th a t plots on the left a t lower tem peratures represents cloud cover; th a t at the right a t higher tem peratures represents areas w ithout cloud cover. Perhaps the m ost im m ediate and useful inform ation available from satellite images is cloud top tem perature. The therm al infra-red (TIR ) channel provided in the M etP C product was com pared in several image frames to th e radiant tem peratures reported by the software for sample pixels. A simple linear relationship was developed by the regression Trad — 0.584^/^ — 90.1. Applying the Stefan-B oltzm ann equation, we can also com pute the radiant energy em itted by clouds as / = (7(0.584^/^ —90.14273.15)^[VE/m^], where a is the Stefan-B oltzm ann constant. T he actual procedure for tem perature conversion was later supplied by MSC, and is included in A ppendix B-1; however, in the tem perature ranges of cloud top radiance the simple regression returns values to w ithin a fraction of a degree of those from th e more complex procedure. For simplicity, the regression m ethod was used. Later, it was realised th a t since GOES calibrations were identical for all frames in the d ataset, a simple lookup-table could - 39 - be used to convert the raw digital num bers (DNs) to their tem perature equivalent. Since cloud tem peratures are proportional to cloud to p height, it is possible to place any given cloud pixel into a cloud-type group based on its equivalent tem ­ perature. A handbook of meteorology ([41]) was consulted for representative cloud tem peratures, and those were then divided into low-cloud, m id-cloud and high-cloud classes (Table 4.1). Edge detection and enhancem ent were perform ed to help create a bitm ap th a t traces the boundary of m id and upper-level flow as seen in jet-level cirrus in the imagery. For this procedure, low-cloud areas were initially isolated, th en a 7 X 7 mode filter was applied to th e resulting image. The mode filter replaces the central value of a moving window w ith th e numerical mode of all pixels in the window. In this case, the window is seven pixels per side. Once a new value is assigned, the moving window advances one pixel and th e process is repeated until the entire image has been filtered. The effect of the mode filter is to make sim ilar DN areas more uniform, and thus increases the edge contrast between differing areas. Since th e low cloud regions have been masked out, strong contrast exists between th e blanked areas and the mid to high-cloud regions. A 3 x 3 Sobel edge detector was then applied to the mode filtered image. The Sobel m ask is sensitive to localised changes in adjacent areas. In raw form, the Sobel filter calculates the gradient of the image vector along the X and y axes, from which the m agnitude of the gradient vector can be calculated. PC I returns the Sobel vector m agnitude as | ^ | = j c t + g I\. G radient m agnitudes greater th an a suitable m inim um (a gradient value of 200) were retained and stored as a separate bitm ap. The high m agnitude gradient edges cleanly delineate mid and upper level clouds. For general references to filters in image processing, cf. [17], [11]. It was decided th a t due to diurnal loss of coverage the m ethods development stage would ignore the visual band d ata. An a tte m p t to m itigate the unavoidable d a ta quality loss from not using the richer visual band (see C hapter 3) was m ade by using a synthetic principal com ponents image extracted from the raw near infra-red and w ater vapour channels. These images were formed by perform ing a histogram m atching between the bands to ensure equivalent dynam ic range, and then a principal 40 - Table 4.1 Representative cloud types and tem p eratu re ranges (adapted from [41], pg. 165). Cloud Type Base Height (km) Base T em perature (°C) Cirrus 5-15 -70 - - 30 C irrostratus 5-15 -40--25 Cirrocum ulus 5-12 -40 - - 2 5 A ltostratus 3-8 -30 - - 1 0 A ltocum ulus 2-8 -30 - - 1 0 N im bostratus 0.5 - 2 -10 - -20 S tratus 0-2 -10 - - 2 0 Stratocum ulus 0-2 -10 - - 2 0 Cumulus 1- 4 -5-25 Cumulonim bus 1- 4 -5-25 components decorrelation stretch. The resulting images capture th e best properties of both bands, containing a higher inform ation content (a necessity of the principal components m ethod) and having sharper spatial detail and contrast (based on visual assessment). Subsequent investigation led to production of an IR based pseudo-colour ta ­ ble th a t autom atically covers low-cloud areas w ith a blocking mask, dynam ically stretches m id-cloud ranges and applies a coloured enhancem ent to cold-cloud regions. Linear contrast stretch was perform ed for tem peratures between -5 and -30 degrees Celsius from dark grey through white. The colour enhancem ent m aps tem peratures from less than -30 to -70 degrees Celsius or colder as pure red through green to pure blue. W hen combined w ith the “flicker” function in ImageW orks, to switch between the infra-red enhancem ent and a linear stretched view of the whole infra-red range, with the addition of the Sobel edge product, this sim pler enhancem ent is nearly as instructive as the more involved principal com ponents m ethod. It has the advantage - 41 of not depending on the water vapour image product, b u t suffers from lower tex tu ral inform ation content and less representativeness of upper level flow patterns. A final visualisation enhancem ent was produced as a hybrid m ethod between the principal com ponents and IR pseudo-colour m ethods. T he IR product is gener­ ated, and the resulting image is transform ed from th e display capable Red, Green, Blue (RGB) colour space to the more hum an interpretable Intensity, Hue, Saturation (IHS) colour space ([22]). Intensity represents the lum inance of the product from black through pure white. The hue and satu ratio n values code for pixel colour. By replacing the high inform ation content intensity channel w ith the principal compo­ nent product, colours from the IR m ethod are merged w ith the je t level p attern s and higher te x tu ra l inform ation from th e principal com ponent product. A backwards transform ation to the RGB colour space allows th e final product to be shown on the display. In all instances where the IR and W V channel are a t least partially uncorrelated {i.e. not identical) the principal com ponent transform ensures th a t com­ ponent one of the transform contains more inform ation th an th e IR channel alone. W hile both theory and visual assessment suggest this product represents the single best overall representation in the m ethods discussed, it is com putationally intensive, and in most cases not required for a suitable analysis; however, in difficult cases it may yield insights into the developing p attern s th a t m ight be missed from th e other products. An example of these enhancem ents is shown in Figure 4.1 4 .2 R e g istr a tio n S tr a te g ie s a n d G e o m e tr ic A n a ly sis o f D e v e lo p m e n t Discussion w ith staff at Pacific W eather Centre (cf. 3.1) m ade it clear th a t PR O B E involved careful observation of image loops of development. Visual enhancem ents allowed tie or control points to be identified in th e cloud field, leading to th e ex­ ploration of m ethods to geometrically control, and hence describe, deform ation p a t­ terns in the developing systems. Com parison between changing meteorological fields and the image sequence helped to determ ine which features were characteristic of development. Published Inform ation {e.g. [46], [31]) assisted in determ ining analysis strategies. Progressing from basic to more advanced strategies, th e following m ethods 42 mî. Fig. 4.1. Enhancem ents used for storm feature detection: d -ra w IR, range inverted: w hite=cold cloud; R -IR & W V principal com ponent one; C -IR pseudo-colour with edge vectors and background mask; D -p rin cip al com ponent and IR colour fusion. 43 - were developed: M anual R egistration, Cloud Frame R otation, Principal Com ponents on Bitm ap Axes, and Idealised Grid Tracking. Based on the developm ent trials, of the four methods, only m anual registration appeared incapable of capturing useful inform ation about the system. The last three m ethods appeared progressively more capable; however, each had its own particular advantages. 4.2.1 M an u al r eg istr a tio n The most obvious way to attem p t geometric rectification is to apply traditional land-based registration methods. An operator defines a series of “ground control” or “tie” points between frames and Fn+i of a series. As points are entered, the root mean square (RMS) error is com puted for a given geom etric transform ation model. RMS error is a resam pling m easure sim ilar to the variance, which describes how closely the transform model projects tie points of Fn+i => Fn- We can com pute RMS as y where F z and give the z and ^ coordinates in the two frames (c./. [17], pp. 104-105). A low RM S error can indicate a good model fit - or it m ight only indicate th a t th e model fits th e control points well. It is advisable to split the points into a “model m aking” and “m odel testing” group, to see if the transform also indicates a low RMS error for independently chosen points. Since deform ations along the je t stream and the com m a head are dissimilar, a higher than first order (non-affine) non-linear regression of tie points is suggested to capture the essential deformations. Control points are viewed as estimators of the global frame deform ations, and so should capture the overall nature of those deformations. The higher the model order, the b etter th e model fits local distortions about the control points, although its generalisability may become problem atic. Areas not near any control points m ay tend to produce unrealistic transform ation results. Typically for ground-based m ethods, control points are chosen th a t have strong edge contrast and are readily identifiable from frame to frame; however, such points have proven to be very difficult to reliably locate in cloud im agery due to both the complex dynam ic evolution of the images and the lack of sharply dem arcated features. 44 4.2.2 C lo u d fram e r o ta tio n Viewed from th e perspective of the entire system (com m a head and tail) cyclonic development can be seen to proceed w ith three m ajor deformations: translation, rotation and scaling. Translation can be fairly easily rectified in a frame to frame sequence, since translation relative to th e storm centre can be defined by the position of the surface level low pressure centre. The upper level vorticity m aximum would be another possible tracking point; however, as it can be readily identified from satellite images. The location of the surface low is not always available on surface charts; however, an approxim ate position for th e surface low can be estim ated by looking for the intersection of the com m a head and the upper level jet flow (c./. [46], pp. 21-31). R otational changes are more difficult to assess, requiring th e positioning of an axis in each frame. Further, it becomes apparent th a t deform ation along th e je t stream axis, from herein denoted the principal axis, is different from th a t occurring in the expending com m a head region, p articularly after upper level decoupling of the jet and surface cyclone (see C hapter 2). To com pletely capture these changes, an affine, first order transform will not suffice. In th e m ethod being described only rotation relative to th e the principal axis (its tilt) is m easured, not the rotation of the comma head relative to the je t stream itself. To test this simple m ethod a circular mask was applied about the surface chart low centres of five frames, at six hour intervals, from the A pril 1996 sequence after centering the mask about the surface low (m anually controlling for the translation of th e low). The mask reduces th e influence of extraneous clouds. Since clouds in cyclonic systems tend to rotate counter-clockwise (cyclonically), an algorithm was developed to “u n ro tate” subsequent frames and com pare them to the previous frames {Fn+i => Fn) by applying a positive rotation. A fter projecting frame Fk+i by a given degree rotation, correlations were com puted between those frames. Correlation values should be highest when frames separated by a small tim e index are rotated such th a t their principal axes m ostly superimpose. Table 4.2 shows correlation values for five raw frames covering the m ajor development period of the April 1996 event in - 45 - Table 4.2 Correlations between frames from April 24-25, 1996. Tim e index is for U TC (Zulu) tim e. Tim e # 1 2 3 4 5 18Z24 1 1 0.61 0.34 R29 0.34 00Z25 2 1 0.64 0.43 0.49 06Z25 3 1 0.64 0.51 12Z25 4 1 R66 18Z25 5 1 six hour intervals. R esults for separations of one frame after rotation are shown in Figure 4.2. C orrelation values drop as fram e tim e separation increases (not shown) due to strongly different geom etry between them . The curves also become flatter w ith a less definite m axim um value. The angle of m axim um correlation for th e same five frames a t all tim e separations (multiples of six hours in this example) are shown in Table 4.3. In this comparison, a given frame F„ is not only com pared to Fh+i (i.e. to th e fram e six hours later), b u t to F„+ 2 ... etc, as well, sim ilar to values in the non-adjacent columns of Table 4.2. There does not seem to be any system atic relationship for how correlations change as frame separation increases, although Figure 4.2 does seem to suggest a localised m axim um for relatively short separations (6 hours in these examples). It is perhaps not surprising th a t as fram e separations become large, ro tatin g one fram e relative to the other does not produce a m eaningful superim position, as the frames would then record greatly different stages of developm ent in the system. A larger sample set, or a choice of a smaller frame to fram e tim e separation would be needed to test the problem further. Such testing is beyond th e scope of the current work. A nother sim ilar approach is to generate a bitm ap from the segmented mid and high level cloud in each frame, and to ro tate one bitm ap w ith respect to th e previous one {Bi+i Bi). Under bitm aps, tex tu ral features are removed, and only the overall 46 m M - 8 R o ta tio n < deQ rees c lo c k w is e ) are ro tated against Fn Fig. 4.2. C orrelation curves as frames Table 4.3 Angle of m axim um correlation under ro tatio n of Frame 00Z25 [MIZ25 12Z25 18Z25 18Z24 -3 30 -15 -12 00Z25 X 11 10 -5 06Z25 X X 11 -1 12Z25 X X X 0 - 47 - S a s R o ta tio n ( d e g r e e s c lo c k w ise ) Fig. 4.3. Percent “pixels on ta rg e t” of S j+ i ro tated onto Bi shape of the cloud-mass is com pared between frames. Some unrelated rem nant and dow nstream je t-re la te d cloud are left in th e segmented images. If those areas are m anually removed in an image editor, a mask area is created th a t represents the extent and shape of development in th a t p articu lar image frame. A suitable m etric for comparison of these shapes under ro tatio n is th e “pixels on ta rg e t” measure: a count or percentage of on pixels in bitm ap two th a t overlay on pixels in b itm ap one - P O T = * 100[%], where B, * defines a grid m ultiplication (Bi(^x,y) * for all (a:, y)pairs), and E B , is the count of all on pixels in fram e B%. Since bitm aps are either on (value of one) or off (value of zero) their product defines their logical intersection. Results for the same five frames as before are shown in Figure 4.3. Use of bitm aps seems to produce cleaner curves w ith more definite maxima. C orrelation between frames and pixels on targ et of bitm aps offer objective, sim ­ plistic measures of development. The only subjective factors in their calculation are the location of the surface low, which can be done with a fair degree of accuracy, and 48 - the removal of surrounding cloud masses for bitm aps, which is a straight-forw ard procedure. B oth m ethods deal w ith tran slatio n and ro tatio n fairly well (if only based on m anual placem ent of the low), although in this sample, results for com parisons B, C and D correspond, while those for comparison A do not (com paring the curves in Figures 4.2 and 4.3). U nfortunately neither m ethod im plicitly accounts for stretching along the principal axis. 4 .2 .3 P r in c ip a l c o m p o n e n ts on b itm a p axes Once bitm ap shapes of flow developm ent are isolated, as described above, these shapes can be autom atically aligned according to their principal axes and scaled according to their length, resnlting in a fairly good m easure of development. Such a procedure is suggested in Gonzalez and Woods ([11], pp. 151-152), and is often used in rotationally invariant object recognition procedures. Given a vector V = Ly such th a t X and y are the (x ,y ) coordinates of the contour points of the bitm ap shapes, then principal com ponents one and two of will form new coordinate axes w ith the following properties: P i will contain the m ajority of th e variance; Pj-LPi and therefore uncorrelated w ith Pi, Pi explains more of the pooled variance than any other single axis th a t could be chosen in the dataspace. In the context of an image bitm ap. Pi will be the axis along which the greatest spread of points will be found if all points are projected onto th a t axis, which corresponds to the longest axis in the bitm ap pattern . The orthogonality constraint ensures th a t (Pi, P 2 ) is a suitable substitute coordinate space for {x,y). For early stages of development, the longest visual feature is bound to be the je t stream cloud trace, and thus P i should correspond fairly well to the principal axis. Furtherm ore, th e eigenvectors of the components specify the linear axis transform th a t defines th e new components. The transform in tu rn describes translation, rotation and scaling of the entire bitm ap. Such transform s were run on test bitm aps extracted from the mid and high cloud edge detection segm entation (Figure 4.4). The bitm aps represent the contour of the target region. They were converted to vector form at for in p u t to SPlus using a ra ste r- - 49 - to-vector conversion module. U nfortunately, th e principal com ponent transform is strictly linear, and so like the simpler b itm ap ro tatio n m ethod cannot account for differential deform ation between the jet stream and comm a head, 4 .2 .4 Id e a lise d grid track in g C haracteristic features of a developing cyclone are the baroclinie leaf, expanding com m a head and dry slot region behind the surface low (see C hapter 2). All three features are observable to different degrees under th e various enhancem ents presented in Section 4.1. From the onset of rapid deepening until the dry slot becomes suffi­ ciently pronounced to create a pocket of cloud-free air inside th e comma head, an idealised wire-figure can be used to represent the system. The “comma grid” used in this work underw ent 10 distinct forms before one was found th a t provided a satisfac­ tory representation of the developing com m a head from the April 1996 test sequence. Figure 4.5 shows grid 10; the final version. The grid was created by specifying geometric relationships between its p a rts and com puting the resulting coordinates in a spreadsheet. Segment A C represents a linear portion of the je t stream from underneath which th e com m a head emerges, and is denoted the principal axis. If A C is one unit length, segment A B = 3/5 and B C = 2/5 units. There are five “tick” alignm ent m arks along segment A B and five w ithin the com m a head between B and C (w ith an additional two at B and C). The head itself is the segment of a circle of radius R w ho’s centre is located beneath point 8, such th a t the distance between the centre and point 8 is 2 /3 R , where the circle is secant to the principal axis. From these criteria, we find th a t R = Com b-like teeth extend from points 5, 7, 9 and 11 for a length R perpendicular to and below the principal axis. R adial lines from the centre along points 6 through 10 extend beyond those points for a to ta l length of R from th e centre. The teeth and radial lines are used to specify the je t-stre a m w idth and com m a head position relative to the principal axis. Alignm ent of the grid to a developm ent frame is guided for enhanced imagery (w ithout use of surface charts) by the following steps: A E stim ation is m ade of the position of th e surface low. A ttention is paid to a - 50 § « o .Ë B Q. % #***## § _ _ 5 ?S 8 E ______ Pixels (x) CO s ' 1 I I r -0.015 -0.010 -0.005 0.000 0.005 0.010 Transformed X Fig. 4.4. Vector outline of developm ent and its principal com ponents alignm ent. 51 - Fig. 4.5. A lignm ent grid # 1 0 for flow rectification. N um bers in th e figure represent tie points used in specifying development of a system when th e grid is superim posed on an image frame. developing dry slot a t the south or south-w estern edge of the com m a head. Point # 5 of the grid is positioned at this location. B Using the stretch function, point # 1 1 is grabbed and dragged to the far edge (north or n o rth -east) of the comma head. The principal axis should be fitted as per a regression line through th e brightest westernm ost extent of th e je t stream flow. The entire grid will ro tate and stretch to accom m odate the line segment between the surface low and edge of the comma head. Awareness is necessary of splitting cloud masses th a t are entrained by the low or th e je t stream bu t th a t will split off in subsequent frames. The position of th e gradient enhancement bitm ap edges can be used for guidance. C Comma head expansion points are added along the radial lines through grid points 12 through 16. Focus is on the general shape of th e expansion, rather th an the exact point where the head crosses the radial lines. As for step two, the process is like fitting a non-linear regression or spline through a sem i-elliptical region. Also as in step two, awareness of splitting and merging cloud masses - 52 and the gradient bitm ap location are necessary. D Points 17 through 20 are used to specify th e mean cloud w idth. Alignm ent is chosen to correspond to th e opposite side of the bright upper-level mass used as the principal axis, and should approxim ate the m ean w idth of this baroclinie shield cloud feature. From the April 1996 test case, cloud w idth was a very well defined and easily identifiable feature. In subsequent images, it was found th a t this feature is not reliable for all developm ent patterns. In the A pril 1996 test case it does denote usable inform ation, so determ ination of this feature will have to be done on a case by case basis. 4 .3 R a d io m etric A n a ly sis o f D e v e lo p m e n t Early parts of this work focused on the changes occurring in a system a t the radiom etric level. In order to exam ine pixel level differences in sensor response, it was first necessary to control for, or remove, th e geometric deform ations occurring over the interval being investigated. The grid m ethod presented above was used to co­ register the entire sequence of images in the development case. In this m anner, sim ilar regions of the system were forced to geom etrically overlap, so th a t pixel changed could be assessed fram e to frame. The goal of these m ethods was to determ ine if radiom etric change in specific p arts of the system were indicative of development, and ultim ately, if these changes were characteristic of explosive events. Some patterns, such as banding in and around the comma head, were im m ediately visually apparent. These visual features are also depicted schematically in Figure 2.2. A fter image registration was perform ed, a series of m ethods were applied to try to quantify distinct visual patterns. C lustering of local textures as m easured from grey level co-occurrence m atrices was perform ed (cf. [11], [17]). Areas of like-texture were then analysed using the Fragstats suite of landscape ecology software [25], to produce and analyse shape m etrics at the patch, class and landscape (or “cloudscape”) level. Prelim inary results suggested th a t texture scaling (the size of characteristic bright­ ness changes) was an im portant problem, even in a series of geom etrically controlled 53 images. Some work w ith m ultiscale W avelet and Fractal analysis was done, b u t the entire section of radiom etric work was dropped due to th e significant problems scaling posed. Future work in this area may prove fruitful, as im p o rtan t visual inform ation seemed to be contained in the changing textures, b u t suitable m ethods of m easuring those changes were not found. Some final comments on possibilities for future work in this area are m ade in Section 7.3. 4 .4 P o s t- P r o c e s s in g o f R a w R e su lts Basic radiom etric results from high cloud and the Cyclonic Index and geometric results from the grid m ethod were applied to five full storm cases. The raw results contained a large volume of data, which needed to be ordered in a meaningful way. D etails of the three prim ary analytical m ethods applied to each case are presented below. These include; pressure changes; radiom etric analysis; and vector analysis. Some discussion of the PR O B E m ethodology is also included. 4 .4 .1 Probe The PR O B E system, as described in C hapter 1, was based prim arily on trad itio n al meteorological analysis m ethods. It was heavily based on the work of Roger Weldon (“Cloud P atterns and the U pper Air W ind Field” [46]). A lthough PR O B E could not be implem ented here due to lack of th e program code and system atic upper level charts, several of the concepts addressed in PR O B E are also addressed in the current work. In particular, b oth methodologies address: ro tatio n of the J e t Stream ; sharpening cloud edges; cloud field expansion; and translation velocity. 4 .4 .2 P ressu re The prim ary d a ta sources for this work were 1000 h P a (surface level) pressure charts and G O ES-W est satellite image coverage. Pressure charts were obtained from b oth the Pacific W eather Centre in photocopy form and digitally from th e C anadian Meteorological Centre. Satellite im agery was provided by the Pacific W eather Cen­ tre. Ideally, pressure centres could have been directly com pared to im age-derived measures, and in some instances this was possible; however, coverage did not always 54 overlap in tim e, and was not always available a t regular intervals. Older records from PW C were often incomplete, and pressure charts were only available at 6 hour in ter­ vals, compared to half-hour intervals for compressed im agery (the uncompressed, full resolution images used in the development case were available at one-hour intervals). Due to these tem poral differences, spline interpolation was used in several measures, and especially im portantly for pressure values, to regularise observation intervals. The natural spline m ethod from the R statistical package was used (See C hapter 3 for more details of the R package). As is stan d ard practice in m eteorological work, all tim e indices were recorded relative to Coordinated Universal Time, also referred to as Zulu Time. Furtherm ore, pressure intervals were indicated relative to Time Zero (tO), as defined in C hapter 2. Standardising observations tem porally allowed comparisons of development between as well as w ithin cases. Pressure falls alone do not provide sufficient inform ation to charactarise a rapid deepener. As m entioned it C hapter 2, system strength, as m easured by the m axim um deepening value, and especially system intensity, as m easured by m aximum ra te of deepening, are more inform ative measures. A stan d ard index is th e Bergeron, a value indicating the ra te of pressure fall corrected for the effects of latitude. A lthough various authors choose different standard latitudes, in this work, the criteria for a Bomb of one h P a deepening per hour at 60° north was used, as per Sanders and Gyakum [39]. To standardise betw een-case results, all pairs of pressure observations were com­ pared per system, and the best 6, 12 and 24 hour Bergeron values were computed. To account for occasional gaps in the pressure d ata, th e best interpolated 6 hour Bergeron value was also com puted (indicated as 6i in th e Bergeron value tab les). 4 .4 .3 R a d io m e tr ic R e sp o n se Response values of the pixels in each image were also analysed. Initial work on the project focused on radiom etric values, bu t it was found th a t geometric changes were easier to analyse and appeared to be more inform ative; however, some basic 55 radiom etric results were retained. Two basic measures from th e radiom etric response were developed: high cloud counts; and the “Cyclonic Index” (C-language code is shown for com puting these values in A ppendix A-3. High cloud count is sim ply the to tal of pixels in each image frame th a t are -30° Celsius or colder, after m asking out areas over land. Prelim inary work suggested a correlation between high cloud and regional pressure (see C hapter 3). T he cyclonic index was developed to find m ature, large cyclones in a series of images. It has a high value when a solid, circular area of high cloud is surrounded by patches arranged in a ring, of cloud-free or low cloud areas. A high contrast between th e centre and surrounding patches yields a high index value. A final radiom etric measure was the Sobel edge sharpness gradient (described earlier in this chapter). Notes and com m ents from PW C staff suggested th a t edge sharpening of clouds m ight correspond to development ([27], Personal com m unication w ith Laurie Neil, 1998. See Section 3.1). As cloud edges sharpen, they become more visually distinct. Values of the absolute Sobel gradient represent th e strength of edge transition features in the cloud image, allowing for quantification of the sharpness of the cloud edges. 4 .4 .4 V ecto r C a lcu la tio n s Raw geometric measures were derived from the position of th e placed idealised comma grid from each satellite image fram e (the grid is described in Section 4.2.4). All grid vector points have been converted from screen units (pixels) to a polar stereographic projection w ith tru e latitu d e a t 60° n o rth to m atch th e projection of the pressure charts. Distances were converted to latitu d e corrected kilometres across the great circle distance between points using the IDL procedure map_2points (see C hapter 3 for inform ation on IDL). The first geometric m easure is Jet Tilt, repre­ senting turning of the principal grid axis aligned w ith the upper level flow. Next is the Comma “Bulge” Radius, the mean length of arcs from the centre of the comma head to the location of the outer com m a cloud edge, following the radial grid lines. Comma Head Length is the distance between the southern point where th e comma head first appears below the upper level flow to the northern extent of the com ma - 56 - head along the je t line (principal axis). Finally, Baroclinie Cloud Width a tte m p ts to track the mean w idth of the upper level je t baroclinie zone along the grid principal axis, although in practice this m easure has been found to be difficult to estim ate. F irst and second order derivatives of th e raw m easures were initially calculated from interpolated o ne-half hour interval values. These values represent the velocity and acceleration of geometric changes in the system. Due to th e observation interval differences between im age-based and ch art-b ased d a ta source, these results were found to require further processing. In particular, raw image velocity and acceleration graphs were extrem ely variable, possibly due to the geographic registration perform ed on the imagery. Since GOES orbits the equator, pixels recorded obliquely will have significant geometric distortion. W hile these pixels are norm alised in post-processing, the spatial accuracy of pixel centres will vary across the image scene. To m itigate some of these problems, the raw values were subsequently sm oothed. A fter com putation of velocity, these values were passed through the R package “Lowess” sm oothing function (see C hapter 3 for details of the R package) w ith an f-p aram eter of 1/6. Lowess was too harsh a function for the lesser variability of th e acceleration plots; instead of sm oothing w ith Lowess, in the splining process, these values were estim ated over a three-hour interval. 4 ,5 S ta tis tic a l T rea tm en t Since raw d a ta in this study was derived from charts and images th a t did not al­ ways have system atic tem poral coverage, a good deal of pre-processing was required before statistical analysis could be perform ed. In C hapter 5, d a ta w ith extensive regular interval splining is presented, which is quite appropriate for display purposes; however, for num erical analysis, splining artificially increases the num ber of observa­ tions, and so also increases the statistical power and inflates the Type 1 error rate (the probability of concluding we have found an effect when we really have found a trivial difference) in statistical inference. Most possible pairs of variables were compared w ith each other. Specifically, all variables were paired w ith their tim e index, all w ithin-case variable combinations - 57were paired, and all equivalent variables were paired between cases. Between case comparisons of different variables were om itted as being of secondary value, thus removing m any extra comparisons from the set. Treatm ent of each pair of variables was done to normalise tim e indices, and so allow for paired comparisons w ithout introducing a large num ber of extra splined observation values. For each XY pair, X effectively becomes the explanatory (in­ dependent) variable, and Y the response (dependent) variable. Values for Y were derived by splining raw Y values to th e tim e intervals in X, w ith splining ensuring original values occurring a t the correct tim e were retained. Not available (NA) val­ ues were om itted, as were tim e indices extrapolated beyond those of the original Y indices. W here tim e indices in X were missing from key Phase tim es th a t were to be explored, these values were introduced through splining as appropriate. The splining allowed correlation and regression models to be com puted. Comparisons between variables were done a t two levels; case level comparisons considered the values of the variables across th e entire tem poral range of th e case (a comparison of sum m ary statistics), while observation level comparisons looked at the variables a t each tim e index. A variation of case level analysis was to consider values over the Phase II to Phase III interval, as estim ated from the images (see C hapter 5). The purpose of this tim e standardisation was to look more closely at changes over a readily identifiable interval. The statistical results are presented at the end of C hapter 5. 4 ,6 F in a l R em a rk s Three useful m otion estim ation and registration strategies were presented in this chapter. Their original goal was to allow for geom etric stan d ard isatio n between frames of a development sequence. Such a standardisation would allow for the direct geo­ m etric superim position of one frame in th e sequence over the previous frame, hence perm itting a pixel based comparison of radiom etric changes: ^n(x,y) for each (x, y) pixel pair in frames n and n -f 1. The “u n ro tatio n ” m ethods (correlation and pixels or target based) do not control for stretching. B oth the principal compo- 58 neats and grid m ethods do control stretching, bu t the principal com ponents m ethod is sensitive to small variations in th e shape of the extracted cloud segments. Over­ all, the grid m ethod was felt to be th e m ost accurate at geometric representation of development, and was used extensively in prelim inary testing of radiom etric change analysis. R adiom etric analysis has proved to be a topic complex enough to w arrant a completely separate study; m eteorologists traditionally focus on geom etric changes in video loops, so the project was re-focused on geometric changes, while retaining only the most basic radiom etric analyses. All results are presented in C hapter 5. While the grid m ethod was the m ost suitable under the circum stances, it is inherently more operator intensive, and less objective th an th e other m ethods. Some com m ents re­ garding potential use of these m ethods in autom ated or q u asi-au to m ated analysis are made in the conclusions of this work. - 59 - 5. RESULTS Raw results produced by application of the m ethods described in th e previous chapter are presented here. First, d a ta in chart form are presented in light of the four phase model of developm ent described in C hapter 2. Statistical analysis of these d a ta are then presented a t the end of th e chapter, w ith special em phasis on variables th a t predict for the system strength and intensity. 5.1 In tr o d u c tio n Results from five Pacific storm s are presented here in a case-study form at. By this means the assembled m easurem ents can be com pared and contrasted to reveal trends, pattern s and correlations b o th for different measures w ithin a case and for the same measures between cases. Subsections of this C hapter will deal w ith each type of analysis done. R esults have focused prim arily on geometric analysis, as indicated at the end of C hapter 4. Detailed code used for com putations, w ritten in the R statistical language are presented in A ppendix A-4. Results for the developm ent case will be presented in each section in full, followed by a brief presentation of th e other cases. All tables and figures appear a t the end of Section 5.2 startin g on page 73. As suggested in C hapters 3 and 4, a prim ary focus of this work was the develop­ m ent of experim ental methodologies to track and analyse explosive deepeners from satellite images. A full-resolution (uncompressed) image sequence from April 1996 was used as the developm ental case. This storm was selected, w ith the help of Laurie Neil at Pacific W eather Centre (See Section 3.1), as being very typical of the type of w inter storm s th a t develop into explosive deepeners. U nder sub-headings following the p attern presented in the methodology description above, results will be presented in detail for the developm ental case. Results for th e rem aining four cases will be pre­ - 60 - sented after those for the development case and discussed under each sub-heading. 5.2 C ase D e sc r ip tio n s C ase I: A p r i l 24, 1996 D e v e l o p m e n t C a s e More support inform ation was available for the January 1996 development case th an for any of th e other cases. Table 5.1 shows the available chart and image d a ta series for this case. A contact sheet at 6 hour intervals is shown in Figure 5.1. Image coverage for Case I was at one hour intervals, and covered the entire developm ent period, from the emergence of th e com m a head to tO, when the dry tongue becam e evident. Flow was initially quite zonal, b u t became more meridional as the system developed. C ase II: J a n u a r y 12, 1997 This system was quite meridional w ith entrained cirrus to the west of the low th a t does not define the com m a-head. C ase III: J a n u a r y 28, 1997 This system began upstream of an earlier low, which failed to develop. The cloud mass th a t becomes the comma head was initially separate from the jet, but merged w ith it in later frames. The system was fairly meridional, w ith the je t in a m ostly n o rth -east orientation. C ase IV: N o v e m b e r 8, 1997 This case developed upstream of a cloud mass th a t never developed into a true com ma head. Much of the cloud from this system was later entrained by the developing system. In later frames, the system finally tilted past the n o rth -so u th line. A nother dow nstream system began to form along the je t as this system intensified. Case V: MARCH 6, 1998 - 61 The upstream je t in this case was extrem ely meridional, tiltin g well past the n o rth south line. Cloud about the developing low was very dense and thick, while the w idth of the je t in other areas was much less. In early frames it was no t apparent where the low would develop. 5.2.1 P ressu re C ase I; Case I was a fairly strong system, deepening to an approxim ate lowest value of 969 hPa (Figure 5.2T). Sea-surface pressure measured relative to 1000 h P a indicates a to ta l pressure fall of 31 hPa. The storm was also quite intense, w ith a 24 h o u rbased Bergeron value of 1.34 (see Table 5.2). The 6 hour value was 2.71, about twice as intense, while the 12 hour value was 1.38, which is sim ilar to th e 24 hour value. B oth the vector and pressure centre tracks follow closely, w ith th e vector positions falling to the north-w est of their equivalent pressure centre positions. Separations between the observations are generally less th a n a few degrees. The storm originates w ithin R oebber’s [36] m axim um frequency zone for storm developm ent. It reaches i t ’s m axim um depth ju st before leaving th e 50°north lim it for bom b decay (Figure 5.3). The contact sheet for this case (Figure 5.1) shows a strong cyclonic shape, w ith a sequence progressing from a well defined baroclinie leaf (Phase I) to an emergent comma cloud p a tte rn (Phase II), the full developm ent of a com m a-head (Phase III), and leading to a fully secluded cold core in the “spin down” phase (Phase IV). In C hapter 2 it was postulated th a t there is a direct connection between the four phases of the physical cyclone model of Rogers and B osart [37], and th e cloud held descriptive model of Neiman and Shapiro [31]. Based on the image d ata, the Neiman and Shapiro m odel can be readily applied to Case I. Phase I began w ith the appearance of a “leaf” stru ctu re at OZ April, 24, or at t-22 hours relative to the emergence of the comma head (where th e emergence is taken as an estim ate of tO; the beginning of explosive deepening). Phase II began at t-10 hours with the cold front “fracturing”; th e hrst appearance of th e early structure of the comma head (Figure b .lA -B ). This point corresponds w ith the hrst applied - 62 - “coram a-grid” vector for the image tracking m ethod. Phase III began at tO, when the comma head p a tte rn first separates from the baroclinie leaf cloud mass (Figure 5.1 CD). Neiman and Shapiro [31], define Phase III as the emergence of a t-b o n e comma head along the occluded front west of the frontal triple point, and by definition, tO in this work represents the same point in tim e. It also represents the last analysed image frame. Phase IV began a t t+ 1 4 hours (Figure h .lE -F ). It represents th e point where the frontal lines have completely encircled th e surface low, cutting it off from the cold air mass and leading to decay of th e system. The Rogers and B osart [37] physical model is also fairly well followed by th e data. Its Phase II requirem ent is for a m inim um 12 h P a deepening over a 12 hour period. C entral pressures for Case I at the sta rt of each phase were: 1002, 996, 986 (interpolated), and 970 hPa. C alculated a t a per hour rate, th e deepening between the starting pressures of each phase was: -0.50, -1.00, -1.14 and 0.33 h P a /h r, which m atch expectations except for Phase III, where pressure should be quasi-steady. The Phase IV ra te also uses a pressure value a t t-f20. This is th e last available pressure value; during Phase IV, the system should weaken until dissipation. There were three periods in this case th a t m et the Phase II requirem ents: t-10 to t+ 2 at a A P of 12 hPa, and t+ 2 to t+ 1 4 and t+ 8 to t+ 2 0 , a t A P of 14 and 12 hPa. The case is unusual in th a t there is a qu asi-static pressure state a t 984 hP a at t+ 2 and t+ 8 , which is a requirem ent if Phase III, bu t this period is followed by a second period of strong pressure falls. Phase IV would appear to have begun by t+ 2 0 as pressure is increasing a t this time. Phase I is said to begin a t th e point when the surface low is first visible on surface charts. Therefore it cannot be com pared to an im agebased model. Com paring the rem aining three phases of the two models yields for the Neiman and Shapiro image model w ith the Rogers and B osart physical model tim es following in brackets: Phase II at t-10 (t-10, t+ 2 or t+ 8 ); Phase III at tO (t+ 2); and Phase IV a t t+ 1 4 (t+ 20). The pressure derivative graphs emphasize the deceleration of pressure falls about Phases III and IV (Figure 5.2P ). Figure 5.4yl and B show velocity and acceleration calculations for the storm cen­ - 63 - tres as tracked from the pressure charts and from th e image sequence. The shape of both velocity and acceleration curves is sim ilar between those from the pressure charts and those from the images. The im age curves are much m ore variable, which is not unexpected since they are derived at half hour intervals instead of the six hour in ­ tervals for pressure chart centres, and because image centres are no t estim ated based on a sm ooth pressure field. At t-10, which corresponds to the im age-based estim ate for Phase II, velocity is low, h u t th e storm centre is accelerating. A t approxim ately t-3 velocity is at a maximum, b u t decreases again by Phase III at tO. There is a local m inim a of velocity at t+ 1 4 , corresponding to Phase IV. The deepest pressure occurs a t t+ 1 8 , only four hours later. The system ground track is shown in Figure 5.4(7 and D for chart and image centres respectively. C ase II: Available d a ta for Case II are listed in Table 5.3. Case IPs chart and image ground tracks follow each other well, b u t are separated by several degrees in the early stages (Figure 5.5A). The system did not originate in R oebber’s [36] zone, and m axim um deepening occurred ju st north of 5 0 ° . This system had quite a com plicated cloud field, as seen in Figure 5.7. It is possible th e early grid alignm ent from th e image sequence has some system atic error, later resolved as the developm ent becam e more clear, or th a t there were difficulties in placing the early storm centres on the surface charts. The case had a 24 hour Bergeron value of 1.19, qualifying it as a bomb (Table 5.4). The 12 and 6 hour values were 2.06 and 3.09, or 1.73 and 2.3 tim es the 24 hour value respectively. The lowest pressure value (Figure 5.8) was approxim ately 961 h P a (interpolated). Hourly deepening rates for Phases I to IV were -0.86, - 1.86, -0.28 and -0.72 h P a /h , which roughly follows the physical model, except for continued deepening in Phase IV. There were three periods of 12 hr separation th a t m et the Phase II criteria: t-14 to t-2 a t a A P of 17 hPa; t-8 to t+ 4 at a A P of 15 hPa; and t+ 1 6 to t+ 2 8 at a A P of 14 hPa. C entral pressure was quasi-steady at - 64 - approxim ately 981 h P a between t-2 to t+ 1 6 hours, giving a tim e for Phase III, bu t this period precedes the lowest recorded pressures and the second period of strong deepening. Model com parisons for Neiman and Shapiro (Rogers and B osart) yield: Phase II at t-7 (t-14, t-8 or t+ 1 6 ); and Phase III at tO (t-2). Figure 5.8 shows th a t deepening was fastest in the t-14 period. Phase IV values could not be estim ated since later pressure values were not available. C ase III: Available d a ta for Case III are shown in Table 5.5. Case III occurred in a very com­ plicated flow p a tte rn (See Figure 5.9). Several strong, q u asi-statio n ary lows were present throughout the sequence, and it was difficult to locate th e actual system . Some guess work was involved in placing the low for the early pressure chart obser­ vations, as there was no low indicated on the charts in the area suggested from the imagery. Later observations were more definite, and show a few degrees separation between chart and image centres (Figure 5.5). It originated slightly S o u th -E ast of R oebber’s [36] zone and was at 998 h P a a few degrees before th e 50°N line. The only available Bergeron value estim ate was 1.65 based on the 6 hour interval (Ta­ ble 5.6). Insufficient pressure d a ta were available to make a 24 hr Bergeron measure, as the pressure records only spanned 18 hours (mostly since there was no surface low to track in the early stages of development as visible on the im agery). The lowest pressure value occurred a t t-2 at 993 h P a (Figure 5 .8 -1 ), which is inconsistent w ith to representing the onset of m axim um deepening. Given its shallow pressure profile it is very likely th a t Case III was not a Bomb, bu t a “D ud”- a case th a t appears to be developing explosively but does not. This conclusion follows from th e cloud-held patterns similar to those of the other cases bu t a lowest pressure and Bergeron value suggesting the system was not strong or intense enough to be a Bomb. Very likely no dynamic forcing occurred. The hourly pressure fall could not be calculated for Phase I, since the hrst pressure observation does not precede th e hrst image obser­ vation (it was recorded after the beginning of Phase II), nor could it be calculated 65 for Phase IV, since the last pressure observation precedes the beginning of P hase III. The rates for phases II and III are: -0.63, and -0.19 h P a /h . Case IV: Available d a ta for Case IV are shown in Table 5.7. Flow p attern s for Case IV are shown in Figure 5.10. This case originates a t ab o u t 40°N, and 10° E ast of R oebber’s [36] zone (Figure 5.5). M aximum deepening occurs at 53.4°N. Bergeron values for Case IV (Table 5.8) were 1.04 (interpolated a t 24 hr), 1.86 (12 hr) and 2.08 (6 hr). The 12 hr and 6 hr calculations are 1.79 and 2 tim es the 24 hr value, respectively. The system deepened to 954 h P a (Figure 5.8-7 ) at t-|-30. An hourly rate could not be calculated for Phase I due to lack of early pressure coverage. R ates for Phases II through IV were: -4.22, -1.71 and -0.60 h P a /h , which show stronger th an expected deepening in Phases III and IV. There were two candidate 12 hr periods for the sta rt of Phase II: t-t-12 to t+ 2 4 at 19 hPa, and b+T8 to t+ 3 0 a t 16 hPa; however, early pressure d a ta was not available, so this phase may have begun earlier. From Figure 5.8-^, it appears more likely th a t t+ 1 2 is the beginning of Phase II, although these two ranges are possibly b o th p a rt of th e same deepening phase. Phase III appears to have occurred between t+ 3 0 to t+ 4 2 w ith a pressure of approxim ately 956 hPa, compared to the im age-based tim e of tO, bu t lack of early d a ta makes this hard to determine. C ase V: Available d a ta for Case V are shown in Table 5.9. The flow p attern for Case V is shown in Figure 5.11. The case began a t 35°N, about 7°east of R oebber’s [36] zone (Figure 5.5). M aximum deepening occurred ju st south of 50°N. The 24, 12 and 6 hour Bergeron values (Table 5.10) were: 1.45, 2.05, 2.90 and 3.03 (6 hour interpolated). Shorter estim ation periods resulted in over-estim ation of intensity, and the interpolated 6 hr value exceeds the best recorded 6 hr value. The 12, 6 and 6 hr interpolated values were 1.42, 2, and 2.09 tim es the 24 hr value. The system - 66 - deepened to 982 hP a (Figure 5 .8 -i ) a t t+ 3 3 .5 and qualifies as a bomb. Phase I hourly deepening could not be calculated due to lack of early pressure d ata. Phase II to IV rates were: -0.80, -1.20, and 0.11 respectively. The strong deepening in P hase III is unexpected. There were two intervals th a t qualify for pressure based estim ates of Phase II: t+ 3 .5 to t+ 1 5 .5 at 18 h P a and t+ 9 .5 to t+ 21.5 a t 17 hPa; from Figure 5.8â, t+ 3 .5 appears the more likely candidate. Phase III may have occurred between t+21.5 to t+ 27.5 w ith a quasi-steady pressure of 984 hPa; th e lowest pressure value of 982 h P a at t+33.5 may also have been p art of this period. The sta rt of P hase II may be somewhat off since the first available pressure value was recorded 3.7 hours after the image estim ate of Phase IPs start. Comparisons of th e image (physical) models yields: Phase II at t-6.2 (t+ 3 .5 or t+ 9 .5 ); Phase III at tO (t+21.5); Phase IV at t+ 2 0 (t+39.5). 5.2.2 R a d io m etric C ase I: Phase II, which began at t-10, saw a localised peak in the high-cloud count index (Figure 5.12). A strong upper level flow p a tte rn is evident in the satellite im agery at this point, although development is at an early stage. By Phase III at tO, the index has fallen by about one percent. It peaks a t t+ 8 at 10.3% of m axim um (as a percent of high count pixels available in the unmasked portion of the image frame), and is at a minim um of 6% at t+ 20. The cyclonic index is very strong for this case, growing from approxim ately 10% a t the sta rt of Phase II and reaching nearly 100% of m aximum in the range of t-5 to t+ 5 (Figure 5.13). The storm centre is reasonably well located by the m axim um index position. The index then drops to a low of 2% in Phase IV, around the tim e of m axim um deepening. Edge sharpness begins with a low gradient value of around 55 and grows to a peak of 82.6 a t t+ 1 (Figure 5.14). There are peaks in the m axim um gradient value in the entire image of 1100 a t t-8, and 1168 at t-1 which roughly correspond to Phases II and III. A nother peak of 1108 at t+ 4 occurs in early Phase III. - 67 - C ase II: The m axim um high-cloud (Figure 5.15) value is 32.66%, occurring at t+ 1 9 . This tim e falls after the s ta rt of Phase IV, suggesting th a t th e m atu re system contained the most high-cloud. Cyclonic index follows the same p a ttern , bu t w ith a more pronounced spike a t t+ 2 3 of 29.8% (Figure 5.16). At this point, th e system is quite m ature in the imagery, and definitely in decay. The cyclonic index m axim um does not actually fall over the low, although it picks the right system and a reasonable time. Edge values range from about 65 around Phase 11 to a m axim um of 84.7 at 14-20.5 (Figure 5.17). A small peak at t+ 1 of 69.8 corresponds to Phase 111. Peaks a t t+ 1 0 and t+ 2 0 .5 occur in late Phase 111 and early Phase IV respectively. There is a large edge m axim um of 1098 a t t-0.5 and a general increase in m axim um values around t+ 1 8 in early Phase IV. C ase III: H igh-cloud values begin around 25% a t t-10, drop by ab o u t 3.5% around the tim e of m axim um deepening (t-2), and rise to a local peak at tO; th e start of Phase 111 (Figure 5.15). Counts then fall progressively to a minim um of 14.77% before Phase IV begins (the analysis was not continued past t+ 1 1 , while Phase IV began at t+ 1 6 ). Initial high returns appear from the imagery to be due to a previous low centre in the frame along whose axis the Case 111 low also later develops. M axim um deepening for this case appears to have occurred at t-2 (an anom aly noted above). The upstream system appears to be in Phase 11 or 111 at this point, and is providing the m ajority of the high-cloud pixels. Cyclonic index in this case was more reliable. The m aximum index value is a low 1.9% at t-3, bu t it correctly places th e low both spatially and tem porally (Figure 5.16). Edge sharpness begins high and falls to a low at t+ 2 (Figure 5.17). This anom alous condition can be easily explained by a large upstream system moving over land and hence into the masked out area of the edge sharpness images. The effects of the targ et cyclone are obscured; an unfortunate weakness of 68 the edge strength m ethod. It is unclear if th e large edge m axim um value a t t-5 is due to the target cyclone or the upstream system. Case IV: H igh-cloud counts peak at t-t-12.5 w ith a value of 25.1% (Figure 5.15). This tim e falls in the middle of Phase III, which is the logical tim e to expect a well developed upper cloud field. A sm aller peak of 17.25% at t+ 3 0 .5 corresponds to th e tim e of m axim um deepening. The cyclonic index has a m axim um value of 15.54% at t+ 37.5. The local spike is quite sharp. This tim e follows th e tim e of m axim um deepening (t+ 3 0 ) by a few hours. The system is completely occluded at this point and is decaying. The m aximum index is located on a dow nstream developing system (Figure 5.16). Edge values dip to a low of 42.3 at t+ 1 , th en rise progressively to a value of 59.7 at t+ 22, corresponding to Phase III and early Phase IV respectively (Figure 5.17). An anomalous high value at t+ 3 6 corresponds to an erroneously tran sm itted image fram e which contains a large white sem i-circular artifact in the upper portion of the image. This feature is also picked out on th e m axim um sharpness index. A m axim um edge spike at t+ 1 8 of 1248 occurs one hour after the s ta rt of Phase IV, b u t is likely caused by a sim ilar b u t smaller image artifact in th a t tim e’s image. C ase V : At t+ 1 8 .25 the high-cloud index reaches its m axim um of 15.14% in a noisy d istri­ bution (Figure 5.15). This point is ju st prior to Phase IV, bu t precedes the tim e of m axim um deepening by about 15 hours (an inconsistent condition). Smaller peaks at t+ 0 .5 and t+ 3 3 correspond to Phase III and the tim e of m axim um deepening. The cyclonic index has a strong m axim um peak a t t+ 1 5 of 84.75% (Figure 5.16). This tim e is in late Phase III, five hours prior to Phase IV. The index m axim um is well located in the upper p art of the com m a head. The index avoids incorrectly choosing a coincident system to the west. Values begin to rise late in the life-cycle of Case V as a newly developing system enters the image frame. Edge sharpness values vary -6 9 slightly about a value of 55 until t+ 2 9 , when they begin to rise to th eir highest m ean value of 65.0 a t t+ 3 7 . They then fall gradually back to previous values around t+ 5 0 (Figure 5.17). The 65.0 m axim um falls ju st after the point of m axim um deepening at t+33.5. The m axim um sharpening value plot reveals a few large peaks, m ost notably: 1476 at t+ 34.5, ju st after the point of m axim um deepening (t+ 33.5); 1296 a t t+ 1 .5, ju st after the s ta rt of Phase III; and 1164 a t t+ 5 4 , late in Phase IV. U nfortunately, both the t+ 34.5 and t+ 1 .5 values are likely caused by a single, bright sem i-circular line artifact in each of these images. 5 .2 .3 V ector C ase I: Jet T ilt in degrees north of east increased as the system developed from Phase II to Phase III (Figure 5.18). T he progression was sm ooth, as th e system tilted from 32.5° at t-10 to 43.1° at t-3. There was a cou n ter-ro tatio n (anti-cyclonic) from t-2 to t-1, followed by a return to rotation to the west a t tO. T he system ro tated at about 1.5° per hour until t-2 (Figure 5.19). The Head Length contracted strongly at t-8 and t-7, followed by a quasi-steady length from t-6 through t-2 averaging 914.2 km. It decreased again ju st before tO. The mean rate between t-5 .5 to t-3 was only -2.71 k m /h. Overall, the m ean rate was -11.0 k m /h . The Com m a Bulge also decreased strongly from the sta rt of Phase II until t-7, when it was 367.4 km, which further indicates the system was contracting at this point. The Bulge then increased in size fairly uniformly for the rest of the tracking time, w ith a m ean 18.2 k m /h rate of expansion. A small decrease in length of 29.4 km a t t-2 corresponds w ith the drop in rotation rate at the same period. Baroclinie W idth roughly increased in time, w ith a mean rate of 4.8 k m /h. V ariation about a rate of zero increased w ith tim e, probably because the je t width became more difficult to measure in later frames. C ase II: The je t axis in this case was tilted past north, indicating a m eridional flow p attern (Figure 5.20). T ilt increased rapidly in the first few image frames until t-5, then -70slowed slightly before continuing to increase gradually until tO. The mean rate until t-5 was 4.7°/h; from t-4.5 to tO, the m ean rate was only 0.5 °/h (Figure 5.21). The comma head shrank rapidly between t-5.5 and t-5 by 147.8 km (-295.6 k m /h ). By t-3.5 the head had shrunk a to tal of 234.3 km in ju st 3.5 hours. In then generally increased in length until tO at a mean rate of 7.8 k m /h for an overall contraction of 129.5 km. The Com m a Bulge was generally small before t-3 .5 when it was a t a minimum of 700.5 km, and then generally increased in size. There was a contraction of 38.8 km between t-2 and t-1.5 bu t overall between t-3 .5 and tO th e bulge increased at a mean rate of 22.6 k m /h . Over the entire length of observation, th e bulge increased at a mean rate of 12.5 k m /h by a to tal of 87.2 km. Baroclinie W idth dropped sharply between t-7 and t-6.5 66.1 km then increased rapidly to a m axim um value of 254.8 km at t-4. The w idth was increasing by 58.6 k m /h between t-6 .5 to t-4 w ith a m axim um rate of 163.8 k m /h at t-5. A fter t-4, it decreased at a ra te of -20.7 k m /h . The m ean w idth was 187.9 km, while the w idths at th e first and last observation were 174.5 and 172 km respectively. C ase III: Overall, the Je t T ilt increased; however, prior to t-5 there was some variability (Fig­ ure 5.20). The range of these measures was very sm all w ith a difference between the m inim um and m axim um tilt values of only 2.42°, suggesting th a t this variation was not particularly noteworthy. Overall, th e m ean tilt was 67.5° versus a minimum and m aximum tilt of 62.2°and 73.4° respectively. The system tilted a t a mean rate of only 0.7°/h over the entire interval (Figure 5.21). Head Length was generally increasing until a sharp drop of 253.3 km between t-4 and t-3. T he “steps” prior to t-5 were quite unusual, and somewhat system atic. The early (left) side of the steps showed increases between t-9.5 to t-8 .5 and t-7 to t-6 are 91.9 and 110.2 km respectively. The late (right) side of the “steps” showed decreases between t-8 .5 to t-7 and t-6 to t-5 of -64.7 and -67.9 km respectively. It is quite possible th a t the unusual nature of Case III made system atic placement of the comrna grid difficult. The overall rate of 71 increase was 17.3 k m /h w ith a m ean head length of 1234.2 km. Com m a Bulge was similarly asystem atic. Generally, the bulge size was large where th e tilt was shallow. There was a large drop in size between t-4 and t-3 of 168.5 km. T he mean bulge size was 648.3 km w ith a mean rate of change of 1.88 k m /h . For th e first six observations, the je t w idth could not be visually estim ated. Over the last four observations, the mean w idth was 189.9 km. C ase IV: Geometric measures for Case IV were quite linear in com parison to the other four cases. Jet T ilt was greater th a n 90° throughout, m aking this a m eridional system (Figure 5.20). T ilt increased quite system atically w ith a mean rate of 105.5°/hr through a range of 5.5°(Figure 5.21). Com m a Head Length increased over tim e w ith a mean rate of 67.7 k m /h w ith a mean length of 847.8 km and an overall change in length of 305.1 km. Com m a Bulge increased w ith a m ean rate of 39.3 k m /h and had a mean length of 367.3 km, increasing overall by 176.8 km. The Baroclinie w idth was more variable, but increased fairly system atically until t-0.5 w ith a m ean ra te of 13.8 k m /h. A fter t-1 there was a strong drop of 82.5 km, which m ay have resulted from loss or am biguity of the visual feature being tracked as representative of the jet in later frames. C a se V: Je t T ilt crosses 90° early Phase II, making this a m eridional case (Figure 5.20). T ilt increases fairly system atically until t-1 .5 to a value of 103.0°. There is a slowing of the rate of rotation around t-4, and even a small tem porary reversal of ro tatio n ju st after this period (Figure 5.21). The system co u n ter-ro tates again after t-2 and then stabilises with a mean rotation rate of 0.2°/hr. From the s ta rt of Phase II until t-2, the mean rate is 4.4°/hr, while the overall ro tatio n ra te for th e case is 2.5°/hr. Com m a Head Length begins w ith a slow increase then jum ps rapidly at a rate of 106.4 k m /h from t-5.25 to t-4. It then increases in a rough m anner a t a mean rate of 72 26.7 km /h. The overall mean rate is 34 k m /h . Com m a Bulge increases in size in a similar p a tte rn to th e ra te of rotation. There is a sim ilar slowing of th e rate of increase around t-4 through t-3, followed by a fairly steady rate of increase of 32.3 k m /h from ju st after t-2.5. The overall rate of increase for th e case is 37.5 k m /h with a growth of 234.5 km. Baroclinie W idth is broken into two estim ate; those up to t-4.75 and those th a t follow. This is due to the feature initially being tracked becoming indistinct, while a new feature was later visible. It is m ost likely th a t b o th of these features could not be good estim ates of the je t width. R ates in the two p a rts were 26.4 k m /h and 11.5 k m /h respectively. The m ean rate of these two periods (thus removing the jum p between features) is 18.9 k m /h . - 73 Table 5.1 Event D a te s-A pr il 24, 1996, Case I. F irst C hart Last C hart F irst Image L ast Image Year 96 96 96 96 M onth 4 4 4 4 Day 24 25 24 24 Hour 0 18 12 22 M inute 0 0 0 0 Table 5.2 Bergeron E stim ates-A pril 24, 1996, Case I. One Bergeron equals 24 h P a /2 4 hr deepening at 60° A"- The 6i interval is interpolated to 6 hours. Tim e Interval D elta mb Bergeron 6i 14 2.71 6 14 2.71 12 14 1.38 24 26 1.34 Table 5.3 Event D ates-Jan u ary 12, 1997, Case II. F irst C hart Last C hart F irst Image Last Image Year 97 97 97 97 M onth 1 1 1 1 Day 12 14 13 13 Hour 18 18 1 8 M inute 0 0 0 0 - 74 Table 5.4 Bergeron estim ates-Jan u ary 12, 1997, Case IL One Bergeron equals 24 h P a /2 4 hr deepening a t 60°IV The 6i interval is interpolated to 6 hours. Tim e Interval D elta mb Bergeron 6i 13 3.09 6 13 3.09 12 17 2.06 24 21 1.19 Table 5.5 Event D ates-Jan u ary 28, 1997, Case III. F irst C hart Last C hart First Image Last Image Year 97 97 97 97 M onth 1 1 1 1 Day 28 29 28 29 Hour 18 12 16 2 Minute 0 0 30 0 Table 5.6 Bergeron E stim ates-Jan u ary 28, 1997, Case III. One Bergeron equals 24 h P a /2 4 hr deepening at 60°IV. T he 6i interval is interpolated to 6 hours. Time Interval D elta mb Bergeron 6i 6 1.65 6 6 1.65 0 0 0.00 0 0 0.00 - 75 Table 5.7 Event D ates-N ovem ber 8, 1997, Case IV. F irst C hart Last C hart F irst Image L ast Image Year 97 97 97 97 M onth 11 11 11 11 Day 8 9 7 7 H our 6 12 13 18 M inute 0 0 30 0 Table 5.8 Bergeron Estim ates-N ovem ber 8, 1997, Case IV. One Bergeron equals 24 h P a/2 4 hr deepening at 60°A^. The 6i interval is interpolated to 6 hours. Time Interval D elta mb Bergeron 61 11 2.08 6 11 2.08 12 19 1.86 24 22 1.04 - 76 - Table 5.9 Event D ates-M arch, 6, 1998, Case V. F irst C hart Last C h art F irst Image Last Image Year 98 98 98 98 M onth 3 3 3 3 Day 6 8 6 6 Hour 6 18 2 8 M inute 0 0 15 30 Table 5.10 Bergeron E stim ates-M arch 6, 1998, Case V. One Bergeron equals 24 h P a/2 4 hr deepening at 60°JV. The 6i interval is interpolated to 6 hours. Time Interval D elta mb Bergeron 6i 13 3.03 6 13 2.90 12 18 2.05 24 26 1.45 77 1 Z Z A pril 2 4 , 1 9 9 6 P a n e l A —( P h a s e 11/1—10) l a z A p ril 2 4 , 1996 P a n el B—( P h a s e ll/t—4 | OOZ A pril 2 5 , 1 9 9 6 0 6 Z A pril 2 5 . 1 9 9 6 P a n e l G—( P h a s e lll/t+2} P a n el O—( P h a s e Ill/t+Sj 1 2 Z A pril 2 5 1 9 9 6 l a Z A pril 2 5 , 1 9 9 6 P a n e l E—( P h a s e IV/t+14) P a n el F—( P h a s e IVrt+20) Fig. 5.1. “C ontact sheet” indicating development at six hour intervals-A pril 24, 1996. - 78 - Pressure Observations o o o 1st and 2nd Derivatives 1-0Z24 10 d 10 0) 0) o d 4-18Z24 £! E o 0) G> I 10 d I 3 10 W OO (0 0) 0 03 n o 7 o 00 0) 10 I 0) ©8-18Z25 o)7-12Z25 R 0) -20 0 20 1st Deriv. A 2nd Deriv, 0 o c\i 40 -1 5 Hours from tO A ■5 0 5 10 20 Interpolated hours from tO B C ase I Fig. 5.2. Pressure Record-April 24, 1996, Case I. Pressure centres are from 1000 hPa charts with spline interpolation. tO denotes the emergence of the dry tongue (see Chapter 2). Plot 2 shows the first and second order time derivatives of pressure. 79 - Pacific Storms Locator o (D Image C entres • Low Pressure C entres 0 r t 0 o w 6-6Z25 z I 0) 0 Û m i 1-18Z 24 o o n -180 -170 -160 -150 -140 -130 D egrees East C ase! Fig. 5.3. Storm Ground Tracks-A pril 24, 1996, Case I. The horizontal lines represent norm al ranges for bom b development and decay. Vertical lines represent the Pacific m axim um frequency position for storm development as per R oebber, 1984. A square is drawn about the location of m axim um deepening as found on Figure 5.2. Dashed lines connect Image and Pressure C h art observations th a t occurred at the same time. The last noted tim e on the Im age line indicates the last observation analysed using the grid m ethod, although subsequent image centres were som etimes available. - 80 - Velocity and Acceleration - Im ages V elocity and Acceleration - Charts PI Pii Pill PIV o o o o 8 O O o O 8 o o PI PH PHI -20 -10 0 PIV CM CM T Ü -20 -10 0 10 20 20 Interpolated hours from tO A Interpolated hours from tO B Ground Track Bearing - Charts Ground Track Bearing - Im ages PI PI PH PHI -20 -10 0 PH PHI PIV i o z t 8 0 z E o 0 10 PIV 8 E p in « o 1 § o 8 0 0in 1 Ü S 2 oo 8 1 oo 8 Û Û -2 0 -10 0 10 20 10 20 Hours from tO D Hours from tO C C ase I Fig. 5.4. G round track m otions (April 24, 1996, Case I) based on pressure chart low centres (left column) and image low centres (right colum n). All distance-based measures were com puted from an equidistant azim uthal model projection, resulting in true ground units (kilom etres). - 81 - Pacific Storm s Locator Pacific Storm s Locator § ImageCentres • LowPressureCentres 0 • LowPressureCentres i ° ê I' 4-12Z29 2 M8Z12 2-OZ29 g § -160 -150 -140 -180 -130 -170 -130 -160 -150 DegreesEast Caseill Pacific Storm s Locator Pacific Storm s Locator ImageCentres ®U)wPressureCentres 0 imageCentres • LowPressureCentres 12Z9 0 r 2-12Z8 ! 1-6Z8 z 2 0S' '3-18Z6 g -• § -180 -170 ■160 CaseIV -150 -140 -130 -180 -170 -160 -150 -140 -130 CaseV Fig. 5.5. Storm G round Tracks-Cases II to IV. The N orth-South lines represent norm al ranges for bomb development and decay. East-W est lines represent the Pacific m axim um frequency position for storm development as per Roebber, 1984. - 82 - Velocity and Acceleration - Images Velocity and Acceleration - Charts Pi Pi! PHI PI PH Pill PIV Velocity and Acceleration - Charts PIV PH Velocity and AcceleraSon - Images PHI nil Ml S § 8 § -1 0 0 10 20 30 0 -5 -10 5 -5 10 0 5 Interpolated hours [tom to A Interpolated hours from K Interpolated hours horn 10 A tnter(K^ted hours from to Ground Track Bearing - Qiarts Ground Track Bearing - im ages Ground Track Bearing - Charts Ground Track Bearing ■ im ages PI PH PHI PI Pit PHI Pil PIV PIV PHI PH 8 § PHI S s 8 § § s -10 0 10 20 -1 0 30 0 10 20 30 0 -5 -1 0 5 0 -5 -10 10 5 10 Hours I r m to C Hours from 10 D Hours from to C Hours from 10 Velocity and Acceleration - Charts Velocity and Acceleration - Images Velocity and Acceleration - Charts Velocity and Acceleration - Images PH PIV PH PH PIV § § S § S s D PIV PH s a 0 10 30 0 10 40 20 » 10 20 30 40 50 60 Ground Track Bearing - Images Ground Track Bearing - Charts Ground Track Bearing - im ages PH PH PH Ground Track Bearing - Charts PH PIV PIV 8 8 s 8 ? 0 Interpolated hours from to Interpolated hours from 10 PIV 0 10 20 3 0 40 50 60 40 Interpolated hours from tO A interpolaled hours from 10 A 8 s § s Ü 20 PIV PIV 8 S § 0 10 20 Hours from to C 30 40 0 10 20 Hours from K) D 30 40 0 10 20 30 40 50 60 0 10 20 30 40 50 60 Hours from to Hours from 10 C 0 CaseV Fig. 5.6. G round track m otions (Cases II to IV) based on pressure chart low centres (left column) and image low centres (right column). All distance-based measures were com puted from an equidistant azim uthal model projection, resulting in true ground units (kilometres). - 83 - OIZ January 13, 199? Pmeî A-(Phase I I /t- 7 } OèZ January 13, 1997 Panel B-(Phase I I /t- 2 } 12Z January 13, 1997 Panel C-(Phase III/t* 4 ) 18Z January 13, 1997 Panel D-(Phase III/U lO ) Fig. 5.7. “Contact sheet” indicating development at six hour intervals-January 12, 1997. - 84 - 1st and 2nd Derivatives Pressure Observations i ,i-iezi2 1st an d 2nd Derivatives Pressure Observations AA '2-0Z13 I ■3\6Z29 8 § 1-18Z28 4-12Z29 6 '7-6Z14 T d i s 0 1stDeriv. à 2ndD eriv. 2-0Z29 1stDeriv. A 2ndD eriv. 0 8 20 40 HoursfromK ) A 0 10 20 30 InterpolatedbourefromtO -10 -5 0 5 10 15 20 Hoursfromto A -2 0 2 4 6 8 10 Interpolatedhoursfromto Pressure Observations 1st and 2nd Derivatives P ressure Observations 1st and 2nd Derivatives 8 : s '2-1226 d ■3-18Z6 ■2-12Z8 § s .6-12Z9 1stDeriv. à 2ndD eriv. 0 I 10 20 30 40 50 Hoursfromtt) A InterpolatedhoursfromtO 4-0Z7 0 1 stDeriv. Û2ndDeriv. 8 IN 7-18Z7 0 20 40 60 HoursfromtO A 10 20 30 40 50 interpolatedhoursfromto CaseV Fig. 5.8. Pressure R ecord-Cases II to IV. Pressure centres are from 1000 hP a charts w ith spline interpolation. tO denotes the emergence of th e dry tongue (see C hapter 2 ref.) P lot 2 shows the first and second order tim e derivatives of pressure. 85 - 19Z J a n u a r y 2B, 1997 Panel A-(Phase I I /t- 7 ) OOS January 29, 1997 Panel B-(Phase I I /t- 2 ) Q6Z January 29, 1997 Panel C-(Phase III/t* 4 ) 13Z January 29, 1997 Panel P-(Phase I I I / t * 11) Fig. 5.9. “Contact sheet” indicating development at six hour intervals-January 28, 1997. - 86 - 13:3DZ N o v em b er 7 . 1 9 9 7 P a n el À—( P h a s e IIA—4 .5 ) 1 S Z N o v em ber 7, 1 9 9 7 P a n e l B—( P h a s e Ill/tO) 4 i DOZ N o v em b er 8, 1 9 9 7 P a n e l C—( P h a s e II lA+B) OBZ N o v e m b e r 8, 1 9 9 7 P a n e l D - ( P h a s e IIIA+12) 12Z N w e m b e r 3, 1 9 9 7 P a n el E—( P h a s e IVÀ+1S) l a Z N o v e m b e r 3, 1 9 9 7 P a n e l F—( P h a s e IVÂ+24) Fig. 5.10. “Contact sheet” indicating development at six hour intervals-November 1997. - 87- D2;15Z March G, 1 9 9 8 P a n el A —( P h a s e ibt—B.25) P a n el B—(P h a s e lift—2.5) 1 ^ M arch B, 1 9 9 8 P a n e l C—(P h a s e lll/t+ 3.5) 1 8 :3 0 2 March B, 1 9 9 8 P a n el D —(P h a s e IIlft+10) □ 0 2 M arch 7, 1 9 8 8 P a r e I E—( P h a s e lll/t+ 15.5) DBZ M arch 7. 1 9 9 8 P a n el F—( P h a s e IVft-t-2l .5) OGZ M a r c h G, 1 9 9 8 Fig. 5.11. “C ontact sheet” indicating development at six hour intervals-M arch 6, 1998. - 88- Cyclonic Index Hlgh Cloud Pixel Count PH Pill PIV PH PHI -10 -5 0 PIV O o (0 CO (D 3 (C > (0 0 X Ï 13 C E 3 E E 3 z § 1— T -10 -5 0 5 10 15 20 Hours from tO 5 10 15 20 Hours from tO C ase I Fig. 5.12. High cloud pixels (April 24, 1996, Case I) have an emissive tem perature below 30°C. Cyclonic index is a dimensionless measure indicating the highest cyclone shape m atch in each tim e frame. 89 - Fig. 5.13. Three dimensional view of Cyclonic Index values-A pril 24, 1996, Case I. Index is th e Z-axis. Vertical exaggeration: 2x -90- 0 •0 3 c « S *; I Edge Sharpening PH Pill o CM OOo' 1 8 #### 0 n 0 w -1 0 PIV 'an- ,00 • M ean 0 St-Dev ## 20 10 30 Hours from tO 0 3 C 0 T3 Edge Sharpening PH PIV PHI C 0 0 Image Max. 1 0 § 0 00 -Q 0 W -10 10 20 30 Hours from tO C ase I Fig. 5.14. R esults for 3 x 3 Sobel filter gradient values greater th an 100-April 24, 1996, Case I. - 91 - High Cloud Pixel Count Pll Pill Cyclonic Index PIV Pll PHI I II II I I -5 0 5 10 20 HoursfromK ) PIV -Y ~ r T ~ \~ V -5 0 5 10 20 HoursfromfO High Cloud Pixel Count 1—i— I— I— r -10 -5 0 5 10 HoursfromID High Cloud Pixel Count PIV Pll Cyclonic index PIV 1-- 1-- i---T T—I—I—i—r 0 10 20 30 40 0 10 20 30 40 CaseIV Cyclonic Index PHI -10 -5 0 5 10 HouisfromtO Casein CassI Pll PI! High Cloud Pixel Count Cyclonic Index I 1I i 10 20 30 40 50 ~ n —I—n —r 0 10 20 30 40 Hoursfromto CaseV Fig. 5.15. High cloud pixels (Cases II to IV) have an emissive tem perature below 30° C. Cyclonic index is a dimensionless m easure indicating the highest cyclone shape m atch in each tim e frame. -92- Casëll C#*M C*eW Ga»V Fig. 5.16. Three dimensional view of Cyclonic Index values-Cases II to IV. Index is the Z-axis. Vertical exaggeration for Cases II through V: 13 x , 50x , 3 x and 10x. 93- Edge Sharpening PIV 10 Edge Sharpening Pll PHI PIV J______________ L_ 0□0Qg]-—D'CD-O » Mean n St.Dev *# #####, r r 1 .... 1 1 T.....-T -10 -5 0 5 10 15 20 Hoursfromto 20 Hoursfrom Edge Sharpening Pll 1 5 c o ; Edge Sharpening yr / ^ PIV 1 Pill 1 0 imageM ax. V '- ■| ..... 1 ..... Î ^ ' 1 -10 -5 0 5 CaseI! Pll PHI » Mean 0 S lOev 1 20 Edge Sharpening PIV 2 1 2- 1e Mean 1DSt.Dev 1 2: 20 HoursfromtO Edge Sharpening Pll PHI J L_ PIV 40 HoursfromtO Edge Sharpening 0 imageM ax 0 ImageM ax. 20 Hoursfrom10 1 15 CaseII Edge Sharpening Pll PHI 1 10 40 Hoursfromto CaseV Fig. 5.17. Results for 3 x 3 Sobel filter gradient values greater th a n 100-Cases II to IV. 94- Jet Tilt from N-E Comma Head Length Pll Pill o S 2 Iœ 8Oo) < 0 (0I) 2 g E 0 8 800 0 ■4 •2 0 ■4 Interpolated hours from tO •2 0 Interpolated hours from tO Comma "Bulge" Radius Baroclinie Cloud Width PHI Pll o 8 o o 84 o CO ■10 -8 ■6 •4 •2 0 Interpolated hours from tO 10 -8 ■6 •4 2 0 Interpolated hours from tO C ase! Fig. 5.18. Raw geometric measures (April 24, 1996, Case I), in degrees latitu d e and longitude, except for rotation, which expresses tilt of th e supporting je t axis in degrees of arc. Positive rotatio n represents a counter-clockwise tilt from the E ast-W est axis. -95- Jet Tilt from N-E Rates ? I I 1 < 0 n Comma Head Length Rates 00 8 CM o O 0 2 g 0 CM I s I 0 -10 I I I -8 ■6 ■4 ■2 0 ■2 0 Com ma "Bulge" Radius Rates Baroclinie Cloud Width Rates X X 8 I o Ln E o o 0 ! ■4 Interpolated hours from tO E Ü ■6 Interpolated hours from tO % o V Ü o o T3 I 7 8 I C ase I o -10 -8 ■6 ■4 2 0 Ü Interpolated hours from tO -10 -8 "6 “4 -2 0 Interpolated hours from tO C ase I Fig. 5.19. F irst and second derivatives of geometric measures (solid and dashed lines respectively)“ April 24, 1996, Case I. R otation is in degrees of arc per hour, and per hour per hour. All other measures are in kilometres per hour, and per hour per hour. 96 - Comma Head Length Jet Tiit from N-E Pll 5 Pll § Ôg S g 1s = 8 S .7 _ g _5 4 ^ _2 -1 -7 0 ^ -5 -4 - 3 >2 -1 0 Comma "Bulge" Radius 1 -7 - 6 - 5 -4 - 3 - 2 -1 -2 Baroclinie Cloud Width PHI PI) PHI S s I s S -7 -6 - 5 - 4 0 -4 ; "t 2 -5 Inleqtolated hours from to Comma "Bulge" Radius Pll PHI § 5 -8 0 Interpolated hours from K) Baroclinie Cloud Width Pll - 6 - 4 - 2 -8 Interpolated hours from to Inlapolated hours from JO I i PHI I ■c 8 I Comma Head Length Jet Tilt from N-E PHI trterpolatsd hours from 10 -3 -2 -1 0 -8 Interpolated hours from to Jet Tilt from N-E -4 -2 -8 0 Jet Tilt from N-E Comma Head Length PI! -6 -6 -4 -2 0 Interpolated hours fromtO Comma Head Length PHI PH I 8 Ô 8 S PHI 3 0 S -4 -3 -2 -4 0 Interpolated h o jrs from K) >3 -2 -6 -5 -4 - 3 - 2 - 1 0 Interpolated hours from to Baroclinie Cloud Width Pll -6 PtI 0 Interpolated hours from to •4 -3 -2 -1 Interpolated hours from to C a s e IV -2 -1 Pll 0 PHI I g 8 8 -2 -3 Baroclinie Cloud Width PHI 8 8 -3 -4 ; I -4 -5 Interpolated houte from to Comma "Bulge" Radius PHI j ; § 0 Interpolated hours from to 0 _6 -5 -4 -3 -2 -1 0 -6 -5 -4 -3 -2 -1 0 Interpdated hours from to Interpolated hours from 10 C aseV Fig. 5.20. Raw geometric measures (Cases II to IV), in degrees latitude and longitude, except for rotation, which expresses tilt of the supporting je t axis in degrees of arc. Positive ro tatio n represents a counter-clockwise tilt from the E ast-W est axis. 97 - Jet Tilt fromN-E Rates Conana Head Length Rates Jet Tilt from N-E Rates Comma Head Length Rates § 8 i S -7 ^ _5 -4 _3 -2 -1 0 S 8 -7 -6 -5 -4 -3 -2 -1 0 -8 -2 -2 0 0 tnteipoi^hoursfromto Interpolatedhoursfromto InterpolatedhoursfromtO Comma "Bulge" Radius Rates Baroclinie Cloud Width Rates Comma "Bulge" Radius Rates Baroclinie Cloud Width Rates 8 8 8 oooorx »* 8 8 s -4 ■4 InlerpolayhoursfromtO -7 *6 - 5 -4 - 3 -2 -1 0 a f -7 - 6 -5 - 4 -3 -2 -1 0 ■Caseill 8 -€ -4 -2 - 6 - 4 - 2 0 Int&polatedhoursfromto Interpolatedhoursfromto CaseI! 0 Interpolatedhoursfromto Caseill Corrvna Head Lenghi Rates Jet Tiit from N-E Rates Jet Tilt from N-E Rates Comma Head Lengdi Rates g § 8 S -i -3 -2 ■1 0 8 § 1 -4 -3 -2 interpolatedhoumfromto Comma "Bulge" Radius Rates Baroclinie Cloud Width Rates 8 -6 0 Interpd&edhoursfromto -5 -4 -3 -2 -1 -6 -5 0 4 - 3 -2 -1 0 Interpolatedhoursfromto Interpretedhoursfrrxnto Baroclinie Cloud Width Rates Comma "Bulge" 8 s 8 8 4 -3 -2 0 8 Interpolatedtwursfromto 1 ' CaseW ^ 4 -3 -2 -1-1 0 InterpolatedhoursfromK ) ; : 8 ' - 6 -5 -4 - 3 -2 -1 0 Inferpolaledhairsfromto ? -6 -5 4 - 3 - 2 - 1 0 Intetpolaledhoursfromto CaseIV Fig. 5.21. F irst and second derivatives of geometric m easures (solid and dashed lines respectively)-Cases II to IV. R o tatio n is in degrees of arc per hour, and per hour per hour. All other measures are in kilometres per hour, and per hour per hour. -985.3 S ta tis tic a l R e su lts Raw results presented above suggested some trends in the raw d a ta could be captured quantitatively. Statistics describing trad itio n al and image-based m ethods will be considered in tu rn . Com parisons between variables will be considered for both w ithin case and between case correlations, and where possible, linear regression models will be presented. For between case comparisons, only sam e-variable results will be considered. Analysis of aggregate measures, such as Bergeron num ber will also be shown. Since the num ber of cases in th e study was small, there was a risk of concluding an effect had been found based solely on the consequence of drawing random trials from a small sample. W herever possible, corroborating evidence has been presented from results th a t have a logical tie in to the result being presented, or where the result is expected based on findings in th e literature. It should also be noted th a t the sample of cases was not random ly drawn from the population of all w inter storms: a necessity given the preliminary, and exploratory n atu re of th e work. W hile some results appear strong, it is w orth stressing again th a t the study is prelim inary in nature, and results should be taken as suggestive rath er th a n conclusive. All statistical results are presented in linear regression form at Y = {m ± A m ) A + (6 ± Ab) in Table 5.11. T able 5.11 ; R egression variables a n d coefficients in ord er Y = (to ± A m ) X + (b ± Ab). A m a n d Ab are th e sta n d a rd e rro rs of th e slope and in te rce p t, respectively. R ^ , p a n d degrees of freedom are included. Equ# R esponse Slope S td E rr Slope E x p la n ato ry Intercept S td E rr Intercept 1 C h a rt .B earingl -1.1975 ±0.3371 H ours 5 9 .6 8 1 2 ± 4 .1 0 0 9 2 C h a rt. B earing2 -2.8513 ±0.5599 H ours 3 0 .1 2 6 3 ± 10.5915 P D .F . 0 .7 1 6 2 0.0163 5 0 .8 1 2 1 0.0022 6 3 C h a rt.B e a rin g l -1.3160 ±0.5120 H ours 10.2280 ± 15.9620 0 .6 9 7 3 0 .0 7 8 4 3 4 C h a rt.B ea rin g s 1.6340 ±0.4612 H ours -63.7680 ± 11.1696 0.6765 0 .0 1 2 2 6 5 C h a rt.B e a rin g l 1 .7 9 8 4 ±0.2229 P re ss u re l -1717.0655 ± 2 1 9 .6 2 8 5 0 .9 5 5 9 0.0010 3 6 C h art.B earing2 4.6810 ±1.5300 Pressure2 - 4 5 8 4 .8 5 4 0 ±1494.7510 0.7006 0.0377 4 P re ss u re l - 5 2 7 2 .4 9 9 7 ± 3 1 8 .0 1 6 8 0 .9 9 6 3 0 .0 3 8 6 1 0 .4 3 2 5 0 .1 5 5 8 4 7 C h a rt.B e a rin g l 5 .4 8 0 3 ±0.3325 8 C h a rt.B ea rin g s -2.9260 ±1.6760 P ressu res 2 8 6 9 .5 8 1 0 ±1651.6150 9 P m in 6.1960 ± 1 .8 2 1 0 P IV -P II 825.5110 ± 1 3 .4 5 2 0 0 .7 9 3 6 0.0426 3 10 B24 0.0731 ±0.0204 P IV -P H -0.4551 ± 0 .4 7 7 1 0 .8 6 6 0 0 .0 6 9 4 2 11 P re ssu re l -0.7817 ±0.0810 H ours 9 8 6 .4 6 8 3 ±1.1161 0 .9 3 9 5 7.074e-05 6 12 Pressure2 -0.7528 ±0.0710 H ours 9 8 7 .9 7 2 2 ±1.3091 0.9111 1.152e-05 7 13 P re ss u re l -0.7238 ±0.2212 H ours 9 8 1 .8 7 6 2 ±6.3871 0 .7 2 8 1 0.0307 4 14 P ressu res -0.4269 ±0.1418 H ours 1001.6366 ±4.1078 0.5644 0.0196 7 15 P m ean 0 .8 3 1 9 ±0.1821 P m in 1 7 1 .7 5 7 4 ±177.0841 0 .8 7 4 4 0.0197 3 16 B24 0.0133 ±0.0026 P m e an -11.7535 ± 2 .5 3 5 0 0.9294 0 .0 3 5 9 2 17 P m in 0.2308 ±0.0693 C V m ax 942.7555 ± 9 .6 6 7 6 0 .7 8 7 2 0.0417 3 18 B24 0.0051 ±0.0023 CV m ax 0.7161 ± 0 .2 4 5 1 0.7191 0.1520 2 H ours 6 6 .8 2 3 4 ± 7.7253 0 .4 3 9 9 0.0730 6 0 .3 3 4 2 1 19 C h a rt .Velocity2 -0 .8 8 6 2 ±0.4083 20 C h a rt .VelocityS 7.8100 ±4.5220 H ours 129.8430 ± 2 8 .6 0 2 0 0.7489 21 C hart.V elocityS -1 .2 9 3 3 ± 0.6212 H ours 8 1 .7 9 8 6 ± 1 9 .0 8 3 2 0.1194 0.0825 6 22 Im age. B earing2 -2 .3 9 8 4 ± 0 .9 0 3 7 H ours - 3 .1 3 2 3 ±8.9051 0 .2 9 2 9 0.0167 17 CO CO Table 5.11: Regressions Continued... Equ# R esponse Slope S td E rr Slope E x p la n ato ry In tercep t S td E rr In tercep t R2 P D .F . 23 Im age.B earing4 -2.4997 ±0.3081 H ours 3 3 .9 7 2 2 ± 5 .4 9 5 8 0 .8 2 4 6 1.162e-06 14 24 Im age.H earings -1.7783 ±0.3476 H ours 5 5 .2 7 6 9 ± 8 .2 5 4 9 0 .5 6 6 8 5 .2 6 9 e - 0 5 20 25 Im ag e.B earin g l 2.7219 ±0.3055 P re ss u re l - 2 6 1 6 .8 5 7 1 ±300.1224 0 .9 7 5 4 0.0124 2 26 Im ag e.B earin g l 1.1762 ± 0 .2 1 3 8 Pressure4 -1 1 6 7 .4 9 6 9 ± 2 0 6 .0 1 2 2 0.9098 0.0118 3 27 P m in 0.4565 ±0.0615 Im ag e .B e arin g lll.U m ax 9 2 2 .9 2 4 2 ± 6 .9 3 3 0 0 .9 4 8 3 0.0051 3 0 .9 1 5 8 0.0430 2 28 B24 0.0038 ±8.087e-04 Im ag e .B e arin g lll.IId iff 1 .2 4 9 8 ± 0.0317 29 B 24 0.0086 ±0.0022 Im ag e .B e arin g lll.U m ax 0 .4 2 9 4 ± 0 .2 1 9 7 0.8792 0.0623 2 30 Im age.V elocity2 -3.2080 ±1.1750 H ours 98.6370 ± 1 1 .5 7 6 0 0.3049 0.0142 17 31 Im age.V elocityS -2 .5 5 2 6 ±0.4437 H ours 1 2 2 .3 0 1 4 ±10.5371 0 .6 2 3 3 1.251e-05 20 32 Im age.V eIocity2 7.0690 ±0.9990 Pressure2 -6865.3390 ±978.5950 0.9435 0.0058 3 ± 4 4 3 8 .3 6 1 0 0.7677 0 .1 2 3 8 2 33 Im age.V elocityS 11.4380 ± 4 .4 4 9 0 P re ssu res -11323.6710 34 Im age.V elocityS 5.5094 ± 0.9317 P re ssu res - 5 4 0 2 .6 8 0 8 ± 9 2 4 .6 6 0 6 0 .8 5 3 5 0.0010 6 35 B24 0.0075 ±0.0012 Im age. V e lo city lll.IIm ea n 0 .4 3 3 4 ±0.1394 0 .9 4 7 2 0.0267 2 36 H e ad .L en g th l 6 4 .5 9 7 0 ±3.3600 H ours 993.1700 ±8.9680 0.9788 5.553e-08 8 37 H ead.L engthS 31.0320 ±6.1440 H ours 6 8 8 .3 4 5 0 ±22.4310 0 .6 9 8 7 3.717e-04 11 38 C o m m a.B u lg el 11.3710 ± 2 .9 7 9 0 H ours 4 9 8 .7 1 2 0 ± 1 7 .6 2 4 0 0 .6 1 8 2 0.0041 9 39 C om m a.B ulge4 36.8700 ±1.9400 H ours 450.3040 ± 5 .1 7 8 0 0 .9 7 8 3 6.0740-08 8 40 G om m a. B ulges 36.9180 ± 2 .4 4 8 0 H ours 4 4 5 .5 6 4 0 ±8.9350 0 .9 5 3 9 1.075e-08 11 41 J e t.T iltl 1.1820 ±0.1099 H ours 4 4 .9 7 7 2 ±0.6504 0 .9 2 7 8 1.953e-06 9 ± 0 .2 4 6 7 H ours 1 0 5 .7 4 1 8 ±1.0148 0.7750 1.488e-05 13 ± 1 .9 5 4 2 0.4488 0 .0 3 4 1 8 8 42 Je t.T ilt2 1 .6 5 1 3 43 J e t-T ilts 0.9049 ± 0.3546 H ours 71.7283 44 J e t .T il t l 1.1683 ±0.0691 H ours 108.1334 ±0.1844 0 .9 7 2 8 1.515e-07 45 J e t.T ilts 2 .7 5 3 6 ± 0 .4 1 5 1 H ours 1 0 4 .3 8 6 9 ± 1 .5 1 5 3 0.8000 3.690e-05 11 7.321e-04 9 0 .2 5 3 4 2 46 B aroclinie. W id th l 4 .6 0 8 3 ±0.9204 H ours 1 2 2 .8 5 0 2 ± 5 .4 4 5 2 0.7358 47 B aroclinie. W id th s 17.2100 ±10.8500 H ours 217.8800 ±21.1800 0.5574 O O Table 5.11: Regressions Continued... Equ# R esponse Slope S td E rr Slope E x p la n ato ry In tercep t S td E rr Intercept R2 P D .F . 48 B aroclinie. W id th s -60.8500 ± 14.2100 H ours 1 4 .8 8 0 0 ± 5 1 .8 8 0 0 0.6250 0.0013 11 49 P m in - 0 .4 0 9 8 ±0.1225 B aroclinie. W id th lll.IIm in 1007.3161 ± 1 2 .2 2 7 9 0 .8 4 8 3 0.0790 2 50 B24 0.0377 ±0.0108 J e t.T iltlll.IId iff 0 .8 3 1 3 ± 0 .1 2 7 7 0 .8 5 9 8 0 .0 7 2 8 2 51 H igh.C loud2 -2133.4000 ±665.2000 P ressure2 2131724.0000 ±651674.8000 0.7742 0.0491 3 52 H igh.C loud4 622.3500 ± 94.5400 P ressure4 - 5 6 7 5 8 6 .7 7 0 0 ± 91084.1800 0.9353 0.0071 3 53 C yclonic.Index2 -71.6000 ± 3 2 .2 8 0 0 P ressure2 70389.0000 ± 3 1 6 2 2 .4 8 0 0 0 .6 2 1 2 0.1133 3 54 E dge.M ean2 0 .3 8 2 6 ± 0.0496 H ours 67.8700 ± 0.7177 0.4665 7 .3 4 8 e-ll 68 55 Edge.M eanS -0 .8 4 3 0 ±0.0996 H ours 59.9231 ± 0.6307 0.7902 7.234e-08 19 56 E dge.M ean4 0.2737 ±0.0213 H ours 4 6 .2 9 7 6 ±0.4936 0.6416 0.000e±00 92 57 E dge.StD evS -0.9017 ±0.1406 H ours 136.2496 ± 0 .8 8 9 8 0 .6 8 4 1 3.771e-06 19 58 E dge.StD ev4 0.3912 ± 0 .0 3 1 3 H ours 1 1 8 .8 2 2 6 ±0.7248 0 .6 2 9 1 0.000e±00 92 59 E dge.M ean2 -1.5005 ± 0 .2 6 7 3 P ressure2 1542.9573 ±261.8734 0 .9 1 3 1 0 .0 1 1 2 3 60 P m in -0.1775 ± 0 .0 5 5 8 E dge.M axIII.IIdiff 9 7 4 .6 3 9 3 ± 3.8216 0 .7 7 1 4 0.0500 3 61 C o m m a.B u lg el 4.9135 ±0.7265 E d g e.M e an l 113.1530 ± 4 8 .0 3 9 7 0 .8 6 7 3 2 .6 1 8 e - 0 4 7 11 62 C om m a.B ulge2 12.5350 ±2.8050 E dge.M ean2 -338.1400 ±187.7720 0.6448 9.494e-04 63 C om m a.B ulgeS 24.3320 ±7.4520 E dge.M eanS -9 2 9 .4 1 0 0 ±486.5530 0.6399 0.0171 6 64 C om m a.B ulge4 -85.1400 ± 28.5100 E dge.M ean4 4269.7900 ±1307.6900 0.5979 0 .0 2 4 4 6 65 C om m a.B ulgeS 3 7 .5 2 2 0 ±6.7550 Edge.M eanS -1656.6460 ± 3 5 8 .6 6 4 0 0.7742 3.543e-04 9 66 J e t.T iltl 0 .3 3 8 5 ± 0 .0 6 2 2 E d g e.M ean l 17.0418 ±4.1130 0 .8 0 8 8 9 .6 3 7 e - 0 4 7 67 J e t.T ilts -1.8589 ±0.1735 E dge.M eanS 1 8 8 .1 8 4 2 ± 1 1 .3 3 0 7 0.9503 3.909e-05 6 68 Je t.T ilt4 -2.6630 ±1.0390 E dge.M ean4 2 2 7 .6 1 7 0 ± 4 7 .6 3 9 0 0 .5 2 2 9 0.0427 6 69 J e t.T ilts 3.0145 ±0.6816 E dge.M eanS - 6 3 .4 1 4 3 ± 36.1883 0 .6 8 4 9 0.0017 9 70 C o m m a.B u lg el 11.6740 ±2.9330 J e t .T il t l - 2 2 .7 4 4 0 ± 115.4610 0 .6 9 3 6 0.0053 7 71 C om m a.B ulgeS -12.1620 ±4.2140 J e t.T ilts 1471.7880 ± 2 8 2 .2 7 8 0 0 .6 8 1 3 0.0278 6 72 C om m a. Bulge4 2 8 .9 3 3 0 ±3.0770 Je t.T ilt4 - 2 6 8 6 .6 2 4 0 ± 3 2 4 .4 4 3 0 0 .9 3 6 5 8 .2 1 2 e - 0 5 6 Table 5.11; Regressions Continued... Equ# R esponse Slope S td E rr Slope E x p la n ato ry In tercep t S td E rr In tercep t m P D .F . 73 C om m a.B ulgeS 1 0 .7 8 2 0 ±1.5210 J e t .T ilts - 7 0 6 .4 6 4 0 ±147.1090 0 .8 4 8 1 5.734e-05 9 ± 0.0016 H ig h .C lo u d l 113.7940 ± 2 3 .7 6 1 0 0 .1 7 8 5 0.0715 17 74 E d g e.M e an l -0.0031 75 E dge.M ean2 5.950e-04 ±4.022e-05 H igh.C loud2 47.4000 ± 1 .6 9 4 0 0 .7 6 8 3 O.OOOe+00 66 76 E dge.M eanS 0.0010 ± 2 .2 2 1 e - 0 4 H igh.C louds 22.8900 ± 7.8670 0 .5 6 6 9 1 .9 8 9 e - 0 4 17 77 E dge.M ean4 -4.435e-04 ±7.301e-05 H ig h .C lo u d l 65.7900 ± 2.3950 0.2907 2.934e-08 90 78 E d g e.M e an l 0.0065 ±9.962e-04 C y clonic.Indexl 54.4300 ± 2 .4 6 3 0 0.7137 5.342e-06 17 79 E dge.M eanS 0 .3 8 9 4 ± 0.0894 Cyclonic. IndexS 40.8691 ±4.4401 0.5276 4.285e-04 17 O to - 1035.3.1 T ra d itio n a l M e th o d s T raditional meteorological predictive m ethods are prim arily based on tracking changes in surface and m i d - l e v e l variables. This m ostly consists of charting d eter­ ministic variables such as pressure, tem perature, vorticity etc. on 1000, 500 h P a and other upper-level charts. Pressure is the prim ary physical variable as m easured from the low center on surface charts. Since pressure falls are th e trad itio n al b a­ sis for qualifying cyclones as Bombs, pressure is the fundam ental physical m easure. Thus, correlations to Pressure, and its tim e-based derivative, Bergeron Value, were of particular interest. G eograp h ic D e p e n d e n c y : The geographic measures presented here relate to the gro u n d -track of each system. C hart bearing is measured in degrees clockwise from north. M eridional systems will have an absolute bearing value close to zero, or a negative bearing if the system has tilted west of north. • Observation Level Analysis: C hart Bearing was strongly correlated w ith tim e for Cases I, II, IV and V: Table 5.11 equations 1-4; and Figures 5.4 and 5.6. (The negative correlation for Case V appears to be unusual.) Further, C hart Bearing correlates w ith Pressure over th e length of Cases I, II, IV and V: Table 5.11 equations 5-7; Figure 5.22, and Table 5.11 equation 8 (same figure), which is not particularly significant, bu t worth investigation w ith a larger sample of cases. (Once again, Case V shows a negative correlation.) There were not sufficient overlapping observation points to provide results for Case III. L en g th o f D e v elo p m e n t: * Case Level Analysis: The length of tim e between the Phase II and Phase IV interval proved to be a good predictor of b oth the lowest pressure and the 24 hour Bergeron value. Phase IV-II - 104 length predicts m inim um pressure: Table 5.11 equation 9; Figure 5.23/1. Furtherm ore, it predicts Bergeron Value: Table 5.11 equation 10; Figure 5.235. (Since case level models are based on five storm s, th e m axim um degrees of freedom is three-one for the model, one for the error term , and three for th e regression. Some cases had missing values, leading to fewer degrees of freedom.) S tr e n g th o f D e v elo p m e n t: • Observation Level Analysis: Pressure correlates with tim e for Cases I, II, IV and V. Case III had only four ob­ servation points, so the lack of correlation for this case is perhaps not significant: Table 5.11 equations 11-14; tim e plots in Figures 5.2 and 5.8. • Case Level Analysis: C ertain strong correlations on Pressure and Bergeron Index were found. As might be expected, th e overall Mean Pressure is related to M inimum Pressure: Table 5.11 equation 15; Figure 5.23(7. Of more interest is th a t Mean Pressure predicts the 24 hour Bergeron Value: Table 5.11 equation 16; Figure 5.235. G rou n d Speed: • Case Level Analysis: M axim um C hart Velocity relates to b o th M inim um Pressure and Bergeron Value with: Table 5.11 equations 17 and 18; Figures 5.24A and 5 . W hile the p value for correlation w ith Bergeron Value is not clearly statistically significant, the suggested relationship is of interest for investigation w ith a larger sample of storms. • Observation Level Analysis: There is a notable tim e dependency for C h art Velocity in Cases II, III and V. Re­ gression results yield: Table 5.11 equation 19, and 20, which are strong bu t not particularly significant, and Table 5.11 equation 21; tim e plots in Figure 5.6. Results were not significant for the other two cases. W hile there is generally a slight drop in C hart Velocity over tim e, the variable is not linear over time. - 105 5.3.2 Im age—B a se d M e th o d s G eograp h ic D e p e n d e n c y : ® Observation Level Analysis: Image Bearing shows a strong tim e dependency for Cases II, IV and V. Regression results yield: Table 5.11 equations 22-24; tim e plots in Figure 5.6. There is a large outlier of -103.4 at t+ 1 for Case I which renders the regression non-significant. W ith ­ out this outlier, the trend is negative w ith = 0.1915, p = 0.0609 on 17 degrees of freedom. Image Bearing also predicts Pressure for Cases I and IV: Table 5.11 equa­ tions 25-26; Figure 5.24C-D. R esults were weak or non-significant for the other three cases. • Phase I I to Phase I I I Case Level Analysis: A strong correlation was found between the m axim um Image Bearing value over the Phase II to Phase III interval and m inim um pressure for th e entire case: Table 5.11 equation 27; Figure 5.25A. Furtherm ore, a strong correlation was found between the difference between the Phase III and Phase II Image Bearing values and the 24 hour Bergeron value: Table 5.11 equation 28; Figure 5.255. A slightly weaker relationship was found between the m axim um Phase II to Phase III Image Bearing value and 24 hour Bergeron value: Table 5.11 equation 29; Figure 5.25C. G rou n d Speed: ® Observation Level Analysis: A dependency to hourly tim e index is shown for Cases II and V for Image Velocity: Table 5.11 equations 30-31; tim e plots in Figure 5.6. No strong correlation is evident for the other three cases. Image Velocity is also related to Pressure for Cases II, III and V: Table 5.11 equations 32-34; Figures 5.255 and 5.26A -5. The p value for Case III is not small, but w orth consideration in this context. Results for Cases I - 106 and IV were not significant, although Case IV did have a large Revalue (0.5377 w ith p=0.2667). For all these relations, Image Velocity shows some system atic trends but is generally non-linear. For example, Image Velocity seems to generally vary directly w ith pressure, although the exact relationship is too com plex to be predicted from a linear regression. • Phase I I to Phase I I I Case Level Analysis: The mean Image Velocity over the Phase II to Phase III interval correlated very strongly with the 24 hour Bergeron Value: Table 5.11 equation 35; Figure 5.26(7. E x p a n sio n o f C o m m a —H ead: • Observation Level Analysis: Comma Head Length shows strong correlation to the hourly tim e index for Cases IV and V: Table 5.11 equations 36-37; tim e plots in Figure 5.20. Results are weak for the other three cases. Com m a Bulge Radius also shows strong tim e dependence for cases I, IV and V: Table 5.11 equations 38-40; tim e plots in Figures 5.18 and 5.20. Results for the other two cases were not statistically significant. C h an ge in J e t A xis: • Observation Level Analysis: Changes in the vector tracking of Je t features show significant tim e correlations. All five cases show strong relationships between tim e and Jet T ilt: Table 5.11 equations 41-45; tim e plots in Figures 5.18 and 5.20. The weaker results for Case III may be significant since this case likely did not develop explosively. A lthough these results are very promising, it should be noted th a t Jet T ilt is not always a strictly linear relationship. W hile Baroclinie W idth seemed difficult to m easure consistently, there were some tim e correlations on this variable. Case I had the strongest dependency: Table 5.11 - 107equation 46; tim e plot in Figure 5.18. T he variable was first defined based on this te st case, for which it could be readily identified. Case III shows a dependency as well: Table 5.11 equation 47; tim e plot in Figure 5.20, which is not particularly statistically significant. Case V shows a fairly strong relationship: Table 5.11 equation 48 (same figure), however, as can be seen from the plot versus tim e, th e feature selected as representative of the Baroclinie W idth switched part-way through the analysis; th a t is to say, the two features tracked may have been physically related, b u t were not th e same feature. Results for the other two cases were weak. • Phase I I to Phase II I Case Level Analysis: Given the difficulties in m easuring Baroclinie W idth consistently, a surprisingly strong correlation was found between the m inim um Baroclinie W idth over this interval and th e m inim um case Pressure: Table 5.11 equation 49; Figure 5.26D. A very sim ilar correlation was found between the Phase III and Phase II Je t T ilt difference and 24 hour Bergeron value: Table 5.11 equation 50; Figure 5.26A. A m o u n t o f H ig h C loud: • Observation Level Analysis: Correlations for High Cloud count versus tim e were all fairly strong, b u t none of them were statistically significant. High Cloud is clearly a non-linear feature over tim e (Figures 5.12, 5.15), so observation level regression analysis of tim e correlations is not appropriate for this variable. Some significant correlations were found between High Cloud and Pressure. Results for Cases II and IV yield: Table 5.11 equations 5152; Figure 5.27R-G. Results for Cases I, HI and V were not significant. Cyclonic Index (based on High Cloud values) shows a correlation w ith Pressure for Case II: Table 5.11 equation 53; Figure 5.271). R esults for the rem aining cases were m oderately to fairly strong, but not statistically significant. S h a rp en in g E dges: - 108 » Observation Level Analysis: As seen in C hapter 5 (Figures 5.14 and 5.17), Edge Sharpening variables (mean, stan d ard deviation and m axim um ) are not entirely linear over tim e; however, there is significant linear tim e correlation for Cases II, III and IV. Regression results versus Edge Mean values for Cases II through IV yield: Table 5.11 equations 54-56; Fig­ ure 5.17. The plot becomes no n-linear due to a large drop in values after t-720 hours. Correlations w ith Cases I and V were fairly large b u t not statistically significant. Sim ilar results were found for stan d ard deviations for Cases III and IV: Table 5.11 equations 57-58; same figure. The shape of the stan d ard deviation curves closely follow those of the mean. Pressure also predicts of Mean Edge S trength for Case II: Table 5.11 equation 59; Figure 5.28A. Results for the other cases were not of interest. • Phase I I to Phase I I I Case Level Analysis: A good correlation was found between th e difference between th e Phase III and Phase II values of M axim um Edge and m inim um case pressure: Table 5.11 equa­ tion 60; Figure 5.28R. O th er C orrelation s: Correlations between variables other th an tim e, Pressure and Bergeron Value are also occasionally of interest, especially when unexpected or where the two variables are derived from independent m ethods. * Observation Level Analysis: An interesting correlation was observed between Mean Edge S trength and Comma Bulge Radius. These two variables are independently generated; generation of the edge strength variables is also entirely autom ated. Results for all five Cases yield: Table 5.11 equations 61-65; Figures 5.28C-D and 5.29A-C. Mean Edge Strength also predicts Jet T ilt for all but Case II, which was weak and not statistically significant: Table 5.11 equations 66-69; Figures 5.29D and 5.30A-C. - 109 As would be expected, Jet T ilt also predicts Com m a Bulge (since T ilt and M ean Edge are correlated): Table 5.11 equations 70-73; Figures 5.30D and 5.31A-C. A similar p attern was found for High Cloud counts predicting M ean Edge S trength for all but Case V: Table 5.11 equations 74-77; Figures 5.31D and 5.32A-C. Finally, Cyclonic Index is correlated w ith Mean Edge Strength for Cases I and III: Table 5.11 equations 78-79; Figures 5.32D and 5.33. Clearly, M ean Edge S trength is a highly im portant m easure for prediction. 110 O ' Pressurez Pressure4 Fig. 5.22. Regression plots for equations 5, 6, 7 and 8 (panels A, B, C and D) - Ill - g i R § 23 22 24 25 26 22 23 24 PIV-PH PJV-Pli A B 25 26 i i i i R i 960 970 980 C 990 D Fig. 5.23. Regression plots for equations 9, 10, 15 and 16 (panels A, B, C and D) - 112 - s Ê i S 100 150 CVmax 200 CVmax A Pressure4 Fig. 5.24. Regression plots for equations 17, 18, 25 and 26 (panels A, B, C and D) 113 100 120 -40 -2 0 0 20 Image.Bearinglll.Ilmax Image.Bearingfll.lldiff A B 90 40 60 100 Image.Bearinglli.Umax Pressure2 c D Fig. 5.25. Regression plots for equations 27, 28, 29 and 32 (panels A, B, C and D) - 114 - ° y X X' o a% ■§ 1 o1 y x" X -' o s- x" ■' y x " T" T" 996 997 O Pressures Pressures A B $ g i 100 110 120 80 90 100 110 image.Velocitylll.llmean BarocIinic.W idthlll.Ilmin c D 120 130 Fig. 5.26. Regression plots for equations 33, 34, 35 and 49 (panels A, B, C and D) 115 - o o / / y' /' /' / S o S' X \ o 1% % a ■s 8 ^ I' ° §o — 0 o' T“ 10 955 960 978 12 980 Jet.Tittlll.lldiff Pressure2 A B 965 970 Pressure4 C D Fig. 5.27. Regression plots for equations 50, 51, 52 and 53 (panels A, B, C and D) -116- I s -50 50 0 Pressures Edge.MaxiH.ltdrff A B ? i I 1 5 I 3 § § I 65 Edge.Meani 66 67 68 69 Edge.MeanS D Fig. 5.28. Regression plots for equations 59, 60, 61 and 62 (panels A, B, C and D) 117 o o O 1 - ° x " X y ' ■ " 'X m O S - f 03 ” E o ° 'x 1 I - S _ N 0 ° ~ r T 64 65 45.4 45.6 45.8 46.0 Edge.MeanS Edge.Mean4 A B Edge.MeanS Edge.Meani Fig. 5.29. Regression plots for equations 63, 64, 65 and 66 (panels A, B, C and D) - 118 S S g @ s S s 8 62 63 64 65 66 67 45.4 45.6 45.8 46.0 Edge.MeanS Edge.Mean4 A B Edge.MeanS Jet.Tütl 46.2 46.4 Fig. 5.30. Regression plots for equations 67, 68, 69 and 70 (panels A, B, C and D) -119 g I I 62 64 68 66 70 72 Jet,Tilt4 Jet.TiltS A 14000 JetTilfS 15000 16000 High.CloudI c Fig. 5.31. Regression plots for equations 71, 72, 73 and 74 (panels A, B, C and D) -1 2 0 S °° “ I- - - - - - - - - - - - - - - - r 30000 35000 40000 45000 50000 55000 30000 40000 35000 High,Cioud2 High.Clouds A B § o o<*o O'-O^ , s 30000 35000 500 1000 1500 2000 High.Cioud4 Cyclonic.IndexI c D 2500 3000 3500 Fig. 5.32. Regression plots for equations 75, 76, 77 and 78 (panels A, B, C and D) -121- s CO c s Î § s iS 35 40 45 50 55 60 Cyclonic.IndexS Fig. 5.33. Regression plot for equation 79 65 122 - 6. D ISC U SSIO N 6.1 In tr o d u ctio n Several findings in C hapter 5 show promise for application to th e problem s of detecting and predicting explosive cyclones. The two significant sources of d a ta were those derived from m ean sea-surface level charts, and from GOES-9 image sequences. In this section, the results are interpreted and classified by the m ethods th a t generated them . First, results th a t could be derived from either chart or image sources are presented. Next, those th a t could only be derived from charts alone are discussed. Finally, results th a t were derived from image inform ation solely are considered. As in C hapter 5, reference to the Phase model presented in C hapter 2 helps guide the discussion. 6.2 M e th o d s A p p lica b le to b o th C h a rt an d Im a g e D a ta G eograp h ic D e p e n d e n c y : For both C hart and Image based results. Bearing is directly proportional with P res­ sure. Bearing was recorded in degrees E ast of N orth, w ith negative values for Bearings W est of N orth. In this context, the system tends more westward as Pressure drops. Sanders [38] found th a t strong cyclonic cases tend to be more m eridional (follow a more n o rth -so u th line), which may support the notion of system s turning westward as they deepen. Since b o th Bearing m etrics and Pressure were found to vary inversely w ith time, it is not unexpected th a t the Bearing m etrics vary directly with Pressure. It is im portant to note th a t Pressure is not really a linear variable; rather, Pressure generally falls over the intervals being investigated-values were not included for much tim e after the point of lowest Pressure, so the subsequent rise in values following the decay of the system is not expressed in these regressions. Since th e correlation to - 123 tim e is th e more relevant in this case, it m ight be b e tte r to state th a t the system s tend more westward over time. Correlations to Pressure are stronger for variables derived from ch art-b ased ob­ servations than those based on im age observations. As could be seen in th e plots of Bearing versus tim e (C hapter 5), there is a great deal more variability in the Im ag ebased observations th a n those from th e charts. Almost certainly, the fact th a t ch art observations occur at six hour intervals accounts for the discrepancy. Sm oothing of Image Velocity observations (Figures 5.4 and 5.6) made these plots more sim ilar to their chart-based counterparts, and sm oothing of the regression d a ta would very likely increase the strength of im age-based regressions. Similarly, results of Bearing versus tim e are generally stronger for ch art-b ased observations. Image observations can be more precisely located th an chart observations, since fairly precise guidance is provided from the grid m ethod relative to the fairly coarse level isobars of th e chart pressure field. Predictive relationships were found based on the Phase II to Phase III interval. Phase tim es are estim ated from the imagery. W hile similar inform ation could also be derived from the pressure values (see the com parison of Phase models in C h ap ter 2), there would be little reason to do so, since th e im age-based m ethod is so easy to implement. The m axim um value of Im age Bearing over th e interval predicts b o th the m inim um pressure value over the entire case and the 24 hour Bergeron value. The Image Bearing difference over this interval (the value a t Phase III minus th e value at Phase II) also predicts the 24 hour Bergeron value. Since the Phase II to Phase III interval also represents the length of the explosive deepening stage ([37], [31]), and the standard definition of Explosive Cyclogenesis incorporates th e notion of rapid development ([39]), it is not surprising th a t th e change in variables over this interval was found to be significant. If these predictive relationships hold for a larger sample of cases, they would be extrem ely useful. For the cases presented here, the s ta rt of Phase III was on average 22 hours prior to the tim e a t which th e deepest pressure was recorded (28 hours if the no n -rap id deepening Case III is om itted). Such a lead­ - 124 tim e perm its for prediction, which would be very useful for m arine interests and may greatly reduce the hazard associated w ith rapidly deepening systems. G round Speed: At the case level of analysis, there is a quite strong direct correlation between m ini­ mum Pressure and the m axim um C h art Velocity. The notion th a t systems w ith higher m aximum velocity had higher m inim um pressures (they were weaker) is counter­ intuitive, and seems to contradict th e climatological findings th a t explosive systems move faster [38]. A lthough not statistically significant {R^ = 0.5176,p = 0.1707) the m inim um case Pressure also directly varies w ith m axim um Image Velocity over the Phase II to Phase III interval. A similar result finds m inim um Pressure directly varying w ith mean Image Velocity over this period {R^ = 0.5794,p = 0.135), and case level results s h o w Im age Velocity varying directly w ith Pressure, all of which suggests the unexpected effect may be real, and is definitely w orth fu rth er investigation. A more expected, related finding is th a t the 24 hour Bergeron value directly cor­ relates with the m axim um C hart Velocity. This result is supported by a particularly strong direct correlation between 24 hour Bergeron value and m ean Image Velocity over the Phase II to Phase III interval. These results suggests th a t systems th a t are faster are also more intense (have a higher rate of deepening). Since climatological studies have found th a t Bombs travel faster th an other cyclones ([38]), it is perhaps not surprising th a t there is a linkage between m axim um speed and storm intensity. The Phase II to Phase III result is particularly significant because of its potential application for prediction. At the observation level, both C hart and Image Velocity vary inversely w ith time, indicating th a t generally systems seem to slow over tim e. These variables are not linear, and so the relationship should be viewed as expressing an average behaviour for the system only. From the tim e plots in C hapter 5, it can be seen th a t decreasing velocity over tim e appears to be a more consistent tren d after about t+ 1 0 hours. L en g th o f D e v elo p m e n t: - 125 An interesting relationship was found between both m inim um Pressure and 24 hour Bergeron value versus the length of the interval between Phases II and IV. Since the Pressure and Bergeron values are derived from C hart inform ation and th e Phase estim ates come from imagery, these relationships are not so much applicable to either C hart or Image d ata, b u t rath er dependent on both. B oth relationships are direct with this tim e interval. Since Phase II is th e beginning and Phase IV the end of the deepening stage, the im plication is th a t a long deepening period leads to intense (large Bergeron value) b u t weak (high m inim um Pressure) systems. Inversely, a short deepening period relates to a strong (deep) low, b u t a low rate of deepening (small Bergeron value). A short interval m ight be expected to result in a deep low, since explosive events develop quickly; however, how this condition can be satisfied by a system w ith a low ra te of pressure fall is not im m ediately obvious. Results for the 12 and 6 hour Bergeron value were b o th negative relationships, although b o th were very weak based on the available sample. It is possible th a t a high rate of deepening occurs over a shorter th a n 24 hour interval for strong systems, suggesting th a t th e 24 hour stan d ard (part of the “official” definition of a Rapid Deepener-cf. [39]) may not be appropriate. The entire mean length of th e Phase II to Phase IV intervals was only 23.74 hours, and in C hapter 5 it was found th a t shorter interval Bergeron values consistently overestim ate the 24 hour interval value. If the entire deepening period is only 24 hours, it is obvious th a t th e most intense interval of deepening will be less th an 24 hours. In any case, it appears th a t th e Phase II to Phase IV interval length is a very descriptive measure and m ay be as significant to report as th e m inim um Pressure or Bergeron value when characterising a particular system. 6.3 M e th o d s A p p lica b le to C h a rt D a ta O n ly S tr e n g th o f D ev elo p m en t: Two relationships were found at the case level th a t are w orthy of note: mean pressure over th e entire case varies directly w ith the m inim um case pressure, and th e 24 hour Bergeron value varies directly w ith th e m ean pressure. The first relationship is not - 126 unexpected, since the m inim um value is one of the observations comprising th e mean, and pressure tends to be a sm ooth field. Hence, m inim um pressure will generally not be an isolated value (an outlier), b u t will anchor one extrem e of the range of the variable (See pressure plots versus tim e in C hapter 5). W hether a large mean pressure would be expected to result in an intense storm is less clear. It is possible th a t as w ith the Length of Development findings (above), the 24 hour Bergeron value is estim ated on too long a tim e interval, and hence does not reflect the expected relationship. 6 .4 M eth o d s A p p lic a b le to Im a g e D a ta O n ly E x p a n sio n o f C o m m a -H ea d : Both measures of com m a head expansion varied directly w ith time: C om m a-H ead Length showed strong correlations w ith tim e for Cases IV and V. Case IV in particular had a very strong correlation, and was clearly linear from the tim e plot. Case V was also linear. This is not clearly tru e for Cases I and II, b u t does appear to be for Case HI, even though its results were non-significant. Sim ilar comments apply to Comma Bulge Radius, with only Cases IV and V being clearly linear. Case I, which also returned statistically significant results, appears to increase linearly after t-7 hours. These results im ply th a t generally, Com m a Head size expands over tim e on both measures. The results are expected. Works such as W eldon’s ([46]) indicate th a t expansion of the Comma Head is characteristic of developm ent over tim e. C h an ge in J e t A xis: Jet tilt was very linear over tim e for all bu t Case HI. Strong correlations were found for all five cases. Case HI had a significant, bu t notably weaker value. All five cases generally ro tated at a fairly constant rate of approxim ately 1.5 deg/hr; which agrees with the notion th a t a building and increasingly tiltin g trough is typical of cyclonic development (cf. [27]). It would be interesting to see if deviations from this trend correspond to specific physical occurrences for cases w ith less linear tim e plots. Baroclinie w idth also had significant correlations with tim e for Cases I, HI, and V; - 127however, as noted earlier, the feature could only be reliably identified for Case I. The feature could only be identified from t-4 for Case III, and th e feature th a t was being tracked switched between t-4 .5 and t-4 for Case IV. B oth m etrics showed strong correlations to Phase II to Phase III interval val­ ues. M inimum Pressure varies inversely w ith the minim um Baroclinie W idth across this interval, suggesting a deeper storm for a greater m inim um width; however, as m entioned above, Baroclinie W idth is a m etric of doubtful reproducibility in general. The 24 hour Bergeron value varies directly w ith the last minus first Jet T ilt obser­ vation across the interval, suggesting a greater range of tilt leads to a more intense system. This finding is not unexpected, since Bombs become more m eridional as the supporting jet stru ctu re amplifies (jet tilt to th e West increases). P u t another way, more meridional system s tend to be stronger. The relationship m ay have uses as a predictive function. A m o u n t o f H ig h C loud: At the observation level, two correlations of note were found between High Cloud count and Pressure for Cases II and IV. The relationship was inverse for Case II and direct for Case IV. As noted previously, High Cloud is not a linear relationship over tim e; however. Pressure over the recorded interval is a fairly linear relationship, bringing into question the applicability of linear regression for capturing trends in High Cloud count. By contrast, the plots generated for this relationship do appear linear (Figures 6.6B and C). Cyclonic Index also correlated to Pressure for Case II. The relationship was inverse, indicating lower pressure for a higher Cyclonic Index, which would make sense since Cyclonic Index was derived to retu rn a high value for a m ature system. The plot for this figure, however, is not particularly linear, and results for the other cases were not statistically significant. The utility of the measure m ay be worth further investigation with a larger sample of cases. S h a rp en in g E dges: - 128 A t th e observation level, none of th e relationships are strictly linear for Edge Sharp­ ening versus tim e (Figures 5.14 and 5.17. Cases III and IV are the most linear, and also have the strongest f t values; however, neither of them has the same sign (their slopes are opposite). A lthough some tim e trend appears to be discernible, it is clearly non-linear. Sim ilar comments describe the findings for Mean Edge Sharpening for Cases III and IV. The m ost prom ising findings for Edge Sharpening m etrics involve correlations w ith Pressure measures. At th e observation level, th e Pressure for Case II showed a strong inverse linear relationship with M ean Edge Sharpening, yielding a believable result: lower pressure values correspond w ith stronger edge returns; sh arp ­ ening cloud edges were found by PW C staff to be indicative of developm ent [27]. The result leads nicely to an encouraging finding over th e Phase II to Phase III interval: th e difference between m axim um Edge Sharpening values over the interval predicts the minimum Pressure for the case. This is also an inverse relationship, interpreted to m ean th a t when the strongest Phase III Edge Sharpening value greatly exceeds th a t of Phase II, the system is strong. If corroborated w ith a larger sample, this relationship would be very significant for early warning. 6 .5 O th er S ign ifican t Im a g e—b a se d R e su lts An interesting observation level relationship paired M ean Edge Strength and Com m a Bulge Radius. R esults were significant for all five cases, and varied directly for all but Case IV. If a positive relationship is found to be typical, it would suggest th a t Edge Strength increases across th e image as the Com m a Bulge expands. An­ other related result found th a t Mean Edge Strength also predicts Jet T ilt for all bu t Case II; however, two results were inversely and two directly related. It m ight seem more intuitive to expect Jet T ilt to increase as the system deepens, and generally be­ comes more meridional, as suggested above. This suggestion is supported by a direct correlation between Jet T ilt and Com m a Bulge. Some significant correlations were also found w ith mean Edge Strength predicting Jet T ilt, b u t for th e four significant cases, two had a direct and two an inverse relationship (Figures 6.8D and 6.9A, R, and C). A potentially useful finding was th a t Cyclonic Index predicted mean Edge - 129 Strength for Cases I and III, w ith fairly linear regression plots (Figure 6.11D and Figure 6.12). 6.6 C o n clu sio n s The statistical treatm en t of raw values in C hapter 5 yielded several interesting and potentially useful results. Some results help shape a general impression of explo­ sive events, some are unexpected, while the m ost interesting have strong predictive potential th a t need only be confirmed and refined w ith a large sample. The m ost unusual finding was th a t the lowest recorded pressure of a system fol­ lowed the m axim um translatio n velocity as measured from the low centre of the pres­ sure charts. The im plication of this finding is th a t fast storm s appear to be weaker; a notion th a t contradicts clim atological findings in the literatu re (eg. [38]). There was support for the finding from other related measures, as discussed above. Some trends of general interest were revealed. The radius of th e developing com m a head was found to be directly related to the increasing tilt of the supporting Jet Stream . It was also related to the m ean value of cloud edge strength. Edge mean strength also increased w ith the value of the Cyclonic Index, which was designed to locate cloud bodies representing m ature cyclones. These correlations show the progress of the developing system, indicating some of the key features of develop­ ment. It is possible th a t these findings could be used to help determ ine the degree of development of the system. It is also possible th a t they could assist in a procedure to autom ate tracking of the low pressure centre. Some suggestive findings yielded potentially predictive relationships th a t are very promising. Pressure relationships returned three predictive equations over the Phase 11 to Phase 111 interval. In the first, the lowest pressure value (the overall system strength) was low for a low m axim um image bearing value over the interval. One interpretation of the result is th a t more meridional systems are stronger, which is expected [38]; the reasoning here is th a t if the storm tended m ore westward in an eastward je t flow, then it m ust have had a large northerly com ponent (been more meridional). The regression was quite strong. As explained previously, sum m ary re­ 130 lations over th e Phase II to Phase III interval have great potential for early warning. The second relationship was between m inim um pressure and The m axim um Edge Strength difference across the interval. The relationship was inverse, so when the range of edge values was greater, lowest pressure was lower. T he result is suggestive. The most obvious interpretatio n is th a t systems where clouds have sharpened greatly over the interval are strong. A related finding was a statistically significant relation­ ship for Case II th a t found pressure falling as the m ean edge stren g th across the image increased. The th ird relationship was between m inim um pressure and the w idth of the baroclinie je t level cloud across the interval. As m entioned previously, it is ques­ tionable how well the m ethod used actually captures this w idth; however, an inverse relationship was found between the variables, suggesting th a t as th e w idth increases, pressure falls. Further study and refinement of the m ethod would be necessary before the result should be held in much regard. Five strong results were also found relating to th e 24 hour Bergeron value across the Phase II to Phase III interval. A large Bergeron value indicates an intense storm (one where pressure falls rapidly). Bergeron value varied directly w ith the m axim um storm bearing as calculated from im agery over the interval. The result is somewhat unexpected since it would seem to suggest th a t a more easterly system is more intense. An alternative interpretation is th a t a system which starts as easterly flow and then becomes more m eridional across the interval is more intense. Further investigation would be needed to assess the full im plication of the result. A very strong direct correlation w ith the m ean im age-based velocity over the interval was found. Since the literature suggests rapid deepeners travel faster [14], the result is supported. A similar relationship at th e case level found a dependence on the m axim um chart-based velocity. Furtherm ore, the difference in image velocity over the interval directly predicts Bergeron value, suggesting th a t an accelerating system deepens faster. The last Bergeron relationship was a direct dependence on the range of the tilt of the supporting jet over the interval. This last result indicates th a t when the je t is rapidly becoming more m eridional th a t strong systems result, - 131 supporting the result for difference in image velocity above. 6.6.1 T ow ards a D e fin itio n In the course of this work, results and a review of the literatu re have tended to suggest th a t the trad itio n al Bergeron value standard for defining a rapid deepener m ay not be appropriate. The first difficulty is th a t various authors have adopted different standards for calculating the Bergeron num ber to qualify a system as a Bomb. Some use different intervals to calculate th e change in pressure, while others correct to different standard latitudes. In th e process of characterising a rapid deepener it is critical to apply a consistent definition. The results of this work tend to suggest th a t the 24 hour interval is too long. On average, all five cases studied here had an interval from onset of deepening to beginning of decay of ab o u t 24 hours; since the Bergeron value should reflect th e period of m axim um deepening, it appears th a t a shorter interval is required. This concern m ust be balanced w ith the reality th a t most pressure d a ta is only available a t 6 hour intervals at best. For post-hoc analysis, the length of the interval from Phase II to Phase IV, as identified from imagery, was found to strongly correlate w ith b o th th e m inim um pressure of th e system and the 24 hour Bergeron value. It is proposed here th a t the Phase II to Phase IV interval length could, or perhaps should, be p a rt of the stan d ard definition of a rapid deepener. F urther climatological study with a large sample size would be required to validate this finding. - 132 7. CONCLUSIO NS 7.1 T h e G oals o f C h a r a c ter isa tio n As outlined in C hapter 1, th e theoretical underpinning of this work was th e de­ velopment of the concept of C haracterisation. As an extension and generalised case of the remote sensing principle of “signatures”, C haracterisation tries to bridge the gap between the physical properties of elements in an image scene and the meaning of the scene itself. In C hapter 1 it was suggested th a t while a collection of m aterial signatures could describe a geom etrically static scene in term s of its character, these signatures would not be com parable for a dynam ically changing system in which both radiom etric change was occurring as well as geometric change. E arly aspects of this work tackled the problem of rectifying or describing geom etric change so th a t the un­ derlying radiom etric changes could be investigated. Subsequently, it was found th a t the descriptions of geometric change themselves contained significant inform ation, which was easier to capture and describe for th e case of explosive deepening th a n the radiom etric changes themselves. Since the work has been exploratory, no a tte m p t was m ade to uncover causal relationships. W hat was sought was a series of “signs” which would form a description (and ideally a definition) of character, much like how a series of “signatures” might describe the com ponents of an image scene. C orrelations between signs and specific events were sought, and in some cases good results were found. 7.2 Im age P r o c e s s in g R e su lts As a result of funding cuts and the dem ands of running th e PR O B E system, MSC began to explore alternatives in 1992. Their original proposal, never completed, was the design and im plem entation of an expert system th a t could guide the processes -1 3 3 used in PR O B E to generate sim ilar results. T he work presented here was not designed to replicate PR O B E, b u t several of the findings and m ethods may u ltim ately be usable for the same purposes. E arly aspects of this work focused on more trad itio n al rem ote sensing m ethods, and sought to capture radiom etric p attern s of brightness and texture. G eom etric deform ations resulted in difficulties in analysis since the object of study did n o t su­ perim pose in subsequent frames (the targ et was deform able and n o n -sta tio n a ry ). W hile some image processing m ethodologies are geom etrically invariant (not sensitive to geometric changes), the work focused on rectification of geometric deform ations and motions. Much of the radiom etric work was abandoned as being a sizeable and difficult topic in its own right. Some m ethods th a t were explored are described in Section 4.3. A series of m ethods were developed and refined to perform this rectifica­ tion, and it was found th a t the inform ation they captured ab o u t the evolving system was rich. The image processing m ethods developed can be categorised as: (1) pre-analysis enhancements; (2) “unrotation” rectification; (3) Principal Com ponents rectification; (4) and m anual rectification. The enhancem ents visually sharpened cloud edges, highlighted different cloud tem p eratu re regions, and improved image contrast. The Principal Com ponents based enhancem ents (different from Principal Com ponents rec­ tification, discussed below), also combined inform ation from the W ater Vapour satel­ lite channel, creating a synthetic image rich in inform ation content. The rem aining m ethods focused on strategies for capturing th e m otions and deform ations between image frames. The unrotation m ethods focused on applying a clockwise rotation to subsequent frames (since cyclones rotate counter-clockwise in the norther hemisphere) and calcu­ lating a “goodness of fit” for each angular change until a best m atch was found. These m ethods were at least sem i-operator assisted, since the specification of the surface low and cleaning up of extraneous cloud masses was necessary for their operation. There is strong potential for these m ethods to be developed into fully autom ated - 134 operational procedures. They capture translation of the system by com parison of the low centres, as well as rotation of th e cloud body (actually, of th e J e t tilt rath er th an ro tatio n of the com m a head relative to th e supporting Jet). They do no t account for stretching or expansion, and so are only applicable to frames separated by a short interval, where these changes are minimised. O f these m ethods, the fairly simple “Pixels on Target” m etric produced clean correlation curves w ith definite m axim a. To assess the accuracy of the m ethod, its results would need to be com pared to an external reference. Principal C om ponents rectification shows promise for autom ation. The m ain op­ erator requirem ent to im plem ent it is to remove extraneous cloud from the image frame. There are some ways th is process m ight be autom ated (briefly discussed in Section 7.3). Unlike unrotatio n m ethods. Principal Com ponents captures scaling and translation inform ation as well as rotation. C urrently its m ain weakness is th a t it is sensitive to bulges in the segm ented cloud representing th e je t and comm a head. M anual rectification was initially perform ed using stan d ard rem ote sensing im ageto-im age registration procedures. It was found th a t suitable “tie points” could not be consistently located in the evolving cloud field, which led to the first series of enhancements. These attem p ted to reveal n atu ral edge transition features th a t could be tracked, b u t even then the process was not very accurate. Development of the Idealised G rid-based m ethod then followed, where each progressive refinement to the grid model captured new inform ation ab o u t the changing cloud field. W hile the grid m ethod is fairly operator intensive, it is expected th a t acceptable results could be obtained fairly consistently and rapidly w ith m inor operator training. A well thought out operational system should allow an operator to place the grid from each one-half hour GOES frame long before the next image arrives. The m ain weakness of the system is th a t currently it appears some backtracking and refinement of the placement of previous frames is necessary as the operator gets new details of the developing clouds; however, it appears unlikely th a t more th a n a series of a few subsequent frames of development (or a few hours) would be required to place the -1 3 5 grid accurately, which would allow sufficient lead-tim e for early warning. Based on a four-phase model of explosive developm ent, statistical analysis of vari­ ables derived from the m ethods developed here revealed some significant correlations. T he most promising were based on the length of the Phase II to Phase IV interval and on the change in variables over the Phase II to Phase III interval. The length of the Phase II to Phase IV interval correlated strongly w ith b o th the 24 hour Bergeron value and the m inim um recoded case pressure [B? = 0.79, p = 0.04 and = 0.87, p = 0.07 respectively). The difference in m easured values at the Phase III and Phase II inter­ vals correlated w ith the 24 hour Bergeron value for im age-based measures of storm bearing and je t tilt from im agery = 0.92, p = 0.01 and = 0.86, p = 0.07 re­ spectively); and the m axim um image gradient strength of the storm edges predicted minim um case pressure (i?^ = 0.77, p = 0.05). 7.2.1 C h a r a c ter isa tio n A synthesis of findings in the meteorological literatu re suggests th a t 24 hours is too long an interval upon which to base the definition of a rapid deepener, or to com pute the Bergeron value describing its intensity. For th e cases in this study, the length of the entire deepening interval was on average about 24 hours (C hapter 6). If this result is consistent w ith a large sample, it would suggest th a t 24 hours m ust span more th an the interval of m ost rapid deepening. In C hapter 5, it was found th a t Bergeron value estim ated over shorter tim e intervals (12 and 6 hours) consistently over-estim ated the 24 hour Bergeron value. A standardised Bergeron value, perhaps corrected to a 12 hour interval at 45° north, could form one consistent descriptor of the character of these events. S tandard term inology would also help in defining explosive deepeners. The autho r suggests the adoption of strength to describe lowest pressure and intensity to describe highest deepening rate. Findings in C hapter 6 strongly suggest th a t the length of the Phase II to Phase IV interval, as estim ated from imagery, strongly represents both the strength and intensity of the system. Since this interval represents th e length of the developm ent period (from onset of rapid deepening to beginning of decay), it is intuitive to expect the length of the - 136 interval would have some bearing on th e “explosiveness” of the system. The au th o r suggests th a t further exploration of th e Phase II to Phase IV length relationship may reveal th a t the length of this interval is a fundam ental expression of the character of explosive events. The original goals of this work where: Given hum an interpreters’ abilities to subjectively infer th e character of explosive cyclogenesis from satellite image loops, it is asserted th at: 1 C om puter-based systems should be able to use the same inform ation as systems like PR O B E to produce sim ilar predictions 2 R apid deepeners do possess identifiable characteristics th a t separate them from conventional cyclonic systems 3 Those characteristics can be isolated and used to come up w ith an alternative “definition” for rapid deepeners 4 The concept of characterisation from images is a valid and useful ex­ tension of the existing spectral signature concept in image processing The author feels th a t th e prelim inary results based on the five cases presented show th a t most of the above goals can be m et using im age-based techniques. Item # 2 in the list is still in question, and would require a larger sample of storm s, including non­ explosive events, to adequately test. Refinement and testing of these m ethods w ith a larger sample show great promise for revealing insight into the explosive process and for prediction of explosive events. Such future work is definitely w orth pursuing. 7 .2 .2 P r e d ic tio n A rich series of m etrics were developed based on the results of the grid m ethod, and also some radiom etric m ethods developed previously. In C hapter 2 it was asserted th a t the change from Phase I to Phase II (the onset of rapid deepening) would be a critical period to watch for useful prediction. W hile predictive m ethods on this interval undoubtedly be desirable, it proved too early for analysis using the grid - 1 37m ethod, which only spans the Phase II to Phase III (m ature stage) interval; however, from this work it appears th a t Phase III, as assessed from the im agery (see C hapter 5), tends to occur from 20 to 30 hours prior to the tim e of m axim um deepening. Hence, predictions based on inform ation up th e Phase III would be quite useful. Several useful correlations between image and trad itio n al m etrics were found in C hapter 6. O f these, potentially th e m ost useful were predictive relationships found over the Phase II to Phase III interval. Strong correlations to m axim um pressure depth and to Bergeron value were found on a series of metrics. O f these, the prom inent metrics were derived from variables measuring: storm bearing; cloud edge sharpness (edge strength); storm translatio n speed; and rate of Jet tilt. O f these, only th e Jet tilt m etrics are difficult to com pute, while the edge sharpness m easure could very likely be fully autom ated. 7.3 F u tu re C o n sid é r â t ions Radiom etric work th a t was discarded in favour of following th e geometric rectifica­ tion results would make a useful and independent study of the character of explosive winter storms. Prelim inary work focused on banding in and around the com m a head and adjacent Jet stream . These bands can be easily identified visually, and are shown schematically in Figure 2.2. Their development and placem ent may have fundam ental implications for the system itself. Scaling rem ained a problem in this analysis, and a sta rt was m ade w ith more invariant m ethods such as fractal dimension and use of the wavelet transform to sum m arise textures. The original goal was to classify areas of like-textural p attern s and then analyse the n atu re of these texture clusters using landscape ecology style m ethods. Cloud m otion tracking has been developed by some authors (see C hapter 4). Fur­ ther refinement of earlier work m ay help autom ate or sem i-autom ate the cyclone analysis system developed here. M orphological operators hold promise for removing extraneous cloud masses, and use of th e Cyclonic Index, or some refinement on th a t concept could very likely find a suitable centre point for estim ating the surface low. The author imagines the m ost likely use of this work would be to develop an auto­ 138 m ated operational system which produces coarse-level statistics th a t serve to warn a hum an operator when a hazard condition threshold is crossed. At th a t point, the operator would use either a hum an-assisted m ethod, such as those described here, or a system like PR O B E to further refine prediction. Thus, the requirem ent for reducing subjectivity and operator-intensive work would be m et, while still generating high quality predictions th a t would help prevent property dam age and th e loss of hum an life. - 139 BIBLIOGRAPHY 1] A rnaud, Y., Desbois, M., Maizi, J., 1992. “A utom atic Tracking and C haracteri­ zation of African Convective Systems on M eteosat P ictures” Journal of Applied Meteorology, 31, 443-453 2] Baum , B.A., U ttal, T., Poeîlot, M. et al., 1995. “Satellite Rem ote Sensing of M ultiple Cloud Layers” Journal o f the Atm ospheric Sciences, 5 2 (2 3 ), 4210-4230 3] Bjerknes, V., 1921. “On the dynamics of th e circular vortex w ith applications to the atm osphere and atm ospheric vortex and wave m otions” Geofys. P u b i, 2, 1-88 4] Bosart, L.F., 1981. “The Presidents’ Day Snowstorm of 18-19 February 1979: A Subsynoptic-Scale Event” Mon. Wea. Rev., 109, 1542-1566 5] Carlson, T.N ., 1991. “M id-latitude w eather systems” Routledge, C hapm an & Hall, Inc. New York, 507 pp. 6] Carlson, T.B ., 1980. “Airflow through M idlatitude Cyclones and the Com m a Head P a tte rn ” Mon. Wea. Rev., 108, 1498-1509 7] Cherdak, A.S. (Ed.) 1993. “Im aging from N ondedicated Satellites” The M ITR E Corporation, McLean, VA. 8] Coakley, J.A ., Baldwin, D .G., 1984. “Towards the O bjective Analysis of Clouds from Satellite Im agery D ata” Journal of Climate and Applied Meteorology, 23, 1065-1099 9] Defense Advanced Research Projects Agency, 1992. “Proceedings: 21st Image U nderstanding W orkshop” Software and Intelligent Systems Technology Office, Arlington, Va., M organ K aufm ann Publishers, San M ateo, Ca. 1062 pp. [10] E bert, E., 1989. “Analysis of Polar Clouds from Satellite Im agery Using P a t­ tern Recognition and a S tatistical Cloud Analysis Scheme” Journal of Applied Meteorology, 28, 382-399 [11] Gonzales, R.C., Woods, R .E., 1993. “D igital Image Processing” Addison-Wesley, Don Mills, O ntario, 716 pp. [12] Gyakum, J.R ., 1983a. “On th e Evolution of the Q EII Storm . I: Synoptic A spects” Mon. Wea. Rev., I l l , 1137-1155 [13] Gyakum, J.R ., 1983b. “On th e evolution of the Q EII storm . II: Dynamic and therm odynam ic structure” Mon. Wea. Rev., I l l , 1156-1173 [14] Gyakum, J.R ., Anderson, J.R ., G rum m , R.H., Gruner, E.L., 1989. “N orth Pacific Cold-Season Surface Cyclone Activity: 1975-1983” Mon. Wea. Rev., 1 1 7 , 11411155 - 140 [15] Gyakum, J.R ., Roebber, P.J., Bullock, T.A ., 1992. “The role of Antecedent Sur­ face V orticity Development as a C onditioning Process in Explosive Cyclone In­ tensification” Mon. Wea. Rev., 1 2 0 , 1465-1489 [16] Hobbs, P.V., 1978. “O rganization and S tructure of Clouds and P recipitation on th e Mesoscale and Microscale in Cyclonic Storm s” Reviews of Geophysics and Space Physics, 1 6 ( 4 ) , 741-755 [17] Jensen, J.R ., 1986. “Introductory D igital Im age Processing: A Rem ote Sensing Perspective” Prentice-H all, Englewood Cliffs, New Jersey, 379 pp. [18] Kegley, C.W ., Kegley J.A ., 1984. “Introduction to Logic” University Press of America, New York, 525 pp. [19] Kohonen, T., 1995. “Self-O ranizing M aps” Springer-V erlag, New York, 362 pp. [20] Kuo, Y-H., Low-Nam, S., 1990. “Prediction of Nine Explosive Cyclones over the W estern A tlantic Ocean w ith a Regional M odel” Mon. Wea. Rev., 1 1 8 , 3-25 [21] Kuo, Y-H., Reed, R .J., Low-Nam, S., 1991. “Effects of Surface Energy Fluxes during the E arly Development and R apid Intensification Stages of Seven Explo­ sive Cyclones in the W estern A tlantic” Mon. Wea. Rev., 1 1 9 , 457-476 [22] Levkowitz, H., Herman, C .T ., 1993. “CLHS: A Generalized Lightness, Hue, and Saturation Color Model” CVGIP: Graphical Models and Image Processing, 5 5 (4 ) , 271-285 [23] Lillesand, T.M ., Kiefer, R.W ., 1987. “Rem ote Sensing and Image Interpretation: Second E dition” John W iley & Sons, Toronto, 721 pp. [24] M arroquin, J., M itter, S., Poggio, T., 1987. “Probabilistic Solution of Ill-Posed Problem s in C om putational Vision” Journal o f the A m erican Statistical Associ82(397), 76-89 ]25] M cCarigal, K., Marks, B .J., 1995. “Fragstats: Spatial P a tte rn Analysis Program for Q uantifying Landscape Structure” U nited States D epartm ent of A griculture, Forest Service, General Technical R eport PN W -C TR -351, 122 pp. [26] McLennan, N., Neil, L., 1988. “M arine Bombs Program (Phase II)” Environm ent C anada, Pacific W eather Centre, Vancouver, B.C. [27] McLennan, N., Neil, L., Wells, C., 1988. “P R O B E -A n O perational ‘Bom b’ Fore­ casting System ” Environm ent C anada, Pacific W eather Centre, Vancouver, B.C. [28] Meteorological Service of C anada, 1992. “Artificial Intelligence - Explosive Ma­ rine Storms Prediction” Project Proposal, Environm ent C anada, Pacific W eather Centre, Vancouver, B.C. [29] N ational A eronautics and Space A dm inistration, 1996. “CO ES I-M D ataB ook” G oddard Space Flight Center, Reference #S-415-19, Revision 1 - 3 1 August 1996, pp. 197 [30] Neil, L., M cLennan, N., 1988. “Explosive Cyclogenesis-A Case Study” Environ­ m ent C anada, Pacific W eather Centre, Vancouver, B.C. - 141 [31] Neiman, P .J., Shapiro, M .A., 1993. “The Life Cycle of an E xtratropical M arine Cyclone. P a rt I: Ftontal-Cyclone Evolution and Therm odynam ic Air-Sea In ter­ action” Mon. Wea. Rev., 121, 2153-2176 [32] Oesterle, J.A ., 1963. “Logic: The A rt of Defining and Reasoning” Prentice-H all, New York, 279 pp. [33] Petterssen, S., Smebye, S.J., 1971. “On the development of extratropical cy­ clones” Quart. J. R. Met. Sac., 97, 457-482 [34] Reed, R .J., A lbright, M.D., 1986. “A case study of explosive cyclogenesis in the Eastern Pacific” Mon. Wea. Rev., 114, 2297-2319 [35] Reed, R.J., Grell, G.A., Kuo, Y -H ., 1993. "The ERJCA lO P 5 Storm: Part I: Analysis and Sim ulation” Mon. Wea. Rev., 121, 1577-1593 [36] Roebber, P.J., 1984. “Statistical Analysis and U pdated Clim atology of Explosive Cyclones” Mon. Wea. Rev., 112, 1577-1589 [37] Rogers, E., B osart, L.F., 1986. “An Investigation of Explosively Deepening Oceanic Cyclones” Mon. Wea. Rev., 114, 702-718 [38] Sanders, P., 1986. “Explosive Cyclogenesis in th e W est-C entral N orth A tlantic Ocean, 1981-1984.” Mon. Wea. Rev., 114, 1781-1794 [39] Sanders, P., Gyakum, J.R ., 1980. “Synoptic-Dynam ic Clim atology of the ’Bom b” ’ Mon. Wea. Rev., 108, 1589-1606 [40] Schmetz, J., Holmlund, K., 1993. “O perational C loud-M otion W inds from Meteosat Infrared Images” Journal o f Applied Meteorology, 32, 1206-1225 [41] Schneider, S.H. (Ed.), 1996. “Encyclopedia of Clim ate and W eather” Oxford University Press, New York, 929 pp. [42] Shapiro, L.S., 1995. “Affine Analysis of Image Sequences.” PhD . D issertation, Cam bridge University Press, New York, 210 pp. [43] Shapiro, M.A., Keyser, D., 1990. “Fronts, Jet Stream s, and the Tropopause” E xtratropical Cyclones: The Erik Palm én M emorial Volume, C.W. Newton and E. Holpainen, Eds. American Meteorological Society, Boston., 167-191 pp. [44] Uccellini, L.W ., Keyser, D., Brill, K .P., W ash, C.H., 1985. “The P residents’ Day cyclone of 18-19 Pebruary 1979: Influence of upstream trough am plification and associated tropopause folding on rapid cyclogenesis” Mon. Wea. Rev., 113, 962988 [45] Uccellini, L.W ., Kocin, P.J., Petersen, R.A., Wash, C.H., Brill, K.P., 1984. “The Presidents’ Day cyclone of 18-19 Pebruary 1979: Synoptic overview and analysis of the subtropical je t streak influencing the pre-cyclogenetic period” Mon. Wea. JZeu., 112, 31-55 [46] Weldon, R., 1979. “Cloud P attern s and the U pper Air W ind Pield” Satel­ lite Training Services Course Notes, P art IV , Air W eather Service Docum ent AW S/TR-79/003, 79 pp. 142 [47] Zachor, A., 1983. “Spectral P a tte rn Recognition in IR R em ote Sensing” Applied Optica, 2 2 (1 7 ), 2699-2703 [48] Zhang, J., M odestino, J.W ., Langan, D.A., 1994. “M axim um -Likelihood P a ra m ­ eter E stim ation for Unsupervised Stochastic M odel-B ased Im age Segm entation” IE E E Transactions on Image Processing, 3 (4 ), 404-419 143 A -1 P C I S c r ip ts APR8PCA.EAS lo c a l i f i l e = " a p r 8 e i g n = l , 2 m i d p o in t = d e v r a n g e = 3 m ask= r t y p e = " l o n g re p o rt» " a p r8 p c a . tx t CORRTEST.EAS lo c a l #i l o c a l # m e a n s [ 5 ] , # c o v s [ 4 ] , # s t d e v [ 5 ] ,# r s d p C 4 ] re m r a d p = r o o t o f s t a n d a r d d e v i a t i o n s p r o d u c t re m d e n o m i n a t o r o f c o r r e l a t i o n e q u a tio n nsam =0 f i l e = " s u b a n a l t r i m * h is w = m ask= 2 r e p o r t * " / d e v / n u l l fo r i-1 to 8 d b ic = i,i+ 1 6 d b o c = i + 2 4 ,i + 3 2 r pea fo r # i* l to 5 a p o r t= " te rm d b ic = # i r h i s CLOUD.EAS # m e a n s [ # i] = im s ta t(2 ) en d fo r fo r t o 139 m o d e l o n " ja n A if(y ,{ 1 8 + # i> < = 2 0 a n d % { 1 8 + # i} > = -5 ) % % { 2 + (# i-l)* 3 } = l; if (% { ia + # i} < - 5 a n d % { 1 8 + # i} > = -3 0 ) % % { 3 + ( # i- l) * 3 } = l; if( y .< 1 8 + # i> < - 3 0 a n d ’/ .{ 1 8 + # i> > = -7 0 ) y.y,{4+(#i-l)*3>=l; en d m o d e l e n d f o r f o r # i= l t o en d fo r p rin tf COLLATE-B.EAS a n d WV f r a m e s i n p a i r s * C om bine IR a s k " O u tp u t f i l e : " filo D B i n = D B Q p e n ( f i l i ," r " ) c h a n n e ls = D B C h a n n e ls ( D B in ) f i l e = f i l o te x l= " IR /W V s e q u e n c e t e x 2 = d b s z * D B L in e s ( D B in ) ,D B P ix e ls ( D B in ) p x s z = d b la y o u t = " b a n d if(m o d ( c h a n n e ls ,2 ) » 0 ) th e n p a s s e s - c h a n n e l s / 2 d b n c =c h a n n e 1 s e l s e p r i n t " P r o b le m s " s t o p e n d i f s e lm r c im d b o c = b a se , base+ 1 s iii r iii !a s k "" t e x l e n d fo r ! put d b o c = (i-l)* 2 + l,( i-l)* 2 + 2 : : : : : : : : : : : : : : CORK.EAS # i ,# m e a n s C 2 ] , # c o v , # s t d e v [ 2 ] s iii lo c a l lo c a l # ch [2 ] f o r c o r r e la tio n nsajn=0 f i l e = " s u b a n a l t r i m * hisw ® m ask=2 r e p o r t = " / d e v / n u l l r h i s # m e a n s C # i ] = im s t a t ( 2 ) d b i c = 7 dbiw = e x c l u d e * a r r a y o p * a r r s e g * 3 d b s n * " j u n k d b s d = " u s e d b y r e s t a t e t o g e t t h e im ag e sum m o d e l o n " s u b a n a l %7=0; % 7 = ( % { # c h ( l ) } - # m e a n s [ l ] ) * ( % { # c h ( 2 ) } - # m e a n s [ 2 ] )*%%2 re m c o v a r i a n c e u n d e r b i t m a p en d m o d e l # c o v = im s ta t(2 ) " \n R S D P :\n " # s td a v C # i]= im s ta t (2 ) p rin tf " \n C o r re la tio n : : : : : : : : : : : : : : CORRECT.EAS a s s i s t i n s to rm se q u e n c e r e g i s t r a t i o n p r i n t # c o v s [ # i] /# r s d p [# i] en d fo r re p o rt= " te rm : : : : : : : : : : : : : : DUMP. EAS : : : : : : : : : : : : : : (IR&WV) a s j p g Î Dump E e n h a n c e d ! V a ria b le s lo c a l D B in , c h a n n e l s , $ i n , l o o p , l a s t , c a l c , d x , d y , $ f b a s e d x = 5 1 2 d y = 512 a s k " S t a r t IW ( y ) " t e x l i f ( f $ e x t r a c t ( f $ l o w c a s e ( te x l ) , 1 , l)= " y " o r te x l* " " ) ! S t a r t t h e IW s e s s i o n v d O := " F lo w N o r m a l i s a t i o n vdO# * 1 9 , d x , d y , 2 , 2 , 0 . 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 vdOO="VDO: th a n a s k " Im a g e a r c h i v e f i l e : " f i l i $ f b a s e = f i l i D B in = D B O p e n ( f i l i , " r " ) c h a n n e l s * D B C h a n n e ls (D B in ) # s td e v (# i)= im s ta t( 2 ) iffls ta t ( l ) = # c o v / ( # s t d e v ( l) » # s td e v ( 2 ) ) “0 .5 c o e f f i c ie n ts : \n " 4 r i m a g e v o r k s a s k " H i t < E n te r> w hen t h e d i s p l a y com es u p " t e x l f o r # i * l t o 2 m odel on " s u b a n a l y.7*0 ; %7= (y.-C #ch(#i) > -# m e a n s [ # i ] ) -2*%%2 ; endm odel r rc s ta ts en d fo r p rin tf f o r # i* l to re m s e t d b i c t o t h e tw o i n p u t c h a n n e l s # c h ( l) = d b i c ( l) # c h ( 2 )= d b ic (2 ) r rc s ta ts re m i m s t a t ( 2 ) f r o m r c s t a t s y i e l d s t h e im a g e sum - - m e s s y b u t i t w o rk s # c o v s [ # i ] = i m s t a t ( 2 ) p r i n t # c o v s [ # i ] en d fo r f o r # i * l t o 4 # r s d p [ # i] = (# s td e v C # i] * # s td e v C # i+ l} ) “0 .5 p r in t # rs d p t# i] en d fo r lo c a l i f o r # i= l to 2 d b ic = # c h (# i) en d fo r r rc s ta ts r rc s ta ts en d fo r : : : : : : : : : : : : : : COLLATE.EAS a p r s t o r r a . p i x i n t o IR,WV o r d e r f o r i * l t o 21 d b i c = i , i + 4 2 r iii en d fo r " \n C o v a ria n c e s ; \n " r e p o r t * " c o r r . t x t d b i c * 7 d b iw * e x c l u d e * a r r a y o p * a r r s e g * 3 d b s n = " j u n k d b s d * " u s e d b y r c s t a t s t o g e t t h e im a g e sum f o r # i * l t o 5 ra m s t d e v s f o r d e n o m i n a t o r m o d e l on " s u b a n a l 7,7=0; y .7 * (y .< # i} -# m e a n s [ # i ] )-2*% % 2 ; en d m o d e l f o r i= l to p asse s b a s e * (i-l)* 2 + l d b ic -i,i+ p a s s e s 4 # c o v s C # i] * 0 # r s d p [ # i ] = 0 m o d e l o n " s u b a n a l */7*0; % 7 = (% { # i} -# m e a n s [# i]) * ( y .{ # i+ l} - # m e a n s [ # i + l ] ) *%%2 ; e n d m o d e l re m %%2 i s a b i t m a p c i r c l e a b o u t t h e im a g e c e n t r e s y s t e m C 'c l e a r ” ) " fili # m e a n s[# i] f o r # i* l to 4 l o c a l i , o u t , D B in ,D B o u t, c h a n n e l s , p a s s e s , b a s e a sk " In p u t f i l e : p rin t r e p o r t» " te r m ! P ro g ra m t o ! O pen d i s p l a y h a n d l e r v d O := " F lo w N o r m a l i s a t i o n vdO# = 1 9 , 1 0 2 4 , 1 0 2 4 , 2 , 2 , 0 , 0 , 0 . 0 . 0 , 0 , 0 , 0 , 0 , 0 , 0 vdOO="VDO: r im ag av o rk s ! S e t u p b i t m a p c o l o u r s r d c p " g c 1 ,1 9 6 ,1 9 6 ,1 9 6 "gc 2 ,0 ,0 ,0 r dcp ! L oop o v e r im ag e c h a n n e l s l a s t * 0 f o r l o o p = l t o s y s te m (" c le a r" ) p r i n t f " \n P ro c e s s in g p a i r y ,d \ n " ,l o o p c h a n n e ls /2 ! L o ad Im ag e F ram e ! h i d e w o rk i n p r o g r e s s r dcp " ib r dcp - 144 - file = $ f b a s e c a lc = ( lo o p - l)* 2 + l v d o c = l ,2 d b iw * vdow* IM.EAS d b ic = c a lc ,c a lc + l ! L o a d B itm a p s d b i b ® c a l c + l , c a l c + 2 v d o b = l ,2 o m o d = " o ff lo c a l # i,# j f o r # i= l to 5 f o r # j= # i to 5 d b ic = # i,# j r c o r r p r i n t " C o rre la tio n (" , # i , " , " , # j , " ) : " , i m s t a t ( 1 ) en d fo r en d fo r IMP.EAS ! r iv b ! Show im age r d c p " I s ! r d c p "gd 1 ,2 r dcp " io lo c a l i , $ i n , f i l e ::::::::: file = T E X T o p e n (" lis t" ) 2 ,1 ,2 ! W a i t( ? ) i f ( l a s t =0) t h e n a s k "O k? " t e x l i f ( t e x l = " y " ) e n d if i = l w h i l e ( $ in ! = " < E O F > " ) $ in = T E X T re a d (file ) f i l i = $ i n f i l o = " t e s t d b ic = i d b o c = i d b iw * dbow= s t r u c t u r = 1 0 2 4 , 1 0 2 4 , 1 , 0 , 2 1 6 d a t a ty p e = " 8 U f lip = " Q F F sw a p fl= "N O la s t= l ! Dump t o c a p t u r e f i l o = " c a p t m p 6 c a p tu re r c a p tu re c a p a r e a = " a l l c o m p re 8 = " fa ls s i m a g e r d r im a g e r d i = i + l e n d w h ile ! E x p o r t im a g e f i l i = " c a p t m p f i l o = $ f b a s e + f $ s t r i n g ( l o o p ) + " . j p g " d b iw = d b i c = l , 2 , 3 d b ib = d b v s» d b l u t = d b p c t * f t y p e * " j p g f o p t i o n s * 8 fe x p o rt r fe x p o rt c a l l T E X T c lo s e (f ile ) IMPORT.EAS lo c a l # i,m s tr in g n a m e s ,$ t p i Remove o l d c a p tm p f i l e en d fo r s y s t e m ( ” rm c a p t m p .p i x " ) ! C le a n u p c a l l D B C lo se(D B in ) O u tp u t v e c t o r DUMPVECS. EAS : l a y e r s fr o m f i l e lo c a l fili= filo en d fo r $ in file ,i,D B in ,s e g ,fla g ,i i n p u t "Dump f r o m f i l e : " $ i n f i l e D B in = D B O p e n ($ in file , " r " ) file * $ in file s e g = - l f l a g = l i » l w h ile f l a g * l seg = D B K ex tS eg (D B in ,"V E C ” , s e g ) i f ( s e g O - 1 ) d bvs*seg f il v = $ i n f i l e + " .v e c " + f $ s t r i n g ( i ) dm sform » fld n m e = " z c o o r d filo = " ja n A dboc*#i s iii r iii : : : : : : : : : : : : : : IMSTAT.EAS : : : : : : : : : i = l t o 63 d b ic = i 8 h is r h i s p r i n t im s ta t !en d fo r lo c a l i lo c a l $ d ir ,i,m s tr in g i r f i l e s ,m s t r i n g w v f ile s , s tr in g n e w f i l e , m s t r i n g s ta m p l o c a l p a i r s , b a s e s y s t e m ( " c l e a r " ) i n p u t "R ead f r o m d i r e c t o r y : " $ d i r s y s te m " I s - 1 " + $ d i r + " / b c * " > i r f i l e s s y s t e m " I s -1 " + $ d i r + " /b d * " > w v f i le s EDGE.EAS ifC /.4 > 1 0 0 ) t h e n %%3=1 e l s e '4X3=0 e n d i f endm odel m odel o n " t e s t . p i z p a i r s = f $ le n ( ir f ile B ) if ( p a i r s ! = f $ l e n ( w v f i le s ) ) th e n p r i n t "N um ber o f IR a n d WV f i l e s n o t e q u a l ! " e x it e n d i f p r i n t " F o u n d " + f $ s t r i n g ( p a i r s ) +" p a i r s " a s k " H i t E n te r: " te x l :::::::::::::: lo c a l i n e w f ile = $ d ir f i l e = $ d i r d b n c = 2 * p a irs c im r c im d b s 2 = 6 0 0 ,6 0 0 d b n c = l u p l e f t = - 3 0 0 , - 3 0 0 l o r i g h t = 3 0 0 ,3 0 0 m a p u n i t s = " m e t r e s d b s d = g c p fo rm = " x y x y f i l i = " r e g i o n s d b oc= 2 r e s a m p l e * " c u b i c o r d e r = l m em size* p c i o p = " a d d p c i v a l = l f o r i= l to p a irs b a s e = (i-l)# 2 ! IR f i l e f i l i = i r f i l e s ( i ) f i l o = " t m p im p dbiw = f o r i= 2 t o 7 f i l e = " r a g " + f $ s t r i n g ( i ) s fim p o rt r fim p o rt r p cim o d f i l i = " t m p i m p f i l o = $ d i r d b i c = l d b o c = b a s e + l d biw * %3=%1; GCPS.EAS lo c a l i d b s z = 6 0 0 ,6 0 0 d b n c = l u p l e f t = - 3 0 0 , - 3 0 0 l o r i g h t = 3 0 0 , 3 0 0 m a p u n i t s = " m e t r e s d b s d = g c p f o rm = " x y x y f i l i = " r e g i o n s d b o c = l r e s a m p l e * " c u b i c o r d e r = l m em size* fo r i= l to îfo r : : : : : : : : : : : : : : JPGIMA.EAS ! R ead a seq u e n ce o f j p e g IR a n d WV f i l e s f o r FUSION p r o d u c t ! a s k " : " t e x l a n d w h ile m o d e l o n f i l e if(X 2 = 2 5 5 ) en d m o d e l e n d f o r i= l th e n s w r ite r w r ite e l s e fla g = 0 e n d if i» i+ l GCPBIT.EAS d b i c = l d b iw = dbov= nam es « T e x t $ I m p o r t ( " i m p . t x t " ) f o r # i = l t o f$ le n (n a m e s ) fili= " im p o r t/" + n a m e s (# i) filo = " im p o r t/" + f $ e x tr a c t( n a m e s ( # i) , 1 ,f $ le n ( n a m e s ( # i)) - 4 ) + " .p ix " s fim p o r t r fim p o rt 8 file = " r e g " + f $ s tr in g ( i) r c im r g e o s e t f ile = " r e g io n s d b s n = " o u tlin e " + f$ s trin g (i) re m t f i l e = " v e c " + f $ s t r i n g ( i ) + " . g c p " t f i l 6 = " h a n d y " + f $ s t r i n g ( i ) + " . g c p " d b g c= r g c p r e a d f i l e = " t m p i m p r dim ! WV f i l e f i l o = " t m p im p dbiw = s f im p o rt r fim p o rt f i l i = " t m p i m p f i l o = $ d i r d b i c = l d b o c = b a s e + 2 d biw * dbow* s iii f i l o = " r e g " + f $ s t r i n g ( i ) d b ic = 8 + i re m d b g c = i + l d b g c = i+ 9 r r e g en d fo r fili= w v f ile s ( i) r iii f i l e = " t m p i m p r dim f i l e = " h a n d y d biw * dfasd* p o l y i n f o = " p o i n t s b o r d e r = " o f f c o n t i n t * d m s fo rm = " o f f fld n m e * f o r i = l t o 8 re m d b ic = i ra m d b s n * " o u t l i n e " + f $ s t r i n g ( i ) rem r rtv f i l e = n e w f i l e + " . p i x " ! IR im a g e s o u r c e = " X " + f $ s t r i n g ( b a s e + l ) + " = 2 5 5 - * / ," + f $ s t r i n g ( b a s e + l ) s m o d e l r m o d el ! WV im a g e s o u rc e = " X " + f$ s trin g (b a s 0 + 2 )+ " = 2 5 5 -X " + f S s trin g (b a s e + 2 ) s m o d e l r m o d el d b v s = i + l f i l v = ''h a n d y " + f $ s t r i n g ( i ) s y ste m "e c h o " + i r f i l e s ( i ) + " HANDY.EAS r v w r ite I p e r i m k d a t e .p l " -1 4 5 >s ta m p c r a û l = s t a m p ( l ) •a s k "" t a i l s y s te m "Is d to c ^ b a s e + l s m cd r mcd ! P a s s 1 lo w c l o u d f r o m e i g n 2 p r i n t r e g io n s ..." en d fo r " + $ d ir+ " /b c * I p e r i in k d a te .p l : : : : : : : : : : : : : : JPGIN.EAS o f IR j p e g f i l e s lo c a l $ d ir ,i,m s tr in g s y s te m C " c le a r " ) in p u t " I s -1 " + $ d i r > f i l e s > " + $ d ir + " .1 s t " ! R ead a s e q u e n c e f ile s ,s trin g n e w f i le , m s tr in g " R ead f r o m d i r e c t o r y : n a v f ile = $ d ir f i l e - $ d i r d b n c= fî l e n ( f i l e s ) f o r i= l to f $ l e n ( f i l a s ) d b iw » d b l a y o u t » " p i x e l s fim p o rt r " $ d i r s y s te m s c im r fili= $ d ir+ " /" + f ile s (i) if(% % 2 = 0 ) t h e n 5 Mode f i l t e r lo w c l o u d ( p a s s 2 ) f i l e = " p r e p r o . p i x dboc»3 f l s z * 7 ,7 t h i n l i n e = " o f f k e e p v a lu » p r i n t " FMO" r fm o ! P a s s 2 lo w - c lo u d t o b itm a p p r i n t " m odal on " p r e p r o .p ix %%2=0 e l s e %%2=1 e n d i f en d m o d e l if ( % 3 > 0 ) t h e n ! S o b el edges p r in t "E dge e n h a n c in g b o u n d a r i e s . . . " d b ic = 3 M odule S to r in g r e s u lt s " cim f i l o = " t m p im p fim p o rt fili= " tm p im p filo = n s w f ile + " . p ix " dbiw = dbow» 8 111 r s ta m p m odel on " p r e p r o .p ix %3=%2 e l s e %3=0 e n d i f en d m o d e l " A d j u s t i n g lo w - c lo u d d b ic = l dboc= i fa c to r= l p rin t " M odule FSOBEL" r p rin t " S to r in g r e s u l t s " if(% 3 < = 2 0 0 ) t h e n %%3=0 e l s e %%3»1 e n d i f en d m o d e l 111 file = n e w f ile + " .p ix ” s o u r c e » " y ," + f $ B t r i n g ( i ) + " ® 2 5 5 - ‘/ . " + f $ s t r i n g ( i ) s m odel r m odel fso b e l m odel on " p r e p r o .p ix p r i n t "DONE!" sy ste m "e c h o " + f i l o s ( i ) + " I p e r i m k d a te .p l" c m 0 1 » s ta m p (l) d b o c = i s mcd r mcd file * " tm p im p > stam p : : : : : : : : : : : : : : PPRO-B. EAS ! S u b -m o d u le f o r PREPRO.EAS t o c r e a t e s i n g l e fr a m e e n h a n c e m e n t ! i n im a g e p r e p r o . p i x - t o b e r e c y c l e d ! I n p u t P l a n e s : 1 I R , 2 - WV r dim !a s k "" t e x l e n d fo r LABELS.EAS ::::::::: lo c a l i , i n f i l e file » " m e tb a s e in f ile = te x to p e n ( " c h a r ts " ) c m 0 1 » te x tre a d (in f ile ) dboc= i r mcd ! a s k " h i t r e t u r n : " t e x l fo r i» l m odel on " p r e p r o .p ix i f ( 0 . 5 8 4 # ( 2 5 5 - ’/ , l ) - 9 0 . 1 > - 5 ) ! 1) p r i n t " C r e a tin g p a s s ! fro m te m p e r a tu r e LUT ! H i s t o g r a m m a tc h e d LUT p r i n t " C a l c u l a t i n g a d ju s te d p r i n c i p a l c o m p o n e n ts ..." v a r ia n c e f i l e * " p r e p r o fu n c ® " m a tc d b ic ® 2 d b l u t ® 4 d b s n » " m a tc h d b s d » " h i s t o g r a m m a t c h i n g o s t r = s d p t = t r i m » ! m ask s h o u l d b e s e t b y c a l l i n g r o u t i n e m ask » \ ! b u t . . . dbhc*l p r in t " M odule PUN" r f u n lo c a l i f o r i = l t o 21 d b i c = i , i + 2 1 , i + 4 2 en d fo r POLYS.EAS lo c a l i % % { i+ l} = l; PCOR.EAS (p a ss i f (% K 1 0 9 ) t h e n \ > -5C %%2»1 e l s e %%2=0 e n d i f en d m o d e l en d fo r KOLOW.EAS : : : : : : : : : : : : : : f o r i = l t o 8 m o d el o n " a p r 8 i f ( ( 0 . 5 8 4 * ( 2 5 5 - ‘/ { i } ) - 9 0 . 1 ) < - 5 ) en d m o d e l en d fo r t o 31 ! I n i t i a l lo w - c lo u d b i t m a p 1 l o w - c l o u d m ask" s pea r pea ! Make c h a n g e s t o :::::::::::::: c h a n n e l dboc= 2 p r i n t " M odule LUT" lo c a l # i,# j ,$ tp ! D e c o r r e l a t i o n s t r e t c h d b i c » l , 2 e ig e n s u p » ! ! g lo b a l v a r s e t fr o m PREPRO r e p o r t ® " p r e p r o . e i g n p r i n t " M odule DECORR" r d e c o r r re p o rt= "T E R M f ile = " te m p s lo g s t a r t ! P a s s 1 lo w c l o u d f r o m e i g n 2 p r i n t r e g io n s . . . " f o r # i» l to 6 f o r * j= l to 3 d b ic » 1 8 + # i d b o c = # j+ ( # i- l) * 3 ifC # j= l) if(# j= 3 ) m odel on " p r e p r o .p ix %3=%2 e l s e %3=0 e n d i f endm odel p o lv » -4 ,2 0 i f ( # j “ 2) p o lv * - 2 9 ,- 5 p o lv * -7 0 ,-3 0 if(% % 2 = 0 ) " A d j u s t i n g l o w - c lo u d th e n r ip g e n d fo r ! Mode f i l t e r th in lin e = " o f f lo w c l o u d ( p a s s 2 ) d b ic = 3 d b o c » 3 f l s z = 7 , 7 k e e p v a lu » p r i n t " M odule FMO" r fmo lo g s to p ! P a s s 2 l o w - c lo u d t o b i t m a p p r i n t " PPR02.HAS ! S u b -m o d u le f o r PREPRO.EAS t o c r e a t e s i n g l e fr a m e e n h a n c e m e n t ! i n im ag e p r e p r o . p i x - t o b e r e c y c l e d In p u t P la n e : 1 - IR (p a ss m odel o n " p r e p r o .p i x i f ( 0 .5 8 4 * ( 2 6 5 - % l) - 9 0 . l> - 5 ) ! 1) p r i n t ! ! I n i t i a l l o w - c lo u d b i t m a p 1 l o w - c l o u d m ask" i f (% K 1 0 9 ) t h a n \ > -5C %%2=1 e l s e %%2=0 e n d if endm odel S to r in g r e s u lt s " • M o d ifie d f o r IR o n l y m odel on " p r e p r o .p i x %%2=0 e l s e %%2=1 e n d i f endm odel if ( % 3 > 0 ) t h e n ! S o b el edges p r in t "E dge e n h a n c in g b o u n d a r i e s . . . " " C re a tin g p a ss fa c to r= l p rin t " ! fro m te m p e r a tu r e LUT * M odule FSOBEL" r f s o b e l p r i n t " S to r in g r e s u l t s " i f(% 3 < = 1 0 0 ) t h e n %%3»0 e l s e %%3=1 e n d i f en d m o d e l m odel o n " p r e p r o .p ix ! C ode f o r IR te m p a n d PCI f u s i o n p r i n t " C re a tin g f u s io n 146- fi l e n a ,m e = f i i i im ag es" ! c r e a t e p s e u d o - c o lo u r c o m p o s ite d b i c = l d b p c t= 5 d b o c = 4 ,5 ,6 dbiw = fr o m IR e n c o d i n g = " o v e r ! O pen s o u r c e a n d g e t n e e d e d i n f o D B in = D B O p e n ( f i l e n a m e ," r " ) c h a n n e l s ® D B C h an n els(D B in ) M odule PCE" r p e e p rin tf d b ic = 4 ,5 ,6 d b o c = d b ic i h s m o d @ l= " c y l i n d e r p rin t M odule IB S " r i h s p a s s e s * c h a n n e ls a s k "P ro c e e d ? " t e x l i f ( f $ e x tr a c t ( t e x l , l , l ) o " y " ) th e n c a l l D B C lo se (D B in ) r e t u r n e n d if p rin t " " d b ic ® 2 d b l u t = 6 p rin t " dboc= 4 \ J o v e rw rite I w ith s t r e t c h e d "F o u n d %d c h a n n e l s i n % s \n " .c h a n n e ls .f ile n a m e PCI M odule LUT" r l u t d b ic = 4 ,5 ,6 d b o c » d b ic p rin t " M odule RGB" r r g b p rin t "DONE!" ! s e t up a n d p r o c e s s e a c h c h a n n e l p a i r f o r l o o p = l t o c h a n n e ls s y s t e m ( " c l e a r " ) p r i n t f " V n P r o c e s s in g c h a n n e l # y ,d \ n \ n " ,l o o p ! Swap i n p u t c h a n n e l s t o p r e p r o . p i x f o r e n h a n c e m e n t f i l i « f i l e n a m e f i l o = " p r e p r o d b i c * l o o p d b o c * l dbiw® PPRO.EAS PREPRO.EAS t o c r e a t e s i n g l e p re p ro .p ix - t o be re c y c le d 2 - WV ! S u b -m o d u le f o r fr a m e e n h a n c e m e n t ! i n im ag e ! In p u t P la n e s : 1 - IR , ! I n i t i a l l o w - c lo u d b i t m a p 1 l o w - c lo u d m ask" ( p a s s 1) p r i n t " C r e a tin g p a s s ! R un PPRO p r e p r o c e s s i n g m odel on " p r e p r o .p i x %%2=1 e l s e %%2=0 e n d i f endm odel i f (0 .5 8 4 * (2 5 5 - X l)- 9 0 . l> - 5 ) th e n p r i n t " T r a n s f e r r i n g r e s u l t s t o o r i g i n a l im ag e Swap o u t p u t t o o r i g i n a l im a g e f i l i * " p r e p r o f i l o = f i l e n a m e dbiw® dbow® r iib to c h a n n e l dboc= 2 p r i n t " ! C le a n u p c a l l D B C lo se (D B in ) M odule LUT" ! D e c o r r e la tio n s t r e t c h d b i c = l,2 e ig e n su p = l ! g lo b a l v a r s e t f r o m PREPRO r @ p o r t = " p r e p r o . e i g n p r i n t " M odule DECORR" r d a c o r r rep o rt* " T E R M ! P a s s 1 lo w c l o u d f r o m e i g n 2 p r i n t r e g io n s ..." en d fo r v a r ia n c e f i l e = " p r e p r o fu n c = " m a tc d b i c » 2 d b l u t = 4 d b s n = " m a tc h d b s d = " h i 8 t o g r a m m a t c h i n g o s t r * s d p t® t r i m * ! m ask s h o u l d be s e t b y c a l l i n g r o u t i n e d b h c = l p r i n t " M odule FUN" r f u n m odel on " p r e p r o .p ix %3=%2 e l s e %3=0 e n d i f en d m o d e l ! ! T r a n s f e r e n h a n c e m e n t b i t m a p s d b ib ® 2 ,3 dbob® ! H is t o g r a m m a tc h e d LUT p r i n t " C a l c u l a t i n g a d ju s te d p r i n c i p a l c o m p o n e n ts ..." ! Make c h a n g e s e n h a n c e m e n t r p p ro 2 : : : : : : : : : : : : : : PREPRO-B.EAS ! P e r f o r m f lo w n o rm a lis a tio n p re -p ro c e s s in g s te p s ! S o u r c e : im age d a ta b a s e o f te m p o ra l seq u en ce ! o f TIR a n d WV s c e n e s ! ! D e s t: TIR a n d PC2 im a g e , ! l o w - c lo u d a n d e d g e s b i t m a p s ! L o c a l v a r i a b l e s l o c a l D B in , D B o u t, c h a n n e l s , p a s s e s , l o o p , b a s e l o c a l s t r i n g f i l e n a m e , o u t f i l e , s t r i n g s ta m p s y s te m (" c le a r" ) file n a m e ® fiii a s k "Im a g e s e q u e n c e f i l e n a m e : " fili " A d j u s t i n g l o w - c lo u d ! O pen s o u r c e a n d g e t n e e d e d i n f o D B in ® D B O p e n (file n a m e , " r " ) c h a n n e l s = D B C h an n els(D B in ) if(% % 2 » 0 ) t h e n p rin tf ! Mode f i l t e r lo w c l o u d ( p a s s 2 ) d b i c * 3 db o c= 3 f l s z = 7 , 7 t h i n l i n e « " o f f k e e p v a lu * p r i n t " M odule FMO" r fmo ! P a s s 2 l o w - c lo u d t o b i t m a p p r i n t " "F o u n d %d c h a n n e l s i n % s \n " .c h a n n e ls ,f ile n a m e ! A ssu m in g t h e y a r e i n o r d e r T IR , WV.. . i f (mod ( c h a n n e l s , 2 ) 0 0 ) t h e n p r i n t "T h e i n p u t f i l e s h o u l d c o n t a i n T IR auid WV p a i r s o n ly f o r e a c h s c e n e ! " r e tu r n S to r in g r e s u l t s " p a s s e s = c h a n n e l s / 2 p r i n t f " A s s u m in g %d c h a n n e l s f o r e a c h o f T IR a n d W V \n " ,p a s s e s a s k " E n h a n c e d im ag e f i l e n a m e : " f i l i o u tfile = f ili m odel on " p r e p r o .p ix %%2=0 e l s e */,y.2=l e n d i f en d m o d e l if( % 3 > 0 ) ! S obel edges p rin t "E dge e n h a n c in g b o u n d a r i e s . . . " f i l e = f i l i te x l= " R G B s fr o m PCT e n h a n c e d P C I" tex 2 ® d b s z = D B L in e s (D B in ).D B P ix e ls ( D B in ) p x s z ® l , l d b n c = p a s s e s * 3 d b l a y o u t = " t i l e d j p e g " \ ! c o m p re s s t h a t im a g e ! fa c to r= l p rin t M odule FSOBEL" r f s o b e l s c im p r i n t " C r e a t i n g o u t p u t f i l e " " p rin t " S to r in g r e s u l t s " i f ( '/ .3 < « 1 0 0 ) t h e n %%3=0 e l s e %%3=1 e n d i f en d m o d e l p rin t th e n r cim m odel on " p r e p r o .p ix ! s e t u p a n d p r o c e s s e a c h c h a n n e l p a i r f o r lo o p ® l t o p a s s e s s y s t e m ( " c l e a r " ) b a s e ® ( l o o p - 1 ) *2+ 1 p r i n t f " X n P r o c e s s in g c h a n n e l s #%d a n d # % d \ n \ n " , b a s e , b a s e + 1 "DONE!" PREPR02.EAS : : : : : : : : : : : : : : s e q u e n c e s w i t h o n l y t h e IR c h a n n e l ! M o d ifie d f o r ! P e rfo rm flo w n o r m a lis a tio n p r e - p r o c e s s in g s te p s ! S o u r c e : im a g e d a t a b a s e o f t e m p o r a l s e q u e n c e ! o f T IR o n l y ! ! D e s t: s o u r c e im a g e w i t h ! lo w - c lo u d a n d e d g e s b itm a p s ! L o ca l v a r ia b le s s t r i n g file n a m e s y s te m (" c le a r" ) l o c a l D B in, c h a n n e ls, p asses, a s k " Im a g e s e q u e n c e f i l e n a m e : lo o p l o c a l " fili ! Swap i n p u t c h a n n e l s t o p r e p r o . p i x f o r e n h a n c e m e n t f i l i = f i l e n a m e f ilo ® " p r e p r o d b ic = b a s e , base+ 1 d b o c = l ,2 dbiw® dbow* ! R un PPRO p r e p r o c e s s i n g e n h a n c e m e n t r p p ro p r i n t " T r a n s f e r r i n g r e s u l t s t o e n h a n c e d im a g e " b a s e ® ( l o o p - 1 ) *3+ 1 f i l i = " p r e p r o f i l o = o u t f i l e d b i c = 4 , 5 , 6 d b o c = b a s e , b a s e + 1 ,b a s e + 2 dbiw® dbow® 147 s v e c p ro r v e c p ro en d fo r ! L a b e l im ag e ! T r a n s f e r e n h a n c e m e n t b i t m a p s d b i b = 2 ,3 r iib f o r i = l t o nSEG d b v s* 2 + i+ n S E G d b s n = v e c s e g s ( i) dbob= filo = f ili o u tg e o * o u n i t s = " lo n en d fo r a v e c p ro r v e c p ro ! C le a n u p c a l l D E C lo se(D B in ) PREPRO. EAS : : : : : : : : : : : : : : ! P e rfo rm flo w n o rm a lis a tio n p re -p ro c e s s in g s te p s ! S o u r c e : im ag e d a ta b a s e o f te m p o ra l se q u e n c e ! o f TIR a n d WV s c e n e s Î ! D e s t: TIR a n d PC2 i m a g e , ! l o w - c lo u d an d e d g e s b i t m a p s ! L o c a l v a r i a b l e s l o c a l D B in , D B o u t, lo o p lo c a l s t r i n g file n a m e s y s te m (" c le a r" ) file n a m e = f iii c h a n n e ls , a s k " Im a g e s e q u e n c e f i l e n a m e : passes, f ile = " m e tb a s e sy s te m " m k d ir " + $ o u t d i r f o r i = l t o nSEG d b v s = (n S E G * 2 + 2 )+ i f i l v = $ o u t d i r + " / " + v e c s e g s ( i ) d m sfo rm * f l d n m e = " z c o o r d s v w r ite en d fo r r v w r ite RCORR.EAS re m c o r r e l a t i o n a s p l a n e tw o i s r o t a t e d w r t p l a n e o n e re m d b i c ( l ) = s t a t i c c h a n n e l re m d b i c ( 2 ) « r o t a t e d c h a n n e l " fili ! Open s o u r c e a n d g e t n e e d e d i n f o D B in = D B O p e n (file n a m e , " r " ) c h a n n e l s = D B C h an n els(D B in ) lo c a l # a n g le ,# c h l,# c h 2 ,s tr in g # c h 2 = d b ic (2 ) p r i n t f " F o u n d '/,d c h a n n e l s i n % s \ n " , c h a n n e l s , f i l e n a m e re m s y s t e m ( " e c h o ‘ d a t e ' » r c o r r . t x t " ) p r i n t b o x c l e a r C l , 1 , 8 0 , 2 4 ) ,< 8 (1 ,1 ) f o r # a n g l e = l t o 30 f i l i = " s u b a n a l f i l o = f i l i d b i c * # c h 2 d b o c = 6 dbgc= dbiw® a n g l e = # a n g l e r c e n t r e ® r e sa m p le ® " c u b i c m o n ito r = " o f f ! A ssu m in g t h e y a r e i n o r d e r T IR , W V ... i f ( m o d ( c h a n n e l s ,2 ) < > 0 ) t h e n p r i n t "T he i n p u t f i l e s h o u l d c o n t a i n T IR a n d WV p a i r s o n ly f o r e a c h s c e n e !" r e tu r n p a s s e s = c h a n n e l s / 2 p r i n t f " A s s u m in g %d c h a n n e l s f o r e a c h o f T IR a n d W V \n " ,p a s s e s a s k " P r o c e e d ? " t e x l i f ( f ^ e x t r a c t ( t e x l , 1 , 1 ) < > "y ") th e n c a l l D B C lose(D B in) r e t u r n e n d if r e s u l t # c h l* d b ic ( l) d b i c ® # c h l,6 r co rr d b ic = # c h l,6 v d o c ® l,2 dbiw® vdow® r i v i 7,’/ ,4=0 i f (X lO O a n d ’/,6<> 0) %%4=1 d b i b = 4 vdob®3 o m o d = " o ff dbiw® vdow® r i v b ; s e t up a n d p r o c e s s e a c h c h a n n e l p a i r f o r lo o p -1 to c h a n n e ls by 2 6 y s t e m ( " c l e a r " ) p r i n t f " X n P r o c e s s in g c h a n n e l s #'/,d an d # % d \n \n " ,lo o p ,lo o p + l re s u lt® " A n g le " + f $ s t r in g ( # a n g l e ) + " : " + f$ s tr in g ( im s ta t(1 )) p r in t r e s u lt rem s y a t e m ( " e c h o " + r e s u l t + " » r c o r r . t x t " ) en d fo r m o n ito r ® " o n : : : : : : : : : : : : : : RECT2.EAS : : : : : : : : : : : : : : ! C a l l C c o d e t o h a n d le v e c to r l a y e r s e t c . ! O t h e r w i s e , s t a r t u p IW fro m E a s i ! Swap i n p u t c h a n n e l s t o p r e p r o . p i x f o r e n h a n c e m e n t f i l i * f i l e n a m e f i l o = " p r e p r o d b i c = l o o p ,l o o p + 1 d b o c = l ,2 dbiw = dbow= } V a ria b le s lo c a l D B i n , c h a n n e l s , $ i n , ( p r o m p t , l o o p , l a s t , c a l c , d x ,d y ! R un PPRO p r e p r o c e s s i n g en h an cem en t r p p ro d x = 5 1 2 d y= 512 p r i n t " T r a n s f e r r i n g r e s u l t s t o o r i g i n a l im a g e Swap o u t p u t t o o r i g i n a l im ag e f i l i = " p r e p r o f i l o = f i l e n a m e d b i c = 2 d b o c = lo o p + l dbiw® dbow= ! a s k " S t a r t IW (y ) " t e x l i f ( f ( e x t r a c t ( f d o w c a s e ( t e x l ) ,1 , l)® " y " o r te x l® " " ) ! S t a r t t h e IW s e s s i o n v d O := " F lo w N o r m a l i s a t i o n vdO# ® 1 9 , d x , d y , 2 , 2 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 vdOO®”VDO: ! T r a n s f e r e n h a n c e m e n t b i t m a p s d b ib ® 2 ,3 dbob® r iib th e n r im a g e w o rk s a s k " H i t 0 ) t h e n i f ( f ( v a l u e ( ( i n ) = 0) s t o p l o o p = f ( v a l u e ( ( i n ) > vecsags p rin tf s y s t e m ( " c p m e t b a k .p i x m e t b a s e . p i x " ) ! co p y v e c s t o m e tb a s e f i l i ® $ i n f i l e f i l o = " m e t b a s e d b s l ® f ( v a lu e ( v e c s e g s ( n S E G + 1 ) ) , - i * f ( v a l u e ( v e c s e g s ( n S E G + 2 ) ) dbos® 8 i i a r l i a " \n P ro c e s s in g p a i r % d \n " , l o o p if ( l o o p ® l a s t ) th e n g o to done e n d if la s t= lo o p !g o to done f o r i = l t o nSEG f i l i = " m e t b a s e in g e o ® 1 d b v s = 2 + i f i l o ® o u tg e o ® o u n i t s ® d b s n ® v e c s e g s ( i ) dbsd® ! L o ad Im ag e F ram e "gb ! h i d e w o rk i n p r o g r e s s r d c p " i b r d cp 148 - f c a lc = ( lo o p - l) * 2 + l v d o c = i ,2 dbiw = vdow* î L o ad B itm a p s d b i b = c a l c + l , c a l c + 2 r v d O := " F lo w N o r m a l i s a t i o n vdO# = 1 9 ,d x .d y ,2 , 2 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 d b ic = c a lc ,c a lc + l v d o b = l ,2 oinod="ov® r ! L oop o v e r im a g e c h a n n e l s ! a s k " Im a g e a r c h i v e f i l e : " f i l i f i l i = " a p r 9 4 . p i x D B in = D B D p e n ( f i l i , " r " ) c h a n n e l s = D B C h an n els(D B in ) l a s t = 0 f o r lo o p = l t o c h a n n e ls b y 2 s y s t e m C 'c l e a r " ) p r i n t iv b done: vdOO*"VDO: r im a g e w o rk s rem c o n t i n u a o n ! U nhide d i s p l a y r d c p " I s " " io 2 ,1 ,2 " a s k " lo o p : " v d ic i f ( v d i c ( l ) ! = 0 ) th e n lo o p = v d i c e n d i f p r i n t f " \ n P r o c e s s i n g p a i r % d \ n \ n " , ( ( l o o p - l ) / 2 ) +1 r d c p " g d 1 , 2 r d cp en d fo r i f ( l o o p = l a s t ) t h e n g o to done e n d if la s t= lo o p ! C le a n u p c a l l D B C lo se (D B in ) : : : : : : : : : : : : : : RECT3. EAS a s s u m e s n o WV c h a n n e l i s p r e s e n t . PCA p r o d u c t d i s p l a y e d ! T h is v e r s io n T h e re fo re no ! Î L o a d Im ag e F ram e f i l o * f i l i d b iw » vdow= r i v i r dcp " id 2 ,1 ,2 " ! V a ria b le s l o c a l D B i n ,c h a n n e l s , $ i n , $ p r o m p t , $ i f i l a , l o o p , l a s t , c a l c , d x , dy d b i c = l o o p , lo o p + 1 r dcp " Is" ! L o ad B itm a p s d b i b = l o o p + l , lo o p + 2 r iv b d o n e: v d o c = l ,2 v d o b = l,2 o m o d = " o v er rem c o n t i n u e o n e n d f o r d x = 5 1 2 dy*512 ! C le a n u p c a l l D B C lo se(D B in ) s y s t e i n ( " c l e a r " ) ! L oop o v e r im a g e c h a n n e l s a s k " Im ag e a r c h i v e f i l e : " f i l e $ i f i l e = f i l e D B in = D B O p e n ( f i l e , " r " ) c h a n n e l s = D B C h an n els(D B in ) a s k " S t a r t IW ( y ) " t e x l if ( f $ e x tr a c t( f $ lo w c a s e ( te x l) ,l,l) * " y " o r te x l= " " ) ! S t a r t t h e IW s e s s i o n v d O := " F lo w N o r m a l i s a t i o n vdO# = 1 9 , d x . d y , 3 , 3 . 0 , 0 , 0 , 0 , 0 . 0 , 0 , 0 , 0 , 0 , 0 vdOO="VDO: REDUCE. EAS : : : : : : : : : : : : : : rem Remove a l l v a lu e s i n a l l v e c t h a t a r e n o t u n d e r t h e flo w b itm a p lo c a l i th e n r im ag ew o rk s a s k " H i t = - 5 ) t h e n %%1=1 e ls e 1=0 sy s te m (" c le a r" ) i f ( '/ .8 < - 3 0 ) t h e n %%2=1 e l s e %%2=0 e n d if lo o p = l $ p ro m p t= " lo o p (" + f $ s tr in g ( lo o p )+ " ); " p r i n t f " % s " ,$ p ro m p t i n p u t " " $ i n i f ( f $ l e n ( $ i n ) O 0 ) t h e n i f ( f lv a l u e ( $ i n ) = 0 ) s to p lo o p = flv a lu e ($ in ) if ( % % l = l ) t h e n %3=0 e l s e %3=%2 p r i n t f " P r o c e s s i n g im a g e %d % s \ n " , l o o p , D B R ead C h an D esc(D B in , l o o p ) RTARG.EAS rem o n t a r g e t p i x e l s a s b i t m a p tw o i s r o t a t e d w r t b i t m a p o n e rem d b i c ( l ) = s t a t i c c h a n n e l re m d b i c ( 2 ) = r o t a t e d c h a n n e l i f ( l o o p = l a s t ) th e n g o to done e n d if la s t= lo o p lo c a l # a n g le ,# c h l,# c h 2 ,# c o u n t,s trin g # c h 2 = d b ic (2 ) r e s u l t # c h l= d b ic (l) !g o to dona ! L o ad B itm a p s c a l c = ( l o o p - l ) *2+1 d b i b = c a l c + l , c a l c + 2 v d o b = l ,2 o m o d = " o v er p r i n t b o x c l o a r ( l , l , 8 0 , 2 4 ) ,0 ( 1 , 1 ) s y s te m (" e c h o ‘ d a t e ' > r t a r g . t x t " ) s y s t e m ( " e c h o R o t a t i o n b e tw e e n p l a n e s " + f $ s tr in g ( # c h l) + " and " \ + f $ s tr in g ( # c h 2 ) + " » r t a r g . t x t " ) r iv b ! L o a d Im ag e F ram e d b i c = l o o p v d o c = l dbiw = vdow= rem c o u n t p i x e l s i n s t a t i c c h a n n e l %6=%%{#chl+4} d b ic = 6 d b iw = e x c l u d e » a r r a y o p = a r r s e g = 3 d b s n = " j u n k d b s d = " u s e d b y r c s t a t s t o g e t t h e im ag e sum r r c s t a t s # c o u n t = i m s t a t ( 2 ) done: f o r # a n g l e = - 2 0 t o 60 b y 5 f i l i = " s u b a n a l f i l o = f i l i d b i c = 6 d b o c = 7 d b g c » d b iw » e in g le = # a n g le r c e n t r e » r e s a m p le » " n e a r m o n ito r = " o f f ra m c o n t i n u e o n e n d f o r I C le a n u p c a l l D B C lo se (D B in ) RECTIFY.EAS t o h a n d le v e c t o r l a y e r s e t c . fr o m E a s i ! O th e rw is e , ! C a l l C co d e s t a r t u p IW re m c o p y b i t m a p i n t o im ag e p l a n e f o r r o t a t i o n if(% % { # c h 2 + 4 } = l) %6=1 r r o t %6=0 re m d e f i n e o n t a r g e t p i x e l a s # - C b i t 2 * b i t l » l } / # b i t l %6=%%{#chl+4}*%7 Î V a ria b le s lo c a l D B in ,c h a n n e ls ,lo o p ,la s t,d x .d y d x = 6 4 0 d y= 640 ! S ta r t th e IW s e s s i o n d b i c = 6 v d o c = l d b iw = vdow= re m r i v i e x c lu d e » a r ra y o p » a r rs e g = 3 d b s n = " ju n k d b sd = " u se d by r c s t a t s t o g e t th e - 149 - re m c o u n t p i x e l s o v e r l a p r im s ta t ( l) » i m s t a t (2 ) /# c o u n t re s ta te # z [ l ] = - l # x [ 2 3 = - 2 # x [ 3 ] = - l # x [ 4 ] =0 # x [ 5 ] = 0 # x [6 3 = 0 # x [ 7 ] = l #% [8] =2 # x [ 9 ] = l r e s u lt» " A n g le " + f $ s t r in g ( # a n g l e ) + " ; " + f ( s t r i n g ( i m s t a t (1 ) ) p r i n t r e s u l t sy s te m (" e c h o " + r e 3 U lt+ " » r t a r g . t x t " ) e n d f o r s y s ta m C ’e c h o ‘ d a t e * > > r t a r g . t x t " ) # y [ l ] = - l # y [2 ]= 0 # y [3 ] = l # y [4 ]= -2 # y [8 ]» 0 # y [9 ]» l re m : U sage file n a m e s t a r t . i n p u t s t a r t . o u t p u t s y s t e m ( " c l e a r " ) p r i n t ®(BOLD), ®(REVERSE), " S o b e l g r a d i e n t v e c t o r c o m p u t a t i o n " , ID(ALLOFF) p r i n t i n p u t " D a ta b a s e file n a m e : " $ fn in p u t " S t a r t in p u t c h a n n e l: " # in in p u t " S t a r t o u tp u t c h a n n e l: " # o u t m o n ito r = " o n SEGMENT.EAS # y [ 5 ] =0 # y [ 6 ] » 2 # y [ 7 ] = - l lo c a l # i f i l e » " a p r s t o r m f l s z = 7 , 7 m ask* t h i n l i n e = " O F F k e e p v a l u » f a c t o r » ! f o r # i = l t o 16 p r i n t " P r o c e s s i n g im ag e " + f $ s t r i n g ( # i ) p r i n t re m p r i n t " lo w c l o u d r e m o v a l" p r i n t " h i g h a n d lo w c l o u d re m o v a l" m o d el on " a p r s t o r m rem t e m p e r a t u r e c o n v e r s i o n re m % {# i+ 3 2 }= 0 . 5 8 # % { # i } - 9 0 .1 ; % { # i+ 3 2 } = 0 . 584=*‘ ( 2 5 5 - y .{ # i} ) - 9 0 . 1 ; re m re m o v e lo w c l o u d re m i fC /.{ # i+ 3 2 > > = -5 ) y .{# i+ 3 2 > = 0 ; i f ( % { # i+ 3 2 } < - 3 0 o r U # i + 3 2 > > - 5 ) % {#i+ 32}= 0; endm odel p r i n t " c u m u lu s f i l t e r i n g " re m mode f i l t e r i n g t o re m o v e c u m u lu s p u f f s d b ic = # i+ 3 2 d b o c * d b i c r fmo m odel on $ fn re m I g r a d i e n t % {#out}= (% { # in } [ - 1 , - 1 ] * # x [ 1 ] +%-C#in} [ 0 , - 1 ] * # i [2 ] + y .{# in > [ 1 , - 1 ] * # x [3 ] + \ y , { # i n } [ - l , 0 ] * # x [ 4 ] + % { # in } [ 0 , 0 ] * # x [ 5 ] + % { # in } [ 1 . 0 ]* # x C 6 ]+ \ y . { # i n } [ - l , 1 ] # x [ 7 ] + % { # i n } [ 0 , l]* # x [8 ] + % { # in } [ 1 . l]* # x C 9 ] ) ; re m Y g r a d i e n t % { # o u t + l } = ( % { # i n + l } [ - l , - l ] * # x [ l ] + % { # i n + l } [ 0 ,- l ] * # x C 2 ] + y .< # i n + l > [ l , - l ] * # x [ 3 ] + \ y .{ # i n + i > C - l , 0 ] * # x [ 4 ] + y .< # in + l } [ 0 , 0 ] * # x [ 5 ] + % { # i n + l } [ 1 , 0 ] * # x [ 6 ] + \ '/ { # o u t + l > [ - l , 1 ] * # x [ 7 ] + % { # o u t+ l } [ 0 , 1 ] * # x [ 8 ] + % { # o u t+ l} [ 1 , l]* # x [9 ] ) ; re m M a g n itu d e o f g r a d i e n t + a b s ( % { # o u t+ l} ); p r i n t " g r a d i e n t c o m p u t a t i o n " re m c o m p u te g r a d i e n t im a g e s d b o c = # i+ 1 6 r f s o b e l p r i n t v e c t o r % { # o u t+ 2 } = a b s (% { # o u t} ) re m A n g le o f g r a d i e n t v e c t o r % - [# o u t+ 3 } = a ta n (% { # o u t+ l} / % { # o u t} ) ; SHOHREG.EAS :::::::::::::: f o r i= l to 8 f ile = " r e g " + f $ s tr in g ( i) en d fo r lo c a l i d b ic = l vdoc= i r iv i SOBS.EAS :::::::::::::: ! S obel lo o p p r o g SQBEDGE.EAS ‘ C a lc u la te s o b e l g r a d ie n ts f o r edge s h a rp e n in g tr a c k i n g ! F rom PPRQ2 ! I n p u t P l a n e : ! S o u r c e : im ag e d a t a b a s e o f t e m p o r a l s e q u e n c e o f T IR o n l y 1 - IR ! L ocal v a r ia b le s s t r i n g file n a m e lo c a l $ o u t,i ! I n i t i a l l o w - c lo u d b i t m a p 1 l o w - c lo u d m ask" m odel o n " p r e p r o .p i x LUT = >-5C %%2=1 e l s e y.y.2=0 e n d i f endm odel (p a s s 1) p r i n t if(% K 1 0 9 ) th e n \ " C r e a tin g p a s s ! fro m te m p e r a tu re s y s te m (" c le a r" ) file n a m e = fi1i ! P a s s 1 lo w c l o u d fr o m e i g n 2 p r i n t r e g io n s .. " A d j u s t i n g l o w - c lo u d if(% % 2= 0) t h e n Î Mode f i l t e r lo w c l o u d ( p a s s 2) f i l e = " p r e p r o . p i x db o c= 3 f l s z = 7 , 7 t h i n l i n e = " o f f k e e p v a l u » p r i n t " FMO" r fmo ! P a s s 2 l o w - c lo u d t o b i t m a p p r i n t " d b ic * 3 M odule S to r in g r e s u lt s " m odel on " p r e p r o .p i x y,y,2=0 e l s e y,y,2»l e n d i f endm odel i f(% 3 > 0 ) ! S obel edges p r in t "E d g e e n h a n c i n g b o u n d a r i e s . . . " l o c a l D B in , c h a n n e ls , passes, a s k " Im a g e s e q u e n c e f i l e n a m e : lo o p l o c a l " fili ! O pen s o u r c e a n d g e t n e e d e d i n f o D B in = D B Q p e n C f ile n a m e ," r" ) c h a n n e l s » D B C h a n n e ls (D B in ) p rin tf m odel on " p r e p r o .p i x %3=%1 e l s e y.3=0 e n d i f en d m o d e l ! " F o u n d %d c h a n n e l s i n % s \ n " . c h a n n e l s , f i l e n a m e p a s s e s * c h a n n e ls a s k "P ro c e e d ? " t e x l i f ( f ( e x t r a c t ( t e x l , 1 , l ) 0 " y " ) th e n c a l l D B C lo se (D B in ) r e t u r n e n d i f s y s t e m ( " e c h o " + f il e n a m e + " >r e s u l t s " ) » r e s u l t s ; echo » r e s u l t s " ) s y s te m (" d a te ! s e t u p an d p r o c e s s e a c h c h a n n e l f o r lo o p = l t o 8 y sta m (" c le a r" ) p r i n t f " \n P r o c e s s in g ch a n n el # y ,d \n \n " ,l o o p c h a n n e ls ! Swap i n p u t c h a n n e l s t o p r e p r o . p i x f o r e n h a n c e m e n t f i l i = f i l e n a m e f i l o = " p r e p r o d b i c = l o c p d b o c = l dbiw = th e n ! R un SOBEDGE p r e p r o c e s s i n g en d fo r enhancem ent r sobedge ! C le a n u p c a l l D B C lo se (D B in ) f a c t o r » ! dboc»7 p r i n t " M odule FSOBEL" r f s o b e l :::::::::::::: d b i c » 7 e x c lu d e = 0 a r r s e g « 8 ! C o l l e c t e l e m e n t s o f i m s t a t (6 ) f o r i= l to 6 $ o u t= $ o u t+ f $ s tr in g ( im s ta t(i) )+ " " e n d f o r p r i n t ( o u t s y s t e m ( " e c h o " + ( o u t+ " » r e s u l t s " ) p rin t SUBREG.EAS lo c a l i r rc s ta ts "DONE!" : : : : : : : : : : : : : : SOBEL. EAS : : : : : : : : : : : : : : re m x a n d y g ra d ie n t f i l t e r s l o c a l # x [ 9 ] ,# y [ 9 ] ,$ f n ,# in ,# o u t d b s z = 6 0 0 ,6 0 0 d b n c = l u p l e f t = - 3 0 0 ,- 3 0 0 l o r i g h t » 3 0 0 ,3 0 0 m a p u n i t s = " m e t r e s dbsd® g c p f o rm = " x y x y f i l i = " r e g i o n s dboc®2 r e s a m p l e ® " c u b i c o r d e r ® ! m em size® p c io p ® " a d d p c i v a l ® ! f o r i» 2 t o 7 f i l o ® " r e g " + f $ s t r i n g ( i ) file = filo r p c im o d d b ic = i d b g c= i r r e g en d fo r TEMP2.EAS m odel o n " t e s t . p i x - 150 i f ( 7 , ‘/ ,2 = l) %2=0 en d m o d e l s e g = -l f la g = l r dcp "gc 1 ,8 r d cp "g c 2 ,7 r d cp "g c 3 ,4 TEMPS.EAS i f (7.3=0) t h e n 77.2*1 e l s e %%2=0 e n d i f en d m o d e l m o d el o n " t e s t . p i x : : : : : : : : : : : : : : TEMP.EAS i f ( 0 .S 8 4 * C 2 5 5 - 7 .i ) - 9 0 .1 > - 5 ) e l s e 7.72=0 e n d i f en d m o d e l m odel on " t e s t . p i x t h e n 7.7.2*i TEMPS.EAS : lo c a l # i,# s r c ,# d e s t f o r # 1=1 t o 8 m o d el o n " te m p s 2 7 , { # i - l + # d e s t } = 0 . 5 8 4 * ( 2 5 5 - % { # i - l + # s r c } ) - 9 0 .1 rem 7 .i # i - l + # d e s t } ® ( 7 .{ # i - l + # s r c } + 9 0 .1 ) / 0 .5 8 4 en d m o d e l e n d f o r TEMPSEG.EAS :::::::::::::: TEST.EAS i=VDOpen("VDOO") :::::::::::::: lo c a l i 8 w r ite en d fo r lo c a l i c a l l V D C lo s e ( i) TOJPG.EAS ! E x p o r t n o v98 s to rm a s j p e g s e q u e n c e f o r l o c a l d i s p la y lo c a l i,c h a n n e ls ,in f ile fili= " E n o v 9 8 in f ile = D B O p e n ( f ili," r " ) c b a im e l 8 = D B C h a n n e l B ( i n f i l e ) c h a n n e ls f i l o » " n o v 9 8 / " + f $ s t r i n g ( i ) + " . jp g " d b ic = i r fe x p o rt en d fo r : : : : : : ; : : : : : : : TO^LL.EAS p ix e l-> P S w ith in m e tb a s e .p ix m e t b a s e x 2 .p i x ! re p ro je c t ! th e n P S - > lo n /la t in lo c a l i f o r i = l t o 11 f i l i = " m e t b a s e i n g e o = l d b v s = 2 + i f i l o = o u n i t s * d b s n = f $ s tr in g ( 2 4 1 1 + i) dbsd= o u tg e o * s v e c p ro r v e c p ro d b v s = 2 + i+ l l f i l o = " m e t b a s e x 2 o u tg e o = l s v e c p ro r v e c p ro en d fo r w ith v w r ite , w ith v re a d V E G .5. EAS : : : : : : : : : : : : : : Î E x p o r t v e c s r u n v .S .p l t o re d u c e b y 1 /2 an d re - im p o r t f o r i * 2 t o 12 f i l e = " a p r 9 6 g c p d m s fo rm = " o f f f l d n m e * " z c o o r d d b v s = i f i l v = " o u t . vac s y s te m (" rm o u t .v e c " ) îa s k "" te x l s v w r ite r v w r ite s y s te m (" c a t o u t.v e c s y s te m (" h e a d in .v e c 1 p e r i v .S .p l > in .v e c " ) ! ; t a i l i n . v e c I l e s s " ) !e n d f o r f i l v = " i n .v e c v e c u n it= " p ix a l file = " a 9 6 v e c d b s n = " 2 4 " + f $ s tr in g ( 1 0 + i) s v re a d r v re a d ! a s k "" t e x l e n d f o r VECDISP.EAS v e c to r s t o b itm a p d i s p la y :::::::::::::: ! T ra n sf l o c a l $ i n f i l e , D B ,s a g , f l a g , v i d i n p u t " D a ta f i l e : file = $ in f ile " $ i z x f i l e D B = D B O p e n ( $ i n f i l e ," r " ) !p o ly in f o = " b o th ! r dcp "g c " + f $ s tr in g ( v id ) + " ,7 " f i l e » " r e g i o n s d m s fo rm = " o f f fld n m e = f o r i = l t o d b v s = i+ l f i l v = " r e g i o n " + f |s t r i n g ( i ) m o d a l on " m id a e g if(% % 3= 1) t h e n i f ( ( 0 . 5 8 4 * ( 2 5 5 - 7 . 8 ) - 9 0 . 1 ) < - 3 0 ) t h e n 7.7,9=1; e l s e %%10=1; e n d if e ls e 7.7.9=0; 7.7,10=0; e n d i f endm odel fo r i= l to s iv v r iv v ! a s k " n e x t : " TEXl e l s e fla g = 0 e n d if e n d w h ile !v d o b = 3 # s r c = l # d e s t= 9 :::::::::::::: v id * 0 w h i l e f l a g > 0 s e g = D B N e x tS e g (D B ," V E C " ,s e g ) i f ( s e g O - l ) t h e n d b v 8 = s e g v d ob= 2 d b v w * 0 ,0 ,5 1 2 ,5 1 2 p c lg = v i d = v i d + l v d o b = v id p o l y i n f o = " b o t h r d c p "gc " + f $ s t r i n g ( v i d ) + " ,7 " r i v v ! p o ly in fo * " p o in ts r v w r ite - 151 A -2 P e r l S crip ts m k d a te . p i C o n v e rt v e c t o r f ile n a m e s t o a d d tO .p i : : : : : : : : : : : : : : # ! / u s r / b i n /p © r l # C a l c u l a t e h o u r s r e l a t i v e t o tO a n d p a s t e i n t o new s h e e t # !/u s r/b in /p e rl d a t e /t i m e fro m d i r e c t o r y # o p e n d ir( D IR ,$ A R G V [ 0 ]) ; chdxr " /u s r /b ig /d a ta /w o rk /th e s is /f in is h /in d ic e s " ; $ym *$AR GV[0]; $ y m = ~ / \ / { l > ( \ w { 3 » . * ( [ 0 - 9 ] { 2 } ) \ / ? l / ; $ y e a r = $ 2 ; |m o n * $ l ; $tO=$ARGV[03 ; $ b a s e = $ A R G V [i]; # $ tO = 1 3 * 2 4 + 8 ; Q s ta t8 = ‘ c a t $ b a s e . s t a * ; ® f i l e s » ‘ c a t $ b a s e .r im ‘ ; # ® s t a t s « ‘ c a t j A . s t a ' ; # ® f i l e s = ‘ c a t j A .r u n * ; w h i l e ( $ i = s h if t( O f i l e s ) ){ i i = ~ / e c h o ( b c .- C 6 } ) / ; $ t i m e « ‘ e c h o I I I p / t i m e s '; $ tim e = ~ /“ . + \ t . { 8 } ( . .) $ h rs = $ l* 2 4 + $ 2 + l3 /6 0 ; $ h r s t O = $ h r s - |t O ; p rin t(" $ h rs tO \t" .s h if t( O s ta ts ) ); © n a m e * ( " ja n " , " f e b " , " m a r " , " a p r " , " m a y " , " j u n " , " j u l " , " a u g " , " s o p " , " o c t " " n o v " ," d e c " ) ; $ i * 0 ; f o r (® n a m e ) { i f d n a m e C I i] e q lc ($ m o n ) ){ } b a tc h .p l f o r e n t i r e c a s e o p e n d i r ( D I R , ” IK S R C " ); # B a tc h p r o c e s s i n g $ i = l ; w h ile ( $ lin e = r 6 a d d ir ( D I R ) ) { # e n s u r e i t i s a n im a g e f i l e i f ( | l i n e * " / ( “b c \w + ). ( j p g ) / i ) { # c o n v e r t t o ra w f o r m a t $ fn a m = $ l; s y s t e m ( " c o n v e r t IM S R C /ll.1 2 g r a y : $ l .b in * ') ; $ s t a m p » ‘ e c h o l l i n e . /tim e s ' ; I p r i n t " \ n \ n P r o c e s s i n g im a g e $ i ; \ n " j p r i n t " \ t $ s t e u n p \ n " ; # I n t e r f a c e t o C p r o g m a s k .c f o r c o m p u t a t i o n s o p e n ( R E T ," c a t l f n a m . b i n ./ m a s k 2 > ftl l > t p . b i n i I''); # p r i n t s y e a r , m o n th , d a y , h o u r , m in u te w h i l e ( | e n t r y = r e a d d i r (D IR ) ) •( $ m in * (); i f ( l e n t r y * " / " ( [ 0 - 9 ] { 2 } ) ( [ 0 - 9 ] { 2 } ) $ /) { $ d a y * |l ; |h o u r * $ 2 ; $ m in = 0 ; } i f ( $ e n t r y = - / " ( [ 0 - 9 ] { 2 » ( [ 0 - 9 ] < 2 » ( C 0 - 9 ] { 2 } ) |/ ) { $ d a y = $ l; $ h o u r = $ 2 ; |m in = $ 3 ; } if ( $ e n tr y * " /- ( [ 0 - 9 ] { 2 } ) ( [ 0 - 9 ] { 2 } ) 2 ( [ 0 - 9 ] a ,2 » l/) - C $ d a y = $ 3 ; l h o u r * $ l ; $ m in = l2 ; > if ( I m in ne ( ) ) { $ c o d e * $ y e a r * 1 0 0 0 0 0 0 0 0 + lm o n * 1 0 0 0 0 0 0 + |d a y * 1 0 0 0 0 + |h o u r * 1 0 0 + $ m in ; p r i n t " $ c o d e \n " ; >} c lo s e d ir(D IR ); w h ile ( $ lin e = < R E T > ) { p r i n t " l l i n e " ; m k e n v i v e c .p l i f ( $ l i n e = " /.+ r e a d , (\d + ) h ig h c lo u d /){ h i g h c l o u d c o u n t |h c = $ l ; } i f ( l l i n e * ' ' / . +v a lu © : ( \ d + . \d + ) / ) { # g ra b c y c lo n ic in d e x $ c i « $ l ; # g ra b w h i l e ( |i n = s h if t( © a ) ){ i f ( Î ( $ i n = " / " \ w / i) ) { |i n = " s / { l , } / \ t / ; # c o n v e rt a l l sp ace seq u e n ces to s in g le ta b s $ in * " s /“ \ t / / ; # re m o v e l e a d i n g t a b p r i n t l i n ; # s t o r e r e s u l t s s y s t e m ( " c p t p . b i n A N A L Y S IS /lfn a m .|i" ) ; s y s te m (" rm lf n a m .b i n " ) ; s y s te m (" c p te m p l a t e .h d r A N A L Y S I S / l f n a m .li .h d r " ) ; s y s t e m ( " e c h o | i \ t $ h c \ t l c i » A N A L Y S I S / r e s u l t s " ) ; $ i+ + ; m k ta b .p l } p lo t.p l d ay , h o u r. $aum *‘ e c h o In a m e I . . / p / t i m e s ' ; fira d s * ‘ c a t p lt4 .p l © in=<>; © f ig s * g re p (/\\in p u t< s 6 a ta t\/[0 - 9 ]+ \.te x .♦ /,fiin ); f i t i m e s = 'g r e p H o u rs [ 0 - 9 ] * . t e x ' ; # w h i l e ( I f i g = s h i f t © fig s ){ I f i g * " / . * s 6 s t a t \ / ( [ 0 - 9 ] + ) \ . t e x . * /; |f i g = $ l; i f ( ! g r e p ( / “ $ f i g \ . t a x . » / , © t i m e s ) ) { # rem ove tim e c o r r e l a t i o n v a r s p u sh ® p s ,|l ." .p s " ; > |dir*$A R G V C O ]; o p e n d i r ( D I R , $ d i r ) ; w h i l e ( | l i n e * r e a d d i r ( D I R ) ){ i f ( l l i n e * " / (\d + Z ? \d * ) /) • ( p r i n t " l l i n e \ n " ; > > > c lo s e d ir(D IR ); : : : : : : : : : : : : : : d ir n a m e s .p i T r u n c a t e l e a d i n g p a t h nam e s f r o m d i r l i s t w h ile C $ in = < > )-{ i f ( | i n * ~ / . + \ / ( \ w + ) \ / ? l / ) { p rin t " |l \ n " ; > # ! /u s r/b in /p e rl I . / t i m e n u m '; c lo s e ( S T A T ) ; } # !/u s r/b in /p a rl $ d is k = $ l; # |i + + ; # $ p = $ i/2 7 8 4 6 « 1 0 0 ; # p r i n t STDERR "In a m e $ d is k \t$ p \% \n " ; p r i n t " In u m I c o u n t $ n a m e \n " ; } * . r a d '; p r i n t ( " d a y \ t h o u r \ t m in u t e \t m e a n \t B td e v \tm a x \n " ) ; w h ile ($ ln = s h if t( © tim e s )){ $ r d = s h i f t ( O r a d s ) ; $ rd = “ s / { l , > / \ t / g ; c h o m p ( l l n ) ; $ l n * “ / . * \ t . * .* ( . . ) ( . . ) ; ( . . ) / ; i f ( $ l n ) { p r i n t ( " |i \ t $ 2 \ t $ 3 " .$ r d ) ; } d ir lis t.p l Dump v e c e l e m e n t s f r o m d i r e c t o r y o p a n ( S T A T ," s t a t s " ) ; | i = 0 ; w h ile ($ lin e = < S T A T > ){ l l i n e * " / " ( [ 1 - 3 ] ) .( [ 0 - 9 ] + ) .( b c \w + \.jp g ) /; | c o u n t * $ 2 ; |n a m e * |3 ; c h d ir I d i r ; -1 * . j p g |i $ i = " s / " \ t / / ; # c h o p l e a d i n g t a b s | i = ~ s / \ t / \k / g ; $ i » “ s / $ / \ \ \ \ / ; c h o p ( l i ) ; # re m o v e \ n fr o m e n d p r i n t "$ i \\h lin e \n " ; } © tim e s * ‘ l s ©a* <>; f o r e a c h ( ©a ) { : : : : : : : : 1: : : : : c p .p l w h i l e ( |i n = < > ) { $ i n = ~ / “ ( . { 8 } . j p g ) \ t ( . -» ) $ /; p r i n t " c o n v e r t - n e g a t e - n o r m a l i z e - p a n b l a c k - d r a w ' f i l l R e c t a n g l e 5 ,1 0 2 6 0 , 2 5 ’ - p a n y e l l o w - d r a w ’ t e x t 1 0 ,1 0 \ " $ 1 $ 2 \ " ’ $1 j p g / | l \ n " ; # r e tu r n # n u m e r ic e n t r y > > > > $dir=$A R 6V C 0] ; # !/u s r /b in /p e r l ©a=<>; # s l u r p s t d i n > > d a te s .p i : ; : m i n u te fr o m t i m e s . c o u t p u t la s t; } $ i+ + ; } l m o n = |i + l ; # w h ile (© p s ){ l o u t = j o i n " " . s h i f t © p s , s h i f t © p s , s h i f t © p s , s h i f t fip s ; I f i g * s p r i n t f ( "% 0 2 d " , + + $ i ) ; p u s h © ru n ," m p a g e - o - 4 - c -d p " . l o u t . " > f i g " . I f i g . ” . p s \ n " ; } o p o n (O U T ," > m k 4 .s h " ); p r i n t OUT © ru n ; c lo s e ( O U T ) ; a y s t e m ( " s h m k 4 . s h " ) ; # m ake t h o s e f i g s ! > d .p l $ i = l ; w h i l e ( $ a * s h i f t (© a) )•( p r i n t " | i \ t $ a " ; $ i+ + ; s y s t e m ( l a ) ; } ®a=<>; # c r e a t e th e ly x p l o t f i l e f if o u r f ig s * ‘l s f i g ? ? . p s ‘ ; |i = 0 ; w h i l e ( I f i g l n * 8 h if t © fo u rfig s ){ chop I f ig l n ; # | f i g = s p r i n t f ( " F i g u r e % 0 2 d " ,+ + $ i ) ; l f i g = " p u s h © o u t, " \ \ b e g i n { f i g u r e } ■ C W c e n te rin g - 152 - \\re s iz e b o x * { 6 in > { 6 in )" C " . " \\in c lu d e g ra p h ic s { s 6 s ta t/" . $ f ig ln ." > } W p a r} \ \ c a p t i o n { '’ .$ f i g ." > \\e n d { f ig u r e > \n " ; v e c s tr ip .p l # !/ u s r / b i n /p e r l S t r i p LINE a n d POINT f o r a c a d f o r m a t v e c s openC lN ,$A R G V [0] ) ; w h i l e ( $ l i n e = < I N > ) { i f ( $ l i n e » “/ + ( [0 -9 ] + \. [0 -9 ]+ ) + ( [0 -9 ] + \. [ 0 - 9 ] + ) /) { p r i n t "$1 $ 2 \n " ; > o p « n ( Q U T ," > f i g s .t e x * ') ; clo s e (O U T ); p r i n t OUT ® o u t; } } # \b e g in { fig u re > iX c e n te rin g \ i n c l u d e g r a p h i c s - ( s 6 s t a t / f i g 0 1 .p s } \e n d { fig u re } c lo s e d ir(D IR ); \p a r} \c a p tio n { a > o p a n d i r C D I R / 'c d i a g s " ) ; w h i l e C $ li n e = r e a d d i r ( D I R ) )■( i f ( $ l i n e = " / " b c / i ) { $ s t a j n p = 'e c h o $ l i n e I . / t i m e s ' ; s y s t e m C " c o n v e r t c d i m g s / $ l i n e g r a y : t e m p . b i n " ) ; $ s t a t s = ‘ ./ m a s k < t e m p .b i n ‘ ; c h o p ( $ s t a t s ) ; u n l i n k ( " t e m p . b i n " ) ; p r i n t STDERR " $ s t a t s \ t $ s t a m p " ; " $ s ta ts \t$ s ta m p " ; p rin t # s k i p 23 im a g e s # $ i » 0 ; # do{ # $ lin a * re a d d ir(D IR ) ; # i f ($ lin e = ~ /~ b c /i)-{ $ i+ + ; # } # } w h ile ($ i< 2 3 ); # }> c lo s e d ir(D IR ); file s ta tre p .p l (a lls ta ts .tx t) $ s ta tf l= " a lls ta ts .tx t" ; # re p o rt on s ta ts # s a t th e in p u t file n a m e ® v ars= ‘ g re p p r e d i c t s $ s t a t f l ‘ j f i i n t e r c e p t = ‘ g re p I n t e r c e p t $ s t a t f l ' ; ® s lo p e » ‘ g r e p ’ - x y ’ $ s t a t f l ‘ ; ®R2=‘ g r e p R -S q u a re d $ s t a t f l ‘ ; ®DF_p=‘g r e p p - v a l u e $ s t a t f l ‘ ; $ 1=1 ; w h i l e ( $ v a r B = s h i f t ® v a r s ) { $ v a r s = “ / ' ‘ . +" ( . +) p re d ic t s (.+ )" /; $ v X » $ l ; $vY=$2 ; $ in t» s h if t ^ in te rc e p t ; $ i n t = “ / ‘' . I n t e r c e p t . + ( - ? \ d + \ . \ d * e ? - 7 \ + ? \ d * ) + ( - ? \d + \.\d * e ? - ? \+ ? \d * ) /; $ in t» $ l; $ in te rr= $ 2 ; $ s l = s h i f t A s lo p e ; $ s l = ~ / '‘x y . + \ ] + ( - ? \ d + \ . \ d * e ? - ? \ + ? \ d * ) + ( - ? \d + \.\d * e ? - ? \+ ? \d * ) /; $ s l= $ l; $ s le rr » $ 2 ; $ r 2 = s h i f t AR2; $ r 2 = " " / " M u l ti p l e R - S q u a r e d : $ r 2 = $ l; + ( 0 .\d + )/; $ d f _ p = s h i f t ®DF_p; $ d f _ p = ~ / " .* o n 1 a n d ( \ d + ) d e g r e e s / ; $ d f = $ l; $ d f _ p = " /" . * p - v a lu e : + ( \ d + \ . ? \ d * e ? - ? \ d * ) / ; $ p = $ l; $ f r m f d e f= " % 0 . 4 f " ; # f l o a t i n g p o i n t d e f a u l t f o r m a t $ f r m e d e f = " y ,0 .3 e " ; # s c i n o t a t i o n d e f a u l t f o r m a t $ frm s l= $ frm fd e f; # d e f a u l t fo rm a t s p e c i f i e r $ frm in t= $ frm fd e f; # d e f a u l t fo rm a t s p e c if i e r $ fr m s e rr= $ frm fd e f; # d e f a u lt fo rm a t s p e c if i e r $ f r m ie r r = $ f r m f d e f ; # d e f a u l t fo rm a t s p e c i f i e r $ frm r2 = $ fn n fd e x ; # d e f a u l t fo rm a t s p e c i f i e r $ frm p = $ frm fd e f; # d e f a u l t fo rm a t s p e c i f i e r i f ( a b s $ s K l e - 3 ) { # we h a v e s m a l l n u m b e rs $ frm s l= $ frm e d e f; # u s e s c i - n o t a t i o n } i f ( a b s $ i n t < l e - 3 ) { # we h a v e s m a l l n u m b ers $ frm in t= $ frm e d e f; # u se s c i - n o t a t i o n } i f ( a b s $ s l e r r < l e - 3 ) 'C # we h a v e s m a l l n u m b e rs $ frm se rr= $ fra e d e f; # u se s c i- n o ta tio n } if(a b s $ i n t e r r < l e - 3 ) '( # we h a v e s m a l l n u m b e rs $ frm ie rr= $ frm e d e f; # u se s c i - n o t a ti o n } i f ( a b s $ r 2 < le - 3 ) 'C # we h a v e s m a l l n u m b e rs $ frm r2 = $ frm e d ef ; # u s e s c i - n o t a t i o n } i f ( a b s $ p < le -3 ){ # we h a v e s m a l l n u m b e rs $ frm p = $ frm e d ef; # u s e s c i - n o t a t i o n } $ fr m = " \$ % s = (" . $ f r m s l . "W pm " . $ f r m s e r r . " )% s " . " + ( " . $ f r m i n t . "W pm " . $ f r m i e r r . " ) , " . " R X 2 } = " .$ fr m r 2 ." , " . " p = " .$ fr m p ." , "D F = % d \$ \n " ; $ re a u lt= s p rin tf ( $ f r m ,$ v Y ,$ s l,$ s le r r ,$ v X ,$ in t,$ in te r r ,$ r 2 ,$ p ,$ d f ) ; # c re a te a f i l e fo r each r e s u lt $ f n m = s p r in t f ( " X d . t e x " , $ i + + ) ; s y s t e m ( " > " . $ f n m ." \ " \ \ " . $ r e s u l t . ) ; # . 153 A -3 C P ro g ra m s e x 2 c .c /* ~i/ / * EASI/PACE V 6 .0 , C o p y r i g h t (c ) 1995. I * I *|@ @ @******* * * ******* I * |9 a n d f i x e d up com m ents a b i t . * * R e v i s i o n 1 .1 1 9 9 2 /0 4 /1 3 1 4 :5 4 :4 6 v051 * I n i t i a l r e v is i o n * * / / * C+ C < 8 title { re c t} -C C c o d e t o r e a d d i s p l a y c o o r d i n a t e s a n d g e n e r a t e v e c t o r s } C C The c o d e i s c a l l e d fro m RECTIFY.EAS, a n d c a n n o t b e u s e d C o n i t s own. P l e a s e r e f e r t o t h e RECTIFY d o c u m e n ta t io n C C - * / F o r e a c h v a l u e i n VECTOR a r r a y , * / /* i f v a l u e i s n e g a t i v e , p r i n t w a r n in g u s i n g IM P E rrR e a l */ / * e l s e p r i n t r e s u l t o f pow er f u n c tio n c a lc u la tio n . • / /* */ fo r ( i = 0 ; i < a r g e n t [0 ] ; i+ + ) { i f ( v e c t o r [ i 3 < 0 . 0 ) IM P E rrR e a l ( 1 1 , ERRTYP.WARNING, "VECTOR", v e c t o r [ i ] . i ) ; ^ e l s e f p r i n t f ( R e p o r t , " %f r a i s e d t o i s % f \n " , v e c to r C i] , p o w e r [ i] , p o w ( v e c to r[ i], p o w e r[i])); } * / /* E x it p ro g ram u s in g IM P R e tu rn . * / /* */ IM P R e tu m O ; } f c .c c o u n ts an d c y c lo n ic in d e x ./f in d c lo u d { m a s k file } /* # d e fin e /* < d a ta file */ NOIMG*/ / * A p p ly t h e c y c l o n e t r a c k e r m ask # in c lu d e co m p u te h i g h c l o u d > r e s u ltfile < m a th .h > # i n c l u d e */ < s td io .h > # d e f i n e UBYTE u n s i g n e d c h a r s t r u c t bounds-C f l o a t } *b o u n d s; x ,y ; F IL E * m a s k f i l e ; UBYTE * f r a m e ,* m a s k ; f l o a t A , 6 , L , l , e , D , r , d ; f l o a t * i n d e x ; i n t IM ,S U B IM ,am in ,am ax ; /* */ / * p ro g ra m s. In c lu d e " p c i .h " * / /* in a l l C /* R e a d i n t h e im a g e * / filK ) { in t i,c o u n t; */ # i n c l u d e " p c i . h " R C S ID (" $ Id : E xp $ " ) e x 2 c .c ,v 5 4 .3 1 9 9 7 /1 0 /0 4 1 6 :0 4 :2 1 i n t roainC i n t m a i n _ a r g c , w a rm erd a c h a r * * m a in _ a r g v ) UBYTE v a l ; /* sh o rt in t v a l; */ c o u n t * 0 ; f o r ( i = 0 ; i< IM * I M ;i+ + ){ f r e a d ( & v a l ,B i z e o f ( U B Y T E ) , 1 , s t d i n ) ; /* f r e a d ( & v a l,s iz e o f( s h o rt i n t ) , 1 , s t d i n ) ; * / f r a m e [ i ] = (U B Y T E )v al; i f ( ( i n t ) ( f r a m e [ i ] / 1 5 2 * m a s k [ i ] ) ) c o u n t+ + ; > { /* * / /* D e c la re p a r a m e te r s f o r IM P S t a tu s . * / /* c h a r r e p o r t[6 5 ]; f l o a t i n t a r g e n t [ 3 ] , i ; v o id * / /* In itia liz e f o r I M P S t a tu s . # i f d e f NOIMG p r i n t f ( " % d \ t " , c o u n t ) ; # e l s e f p r i n t f ( s t d o r r , " I n p u t r e a d , %d h i g h c l o u d p ix e ls \n " , c o u n t); # e n d if } v e c t o r [ 1 6 ] , p o w e r[1 5 ]; * a rg s [3 ]; se tu p O { in t i , j ; A = 60*60; B =A /8; L * s q r t ( A ) ; D= e+1; r = e + l / 2 ; / * 45 d e g . SUBIM=IM-2*D; arg u m en t l i s t * / /* a r g s [0 ] = ( v o i d * ) v e c t o r ; a r g s [ l ] p o w e r; a r g s [2 ] * ( v o i d * ) r e p o r t ; l» s q rt(B ); i n r a d ia n s # i f n d e f NOIMG f p r i n t f ( s t d e r r , " I m a g e s id e \ n " ,S U B I M ) ; # e n d if */ / * G et p a r a m e te r s u s in g IM P S t a tu s . * / /* fr a m e » (UBYTE * )m a llo c ( IM * IM ) ; I M P S ta tu s ("VECTOR, POWER, REPO RT;", , C "16 ,1 6 ,6 4 "1 , * , 1 "EX2C. " , "FORCE", a r g e n t , a r g s , m a i n . a r g c , m a in .a r g v ) ; */ /* P r i n t t i t l e page h e a d e r f o r r e p o r t u s i n g IM P P a g e. */ /• ( R e p o r t, 0 ) ; "R . e = 1 .5 * L ; / * 2*L */ * / d = » r * s in ( 0 .7 8 5 4 ) ; /* t h r e s h o l d o f h ig h c lo u d f o r fra m e c o n s i d e r a t i o n * / a m i n = ( 0 .5 * A ) ; / * a m a x = (0 .9 * A ); * / amax=A; / * m ax c a p i n t e r f e r i n g w ith t r u e r e s u l t s * / » ( v o i d *) /* IM PPage %f p o w e r R is %d o n a i f ( Ifra m e ) e x i t ( O ) ; b o u n d s» ( s t r u c t bo u n d s *) m a llo c (9 * s i z e o f ( s t r u c t if(( b o u n d s ) e x it( O ) ; b o u n d s [ 0 ] .x = D -L /2 ; b o u n d s [ 0 ] .y = D -L /2 ; b o u n d s [ 1 ] .x = D - l/2 ; b o u n d s [ 1 ] .y » 0 ; b o u n d s [ 2 ] .x = D + d - l / 2 ; b o u n d s [ 3 ] .x = 2 * D - l ; b o u n d s[ 2 ] .y » D - d - l/2 ; b o u n d s[ 3 ] .y = D - l/2 ; b o u n d s [ 4 ] -x » D + d -l/2 ; b o u n d s [ 4 ] .y = D + d - l / 2 ; fillO ; b o u n d s)) ; 154 - b o u n d s [5 ] . x = D - l / 2 ; b o u n d s[ 6 ] .x = D -d -l/2 ; b o u n d s [7 ] .x = 0 ; # d e f in e b o iin d s [ 5 ] .y = 2 * D - l ; UBYTE u n s i g n e d c h a r m a in O { i n t x ,y ,a d r ; b o u n d s [ 6 ] .y = D + d - l / 2 ; UBYTE i n ; UBYTE •mem; b o u n d s[ 7 ] .y = D -l/2 ; mem®(UBYTE * ) m a l l o c ( 5 1 2 * 6 1 2 ) ; f o r ( x = 0 ; x < 5 1 2 * 5 1 2 ; x + + ) { m e m [ x ] = g e t c h a r ( ) ; i f (m em [x ]> 0 ) m e m [x ] = l; / • s e t 2 5 5 v a lu e s t o 1 * / b o unds[ 8 ] .x = D -d -l/2 ; b o u n d s[ 8 ] .y = D -d -l/2 ; # i f n d « f NOIMG f p r i n t f ( s t d e r r , " D e f i n i t i o n s # e n d if } i n t p e « k ( i n t X, i n t Y, i n t s i z e ) i n t i , j , count ; c a lc u la te d X n " ); > fo r (x = 0 ;x < 5 1 2 ;x + + ) fo r(y = 0 ;y < 5 1 2 ;y + + ){ / * f i l l p o i n t s s o u th * / a d r = y * 5 1 2 + x ; i f ( m e m [ a d r ] ) m e m [a d r]= 0 ; e l s e b r e a k ; ■( } c o u n t = 0 ; f o r ( j = 0 ; j < s i z e ; j ++) f o r (i= 0 ;i< s iz e ;i+ + ) c o u n t + = ( i n t ) ( 2 5 5 - f r a m e [ ( Y + j ) * IM + X + i]) / 1 5 2 ; fo r(x = 0 ;x < 5 1 2 * 5 1 2 ;x + + ) fre e (m e m ); p u tc h a r(m e m [x ]) ; } re tu r n (c o u n t); } E canO { i n t i , j , k , b [ 8 ] , p a d A , p a d B ; f l o a t a c n t ,b m e a n ,m a x i n d e x ; f o r ( j * 0 ;j < S U B I M ; j + + ) { f o r ( i = 0 ; i < S U B I M ; i+ + ) { a c n t = ( f l o a t ) p e e k ( b o u n d s [ 0 ] . x + i ,b o u n d s [ 0 ] . y + j , L ) ; if ( a c n t> * a m in a c n t< a m a x )-( / * do m ean a n d i n d e x c a lc */ fo r(k = i;k < 9 ;k + + ) b [ k - 1 ] = p e e k ( b o u n d s [ k ].x + i,b o u n d s [k ] .y + j, 1 ) ; : : : : : : : : : : : : : : fin d c lo u d .c c lo u d c o u n ts an d c y c lo n ic in d e x . /fin d c lo u d { m a s k file } < d a ta f ile /• c o m p u te h i g h > r e s u ltfile */ / * # d e f i n e NOIMG * / /• A p p ly t h e c y c l o n e t r a c k e r m a s k * / # in c lu d e < m a th .h > # i n c l u d e < s td io .h > # d e f i n e UBYTE u n s i g n e d c h a r f o r ( k = 0 ,b m e a n = 0 ; k < 8 ; k+ + ) b m e a n + = b [ k ]; b m e a n /= 8 ; i n d e x [ j f S U B I M + i] = a c n t / ( b m e a n + 1 ) ; } e l s e i n d e x [j* S U B IM + i]=0 ; s t r u c t bounds{ f l o a t } •bounds; x ,y ; } } fo r (i= 0 ,m a x in d e x = 0 ;i< S U B I M * S U B IM ;i+ + ) if ( in d e x [ i] > m a x in d e x ) m a x in d e x = in d e x [i]; f p r i n t f ( s t d e r r , "Maximum i n d e x v a l u e ; */,4. 2 f \ n " , m a x in d e x ) ; # i f n d e f NOIMG f p r i n t f ( s t d e r r , " S t o r i n g im a g e \n " ); /* fo r(i= 0 ;i< S U B IM * S U B IM ;i+ + ) fw rlte (& in d e x [i], s i z e o f ( f l o a t ) , 1 , s td o u t) ; * / a c n t = 0 ; p a d A = ( i n t ) ( (I M -S U B IM )/2 ); padB =IM -SU B IM -padA ; / * S to r e b la n k b o r d e r t o p * / fo r (i* 0 ;i< p a d A * I M ;i+ + ) f w r i t e ( & a c n t , s i z e o f ( f l o a t ) , 1 , s t d o u t ) ; /* S to r e d a ta l i n e s * / f o r ( i = 0 ; i < S U B I M ; i+ + ) { / * S to r e b la n k l e f t ed g e * / f w r i to ( f c a c n t ,s i z e o f ( f l o a t ) , p a d A ,s td o u t); / * S t o r e im a g e d a t a » / f w r ite ( & in d e x [ i* S U B I H ] , s i z e o f ( f l o a t ) . S U B I H , s t d o u t ) ; /* S to r e b la n k r i g h t edge » / f w rite ( A a c n t, s i z e o f ( f l o a t ) ,p a d B ,s td o u t) ; } / * S to r e b la n k b o r d e r b o tto m * / fo r(i= 0 ;i< p a d B * IM ;i+ + ) f w r i te ( f t a c n t ,s iz e o f ( f l o a t ) , 1 , s t d o u t ) ; # e n d if > m a in d n t a rg c , in t i , j ; IM =512; P IL E * m a s k f i l e ; UBYTE # f r a m e , * m ask ; f l o a t f l o a t * i n d e x ; i n t IM, SUBIM, a m i n , am a x ; /• A ,B ,L ,l,e ,D ,r ,d ; R e a d i n t h e im a g e • / filK ) { in t i,c o u n t; c o u n t=0; fo r(i= 0 ;i< IM * IM ;i+ + ){ / • i n v e r t t h e im a g e s • / / * f r a m e [ i ] = 2 5 5 - g e t c h a r ( ) ; F o r n e g a t i v e (r a w ) im a g e s • / f r a m e [ i ] = g e t c h a r ( ) ; i f ( f r a m e [ i j * m a s k [ i ] > = 152 ) c o u n t ++; / * h i g h c l o u d o v e r w a t e r * / } # i f d e f NOIMG p r i n t f ( " % d \ t " , c o u n t ) ; S e i s e f p r i n t f ( s t d e r r , " I n p u t r e a d , %d h i g h c l o u d p ix e ls \n " ,c o u n t) ; S e n d if } s e tu p O { in t i , j ; c h a r * * arg v ) { /* th e o r ig in a l im a g e s i z e A = 60*60; B =A /8; D = e+ 1; r = e + l / 2 ; SUBIM=IM-2*D; */ mask=(UBYTE * ) m a llo c ( I M * I M ) ; i f ( ! m a s k ) { f p r i n t f ( s t d e r r , " E r r o r a l l o c a t i n g m ask m e m o r y ! \n " ) ; e x it(O ); } fo r (i* 0 ;i< IM * IM ji+ + ) m a s k [ i] = l; /* d e f a u l t t o a l l p i x e l s u s e d * / i f ( a r g c = = 2 ) { / * we h a v e a m a s k f i l e * / m a s k file = fo p e n ( a rg v [ l] ," r" ); i f ( ! m a s k file ){ f p r i n t f ( s t d e r r ," E r r o r re a d in g m a s k file ! \ n " ) ; e x it(O ) ; } f r e a d ( m a s k , 1 ,I M * I M ,m a s k f i le ) ; / * f i l l m ask f r o m f i l e * / f c lo s e ( m a s k f ile ) ; f p r in tf ( s td e r r ," M a s k f ile r e a d \n " ) ; } e l s e f p r i n t f ( s t d e r r , " N o m a s k in g u s e d o n ra w d a t a \ n " ) ; l* s q rt(B ); i n r a d ia n s e = 1 .5 * L ; / • 2*L • / * / d = r * s i n ( 0 .7 8 5 4 ) ; / * t h r e s h o l d o f h i g h c l o u d f o r fr a m e c o n s i d e r a t i o n • / a m i n = ( 0 .5 * A ) ; / • a m a x = ( 0 .9 * A ) ; * / am ax=A; / * m ax c a p i n t e r f e r i n g w ith t r u e r e s u l t s • / # i f n d e f NOIMG f p r i n t f ( s t d e r r , " I m a g e s id e X n " ,S U B IM ); # e n d if fr a m e = (UBYTE * ) m a llo c ( I M * I H ) ; is %d o n a i f ( (fra m e ) i n d e x = ( f l o a t * ) c a l l o c ( S U B I M * S U B I M ,s i z e o f ( f l o a t ) ) ; if ( ( in d e x ) e x it(O ); b o u n d s [ 0 ] .x = D - L /2 ; b o u n d s [ 0 ] .y = D - L /2 ; b o u n d s [ 1 ] .x = D - l/2 ; b o u n d s [ 1 ] . y=0; */ scanO ; b o u n d s [ 2 ] .x = D + d - l / 2 ; b o u n d s[ 2 ] . y = D -d -l/2 ; fre e (b o u n d s ); fr e e ( in d e x ); b o u n d s [ 3 ] .x = 2 * D - l ; b o u n d s[ 3 ] .y = D - l/2 ; fre e (m a sk ); fre e (fra m e ); b o u n d s [ 4 ] .x = D + d - l / 2 ; :::::: f ill.c c a n 't t h i s be done : : : : : : : /* f i l l o th e r s o ftw a re t h e dam ned !? * / b o u n d s[ 5 ] .x = D - l/2 ; b o u n d s [ 4 ] .y = D + d - l / 2 ; b o u n d s [ 5 ] .y = 2 * D - l ; b o u n d s [ 6 ] .x = D - d - l/2 ; t f i n c l u d e < s t d i o .h > e x i t (0 ) ; f i l l O ; b o u n d s = ( s tr u c t bounds * ) m a l l o c ( 9 * s iz e o f ( s tr u c t if(( b o u n d s ) e x it(O ); s e tu p O ; / * C a l l s t o p e e k go h e r e L « s q rt(A ); / • 45 d e g . b o u n d s [ 6 ] .y = D + d - l / 2 ; b o u n d s)); 155 - b o u n d s [ 7 ] .x = 0 ; s t r u c t g rid { f l o a t x ,y ; in t i , j ; b o u n d s [ 7 ] .y = D - l/2 ; b o u n d s [ 8 ] .x = D - d - l/2 ; b o u n d s[ 8 ] .y ~ D - d -l/2 ; / * c o n v e r t t o c e n t r e - r e l a t i v e ( D ,D ) - > ( 0 ,0 ) fo r (i= 0 ;i< 9 ;i+ + ) { b o u n d s [i].x - = D ; b o u n d s [i].y - = D ; >; */ v o id m a in O ; in t r d g r id ( s tr u c t g rid * * ); } d u m p g rid (s tru c t # i f n d e f NOIMG f p r i n t f ( s t d e r r , " D e f i n i t i o n s # e n d if > i n t p e e k C i n t X, i n t Y, i n t in t i,j,c o u n t,p o s ; s iz e ) g rid * ,in t) ; c a lc u la te d X n " ); v o i d m a in O { { c o u n t» 0 ; f o r ( j * 0 ; j < s i z e ; j + + ) f o r ( i » 0 ; i < s i z e ; i + + ) { p o s = ( Y + j) * IM + X + i; i f ( ( X + i ) < 0 |I C X + 1 ) > I M |I ( Y + j ) < 0 |i ( Y + j ) > I M ) h o u t o f bounds * / r e t u r n ( - l ) ; i f ( f r a m e [ ( Y + j ) * I M + X + i ] > = 1 5 2 ) c o u n t+ + ; y r e tu r n ( c o u n t) ; } i n t x p o s , y p o s , g r i d p t , g r i d l e n , chnum ; char in p u t[C H _ IN ]; s tr u c t g rid * th e g rid ; g rid le n = rd g rid (f c th a g rid ); g r i d i n t e r s e c t i o n s */ xpos= ypos= 0; g r i d p t = 0 ; /* s t a r t scan O { i n t i , j , k , b [ 8 ] . p k v a l ; f l o a t a c n t ,b m e a n ,m a x i n d e x ; fo r(j= 0 ;j< IM ;j+ + ){ f o r ( i = 0 ; i < I M ; i + + ) { i f ( !m a s k [ j» I M + i] )•{ /* c e n t r e o v e r la n d m a s s */ in d e x C j * IM + i]=0 ; b r e a k ; } a c n t = ( f l o a t ) p e e k (b o u n d s [ 0 ] .x + i,b o u n d s [0 ] y + j , L ) ; i f ( a c n t > = a m i n && a c n t< a m a x )-[ /* do m ean a n d i n d e x c a l c */ f o r ( k = l , p k v a l ® 0 ; k<9 k& p k v a l > = 0 ; k + + ) { p k v a l = p e e k ( b o u n d s [k ] . x + i , b o u n d s [k ] . y + j , l ) ; if(p k v a l> ® 0 ) b [k - l] = p k v a l; e ls e { in d e x [j* I M + i]“ 0 ; b re a k ; > > i f (pkval> = 0)-C f o r ( k = 0 , bm esm =0; k < 8 ; k+ + ) b m e a n + * b [k ]; b m e a n /= 8 ; i n d e x C j * I M + i ] = a c n t/ ( b m e a n + 1 ) ; } } e l s e in d a x [j* IM + i]= 0 ; >} f o r ( i » 0 ,m a x i n d e x » 0 ; i < I M * I M ; i + + ) i f ( i n d e x [ i ] > m a x i n d e x ) m a x in d a x = in d @ x [ i] ; f p r i n t f ( s t d e r r ," M a x im u m i n d e x v a l u e : 7 .4 .2 f \ n " ,m a x i n d e x ) ; # i f d e f NOIMG p r in tf ( " % f \n " .m a x in d e x ) ; # e ls e f p r in t f ( s t d e r r ," S t o r i n g im a g e \n " ); f w r i t e ( i n d e x , s i z e o f ( f l o a t ) , I M * I M ,s t d o u t ) ; # a n d if } /* s l u r p t h e s t a n d a r d at f ir s t p o in t */ do{ p r i n t f ( " P a i r #%d: " , g r i d p t + l ) ; /* S p o o l i n p u t , a l l o w i n g f o r a b l a n k r e t u r n l i n e */ f o r(c h n u m = 0 ; chnum (% d ,% d )\n " \ , g r i d p t + 1 . t h e g r i d [ g r i d p t ] .% , th e g rid [ g rid p t].y , th e g r id [ g r id p t] .i in d e x = (flo a t e x it(O ); + ) c a llo c ( IM * IM ,s iz e o f(f lo a t)) ; i f ( ! in d e x ) , th e g rid [ g rid p t]. j ) ; } } > w h ile (in p u t[ 0 ] ! = 'q ') ; fre e (b o u n d s); f r e e ( in d e x ) ; d u m p g rid (th e g r id ,g r id le n ); f r e e ( th e g rid ); fre e (m a sk ); fr e e ( fra m e ); } g r id .c © in c lu d e < s t d i o . h > © in c lu d e < s t d l i b . h> © in c lu d e < c t y p e ,h > © d e f in e CH_IN 3 /* N um ber o f a l l o w a b l e d i g i t s */ th e g r id [ g r id p t] .i® x p o s ; /* S t o r e m ouse l o c a t i o n n */ t h e g r i d [ g r i d p t ] . j= y p o s ; p rin tf(" % d - ( % 0 .2 f ,% 0 .2 f ) -> (% d ,% d )\n " \ , g rid p t+ 1 ,th e g r id [ g r i d p t] .x ,t h e g r i d [ g r id p t ] . y in t rd g r id ( s tr u c t g rid * * array ) F IL E * g r i d f i l e ; s t r u c t g r id * v a ls ; in t i,le n ; f l o a t x ,y ; fo r g rid p a ir #s * / g r id f ile = f o p e n ( " g r id f ile .t x t " , " r " ); - 156 - i f (îg rid file X p u t s ( " C o u l d n 't o p e n s t a n d a r d g r i d f r e a d ( & v a l,s iz e o f( s h o rt i n t ) , 1 , s t d i n ) ; ♦ / f r a m e [ i ] = (U B Y T E )v al; i f ( ( i n t ) ( 2 5 5 - f r a m e [ i ] ) / 1 5 2 ) c o u n t+ + ; d efe"); ex it(O ) ; le n = 0 ; w h ile (! f e o f ( g r i d f i l e ) ) if ( f g e t c ( g r i d f i le ) » = ’\ n ’ ) # i f d e f NOIMG p r i n t f ( " % d \ t " , c o u n t ) ; « e l s e f p r i n t f ( s t d e r r , " I n p u t r e a d , %d h i g h c l o u d p ix e ls X n " ,c o u n t); « e n d if } ls n + + ; s e tu p O { in t i , j ; re w in d (g rid file ); ♦ a r ra y » ( s tr u c t g rid ♦ )c a llo c (le n ,s iz e o f( s tr u c t v a ls= # a rra y ; i f ( ! (♦ a rra y )){ p u ts (" E rr o r re s e rv in g A = 60^60; B =A /8; L = s q r t ( A ) ; D = a+1; r = e + l / 2 ; / ♦ 45 d a g . SUBIM=IM-2^D; g rid )); l= s q rt(B ); i n ra d ia n s e * 1 .5 ^ L ; / ♦ 2^L ♦ / ♦ / d = r ^ s in ( 0 .7 8 5 4 ) ; / ♦ t h r e s h o l d o f h i g h c l o u d f o r fr a m e c o n s i d e r a t i o n ♦ / a m in * ( 0 .5 ^ A ) ; / ♦ a m a x = ( 0 .9 ^ A ) ; ♦ / am ax*A; / ♦ max ca p i n t e r f e r i n g w ith t r u e r e s u lt s ♦ / g r i d m e m o ry " ); o x it(O ); « i f n d e f NOIMG f p r i n t f ( s t d e r r , " Im a g e s i d e \ n " ,S U B I M ) ; « e n d if fo r(i= 0 ;i< le n ;i+ + ){ fs c a n f ( g r id f ile ," % f % f " ,& x ,& y ) ; fr a m e » (UBYTE ♦ )m a llo c ( IM ^ IM ) ; v a ls [i].x = x j v a l s [ i ] .y “y; is 7,d o n a if(lfra m e ) e x it(O ); b o u n d s » (s tru c t bounds ♦ ) m a llo c ( 9 ^ s iz e o f ( s tr u c t i f ( Ib o u n d s) e x i t ( O ) ; p r i n t f ( " R e a d %d g r i d p o i n t s \ n \ n " , l e n ) ; fc lo s e (g rid file ); re tu r n (le n ); b o u n d s [ 0 ] .x » D - L /2 ; > b o u n d s [ 0 ] .y = D - L /2 ; b o u n d s [ 1 ] . x » D -1 / 2 ; b o u n d s [ 1 ] . y = 0 ; v o id d u m p g r id ( s tr u c t g rid ♦ g r id ,in t { b o u n d s [ 2 ] .x = D + d - l / 2 ; le n ) F IL E ♦ o u t ; in t i; b o u n d s [ 3 ] .x = 2 ^ D - l ; b o u n d s[ 5 ] .x = D -l/2 ; b o u n d s[ 7 ] . x=0; / ♦ Dump GCPs i n x l y l x2 y 2 f o r m a t ♦ / fo r (i* 0 ;i< le n ;i+ + ) f p r i n t f ( o u t , "'/.d %d % 0 .2 f % 0 .2 f \n " ,g r id [ i] .i,g r id [i].j \ ,g r id [ i] .x ,g r id [ i3 .y ) ; b o u n d s [ 6 ] .y = D + d - l / 2 ; b o u n d s [ 7 ] -y = D -l/2 ; b o u n d s[ 8 ] .i= D - d - l/2 ; b o u n d s[ 8 ] .y * D - d - l/2 ; « i f n d e f NOIMG f p r i n t f ( s t d o r r , " D e f i n i t i o n s « e n d if > fc lo s e (o u t); i n t p e e k ( i n t X, i n t Y, i n t s i z e ) i n t i , j , count ; h is t.c m a in O { i n t i , v e c [2 5 6 ]; # in c lu d e < s td io .h > u n s ig n e d c h a r i n ; w h ile ( ! f e o f ( s t d i n ) ){ } fo r (i= 0 ;i< 2 5 6 ;i+ + ) in ® g o tc h a r ( ) ; v e c [in ]+ + ; p r i n t f ( ’"/,d: % d\n" , i , v e c [ i ] ) ; /♦ « d e fin e NDIMG^/ c y c l o n e t r a c k e r m ask ♦ / « in c lu d e < m a th .h > « i n c l u d e « d e f in e UBYTE u n s i g n e d c h a r c a lc u la te d \n " ); { c o u n t » 0 ; f o r ( j = 0 ; j < s i z e ; j ++) fo r ( i= 0 ;l< s iz e ;i+ + ) c o u n t+ » ( in t) ( 2 5 5 - f r a m e [ ( Y + j) ^ I M + X + i] ) /1 5 2 ; rs tu rn (c o u n t); f o r ( i = 0 ; i < 2 5 6 ; ) v e c [i+ + ]» 0 ; A p p ly t h e b o u n d s [ 4 ] .y = D + d - l / 2 ; b o u n d s [ 5 ] .y = 2 ^ D - l ; b o u n d s[ 6 ] .x = D - d - l/2 ; > b o u n d s[ 2 ] .y » D - d - l/2 ; b o u n d s[ 3 ] .y = D - l/2 ; b o u n d s [ 4 ] .x = D + d - l / 2 ; o u t = f o p e n ( " r e c t i f y . g c p " , "w "); if(! o u t) { p u ts ( " E r r o r w r itin g o u t p u t! " ) ; re tu r n ; /♦ fillO ; b o u n d s)) ; } scan O { i n t i , j , k , b [ 8 ] , p a d A , p a d B ; f l o a t a c n t ,b m e a n ,m a x i n d e x ; f o r ( j = 0 ; j < S U B I M ; j+ + ) { f o r ( i = 0 ; i < S U B I M ; i+ + ) { a c n t» (flo a t)p e e k (b o u n d s [ 0 ] .x + i, b o u n d s[ 0 ] .y + j,L ) ; i f ( a c n t> » a m in &i a c n tC a m a x ) { / ♦ d o m ean a n d i n d e x c a lc ♦ / f o r (k » l;k < 9 ;k + + ) b [k -1 ]» p e e k (b o u n d s[k ].x + i, b o u n d s[k ]. y + j,1 ) ; f o r ( k = 0 ,b m e a n » 0 ; k < 8 ; k + + ) b m e a n + » b [k ] ; b m e a n /= 8 ; i n d e x [ j ♦ S U B I M + i ] » a c n t / (b m e a n + 1 ); } e l s e in d e x [ j♦ S U B I M + i] » 0 ; < s td io .h > } } s tr u c t boundsf f lo a t } ♦ bounds; x ,y ; UBYTE ♦ f r a m e ; f l o a t IM ,S U B IM ,am in ,am ax ; A ,B ,L ,l,e ,D ,r ,d ; flo a t ♦ in d e x ; in t fo r (i= 0 ,m a x in d e x = 0 ;i< S U B I M + S U B I M ;i+ + ) if(in d e x C i] > m a x in d e x ) m a x in d e x » in d e x [ i] ; f p r i n t f ( s t d e r r , " M a x i m u m i n d e x v a l u e : % 4 .2 f \ n " ,m a x i n d e x ) ; « i f n d e f NOIMG f p r i n t f ( s t d e r r , " S t o r i n g i m a g e \ n " ) ; /♦ fo r (i» 0 ;i< S U B IM ^ S U B IM ;i+ + ) f w r ite ( k in d e r [ i] , s iz e o f ( f lo a t) ,1 ,s td o u t); ♦/ / ♦ R e a d i n t h e im ag e ♦ / fillO -C i n t i , c o u n t ; UBYTE v a l ; /♦ sh o rt in t c o u n t» 0 ; f o r ( i= 0 ;i< IM ^ IM ;i+ + ){ f r o a d ( & v a l ,s i z e o f ( U B Y T E ) , 1 , s t d i n ) ; v a l; /♦ ♦/ a c n t = 0 ; p a d A » ( i n t) ( ( I M - S U B I M ) / 2 ) ; padB »IM -SU B IM -padA ; / ♦ S t o r e b l a n k b o r d e r t o p ♦ / f o r ( i » 0 ; i< p a d A + IM ; i+ + ) f w r i t e ( k a c n t , s i z e o f ( f l o a t ) , 1 . s t d o u t ) ; /♦ S to r e d a ta l i n e s ♦ / f o r ( i = 0 ; i < S U B I M ; i+ + ) { /♦ S to r e b la n k l e f t edge ♦ / f w r i te ( k a c n t , s i z e o f ( f l o a t ) ,p a d A ,s td o u t) ; - 157- /* S t o r e im age d a t a * / f w r i t e (& in d e i[i* S U B IM ] , s i z e o f ( f l o a t ) , SUBIM, s t d o u t ) ; /* S to r e b la n k r i g h t ed g e * / f w rite (fc a c n t, s iz e o f ( f l o a t ) ,p a d B ,s td o u t) ; } /* S t o r e b l a n k b o r d e r b o t t o m * / f o r ( i = 0 ; i < p a d B * X M ; i + + ) f w r i te ( & a c n t,s i z e o f ( f l o a t ) , 1 .s t d o u t) ; # e n d if > D e c la re p a r a m e te r s I M P S ta tu s . */ !* fo r c h a r r e p o r t [6 5 ] ; f l o a t v e c to r[1 6 ], i n t a r g e n t [3 ] ; v o id * a rg s[3 ]; m ainC ) in t i , j ; IM = 512; / * */ /* t h e o r i g i n a l im a g e s i z e * / s e tu p O ; */ / * index=* ( f l o a t * ) c a l l o c (SUBIM*SUBIM, s i z e o f ( f l o a t ) ) ; i f ( ! in d e x ) e x i t ( O ) ; /* C a lls t o */ s c a n O ; p e e k go h e r e p o w e r[1 6 ] ; In itia liz e f o r I M P S t a tu s . arg u m en t l i s t * / /* a r g s [ 0 ] = ( v o i d *) v e c t o r ; a r g s C l ] p o w e r; a r g s [2 ] * ( v o i d * ) r e p o r t ; - ( v o i d ♦) fr e e ( b o im d s ) ; f r e e (in d e x ) ; free(fra m e); } /* re m o v e l a n d : : : : : : : : : : : : : : n o la n d . ' m a s s e s fr o m ra w im a g e s A ssum es 5 1 2 x512 . / n o la n d d a t a f i l e # in c lu d a < s td io .h > < o a s k file > r e s u l t f i le # d e f in e * / /* G ot p a r a m e t e r s I M P S t a tu s . * / /* u s in g IM P S ta tu s ( " ; " , a r g e n t , a r g s , m a in .a r g c , */ , "RECTG DB.", "FORCE", m a in _ a rg v ) ; UBYTE u n s i g n e d c h a r m a in d n t a r g c , c h a r * # arg v ) { i n t i ; F IL E *i n f i l e ; UBYTE m a s k , d a t a ; * / /♦ P r in t t i t l e page h e a d e r f o r r e p o r t u s i n g IM P P age. * / /* i n f i l a = f o p e n ( a r g v [1 ] , " r " ) ; i f ( ! i n f i l e ) - ( p u t s ( ''F i l e r e a d e r r o r " ) ; e x it( O ) ; IM PPage ( R e p o r t , } 0 ); / ♦ P ro g ra m c o d e h e r e * / fo r (i= 0 ;i< 5 1 2 * 5 1 2 ;i+ + ) -C m a s k = g e tc h a r O ; d a t a= f g e t c ( in f i le ) ; i f ('.m a s k ) p u t c h a r ( 7 0 ) ; / * h i g h i s ( 2 5 5 - x ) / 1 5 2 x = 255 -> 0 / 1 5 2 = lo w */ e l s e p u t c h a r ( d a t a ) ; ; > d b a s e _ in = I D B 0 p e n ( " a p r 9 4 " , " r + " ) ; /* The S o u rc e D a ta b a s e * / i f ( ! d b a s e _ i n ) { p u ts (" E rr o r lin k in g to so u rc e d a ta b a s e ! " ) ; r e tu m ( O ) ; } c lo s e ( in file ); > r e c tg d b .c : : : : : : : : : : : : : : /* + C a title { R E C T IF Y H F lo w N o r m a l i s a t i o n f o r C y c l o n i c D e v e lo p m e n t} C C The c o d e i s c a l l e d f r o m RECTIFY.EAS, and cannot be u sed C o n i t s ow n. P l e a s e r e f e r t o t h e RECTIFY d o c u m e n ta t io n C C - */ d b a s a . o u t = I D B 0 p a n ( " r e c 9 4 " , " r + " ) ; / * The D e s t i n a t i o n D a ta b a s e * / i f ( 5 d b a s e _ o u t ) { p u ts (" E rr o r lin k in g to d e s tin a tio n d a ta b a s e !" ); re tu r n (O ); } g r i d l e n * r d g r i d ( & t h e g r i d ) ; /♦ g rid in te rs e c tio n s * / * / /* In c lu d e " p c i .h " p ro g ra m s. * / /* in s e g « G D B S e g N e x t( d b a s e .o u t, SEG.VEC, 0 ) ; v ec segm ent * / }; « d e f i n e C H .IN 3 p a i r «S * / i,j; /* N um ber o f a l l o w a b l e d i g i t s f o r g r i d i n t r d g r id ( s tr u c t g r id * * ); /* v o id d u m p g rid (s tru c t g r id * , i n t ) ; * / v o i d d u m p g c p s (F IL E * d b a s e , s t r u c t g r i d * g r i d , i n t l e n , u n s i g n e d c h a r * n a m e ); H C S ID (" $ Id : E xp $ " ) e x 2 c .c ,v 5 4 .3 1 9 9 7 /1 0 /0 4 /* get f i r s t d o { / * r e a d a l l v e c t o r s e g m e n ts * / / * F i n d o u t t h e namie o f t h e s e g m e n t » / I D B S e g I n f o I O ( d b a s e .o u t , s e g ,ID B .R E A D , NULL, NULL, ftseg_: i n t d u m p c o u n t« 0 ; flo a t s ta n d a r d /* B ody • / a ll C */ « i n c l u d e " p c i . h " « i n c l u d e " s t r i n g . h " s t r u c t g r id < f l o a t x ,y ; s lu rp th e 1 6 :0 4 :2 1 i n t m a in ( i n t m a i n _ a r g c , c h a r * » m a in _ a r g v ) { F IL E * d b a s e _ i n ,* d b a s e _ o u t ; i n t x p o s, y p o s, g r id p t, g r id le n ,s e g ,n v e r t, i ; ch ar i n p u t [C H .I N ]; s t r u c t g r i d * t h e g r i d ; GDBLayer l a y e r ; GDBShape * s h a p e ; G D B S hapeld s h a p e . i d ; G D B V ertex * v e i r t s ; u n s ig n e d c h a r g rid v e r ts C ]«{1,5 ,9 ,1 3 ,1 7 ,2 3 ,2 9 ,3 7 ,4 3 ,5 1 ,57>; u n s ig n e d c h a r p t v e r t s n = { 6 3 ,6 4 ,6 5 ,6 6 ,6 7 ,1 8 ,3 0 ,4 4 ,5 8 } ; c h a r seg_nam eC SO ] ; V In fo _ t v e c in f o ; i n t * n v o r te x ,* ty p e ; in t3 2 * g r o u p ,* a t t r i b u t e ; d o u b l e * * v e r t i c e s ; d o u b l e ♦ b u ffe r; in t b u ff e r_ s iz e ; w a rm e rd a dum pcQ unt+ + ; /* m ake s u r e c o u n t = s e g m e n t # * / la y e r= G D B Q e tL a y e r(d b a se _ o u t, s e g ) ; /* g e t l a y e r h a n d l e ♦ / if(Q D B Q etN u m S h ap es( l a y e r ) ! = 1 0 ) { / * w ro n g c o u n t o f s h a p e s * / p r i n t f ( " V e c t o r #%d - w ro n g s h a p e c o u n t\n " ,d u m p c o u n t); g o to s k ip ; } /* s h a p e 0 v e r t i c e s d i r e c t l y f r o m g r i d a lig n m e n t * / s h a p e _ id = G D B Q e tF ir s t( la y e r ) ; / ♦ g e t f i r s t s h a p e ID * / v e r t s = G D B G e tV e r tic e s ( la y e r ,s h a p e .id ,f tn v e r t) ; i f ( n v e r t ! * 6 8 ) { / * w ro n g c o u n t o f p o i n t s * / p r i n t f ( " V e c t o r #’/ ,d - w ro n g v e r t e x c o u n t i n sh ap e 0 \ n " ) ; g o to s k ip ; } f o r ( i * 0 ; i < l l ; i + + ) { /* o r i g i n a l c o o r d s * / t b e g r i d [ i] .x = v o r ts [ g r id v e r ts [ i] -1 ] x; th e g r id [ i] . y ® v o rts [g r id v e rts [i]-l] .y ; } H F r e e ( v e r t s ) ; / * d e a l l o c a t e v e r t e x m em ory * / f o r ( i = 0 ; i < 9 ; i + + ) { / * r e a d comma h e a d a n d f lo w w i d t h • / 6 h a p e _ i d = G D B G e tN e z t ( la y e r ,s h a p e _ i d ) ; v e r ts = G D B G e tV e r tic e s ( la y e r ,s h a p e .id ,f e n v e r t) ; t h e g r i d [ ll + i] .x = v e rts [0 ] x; t h e g r i d [ l l + i ] . y = v e r ts [ 0 ] .y ; H F r e e ( v e r ts ) ; } e,N U L L ,N U L L ); - 158 / * W rit© t o PCIDSK GCP S e g m e n t * / / * GCPs m u st g o t o SOURCE d a t a b a s e * / d u m p g c p s (d b a s e _ in ,th e g rid , g r i d l e n , seg_nam e) ; /* d \im p g r id ( th o g r id ,g r id le n ) ; * / s k i p : } w h ile (( B o g = G D B S e g N e x t( d b a s e _ o u t,S E G _ V E C ,s e g )) ! = - ! ) ; / • n e x t segm ent * / fr e e ( th e g rid ); } A b o r t i n g ! " ) ; IM P R e tu r n O ; > } e ls e { p r i n t f ( " P r o c e s s i n g t r a n s f o r m GCP s e g m e n t # '/.d \n " ,n e w _ s e g ) ; / * R e-n am e GCP se g m e n t t o m a tc h s o u r c e v e c t o r s e g m e n t nam e * / ID B S e g In fo IO (d b a s a .s e g m e n t,ID B _ W R IT E ,N U L L ,N U L L ,n a m e , NULL,NULL); /* P i l l p a r a m e te r a r r a y s * / f o r ( i = 0 , j * 0 ; i < l e n ; i + + ) { /* ( x , y ) -> ( i , j ) f o r t r a n s f o r m * / i f ( g r i d [ i ] .x>® 0 ftft g r i d [ i ] .y > » 0 ) -( / * o n l y a d d p o s i t i v e GCPs * / g c p i d s [ j ] = i + l ; g c p s l x [ j ] = g r i d C i ] . x ; g c p s ly [ j3 = g r id [ i3 .y ; g c p s 2 x [ j] ® g r id [ i] . i ; g c p s 2 y [ j] = g r id [ i] . j ; b la n k s [j]= 0 ; ID B C lo s e (d b a s e _ o u t); i* * / /* E x it p ro g ram u s in g IM P R e tu rn . * / /* j+ + ; > */ IM P R e tu r n O ; > i n t rd g r id C s tru c t g r id * * a rra y ) { F IL E *g r i d f i l e ; s t r u c t g r i d * v a l s ; i n t n , l e n ; f l o a t i , j ; /* gcps2x and gcps2y - th e tra n sfo rm e d co o rd s * / g rid f ile * fo p e n (" g rid file .tx t" , " r " ) ; i f ( ! g r id f ile ) { p u t s (" C o u ld n ’t o p e n s t a n d a r d g r i d d e f s " ) ; IM P R e tu rn O ; > le n = 0 ; w h i l e ( ! f e o f ( g r i d f i l e ) ) i f ( f g e t c ( g r i d f i l e ) = = ’ \ n ’ ) le n + + ; re w in d (g rid file ); / * W r it e t h e GCP * / ID B G c p IO (d b a s e , ID B .W R IT E ,1 , s e g m e n t , , "P IX E L ", " P IX E L " . " P IX E L " , "PIX EL" g c p id s ,g c p s lx .g c p s ly ,b la n k s ,g c p s 2 x ,g c p s 2 y ,b la n k s ); /* In c re a se n e w _ se g + + ; th e tra n s fo rm GCP s e g m e n t n u m ber * / r e c tif y .c /* + G ôtitle-C R E C TIFY 3"{Flow N o r m a l i s a t i o n f o r C y c l o n i c D e v e lo p m e n t} C C The c o d e i s c a l l e d f r o m RECTIFY.EAS, an d c a n n o t be u s e d C on i t s ow n. P l e a s e r e f e r t o t h e RECTIFY d o c u m e n ta t io n C C - * / /* *a r r a y » ( s tr u c t g r i d *) c a l l o c ( l e n , s i z e o f ( s t r u c t g r i d ) ) ; v a l 8 * » e ir r a y ; i f (! ( * a r r a y ) ) { p u t s ( " E r r o r r e s e r v i n g g r i d m e m o ry " ); IM P R e tu rn O ; } * / /* I n c lu d e p ro g ra m s. * / ^ in c lu d e f o r ( n * 0 ; n < l e n ; n + + ) { f s c a n f ( g r i d f i l e , "% f% f" , 6 i , & j) ; v a ls C rO . i = i ; v a l s [ n ] . j = j ; } p r i n t f ( " R e a d %d g r i d p o i n t s f r o m s t a n d a r d g r i d . \ n \ n " , le n ) ; f c l o s e ( g r id f i l e ) ; r e t u m ( l e n ) ; } s tru c t >: in a l l C " p c i.h " grid-C f l o a t x , y ; in t i,j; # d e f i n e C H .IN 3 / * N um ber o f a l l o w a b l e p a i r # s */ in t rd g r id ( s tr u c t + ,i n t ); v o i d d u m p g r id ( s t r u c t g r i d * g r i d , i n t l e n ) { F IL E * o u t ; u n s i g n e d c h a ir f i l e [ 3 0 ] = " r e c t i f y 0 0 . g c p " ; in t i; " p c i.h " */ / * R C S ID (" $ Id : Exp $ " ) g rid e x 2 c .c ,v d ig its fo r g rid »■*); v o i d d u m p g r id ( s t r u c t 5 4 .3 1 9 9 7 / 1 0 / 0 4 1 6 :0 4 :2 1 w a rm erd a f i l e [ 7 ] = ( i n t ) d u m p c o u n t/ 1 0 + ’ O’ ; f i l e [ 8 ] = d u m p c o u n t- ((in t)d u m p c o u n t/1 0 )* 1 0 + ’ 0 ' ; o u t« f o p a n ( f ile , "w "); i f ( ! o u t ) { p u ts (" E rr o r w r itin g o u tp u t! " ) ; r e tu r n ; i n t m a in ( i n t m a i n . a r g c , c h a r * * m a in _ a r g v ) { F IL E * v i d e o ; i n t x p o s , y p o s , g r i d p t , g r i d l e n , c h n u m ; c h a r i n p u t [ C H .I N ] ; s t r u c t g r i d * t h e g r i d ; p r i n t f (" C re a tin g * / /* D e c la re p a r a m e te r s IM P S t a tu s . • / /* } file */,s\n" , f i l e ) ; h fo r /* Dump GCPs i n x l y l x2 y2 f o r m a t * / fo r(i= 0 ;i< le n ;i+ + ) f p r i n t f ( o u t , ' ”/ . 0 . 2 f % 0 .2 f % 0 .2 f % 0 .2 f \n " ,g r id [ i] .i .g r i d C i] . j \ .g r id ti] .x ,g r id [ i] .y ) ; f c lo s e ( o u t) ; c h a r r e p o r t [6 5 ]; f l o a t i n t a r g e n t [ 3 ] , i ; v o id v e c to r [1 6 ], * a rg s [3 ]; pow er [1 6 ]; } v o i d d u m p g c p s (F IL E * d b a s e , s t r u c t g r i d * g r i d , i n t l e n , u n s i g n e d c h a r *nam e) { in t i , j ; s t a tic in t ; s t a t i c i n t n e w _ s e g = l; u n s ig n e d c h a r c r e a t e ; * / /* In itia liz e f o r I M P S t a tu s . arg u m en t l i s t * / /* a r g s [ 0 ] = ( v o i d * ) v e c t o r ; a r g s [1 ] = ( v o i d *) p o w e r; a r g s [ 2 ] ® ( v o i d *) r e p o r t ; / * ID B G cpIo p a r a m e t e r s ♦ / i n t g c p i d s [ 2 5 5 ] ; d o u b l e g c p s l x [ 2 5 5 ] , g c p s l y [ 2 5 5 ] ,g c p s 2 x [ 2 5 5 ] , g c p s 2 y [ 2 5 5 ] ; d o u b l e b la n k s [2 5 5 ]; /* f o r e le v a tio n s * / / * f i n d o r c r e a t e n e x t g c p s e g m e n t * / c r e a t e * 0 ; /* f l a g */ i f ( n e w _ s e g = * l ) { /* F i r s t t i m e , t r y t o f i n d e x i s t i n g segm ent * / i f ( (s e g m e n t= G D B S e g N e x t(d b a s e .S E G .G C P ,0 ) ) = * - 1 ) c r o a t e = l ; } e l s e / * t r y t o f i n d th e n e x t seg m en t * / i f ((segm ent® G D B S egN ext ( d b a s e , SEG_GCP, s e g m e n t ) ) “ - ! ) c re a te = l; i f ( c r e a t © ) - ( / * We n e e d t o a d d a s e g m e n t * / s e g m e n t = I D B S e g C r a a te ( d b a s e , n a m e ," F lo w N o r m a l i s a t i o n " , S E G .G C P,0 ) ; if(!s e g m e n t){ p u ts (" E rro r c re a tin g new s e g m e n t! * / /* G et p a r a m e te r s u s in g I M P S t a tu s . * / /* IM P S ta tu s ( " ; " , a rg e n t, a rg s , m a in .a r g c , "R E C T ." , "FORCE" m a i n .a r g v ) ; » / /* P r in t t i t l e page h e a d e r f o r r e p o r t u s i n g IM P Page. * / /* */ IM PPage (R e p o r t, 0 ); g rid - 159 - a x it(O ); } / * P ro g ra m co d e h e r e * / f o r ( i = » 0 ; i < l e n ; i + + ) { f s c a n f ( g r i d f i l e , "% f %f " , & x, 6 y ) ; v a l s C i ] .x = x ; v a l s [ i ] . y * y ; video-V D Q penC'V D O O ") ; > / * B ody f / g r id le n “ r d g r id ( & th e g rid ); /* g rid in te rs e c tio n s */ x pos= ypos= 0; * / do{ p rin tf(" P a ir g rid p t= 0 ; /* s lu rp th e s ta n d a rd p r i n t f ( " R e a d %d g r i d p o i n t s \ n \ n " , l e n ) ; f c lo s e ( g r id f ile ) ; re tu r n (le n ); } s ta rt at f irs t p o in t v o id d u m p g rid (s tru c t F IL E ’• 'o u t ; i n t i ; #%d: " , g r i d p t + 1 ) ; /* S p o o l in p u t, a llo w in g f o r a b la n k r e tu r n l i n e • / f o r ( chnum=0 ; chnum (% d ,% d )\n " \ , g rid p t+ 1 ,th e g r id C g r id p t] .i,th e g r id [ g r id p t] . y \ g rid « g rid ,in t le n ) i o u t= fo p e n ( " r e c tif y .g c p " ," w " ) ; i f ( ! o u t ) { p u ts ( " E r r o r w r itin g o u tp u t! " ) ; r e tu r n ; > /* Dump GCPs i n x l y l x 2 y 2 f o r m a t * / f o r ( i = 0 ; i< le n ;i+ + ) f p r i n t f ( o u t , " % d %d % 0 .2 f y ,0 .2 f \n " ,g r id [ i] .ijg r id C i] . j .g r id C i] .x .g r id C i] .y ) ; fc lo s e (o u t); \ } r e c tv e c .c : : : : : : : : : : : : : : / + + C ® title{R E C T IF Y >-C F low N o r m a l i s a t i o n f o r C y c l o n i c D e v e lo p m e n t} 0 C The c o d e i s c a l l e d f r o m R ECTIFY.EAS, and can n o t be u sed C o n i t s ow n. P l e a s e r e f e r t o t h e RECTIFY d o c u m e n ta t io n C C - */ ,th e g r i d [ g r i d p t] . i , t h e g r i d [ g r i d p t ] . j ) ; if(g r id p t< g rid le n -l) g r i d p t ++; */ /* } In c lu d e p ro g ra m s. / * S k ip t o n e x t g r i d p a i r * / i f ( i n p u t [ 0 ] = = ’n ’ && g r i d p t < g r i d l e n - l ) { g rid p t+ + ; p rin tf(" X d C/.0 . 2 f ,y .0 . 2 f ) -> (% d ,% d )\n " \ , g r i d p t + 1 , t h e g r i d C g r i d p t ] .X \ ,th e g r id [ g r id p t] .y ,th e g r id C g r id p t] .i \ .th e g rid C g rid p t].j); in a ll C */ # i n c l u d e " p c i . h " s tr u c t g rid }; { f l o a t x ,y ; f l o a t i ,j ; # d e f i n e CH_IN 3 / * N um ber o f a l l o w a b l e d i g i t s p a i r # s */ } /* Jum p t o g r i d p a i r */ in t rd g r id ( s tr u c t * ,in t) ; i f ( i s d i g i t ( i n p u t [ 0 ] ) I I i n p u t [ 0 ] = = * n ') { s s c a m f ( i n p u t , "% 2 d ", A c h a u m ); i f (c h n u m < = » g rid le n ){ /* C h eck bounds * / g rid p t= c h n u ra - l; p r in tf ( " X d - C/.0 . 2 f ,y .0 . 2 f ) -> (% d .% d )\n " \ , g r id p t+ 1 ,th e g r id C g r id p t] x R C S ID (" $ Id : Exp $ " ) g rid e x 2 c .c ,v f o r g rid * * ) ; v o i d d u m p g r i d (s t r u e t 5 4 .3 1 9 9 7 / 1 0 / 0 4 1 6 :0 4 :2 1 g rid w a rm e rd a i n t m a in ( i n t m a i n . a r g c . c h a r * * m a in _ a r g v ) { F IL E * v i d e o ; i n t x p o s , y p o s , g r i d p t , g r i d l e n , c h n u m ; c h a r in p u t [ C H .I N ] ; s t r u c t g r i d * t h e g r i d ; \ .th e g r id C g r id p t] . y ,t h e g r i d C g r i d p t ] .i \ .th e g r id C g r id p t] . j ) ; V I n f o .t v e c in fo ; i n t * n v e r te x ,* ty p e ; in t3 2 ♦ g r o u p , * a t t r i b u t e : d o u b le * * v e r t i c e s ; d o u b le ♦ b u ffe r; in t b u ff e r.s ia e ; }} } w h ile (in p u t[ 0 " p c i.h " * / /* /* ] ) ; /* F in is h * / d u m p g rid (th e g r id ,g r id le n ); f r e e ( th e g r i d ) ; ♦ / /♦ D e c la re p a r a m e te r s f o r I M P S t a tu s . ♦ / /♦ V D C l o s e ( v id e o ) ; /* c h a r r e p o r t [6 5 ]; f l o a t i n t a r g e n t [ 3 ] , i ; v o id v e c t o r [ 1 6 ] , p o w e r[1 6 ]; ♦ a rg s[3 ]; */ / * E x i t p ro g r a m u s i n g IM P R e tu rn . * / /* ♦/ IM P R e tu m O ; ♦ / /♦ In itia liz e f o r I M P S t a tu s . } i n t r d g r id ( s tr u c t g rid F IL E ♦ g r i d f i l e ; s t r u c t f l o a t x .y ; ♦ ♦ a rra y ) g r id ♦ v a is ; in t i.le n ; g r id f i l e * f o p e n ( " g r i d f il e .t x t " , " r " ) ; i f ( ! g r i d f i l e ) { p u t s C ’C o u ld n H o p e n s t a n d a r d g r i d d e f s " ) ; e x it(O ) ; > le n = 0 ; w h ile ( ! f e o f ( g r i d f i l e ) ) i f ( f g e t c ( g r i d f i l e )= = *\ n ' ) le n + + ; re w in d (g rid file ) ; ( svt r u ccxt g rni ud ♦ l e.enn,,s s ii z e o f ( s t r u c t ♦ a r ra y =r =\,B » ;)ccaaAl lxoo cc (t ,j g r i d ) ) ; v a ls = ^ a rra y ; i f ( ! (♦ a rra y )){ p u t s ( " E r r o r r e s e r v i n g g r i d m em o ry " ); arg u m e n t l i s t ♦ / /♦ a rg sC O ] = ( v o i d ♦ ) v e c t o r ; a r g s [ l ] p o w e r; a r g s [2 ] = ( v o i d ♦) r e p o r t ; = ( v o i d ♦) ♦ / /♦ G et p a r a m e te r s u s in g I M P S t a tu s . ♦ / /♦ ♦/ I M P S ta tu s ( " ; " , a r g e n t , a r g s , m a in .a r g c , ♦ / /♦ P rin t t i t l e "RECTVEC-", "FORCE" m a i n .a r g v ) ; page h e a d e r f o r - 160 r e p o r t u s in g */ /* IM PPage o u t= fo p e n ( " r e c tif y .g c p " ," w " ) ; i f ( ! o u t ) { p u ts (" E rr o r w r itin g o u tp u t! " ) ; r e tu r n ; */ IM PPage } (R e p o rt, 0) ; / • P ro g ra m c o d e h e r e * / video=VDQpen("VDOO ") ; i f ( ! v i d e o ) { p u t s C 'E r r o r l i n k i n g t o d i s p l a y ! " ) ; } r e tu r n ( O ) ; f* B ody *! / ♦ Dump GCPs i n x l y l x2 y 2 f o r m a t ♦ / fo r(i= 0 ;i< le n ;i+ + ) f p r i n t f ( o u t , " % 0 . 2 f % 0 .2 f % 0 .2 f %0. 2 f \ n " , g r i d [ i ] . i , g r i d [ i ] . j \ ,g rid [i].x .g r id C i].y ) ; fc lo s e ( o u t) ; g r i d l e n = r d g r i d ( & t h e g r id ) ; /* g rid in te r s e c tio n s » / s lu r p th e sta n d a rd « in c lu d e « in c lu d e / * W a it f o r d i s p l a y t o b e s e t u p * / p u t s ( " A l i g n l a y e r 1 , a d d p o i n t s 12 t h r o u g h 2 0 , t h e n h i t r e tu r n ; " ) ; g e tc h a rO ; /* J u s t re a d in th e v e c t o r seg m en t fro m t h e d i s p la y a n d dump t h e v e r t i c i e s * / n v e r te x = ( i n t * ) H H a llo c ( s i z e o f ( i n t ) * v e c in f o .N S tr u c tu r e ) ; ty p e * ( i n t * ) H M a llo c ( s iz e o f ( i n t ) • v e c in f o . N S tru c tu re ) ; g ro u p = ( i n t *) H K a llo c ( s i z e o f ( i n t ) * v e c i n f o . N S t r u c t u r e ) ; a t t r i b u t e = ( i n t ♦) H M a llo c ( s i z e o f ( i n t ) * v e c i n f o . N S t r u c t u r e ) ; v e r t i c e s = ( d o u b l e * * ) H M a llo c ( s i z e o f ( d o u b l e * ) * v e c i n f o . N S t r u c t u r e ) ; b u f f e r = ( d o u b l e * ) H M a llo c ( s i z e o f ( d o u b l e ) * v e c i n f o . N V e rte x * 2 ) ; V D V e c t o r ln f o ( v i d e o , VD.READ, l , 6 v e c i n f o ) ; i = V D V e c to r IQ ( & v e c in fo , VD_READ,0, v e c i n f o . N S t r u c t u r e , n v e r to x ,ty p e ,g r o u p ,a ttr ib u te ,v e r tic e s .b u f f e r ,v e c in f o .N V e r te x * 2 ) ; i f ( ! i ) K p u t s ( " P r o b le m s o n s e g m e n t r e a d ! " ) ; r e t u m ( O ) ; } p r i n t f ( " S t r u c t u r e s : X d \tV e r tic e s ; %d" , v e c i n f o . N S t r u c t u r e , v e c i n f o . N V e rte x ) ; f o r ( i = 0 ; i < v e c i n f o . N V e r t e x ; i + + ) p r i n t f ("# '/,d - % lf % lf\n " ,i+ l,b u ff e r[ 2 * i] .b u ffe r[2 * i+ l]); } tim e n u m .c < m a th .h > « i n c l u d e < s t r i n g . h> < s td io .h > # i n c l u d e < t i m e . h> « i n c l u d e < c t y p e .h > m a in O { / • d e c o d e f i r s t l i n e o f s t d i n b a s e 36 m in s i n c e 7 0 /0 1 /0 1 • / c h a r c o d e [8 0 ] ; i n t i ,d i g it ,n u m ; num *0; c o d e [0 ] = 0 ; f s c a n f ( s t d i n , " % s " , f t c o d e ) ; if(s trle n (c o d e )< 1 2 ) e x i t ( - l ) ; f o r ( i = 0 ; i< 5 ;!+ + ){ d i g i t« c o d e [ i + 2 ] ; i f ( i s a i p h a ( d i g i t )) d i g i t- = * a ’ -1 0 ; e ls e d i g i t - = '0 '; n u m + = (d ig it♦ p o w ( 3 6 ,(4 -i)) ) ; > num ^*60; / ♦ c o n v e r t m i n u te s t o p r in tf ( " % d " ,n u m ) ; seconds ♦ / } : : : : : : : : : : : : : : tim e s .c « i n c l u d e < m a th .h > « i n c l u d e « i n c l u d e < s t r i n g . h> i n t c h o p (c h a r ♦code) in t c le n ,o ffs e t,! ; < s td io .h > « i n c l u d e < t im e .h > « i n c l u d e < c t y p e .h > { c le n = s trle n (c o d e ); /♦ F in is h * / i f ( c le n > 1 2 I I c le n < 5 ) r e t u r n ( - l ) ; e ls e re tu r n (O ) ; H F re e (n v e rte x ) ; H F r e e ( ty p e ) ; H F re e (g r o u p ); H F re e (a ttrib u te ); H F re e (v e rtic e s ); H F re e (b u ffe r); /* d u m p g rid (th e g r id ,g r id le n ); * / f r e e ( th e g rid ); v o id d e c o d e (c h a r • c o d e ,i n t i n t i , d i g i t , num; o ffs e t) if(c le n > 5 ) re tu r n (2 ); { V D C l o s e ( v id e o ) ; num =0; f o r ( i = 0 ; i < 5 ; i + + ) - C d ig it= c o d e [i+ o ff s e t]; if ( is a lp h a ( d ig it) ) i f ( i s u p p e r ( d i g i t ) ) d i g i t - * ’ A '- 1 0 ; e ls e d i g i t - * ’ a ’-1 0 ; e ls e d i g i t- * ’0 ’ ; * / /* E x i t p ro g r a m u s i n g IM P R e tu rn . # / /* n u m + = ( d ig it♦ p o w ( 3 6 , ( 4 - i ) ) ) ; I M P R e tu r n O ; > > i n t r d g r id ( s tr u c t g rid * * a rra y ) { F IL E *g r i d f i l e ; s t r u c t g r i d • v a i s ; f l o a t x ,y ; num ^*60; / ♦ c o n v e r t m i n u te s t o s e c o n d s ♦ / p r i n t f ( " % s \ t % s " , c o d e , c tim e (& n u m )) ; in t i.le n ; g r id f ile » fo p e n (" g rid f i l e . tx t " , " r" ) ; i f ( !g r id f ila )- ( p u t s ( " C o u l d n 't o p e n s t a n d a r d g r i d d e f s " ) ; e x it(O ); > le n = 0 ; w h i l e ( ! f e o f ( g r i d f i l e ) ) i f ( f g e t c ( g r i d f i l e ) = = ' \ n ' ) le n + + ; re w in d (g rid file ); } m a i n O ■£ in t o ffs e t; / • d e c o d e s t d i n b a s e 36 m in s i n c e c h a r co d e[8 0 ]; if ( o f f s e t> = 0 ) d e c o d e (c o d e , o f f s e t ) ; w h ile ( ! f e o f ( s t d i n ) ) ; f o r ( i = 0 ; i < l e n ; i + + ) - ( f s c a n f ( g r i d f i l e , '”/,f'/.f" , ix .& y ) ; v a l s C i ] . %=x; v a i s [ i ] . y = y ; } : : : : : : : : to l6 .c a n d dump a 1 6 - b i t ♦ / « in c lu d e > ♦ g r id ,in t le n ) { / ♦ R ead a n 8 - b i t < s td io .h > m a in O ■{ u n s ig n e d c h a r i n ; p r i n t f ( " R e a d %d g r i d p o i n t s fr o m s t a n d a r d g rid .\n \n " ,le n ) ; f c lo s e ( g r i d f i l e ) ; re tu r n (le n ) ; } > > g rid ♦/ do{ c o d e [0 ]= 0 ; f s c a n f ( s td i n ," X s " ,4 c o d e ) ; o ff s o t= c h o p (c o d e ); ♦ a r ra y * ( s tr u c t g rid ♦ )c a l lo c ( le n ,s iz e o f ( s tr u c t g r i d ) ) ; v a ls » ^ a r r a y ; i f ( ! ( • a r r a y ) ){ p u t s ( " E r r o r r e s e r v i n g g r i d m e m o ry " ); e x i t (0 ); v o id d u m p g rid (s tru c t P IL E ♦ o u t ; i n t i ; 7 0 /0 1 /0 1 u n s ig n e d s h o rt i n t o u t; w h ile ( ! f e o f ( s t d i n ) ){ in = g e tc h a r ( ) ; o u t= (u n s ig n e d s h o rt i n t ) i n ; f w r ite ( to u t. s iz e o f(u n s ig n e d sh o rt i n t ) ,1 ,s td o u t) ; >} - 161 to .im g .c # in c lu d e < s td io .h > m a in O { in t i ,j ; f o r (i= 0 ;i< 2 5 3 ;i+ + ) f o r (j« 0 ;j< 5 1 2 ;j+ + ) f p r i n t f ( s t d o u t , ”'/ c " , g e t c h a r O ) ; } # in c lu d e < s td io .h > m a in O ■[ i n t 1 ,j= 0 ; w h ile ( ! f e o f ( s t d i n ) ){ i = f g e t c ( s t d i n ) ; p r i n t f ( " % d \ n " , i ) ; j+ + ; } f p r i n t f ( s t d e r r , " C o u n t : % d \n " , j ) ; } tx tl6 .c Im ag eM ag ick 1 6 t i t g r a y b i n a r y /* Dump a n as te x t */ « in c lu d e < s td io .h > m a in O { i n t c n t; u n s ig n e d s h o r t i n ; u n s ig n e d c h a r o u t; c n t= 0 ; w h i l e ( f r e a d ( f t i n ,s i z e o f ( u n s i g n e d s h o r t ) , 1 , s t d i n ) ) { o u t = ( u n s i g n e d c h a r ) i n ; p r i n t f ( " % d " , o u t ) ; c n t+ + ; if(c n t> 1 9 ){ p u t e C " ) ;c n t= 0 ; } }> 162 A -4 R /S - P lu s P ro g ra m s m ax. d e e p $ m e a n l a t [ 3 ] . m e a n l a t m ax. d e e p $ d e lM B [ 3 ] _m bsep m ax . d e e p $ d e l H [ 3 ] _ h s e p } j-j+1 > : : : : : : : : : : : : : f.a c c e l.R " f.a c c e l" _ f u n c t i o n ( t a b = r e p . p r e s , d i s t , m u l t = l , i n t e r v a l = l ) '{ v e l_ f . v « l( ta b ,d is tr a w = d is t,m u lt, in t e r v a l) v e l x _ v a l$ n u m .h o u r s v e l y _ v e l $ v e l l e n _ l e n g t h ( v e l x ) d e lv e l_ v e ly L 2 :le n ]-v e ly C l: ( la n - 1 ) ] d e lin t_ v @ lx [2 :le n ]-v e lx [l: (le n - 1 ) ] # c a l c u l a t e b e s t i n t e r p o l a t e d p r e s s u r e d ro p s p i n , ( h o u r s [ l e n g t h ( h o u r s ) ] - h o u r s [ 1 ] ) /6 + 1 in te rp .s p lin e (h o u r s ,m b ,n * s p ln ,m e th o d * " n a tu ra l" ) in te r v a ls _ le n g th ( in te rp $ x ) s y . s p l i n e (1 : num , r e p . p r e s $ n o r t h i n g , n = i n t e r v a l s , m e t h o d » " n a t u r a l " ) iy _ s y $ y f o r ( i i n l : i n t e r v a l s ) { j _ i + l w h i l e ( j < ( i n t e r v a l s + 1 ) ) -{ h s e p _ in te rp $ x [j] - in te r p $ x [ i] m b s e p _ i n t e r p |y [ i ] - i n t e r p $ y [ j ] a c c e l_ a s .d a ta .f r a in ® ( c b in d ( v © lx [ 2 :I e n ] . d e l v e l / d e l i n t ) ) a ttr( a c c e l," n a m e s " ),c (" n u m .h o u rs " , " a c c e l" ) r e tu r n (a c c e l) } f.a llr e p .R " f.a llre p " . f im c tio n (){ # C a ll f .r e p o r t f o r ea ch c a s e i n sequence c a t ( " 9 6 0 4 \ n " ) f . r e p o r t ( " p 9 6 0 4 " . " - v 9 6 " ." 9 6 0 4 " ) f .r e p lo t( f ig = l) c a t (" \n 9 7 0 la \n " ) f.r e p o r t( " p 9 7 0 1 a " ," “ v 9 7 0 1 1 3 ", "9 7 0 1 a") f . r e p lo t( f ig = 2 ) c a t( " \n 9 7 0 1 b \n " ) f .r e p o r t ( " p 9 7 0 1 b " , " -v 9 7 0 1 2 " , "9 7 0 1 b ") f . r e p l o t ( f i g = 3 ) c a t ( " \n 9 7 1 1 S \n " ) f .r e p o r t( " p 9 7 1 1 S " ," - v 9 7 1 1 " ," 9 7 1 1 S " ) f . r e p l o t ( f i g = 4 ) c a t ( " \ n 9 8 0 3 \ n " ) f . r e p o r t ( " p 9 8 0 3 " , " “v 9 8 0 3 " ," 9 8 0 3 " ) f .f e p lo t( f ig = 5 ) # U p d a te 4 f i g u r e p l o t s 4 -u p p l o t s " ) s y s te m (" c d w i t h m page p r i n t ( " U p d a t i n g r e p o r t ; s h 4 / m k 4 .s h " ) f.b e a r in g .R " f.b e a rin g " , f u n c t i o n ( t a b = r a p . p r e s , i n t e r v a l » ! ){ le n _ le n g th (ta b $ e a s tin g ) A _ c b i n d ( t a b $ e a s t i n g [ l : ( l e n - 1 ) ] , t a b $ n o r t k i n g [1 : ( l e n - 1 ) ] ) B _ c b i n d ( t a b $ e a s t i n g [2 : l e n ] , t a b $ n o r t h i n g [ 2 ; l e n ] ) B e a r . r e p ( 0 , l e n - 1) d e l_ B -A f o r ( i i n 1 : ( l e n - l ) ) { i f ( d e l [ i , 2 ] > » 0 ) { # Y i s p o s i t i v e (Q1 6 Q4) B ear [ i ] _ a t a n ( d e l [ i ,1 ] / d e l [ i , 2 ] ) * 3 6 0 /2 /p i y e ls e { i f ( d e l [ i , l ] > = 0 ) { # X i s p o s i t i v e , Y n e g a tiv e (Q 2) B e a r [ i ] . ( ( ( - 1 ) * a t a n ( d e l t i , 2 ] / d e l [ i , 1 ] ) ) + p i/2 )* 3 6 0 /2 /p i } else-C # X i s n e g a t i v e , Y i s n e g a t i v e (Q 3) B e a r [ i ] _ ( ( ( - 1 ) * a t a n ( d e l [ i , 1] / d e l [ i , 2 ] ) ) -p i/2 )* 3 6 0 /2 /p i > >> ts e q _ ta b $ n u m .h o u rs [2 : le n ] # tr a n g e _ ts e q [le n - l] -ts e q [l] # s p l_ a p p r o x ( ts e q ,B e a r ,x o u t= s e q ( ts e q C l] ,t s e q [ l e n g t h ( t s e q ) ] ,b y » i n t e r v a l ) # s p l . s p l i n e ( t s e q , B e a r ,n = r o u n d ( tr a n g e /in te r v a l) + l.m e th o d * " n a tu r a l" ) b e a r i n g . a s . d a t a , fr a m e ( c b i n d ( t s e q , B e a r ) ) a t t r ( b e a r i n g , “n a m e s " ) _ c ( " H o u r " , " B e a r i n g " ) re tu r n (b e a rin g ) # c a lc u la te B e rg e ro n v a lu e m e a n la t_ m e a n ( c ( iy [ i] , i y [ j ] ) ) b e r .h r _ s in ( 2 * p i» m e a n la t/3 6 0 ) /s in ( 2 * p i* b a s © la t/3 6 0 ) r a t e . m b s e p / h s e p / b e r . h r # s t o r e m axim a i f ( h s e p > = 6 && r a t e > m a x .d e e p $ B o r g e r o n [ 4 ] ) { m a x .d e e p $ B e r g e r o n [ 4 ] . r a t e m ax. d ae p Jreq M B p H [ 4 ] _ b e r . h r m ax. d e e p $ m e a n l a t [ 4 ] .m e a n l a t m a x .d e e p $ d e lM B [ 4 ] _m bsop m a x .d e e p $ d e lH [ 4 ].p a s te ( s ig D if (h s e p ,d ig its = 3 ), " i" ,s e p = " " ) } f .b o m b .R " f .b o m b " . f u n c ti o n ( ) - C # c o r r e c t t o b a s e l a t l a t i t u d e ( 4 2 . 5 i s R o e b b e r ’ 8 m ean v a l u e ) b a s e l a t . 60 h o u r s . r e p . p r e s $ n u m .h o u r s m b . r e p . p re s $ m b n u m . l e n g t h ( r e p . p r e s $mb) m ax. d e e p . a s . d a t a . f r a m e ( m a t r i x ( r e p ( 0 , ( 5 * 4 ) ) ,n c o l = 5 ,b y r o w * T ) ) a t t r ( m a x . d e e p , " n a m e s " ) _ c ( " B e r g e r o n " , "reqM B pH ", " m e a n l a t " , "d elH B " num . l o o p .l e n g t h ( m b ) f o r ( i i n l : n u m . l o o p ) { j _ i + l w h i l e ( j < ( n u m .l o o p + 1 ) ) { h s e p . h o u r s [ j ] - h o u r s [ i ] m b s e p .m b [ i ] - m b [ j] # c a l c u l a t e B e rg e ro n v a lu e m e a n la t_ m e e u i( c ( r e p .p r e s $ n o r th in g [ i] , r e p . p r e s ( n o r t h i n g [ j ] ) ) b e r . h r _ s in (2 * p i* m e a n la t/3 6 0 ) /s in (2 * p i* b a s e la t/3 6 0 ) r a t e . m b s e p / h s e p / b e r . h r # s t o r e m axim a i f ( h s o p = = 6 && r a t e > m a x .d e e p $ B o r g e r o n [ l ] ) { m a x .d e e p $ B e r g e r o n [ l] .r a te m a x .d e e p $ r e q M B p H [ l ] .b a r . h r m ax . d e e p $ m e a n l a t [ 1 ] . m e a n l a t m a x .d e e p $ d e lM B [ 1 ] .m b s e p m ax . d e e p $ d e l H [ l ] _ h s a p } i f ( h s e p = » 1 2 && r a te > m a x .d e e p $ B e r g e r o n [ 2 ] )■{ m a x .d e e p $ B e r g s r o n [ 2 ] . r a t e m ax . de e p$ r e qMBpH[ 2 ] . b e r . h r m ax . d e e p $ m a a n l a t [ 2 ] . m e a n l a t m ax . d e e p $ d e lM B [2 ].m b s e p m ax . d e e p $ d e l H [ 2 ] .h s e p } i f ( h s e p = = 2 4 66 r a t e > m a x .d e e p $ B e r g e r o n [ 3 ] ) { m ax . d e e p $ B e r g e r o n [ 3 ] . r a t e m ax . deep$reqM B pH [ 3 ] . b e r . h r >j-j+1 >} # r e - o r d e r th e ta b le f o r p r e s e n ta tio n t h e f u l l t a b l e i s k e p t f o r d e b u g g in g p u rp o s e s r e t _ a s .d a t a .f r a m e ( c b i n d ( m a x .d e e p $ d e l H ,m a x .d e e p $ d e 1 M B ,m a x .d e e p $ B e r g e r o n ) ) # m ove 6 i row t o t h e t o p r e t _ r b i n d ( r e t [ 4 , ] , r e t [ 1 : 3 , ] ) a t t r ( r e t , " n a m e s " ) .c ( " T i m e I n t e r v a l " , " D e l t a m b " ," B e r g e r o n " ) a t t r ( r e t , " r o w . n a m e s " ) _ c ( " " ) r e tu r n (re t) } f .bounds.R " f .b o u n d s " f u n c tio n ( le g x = - 1 7 5 ,le g y = 6 0 ) { # c o l l e c t s to rm c e n t r e s v c e n t .r e p .v e c s # c o l l e c t n o n -g r id b ase d v ec c e n tre s v c 2 .g e t(p a s te ( " V N " .b a s e n a m e , s e p » " " ) ,p o s = l) v c e n t.rb in d (v c e n t,v c 2 )[,6 :7 ] p c e n t.c b in d ( r e p .p r e s $ e a s tin g ,r e p .p r e s $ n o r th in g ,r e p .p r e s $ m b ) v b n d .c ( m i n ( v c e n t [ , 1 ] ) , m a x ( v c e n t [ , ! ] ) , m i n ( v c e n t [ , 2 ] ) , m a x ( v c e n t [ , 2 ] ) ) p b n d .c ( m in ( p c e n t[ , ! ] ) ,m a x (p c e n t[ , ! ] ) ,m i n ( p c e n t[ ,2 ] ) ,m a x ( p c e n t [ ,2 ] ) ) a ll_ rb in d (v b n d , pbnd) ^ p l o t ( x = c ( - 1 8 0 ,- 1 3 0 ) ,y » c ( 2 5 ,6 5 ) ,ty p e » " n " ,m a in = " P a c if ic S to r m s L o c a t o r " , x l a b » " D e g r e e s E a s t " , y l a b » " D e g r e e s N o r th " ) # a d d p r o b a b i l i t y o f d e v e lo p m e n t a r e a r e c t a n g e s amd l i n e s r e c t( - 1 7 0 ,3 0 ,- 1 6 0 ,5 0 ,lty = 2 ) lin e s (x = c (- 1 9 0 ,- 1 2 0 ) ,y » c ( 3 0 ,3 0 ),lty » 2 ) lin e s ( x = c ( - 1 9 0 ,- 1 2 0 ) ,y » c ( 5 0 ,5 0 ) , lty » 2 ) p o in ts ( v c e n t) l i n e s ( v c e n t) p o in ts ( p c e n t,p c h » 1 9 ) l i n e s ( p c e n t) t e x t ( p c e n t , l a b e l s » s e q ( l : d i m ( p c e n t ) [ 1 ] ) ,p o s = 4 ) l e g e n d ( l e g x , l e g y , c ( " Im ag e C e n t r e s ” , "Low P r o s s u r e C e n tr e s " ) ,p c h » c ( l,1 9 ) ) 9 ad d d ash e d l i n e s c o n n e c tin g vec p t . 1 t o p r e s , l i n e a t sam e t i m e p t i m e . r e p . p r e s $ n u m . h o u r s v t i m e . r e p . v e c s $ n u m .h o u r s p le n .le n g th (p tim e ) v le n .le n g th (v tim e ) s x .s p l in e f u n ( x » p t i m e ,y = p c e n t [ ,l ] ) # p tim e p r e d i c t s B r e a s tin g s y _ s p lin e f u n ( x = p tim e ,y = p c e n tC ,2 ] ) # p t i m e p r e d i c t s p $ n o r t h i n g i f ( v t i m e [1 ] > = p tim e [1 ] 66 v tim e [ 1 ] < = p t i m e [ p l e n ] ) { # l o w e r r a n g e i n b o u n d s p l.c b in d ( s x ( v tim e [ l] ) , sy (v tim e [1 ] )) 1 1 . r b i n d ( v c e n t [ 1 , ] , p l ) l i n e s ( 1 1 , l t y = 3 ,l w d = 2 ) y i f ( v t i m e [ v l e n ] < = p tim e [p le n ] 66 v tim e [ v le n ] > = p tim e [ 1 ] ) { 9 u p p e r ra n g e in bounds p 2 .c b in d ( s x ( v t im e [ v le n ] ) ,s y ( v tim e [ v le n ] )) 1 2 . r b i n d ( v c e n t [ v l e n , ] , p 2 ) l i n e s ( 1 2 , l t y = 3 ,l w d = 2 ) y 9 ad d tim e s on t h e p r e s s u r e obs l b l . p a s t e ( s e q ( l : d i m ( r e p . p r e s ) [ 1 ] ) , , r e p . p r e s $ h o u r , "Z", r e p . p r e s $ d a y , : p=M.i) t e x t (p c e n t, la b e ls = lb l,p o s » 4 ) 9 ad d tim e s t o f i r s t an d l a s t v e c to r obs lb l_ p a s te ( r e p .v e c s $ h o u r ," Z " ,r e p .v @ c B $ d a y ,s e p = " " ) t e x t ( x » v c e n t [ i ,l ] , y » v c e n t[ 1 ,2 ] ,la b e ls » l b l [ l ] ,p o s = 3 ) t e x t ( x » v c e n t [ v l e n ,1 ] , y « v c e n t[ v le n ,2 ] , l a b e l s » l b l [ v le n ] ,p o s = 3 ) 9 p l a c e a n X a t t h e l o c a t i o n o f max d e e p e n in g ( a c t u a l l y a s q u a r e e n c lo s e s i t ) p . g e t ( " r e p . p r e s " , p o s = l ) p m in .m in (p $ m b ) p lo g ic .p $ m b = = p m in 9 T w h e re p c e n t$ m b i s a t m inim um e a s tm in .p $ e a s tin g [ p lo g ic ] n o r th m in _ p $ n o r th in g [ p lo g ic ] p r i n t ( c b i n d ( p m i n , e a s t m i n , n o r t h m i n ) ) b s i z e . l .2 . 163 - # r e c t ( e a s t m i n - b s i z e , n o r t h m i n - b s i z a , e a s t m i n + b s i z e ,n o r t h m i n + b s i z e ) t e x t ( x ^ e a s tm in , y = n o r th ia iii, l a b e ls = " I " ) r e t u r n ( c b i n d ( c ( t m i n , tm a x ) , c ( r a i n , rm a x ) ) ) ::::::::::::: m t e x t ( t e x t = g e t ( " c a s e n a m e " , p o s * l ) , s i d e = l ,o u t e r = T ) a n n o ta te p l o t :::::::::::::: } " f .d e r iv a tiv e " # f r a m e . d a t a . f ram e ( a l l [ , 1 ] , a l l [ ,2 3 , a l l [ , 3 ] , a l l [ , 4 ] ) a t t r ( f r e u n e , " n a m e s " ) _ c ( " n i i i i _ e a s t " , " m a x _ e a s t" , " m i n . n o r t h " , " m a x _ n o r t h " ’ r e t u m ( fr a m e ) f.c a s e c o r .R " f . ca seco r"_ f u n c tio n O - C t a b i n _ a l l c a s e l v l c n a m e s _ c o ln a m e s(ta b in ) l e n .l e n g t h ( c o l n a m e s ( t a b in ) ) o u t _ a s . d a t a . f r a m e ( m a t r i x ( 4 * l e n * 2 3 4 6 ,n c o l = 4 ) ) # 2346=69 c h o o s e 2 com bos a ttr C o u t," n a m e s " ) _ c ( " V a r l" , " V a r 2 " , "D F ", " C o r r e la ti o n " ) c o u n t f o r C i i n 1 : ( l e n - 1 ) ) { # c o lu m n s f o r ( j in (i+ l) :le n )< c o r c o l.n a .o m it(a s .d a ta .fra m e (c b in d ( ta b in [,i],ta b in [,j]))) d f _ d i m ( c o r c o l ) [ 1 ] - 2 c o r s _ c o r ( c o r c o l ) [2 ] lin e _ c ( c n a m e s [ i] , c n a m e s C j] ,d f ,c o r s ) o u t [c o u n t, ] . l i n e p r i n t ( p a s t e ( c o u n t , " o f " ,2 3 4 6 )) c o u n t _ c o u n t+ l >> r e tu m ( o u t) f . d e r iv a tiv e .R f u n c t i o n ( t a b , o r d e r = l ,tim e s = 0 )" C # i n t e r p o l a t i o n o n 1 / 2 ho u r in te rv a l if(tim e s != 0 ){ t s e q _ ta b [ ,5 ] ta b .t a b C , 1 :4 ] t r a n g e _ le n g th ( ts e q ) } a ls e { t s e q _ r e p .v e c B $ n u m .h o u r s t r a n g e _ r o u n d ( - 2 * t s e q [ l ] + l ) } r a t e . a s .d a t a , fra m e ( m a t r i x d : ( ( t r a n g e - l ) * 5 ) ,n c o l= 5 ) ) f o r C i i n 1 : 4 ) { # C h e c k f o r N A 's i f ( Sc o m p l e t e . c a s e s ( t ( t a b C , i 3 ) ) ) { f o r ( j i n l : l e n g t h ( t a b [ , i ] ) ) < i f ( i s . n a ( t a b [ j , i ] ) ){ t a b [ j , i ] _ 0 > }} s p l_ s p lin e ( ts e q ,ta b [ ,i] ,n = tr a n g e ,m e th o d ® " n a tu r a l" ) r a t e [ , i ] _ (s p l$ y [ 2 : tr a n g e ] - s p l $ y [ 1 : ( t r a n g e - 1 ) ] ) / ( s p l $ x [ 2 ; t r a n g e ] - s p l $ x [ l : (tra n g e > r a t e [ ,5 ] _ sp l$ x [ 2 :le n g th (s p l$ x )] # p u t i n th e l a b e ls a t t r ( r a t e , " n a m e s " ) _ c ( " D r o t " , " D r l e n " , " D h l e n ” ," D j w i d " ," T i m e " ) if(o r d o r= = l)-( # r e tu r n r e s u l t r e tu r n ( r a t e ) } a ls e { # re c u rse u n til le v e l f . d e r i v a t i v e ( t a b = r a t e , o r d e r = o r d e r - 1 , tim e s = l ) >> } f.c e n p lo t.R " f .c e n p lo t" . : : : : : : : : : : : : : : f.d o 2 C o r.R " f.tm p " i f ( X n a m e = = " H o u r s " ) { # a p p e n d Y’ s # s c a le f a c t o r t o a llo w f o r p lo t t e x t s f a c to r _ 0 .0 5 h o u rs a s th e p r e d ic to r b n d s _ r b i n d ( c ( z n i n x + s f a c t o r * m i n x ,m i n y - s f a c t o r * m i n y ) , c ( m a x x - s f a c to r* m ax x ,m ax )n N rifan fc(iia‘nBntÿti)OY) ) } e l s e { X _ f .g e t v a r ( X n a m e ) > p l o t ( b n d s , t y p e = " n " , m ain® "Low Y h a t _ f . d o s p l (Y , F , I [ , 1 ] + s e p , 1 , 2 , s p l = s p l ) C e n t r e a " ,x l a b = " D e g r o e s E a s t " , y l a b = " D e g r e e s x y . n a . o m it ( a s . d a t a . f r a m e ( c b i n d ( I [ , 2] , Y h a t ) ) ) N o r th " ) p o i n t s ( p c e n t ,p c h ® 1 9 ) l i n e s ( p c e n t ) a ttr ( x y ," n a m e s " ) _ c ( c o ln a m e s ( X ) [ 2 ] , c o ln a m e s (Y )[2 ] ) t e x t ( p c e n t , l a b e l s = s e q ( l : d i m ( p c e n t ) [ 1 ] ) ,p o s = 4 ) f .V a r p lo t( x y ,l,2 ) } # p lo t v e c to r p o s itio n s p o in ts ( v c e n t) lin e s ( v c e n t) # f i r s t v e c to r la b e l f.d o s p l.R " f.d o s p l" . v e t 1 . p a s t e ( f o r m a t e ( r e p . v a c s $ h o u r [13 , w i d t h = 2 , f l a g * " 0 " ) ,f o r m a t C ( r e p . v e c s :$ m ig tiiw [llilq ta ] id ja g ^ ,ia g [g ,= ti^ \j] „ '‘Ælbyf3nlr7gqgKfr)g^. v e c s $ d a y [ l ] , w i d t h = 2 , f l a g = " 0 " ) , s e p = " " ) te x t( x = r e p .v e c s $ e a s tin g [ l] ,y = r e p .v e c s $ n o r th in g [ l] ,la b e ls = v c tl,p o s = 4 ) # h a n d l e t h e i n t e r p o l a t i o n s f o r f.m k n o rm # l a s t v e c t o r l a b e l v t l a s t . r e p . v e c s [ l e n g t h ( r e p . v e c s î h o u r ) ,3 s p lta b .n a .o m it( a s .d a ta .f r a m e ( c b in d ( in ta b [ ,h r c o l] , i n t a b [ , v a r c o l] ) ) ) v c t 2 _ p a s t e ( f o r m a t C ( v t l a s t $ h o u r , w i d t h = 2 , f l a g * " 0 " ) , f o r m a t C ( v t l a s t $ m i n u t e ,w ti^ rh fffiq iffi.a ^ ’‘fi" ô aÜ S .'n g o tiaa4 ;B X a rtiS 6 ti$ i3 a ^ w td id i= S u îl^ l(g sd ‘0 " ) , s e p = " " ) t e x t (x = v tla s t$ e a s tin g ,y = v tla s t$ n o r th in g ,la b e ls = v c t2 ,p o s = 3 ) h r s .r e p d ,le n g th ( s p lta b [ ,l] )) > i f (s p l){ s p f . s p l i n a f u n ( s p l t a b [ , 1 ] / h r s , s p l t a b [ , 2 ] , m e th o d ® " n a tu ra l" ) L eg e n d l e g e n d ( b n d s [ 1 , 1 ] + d e I x p o s , y p o s , c ( " Im ag e } else-C C e n t r e s " ," L o w P r e s s u r e C e n t r e s " ) , p c h » c ( l , 1 9 ) ) s p f.a p p ro x fu n ( s p lta b [ ,1 ] / h r s , s p lta b [ ,2 ] ) } s p l.s p f ( ts e q ) tr u th _ ts e q < = s p lta b [ l,l] /h r s I d ashed jo in s f o r f i r s t and l a s t v ec obs t s e q > = s p l ta b [ l e n g t h ( s p i t a b C , 1] ) ,1 3 / h r s p t i m e . r e p . p r e s $ n u m . h o u r s v t i m e . r e p . v e c s $ n u m .h o u r s s p l [ t r u t h ] _ N A # re m o v e o u t o f t i m e r a n g e e x t r a p o l a t i o n s p le n .le n g th ( p tim e ) v le n _ le n g th (v tim e ) r e tu r n ( s p l) s x _ s p lin e f u n ( x ® p tim e ,y = p c e n t[ ,l3 ) # p tim e p r e d i c t s p $ e a s tin g s y .s p lin e f u n ( x = p tim e , y = p c e n t[ , 2 ] ) # p t i m e p r e d i c t s p $ n o r t h i n g i f ( v t i m e [ l 3 > = p t i m e [13 && f .F o u r U p .R " f .F o u r U p " . v t im e [13 < = p t i m e [ p l e n ] ) { # l o w e r r a n g e i n b o u n d s f u n c t i o n ( ) - ( # Make s u r e p l o t s a r e a n n o t a t e d f o r 4 -u p p i.c b in d ( s x ( v tim e [ 1 ] ) , s y (v tim e [ 1 ] ) ) p rin tin g l l _ r b i n d ( v c e n t [ 1 , 3 , p l ) l i n e s ( 1 1 , l t y = 3 , lw d = 2 ) } i f ( v t i m e [ v l e n ] < = p tim e [ p l e n ] kk v t i m e [ v l e n ] > = p tim e [ 1 ] )-[ # u p p e r ra n g e i n bounds c a s e .s w itc h ( g e t( " b a s e n a m e " , p o s = l ) , "9604"= "C ase I " , "9 7 0 1 a"= "C ase I I " , "9701b"= "C ase I I I " , p 2 _ c b in d (s x ( v tim e [ v le n ]) , s y ( v tim e [ v le n ] )) " 9 7 1 1 S " = " C a s e I V " , " 9 8 0 3 " = " C a s e V") 1 2 _ r b in d ( v c e n t[ v le n , ] ,p 2 ) l i n e s ( 1 2 ,lty = 3 ,lw d = 2 ) } # ad d tim e s on th e p r e s s u re obs l b l . p a s t e ( s e q ( l :d i m ( r e p .p r e s ) [1 ] ) r e p . p r e s $ h o u r , " Z " , r e p . p r e s $ d a y , s e p p ü i'0 o m a = c { 2 , 0 , 0 , 0 ) ) # 2 t e x t l i n e s f o r b o tto m l a b e l a s s i g n ( " c a s e n a m e " , c a s e , p o B = l ) # s t o r e ca s e n a m e t e x t ( p c e n t,la b e ls = lb l,p o s = 4 ) m te x t(te x t= g e t(" c a s e n a m e " , p o s 1 ) ,s id e = l,o u te r = T ) # # m te x t( te x t= g e t( " c a s e n a m e " ,p o s = l) , s id e = l,o u to r = T ) a n n o ta te p l o t a n n o ta te p lo t } f . c o m b in e . R # co m b in e f i r s t an d sec o n d d e r iv a t iv e o u tp u t f o r bo u n d s c a lc " f .c o m b in e " . f u n c tio n ( ta b ){ x l . f .d e r iv a tiv e ( ta b ,r e c u r s e = l) y m a tl.f .d é r iv â tiv e (ta b ) x 2 _ f .d e r i v a t i v e ( t a b , o r d e r* 2 ,re c u rs e * l) y m a t2 _ f.d e riv a tiv e (ta b ,o rd e r = 2 ) tm in .m in ( c ( x l , x 2 ) ) tm a x .m a x ( c ( x l , x 2 ) ) c .a l l.N U L L # c o m b in e a l l c o lu m n s f o r ( i i n 1 : 4 ) { c . lo c a l.c (y m a tl[ , i] ,y m a t2 [ ,i] ) c .a l l_ c ( c .a l l,c .l o c a l ) > r m in _ m in ( c . a l l ) r m a x .m a x ( c . a l l ) f.g e tc y c .R : : : : : : : : : : : : : : " f .g e tc y c " . f u n c tio n ( d im a m o ) { ta b .re a d .ta b le (p a s te ( d ir n a m e ," / r e s u l t s " , sep= "" ) ) [ ,2 :3 ] re tu r n (ta b ) > f .g e tr e s .R : : : : : : : : : : : : : : " f .g e tr e s " < f u n c t i o n ( d i r n a m e , sk ip = 4 )-C s y s t e m ( p a s t e ( " t a i l -t-" , s k i p , " " , d i m a m e , " / r e s u l t s > r e s . tm p " , s o p * " " ) ) t a b . r e a d . t a b l e ( " r e s . t m p " ) s y s te m C 'rm r e s .tm p " ) re tu r n (ta b ) > : : : : : : : : : : : : : f .g e tv a r .R fu n c tio n ( v a r) -{ # r e t u r n " f.g e tv a r" r e q u ir e d v a r ia b le - 164- o b j s _ c ( " H o u r s " , " P r e s s u r e " , " C h a r t . V e l o c i t y " , " I m a g e . V e l o c i t y " , " C h a r t .B eaarttagC Q ut, " n a m e s " ) _ c ( " R a w . H o u r s " , p a s t e ( o b j s [ j ] , i , s e p = " " ) ) 'Edger4lt® H r(V 3Ü '© ige. M a x " , " I m a g e .B e a r i n g " , " H i g h . C l o u d " , " C y c l o n i c . I n d e x " , " E d g e . Me " J e t . T i l t " , " H e a d . L e n g t h " , " C o m m a.B u lg e" , " B a r o c l i n i e .W i d t h " ) b a s e n m s _ c (" a 9 6 " jA " , " jB " , " n 9 7 " , "m 9 8 ") # f . m a k e p lo t. R " f . m a k e p lo t " _ nam es u s e d i n h i g h c l o u d a n d c y c l o n i c t a b l e s f u n c ti o n ( X n a m a , Y nam e, s e p = 0 , d o . o r d = F , s p l = T ) { # e a c h t 0 s . c C 5 9 8 , 3 2 0 , 6 9 8 , 1 8 6 , 1 5 2 . 5 ) # tO f o r e a c h c a s e i n o b j e c t c o n t a i n s T im e , a n d V a r i a b l e Y _ f. g e tv a r(Y n a m e ) d a y * 2 4 + h o u r+ m in /6 0 if(X n « u n e = = " H o u rs " ){ # a p p e n d Y’ s h o u r s a s t h e p r e d i c t o r i _ a s . i n t e g e r ( s u b s t r i n g ( v a r ,n c h a r ( v a r ) ,n c h a r ( v a r ) )) a s . d a t a . fra m e ( c b in d (Y[ , 1 ] ,Y [ ,1 ] ) ) # t r i m c a s e nam e v a r _ s u b s t r i n g ( v a r , 1 , ( n c h a r ( v a r ) - 1 ) ) a t t r ( X , " n a m e s " ) _ r e p ( a t t r ( Y , " n a m e s " ) Cl], 2 ) y e ls e { # t r i m c a s e n u m b er j _ g r e p ( v a r , o b j s ) # f i n d w h ic h v a r X _ f. g e t v a r(X n a m e ) > p r in t (p a s te (" F in d in g " ,o b js C j], " fo r c a s e " ,i ) ) > if(j* ® 2 ){ # P re s s u re i n t a b . g e t ( p a s t e ( " P " , c a s e l s t [ i ] , " . r e p " , s e p = “ " ) ) # m u st " a t t a c h O " c o r r e c t d i r f i r s t (w ith th e d a ta i n i t ) o u t.c b in d (in ta b [ g re p (" n u m .h o u rs " , c o ln a m e s (in ta b ))] , i n t a b C g rep (" m b " , c o ln a m e s ( i n t a b ) ) ] ) > i f ( d o .o r d ) { o r d _ o r d e r( X [,2 ]) # s o r t o r d e r by X’s v a r i a b l e v a l u e s X _ X [ o rd ,] # s o r t e d X y e ls e { p r i n t (" D a ta w i l l n o t b e o r d e r e d " ) } Y h a t.F i f (d im (X ) [l] = = d im ( Y ) [ l ] ) - ( i f ( X [ , l 3 = = Y [ , 1 ] ) < # no n e e d t o i n t e r p o l a t e ! Y h a t_ Y [,2 ] } } if(!Y h a t)< Y h a t_ f .d o s p l( Y ,F ,X [,l]+ s e p ,l,2 ,s p l= s p l) # c a l l s p l in e / in t e r p o l a t i o n f u n c tio n } x y _ n a . o m i t ( a s . d a t a . f r a m e ( c b i n d ( X C, 2 ] , Y h a t ) ) ) i f ( j = » 4 ) { # I m a g e .V e l o c i t y # c o m b in e p r e d i c t o r a n d r e s p o n s e v a r i a b l e s i n t a b _ r b i n d ( g e t ( p a s t e ( " V " , c a s e l s t [ i ] , " . r e p " , s e p = " " ) ) , g e t ( p a s t e ("VK" ,«hto(lx3bi?i3^nM g^-)‘iV 50dolnam es (X ) [ 2 ] , c o ln a m e s (Y ) [2 ] ) o u t_ f .v e l( in ta b ,g e t( p a s ta ( " R V " ,c a s e ls t[ i] ,s e p = " " ) ) [ ,1 ] ) r e g .lm ( x y [ ,2 ] " x y [ , l ] ) p lo t( x y ,ty p e = " p " ) # s c a t t e r p l o t } o f v ars lin e s (x = x y [,l],y = f itte d ( re g ) ,lty * 2 ) # fit re g re s s io n lin e i f ( j = - 5 ) { # C h a r t.B e a r in g i n ta b _ g e t ( p a s t e ( " P " ,c a s e ls t [ i ] , " .r e p " ,s e p = " " )) #m ust r e t u m ( sum m ary ( r e g ) ) > " a t t a c h O " c o r r e c t d i r f i r s t (w ith th e d a ta i n i t ) o u t _ c b i n d ( i n t a b [ 2 : d i m ( i n t a b ) [1 ] , 4 ] , g e t ( p a s t e ( " R P " . c a s e l s t [ i ] , s a p F ! '! ') ) C i 2 i! ) : : : : f .m k 2 c o r .R " f .m k 2 c o r" < } f u n c t i o n ( s e p = 0 , s p l= T )- ( # p r o d u c e o b s e r v a t i o n l e v e l c o r r e la tio n t a b l e u s in g th e f .g e t v a r p a ire d v a r ia b le i f ( j = = 6 ) { # Im a g e . B e a r i n g m eth o d i n t a b _ r b i n d ( g e t ( p a s t e ( " V " .c a s e ls t [ i ] , " .r e p " ,s e p = " " ) ) .g e t( p a s te ( " V N " , c a s e l s t [ i ] ,s e p * " " ) )) o u t _ c b i n d ( i n t a b [ 2 : d i m { i n t a b ) [1 ] ,5 ] , g e t ( p a s t e ("RV" . c a s e l s t [ i ] , s e p = " " ) ’i) C j;f iJ 0 le n g th ( v a r n a m e s ) - l) > i‘5 + l # B x v a rs + t i m e s n c o l s _ 4 y # C o r. DF, Xnam e, Yname if ( j= = 3 ) { # C h a r t.V e lo c ity i n t a b . g e t ( p a s t e ( " P " , c a s e l s t [ i ] . r e p " , s e p = " " ) ) # m u st " a t t a c h O " c o r r e c t d i r f i r s t (w ith th e d a ta i n i t ) o u t _ f . v e l ( i n t a b , g e t ( p a s t e ( "R P", c a s e l s t [ i ] , s e p = " " ) ) [ , ! ] ) } i f ( j = = 7 ) { # H ig h .C lo u d i n t a b .g e t ( p a s t e ( " c " , c a s e l s t [ i ] , s e p = " " )) o u t_ in ta b [ ,l:2 ] } i f ( j = = 8 ) { # C y c lo n ic .In d e x in ta b .g e t( p a s te ( " c " , c a s e l s t [ i ] , se p * "")) o u t_c b in d (in t a b [ , 1 ] . i n t a b [ , 3 ] ) > t a b o u t _ a s . d a t a , f r a m e ( m a t r i x ( r e p ( 0 , n c o l s * 2 4 8 5 ) .n c o l * = n c o l s ) ) # 71 c h o o s e 2 p o s s i b l e v a l u e s a ttr ( ta b o u t," n a m e s " ) _ c ( " C o r r e la tio n " ," D .F ." ." X N a m e " ." Y n a m e " ) c o u n t _ l p r i n t ( " T i m e c o r r e l a t i o n s " ) # do Tim e c o r r e l a ti o n s f o r ( i i n 2 : le n g th (v a rn a m e s )){ f o r ( j i n 1 :5 ) { # C ases Y n a m e .p a s te ( v a rn a m e s [i], j.s e p = " " ) r t a b _ f . d o 2 C o r ( " H o u r s " , Y nam e, s e p = s e p , s p l = s p l ) r _ c o r ( r t a b ) [2 ] d f _ d i m ( r t a b ) [1 ] -2 t a b o u t [ c o u n t , ] _ c ( r , d f . " H o u r s " , Yname) c o u n t _ c o u n t+ l i f ( j * = 9 ) { # E d g e.M e an in ta b .g e t(p a s te (" e " .c a s e ls t[i].s e p = " " ) ) } } # p r o p e r d i r m ust be " a t t a c h O "e d o u t _ c b i n d ( i n t a b $ d a y * 2 4 + i n t a b $ h o u r + i n t a b $ m i n u t e / 6 0 - t 0 s C i ] , i n t a b [ , 4 ] ) # now c o r r e l a t i o n w i t h i n c a s e s , a l l v a r s b u t t im e # Add t o t i m e s p r i n t ( " H i t h i n - c a s e c o r r e l a ti o n s " ) f o r ( i i n 1 :5 ){ # C a s e - le v e l lo o p } p rin t(p a s te (" C a s e " , i ) ) i f ( j = = 1 0 ) { # E d g e .S tD e v c a s e v a r s . p a s t e ( v a r n a m e s , i , s e p = " " ) V C olum n nam es o f in ta b _ g e t( p a s te ( " e " .c a s e ls t[ i] ,s e p = " " ) ) C ase-n v a r ia b le s f o r ( j i n 2: (le n g th ( c a s e v a rs ) -l))- C f o r ( k i n (j + 1 ) : l e n g t h ( c a s e v a r s ) ){ # p r o p e r d i r m ust be " a t t a c h O "e d p rin t(p a ste (" C o m p a rin g p a i r " , j , k . " o u t_ c b in d (in ta b $ d a y * 2 4 + in ta b $ h o u r+ in ta b $ m in u te /6 0 -t0 s [i]; i n t a b [ , 5 ] ) # Add to t i m e s v a r s " , c a s e v a r s [ j] . c a s e v a r s [k ])) r ta b .f .d o 2 C o r ( c a s e v a r s [ j] .c a s e v a r s [ k ] ,s e p = s e p ,s p l= s p l) > i f ( ! d i m ( r t a b [ ! ] ) ) { # No o v e r l a p b e tw e e n v a r ia b le s ! i f ( j = * l l ) < # E dge.M ax in ta b .g e t( p a s te ( " e " , c a s e l s t [ i ] , sep = "")) r_ c o r_ N A } e ls e - { r _ c o r ( r t a b ) [2 ] } d f _ d i m ( r t a b ) [1 ] -2 # p r o p e r d i r m u st b e " a t t a c h ( ) " e d ta b o u t[ c o u n t.] _ c ( r ,d f , c a s e v a r s [ j] , c a s e v a r s [k ]) o u t_ c b in d ( in ta b $ d a y * 2 4 + in ta b $ h o u r + in ta b $ m in u te /6 0 - t0 s [ i] i n t a b C ,6 ] ) # Add t o t i m e s c o u n t . c o u n t +1 } if(j= = 1 2 ){ # J e t . T i l t o u t.c b in d ( g e t( p a s te ( "V ", c a s e l s t [ i ] , " . r e p " , s e p = " " )) [ , 5 ] , g e t(p a s te (" G " .c a s e ls t[i],s e p * " " ))[ ,! ] ) } i f ( j = = 1 3 ) { # H e a d .L e n g th o u t_ c b in d (g e t( p a s te (" V " .c a s e ls t[i], " . re p " . sep = "") ) [ , 5 ] . g e t(p a s te (" G " , c a s e ls t[ i] .s o p » " " ) ) [.3 ] ) > i f ( j = = 1 4 ) { # C om m a.B ulge o u t.c b in d ( g e t( p a s te ( " V " .c a s e ls t[ i] , " . re p " , sa p = " ")) [ ,5 ] , g e t(p a s te (" G " . c a s e l s t [ i ] ,s e p = " " ) ) [ .2 ] ) } i f ( j = = 1 5 ) { t B a r o c l i n i e . W id th o u t_ c b in d (g o t(p a s te (" V " .c a s e ls t[i], " . re p " . sep » "”) ) [ , 5 ] , g e t ( p a s t e ( "G ". c a s e l s t [ i ] . s e p = " " ) ) C , 4 ] ) } o u t _ a a . d a t a .fra m e ( o u t) }y y # f i n a l l y , c o r r e l a t i o n s b e tw e e n c a s e s o n t h e sam e v a r i a b l e p r i n t ( " B e t w e e n - c a s e c o r r e l a t i o n s ” ) c a s e v a r s . v a m a m e s [2 : l e n g t h ( v a r n a m e s ) ] # h a c k t o m erg e w i t h o l d f .m k c o r c o d e f o r ( i i n 1 : l e n g t h ( c a s e v a r s ) ) { # c o m p a re sam e v a r i a b l e s f o r e a c h c a s e f o r ( j i n 1 : 4 ) { f o r ( k i n ( j + l ) : 5 ) { # co m p a re v arX f o r c a s e -j and c a s e -k p r i n t ( p a s t e ( " C o m p a rin g " , c a s e v a r s [ i ] , j , " an d " , c a s e v a r s [ i ] , k , s e p = " " ) ) r ta b _ f .d o 2 C o r ( p a s te ( c a s e v a r s [ i] , j , s e p = " " ) .p a s te ( c a s e v a r s [ i] ,k ,s o p = " " ) , s e p » s e p . s p l = s p l ) i f ( ! d i m ( r t a b [ l ] ) )-( # No o v e r l a p b e tw e e n v a r i a b l e s ! r_ c o r_ N A } else-C r _ c o r ( r t a b ) [2 ] } d f _ d i m ( r t a b ) [ I ] -2 ta b o u t[c o u n t,]_ c ( r , d f . p a s t e ( c a s e v a r s [ i ] , j , s e p » " " ), p a s t e ( c a s e v a r s [i], k , s e p * " " ) ) - 165 - c ( " E d g e .M e a n 4 " , " J e t . T i l t 4 " ) , G( " E d g e . M aa n S ", " J e t . T i l t 5 " ) , c ( " J e t . T i l t 1 " ." C o m m a .B u l g e l " ) , c ( " J e t.T ilt3 " ," C o m m a .B u lg a S " ) , c ( " J e t . T i l t 4 " , " C o m m a .B u lg e 4 " ), c ( " J e t . T i l t 5 " , " C o m m a .B u lg e B " ), c ( " H ig h .C lo u d l" ," E d g e .M a a n l" ) , c ( " H i g h .C l o u d 2 " ," E d g e .M e a n 2 " ) , c ( " H i g h . C lo u d s " , " E d g e . M eanS " ) . c ( " H ig h .C lo u d 4 " , " E d g e . M ea n 4 "), c ( " C y c lo n i c . I n d e x l " , " E d g e . M e a n l" ), c ( " C y c l o n i c . I n d e x S " , " E d g e . M eanS") ) c o u n t c o u n t+ 1 > } r e t u r n ( t a b o u t [1 : ( c o u n t - 1 ) , ] ) > f .m k a llp lo ts .R " f .m k a l l p l o t B " _ f u n c t i o n ( ) - { # do v h a t i t s a y s . F i r s t a l l c a s e l e v e l s w ith f . V a r p l o t on t a b a l l c a s e l v l # t h e n a l l o b s l e v e l w i t h f . o b s r e g - o n l y do t h o s e p a i r s t h a t a r e o f i n t e r e s t p le a se c o u n t _ l # C ase l e v e l p a i r s p a i r s _ r b i n d ( c ( " E n d Z o n e " / 'B 2 4 " ) , c ( " P I V - P I I " ," P m in " ) , c ( " P I V - P I I " , ”B 2 4 " ). c ( " P m i n ” , ’'P m e a n " ) , c ( " P m e a n " , " B 2 4 " ) , c ( " C V m a x " ," P m in " ) , c ( " C V m a x " ," B 2 4 " ) ) fo r C i i n 1 : C d im ( p a irs )[1 ] ) ){ p rin t ( p a s te ( p a ir s [ i,l] , " p r e d ic ts " .p a ir s [ i,2 ])) x _ g r e p ( p a i r s [ i,l ] ,c o ln a m e s (c a s e lv l)) # g e t t h i s v a r ’ ; co lu m n nu m b er y _ g r e p ( p a i r s [ i , 2 ] , c o l n a m e s ( c a s e l v l ) ) # g e t t h i s v a r ’ s c o lu m n n u m b er p r i n t ( f .V a r p l o t ( c a s e l v l . x . y ) ) # p l o t th e m f .p s d u m p ( p a s t6 ( " s ta ts /" ,c o u n t," .p s " ,s e p = " " ) ) c o u n t .c o u n t+ 1 # Tim e c o r Obs l e v e l p a i r s p a i r s _ r b i n d ( c C ’H o u r s " , " C h a r t . V e l o c i t y 2 " ) , c ("H o u rs" ." C h a r t. V e le c ity B " ) , c ( " H o u r s " ," C h a r t. V e lo c ity B " ) , c ( " H o u rs " ." Im a g e . B e a r i n g l " ) , # (? ) c ( " H o u r s " , " I m a g e .B e a r in g 2 " ) , c ( " H o u r s " ," I m a g e .B e a r in g 4 " ) , c ( " H o u rs " ." Im a g e .B e a rin g B " ). c ( " H o u r s " ," I m a g a .V e lo c ity 2 " ) , c ( " H o u rs " ," Im a g e .V e lo c ity B " ) , c C 'H o u r s " , " H e a d . L e n g t h 4 " ) , c ( " H o u rs " , " H e a d .L e n g th s " ) , c ( " H o u r s " , "Comma. B u lg e 1 " ) , c ( " H o u rs " , " Comma. B u lg e 4 " ) , c C 'H o u r s " ." C o m m a .B u lg e S " ), c (" H o u rs" ," J e t . T i l t 1 ") , c ( "H o u rs" , " J e t . T i l t 2 " ) , c ( " H o u r s " J e t.T ilt3 " ) , c C 'H o u r s " , " J e t . T i l t 4 " ) , c C 'H o u r s " ," J e t .T i l t s " ) , c C 'H o u r s " , " B a r o c l i n i e . W i d t h l " ) , c ( " H o u rs " ," B a r o c li n i e .W id th s " ), c (" H o u rs " . " B a r o c li n i e .W id th s " ), c ( " H o u r s " , " E d g e . M ean2") , c ( " H o u r s " , " E d g e . M e a n S " ), c ( " H o u rs " , " E d g e . M ean4") , c ( " H o u r s " ," E d g e . S tD e v S " ), c C 'H o u r s " , " E d g e . S tD e v 4 " ) ) f o r ( i in 1 : (d im (p a ir s )[1 ]) p rin t (p a s te ( p a ir s [ i,1 ] ," p re d ic ts " ,p a irs [ i.2 ] ) ) p rin t ( f .o b s ro g (p a irs [i,1 ] .p a i r s [ i ,2 ]) ) } f .p s d u m p (p a s te ( " s ta ts /" , c o u n t, " . p s " , se p = " ")) c o u n t _ c o u n t+ l # P II- > P III c a se le v e l p a i r s p a irs _ r b in d ( c ( " Im a g e . B e a r i n g l l l . U m a x " . " P m i n " ) , c ( " B a r o c li n i e . W i d t h l l l . I l m i n " , " P m in " ), c C 'E d g e . M a x I I I . I l d i f f " , " P m i n " ) , c ( " I m a g e . V e lo c i t y l l I . I l m e a n " , " B 2 4 " ) , c C 'I m a g e . B e a r i n g l l l . I l d i f f " ," B 2 4 " ) , c ( " I m a g e .B e a r i n g l ll .U m a x " , "B 24") , c ( " J e t . T i l t l l l . I l d i f f " . "B 24") ) f o r ( i i n 1 : ( d i m ( p a i r s ) [ 1 ] ) ){ p r i n t ( p a s t e ( p a i r s [ i , l ] , " p r e d ic ts " , p a ir s [ i ,2 ] ) ) x _ g r e p ( p a ir s [ i.l] , c o ln a m e s (a llc a s e lv l)) # g e t t h i s v a r ’ s c o lu m n n u m b er y _ g re p (p a irs [ i,2 ] .c o ln a m e s C a llc a s e lv l)) # g e t t h i s v a r ’ s c o lu m n n u m b e r p r i n t ( f . V a r p l o t ( a l l c a s e l v l , x , y ) ) # p l o t th e m > f .p s d u m p ( p a s te ( " s ta ts /" ,c o u n t," .p s " ,s e p = " " ) ) c o u n t _ c o u n t+ l # f o r g o tte n v a r ia b le s (L e t’ s n o t have to re -o rd e r a l l eq n ’s in th e te x t! # Tim e c o r Obs l e v e l p a i r s p a i r s _ r b i n d ( c C 'H o u r s " , " C h a r t . B e a r i n g l " ) , c ( " H o u r s " , " C h a r t . Be a r i n g 2 " ) , c ( " H o u r s " ," C h a r t.B e a r in g 4 " ) , c ( " H o u r s " ," C h a r t.B e a r in g S " ) , c C 'H o u r s " . " P r e s s u r e ! " ) , c ( " H o u rs " ," P re s s u re 2 " ), c C 'H o u r s " . " P r e s s u r e 4 " ) , c ( " H o u r s " ," P r e s s u r e s " ) ) f o r ( i in 1 : (d im (p a ir s )[1 ]) ){ p r in t( p a s te ( p a ir s [ i,l] , " p re d ic ts " , p a ir s [ i,2 ] ) ) p rin t ( f .o b s r e g ( p a ir s [ i.l] ,p a ir s [ i.2 ] ) ) f .p s d u m p (p a s te (" s ta ts /" .c o u n t," .p s " ,s e p = " " )) c o u n t _ c o u n t+ l f o r ( i i n 1 : ( d im ( p a ir s ) [1 ] ) ){ p rin t (p a s te (p a ir s [ 1 ,1 ] ," p re d ic ts " , p a i r s [ i ,2 ]) ) p rin t ( f .o b s r e g ( p a i r s [ i .l ] .p a i r s [ i ,2 ])) f . psdum p ( p a s t e ( " s t a t s / " , c o u n t , " . p s " c o u n t _ c o u n t+ l ")) # O th e r o b s l e v e l p a i r s p a i r s _ r b in d ( c ( " P r e s s u r e l" , " C h a rt. B e a r in g l" ) , c ( " P r e s s u r e 2 " , " C h a r t. B e a rin g 2 " ) , c ( " P r e s s u r e 4 " , " C h a r t. B e a rin g 4 " ) , c ( " P re s s u re s " ," C h a rt.B e a rin g S " ), c C 'P r e s s u r e l " . " I m a g e . B e a r i n g l " ) , c ( " P r e s s u r e 4 " , " Im a g e . B e a r in g 4 " ) , c ( " P re s s u re 2 " ," Im a g e .V e lo c ity 2 " ), c ( " P r e s s u r e s " ," I m a g e .V e lo c ity S " ), c C 'P r e s s u r e B " , " I m a g e . V e l o c i t y B " ) , c ( " P r e s s u r e 2 " , " H i g h . C lo u d 2 " ) . c ( " P r e s s u r e 4 " . " H ig h .C lo u d 4 " ), c (" P re B S u re 2 " , " C y c lo n ic . I n d e x 2 " ), c ( " P r e s s u r e 2 " , " E d g e . M ean2" ) , c ( " E d g e .M e a n l" , " C o m m a .B u l g e l " ) , c ( " E d g e .M e a n 2 " ," C o m m a .B u lg e 2 " ) , c ( " E d g e .M e a n 3 " , " C o m m a .B u lg e S " ), c ( " E d g e . M ea n 4 ", "Comma. B u lg e 4 " ) , c ( " E d g e . M eanS", "Comma. B u lg e B " ) , c ( " E d g e .M e a n l" ," J e t.T iltl" ) . c ( " E d g e .M e a n S " ," J e t.T ilt3 " ) , f .m k c o r .R " f .m k c o r " _ f u n c tio n ( ta b in ) - C # c a l c u l a t e n a .o m it c o r r e l a t i o n s v a r s _ d i m ( t a b i n ) [2 ] n c o l s _ 6 c n a m e s _ c o l n a m e s ( t a b i n ) ta b o u t_ a s .d a ta .fra m e (m a tr ix ( re p ( 0 ,n c o ls * 2 4 8 5 ),n c o l= n c o ls )) # 71 c h o o s e 2 p o s s i b l e v a l u e s a t t r ( t a b o u t , " n a m e s " ) _ e ( " C o r r e l a t i o n " , " D .F ." ," X N a m e " , "Y neune", " R o w " ," C o l" ) # f i l l f i r s t ro w m a n u a ll y c o r ta b .n a .o m it(c b in d (ta b in [ ,1 ] ,t a b i n [ ,2 ] )) ta b o u t [ l , ] _ c ( c o r ( c o r t a b ) [ 1 , 2 ] , d i m ( c o r ta b ) [ l ] - 2 , c n a m e s [ l] ,c n a m e s [ 2 ] ,1 ,2 ) # do t i m e c o r r e l a t i o n s f i r s t c o u n t _ 2 p r i n t ( " T i m e c o r r e l a t i o n s " ) f o r ( i i n 3 : v a r s ) - ( # s k i p t i m e co lu m n a n d f i r s t c o lu m n ( a l r e a d y d o n e ) p rin t(p a s te (i," in " , v a rs)) c o r t a b _ n a . o m it( c b i n d ( t a b in [ , 1 ] , t a b i n [ , i ] )) l i n e _ c ( c o r ( c o r t a b ) [ 1 , 2 ] .d im ( c o r ta b ) [ l] - 2 ,c n a m e s [ 1 ] ,c n a m e s [ i] , l . i ) f o r ( j in l:n c o ls ){ t a b o u t [ c o u n t , j ] . l i n e [ j ] } c o u n t .c o u n t + 1 } # now c o r r e l a t i o n w i t h i n c a s e s , a l l v a r s b u t t i m e p r in t( " W ith in - c a s e c o r r e l a ti o n s " ) f o r ( i i n 1 :5 ){ # C a s e - le v e l lo o p p rin t(p a s te (" C a s e " , i ) ) 166 - c a s e v a r s _ g r e p ( a s .c h a r a c te r ( i ) , cnam es) # C olum n i n d i c e s o f C a s e - n v a r i a b l e s f o r C j i n 1 : (le n g th (c a s e v a rs )-l)){ f o r ( k i n ( j + 1 ) : le n g t h ( c a s e v a r s ) ){ p rin t(p a sta (" C o m p a rin g p a i r " , j , k , v a r s " ,c n a m o s [ c a s e v a r s ] [ j ] , c n a m e s[c a se v a rs][k ])) c o r ta b _ n a .o m it( c b in d ( ta b in [ ,c a 8 e v a r s [ j] ] ,ta b in [ ,c a s e v a r s [ k ] ] )) lin e _ c ( c o r ( c o r ta b ) [ 1 ,2 ] .d im C c o rta b )[l]-2 , c n a m e s [c a s e v a rs ][j], c n a m e s [ c a s e v a r s ] [ k ] ,i,j) f o r d i n l:n c o ls )-C t a b o u t [ c o u n t , 1 ] . l i n e [1 ] } c o u n t _ c o u n t+ l g e t ( p a s t e ( " R P " .c a s e l s t [ i ] ,s e p = " " ) ) [ , 2 ] ) , h r s [ i ] , t s e q , 4 , 8 # I m a g e .V e l o c i t y c o l.g r e p ( p a s te ( " I m a g e .V e lo c ity " ,i.s e p » " " ) ,la b s ) in ta b _ r b in d ( g e t( p a s te ( " V " , c a s e l s t [ i ] , " . r e p " , s e p = " " ) ) ,g e t( p a s te ( " V N " , c a s e l s t [ i ] , t a b [ , c o l ] _ f . d o s p K f . v e l ( i n t a b , g e t ( p a s te ( " R V " , c a s e l s t [ i ] , s e p = " " ) ) [ , ! ] ) , h r s [ i ] , t s e q , 1 , 2 , s p l= s p l) # I m a g e .B e a r in g c o l . g r e p ( p a s t e ( " Im a g e . B e a r i n g " , i , s e p = " " ) , l a b s ) ta b [,c o l]_ f.d o s p l(c b in d ( in ta b [2 :le n g th (in ta b [,5 ] ), ] , g e t( p a s te ( " R V " .c a s e ls t[ i] ,s e p = " " ) ) [ ,2 ] ) ,h r s [ i ] , t s e q , 5 , 8 >} # H ig h .C lo u d c o l_ g r e p ( p a s te ( " H ig h .C lo u d " , i , s e p = " " ) , la b s ) i f ( i> l) - [ # 9 6 0 4 c a s e r e a d s e p a r a t e l y ( i m a g e f i l e nam es d o n 't code h o u rs ) s y s te m ( p a s t8 ( " i/a d d tO .p i" , t O s [ i ] ,b a s e n m s [ i ] , " > c ta b " )) in ta b _ r e a d .ta b le ( " c ta b " ) } else-C in ta b _ g e t( " c 9 6 0 4 " ,p o s = l) } t a b [ , c o l ] _ f . d o s p l ( i n t a b , h r s [ i ] , t s e q , 1 ,2 .s p l» s p l) # f i n a l l y , c o r r e l a t i o n s b e tw e e n c a s e s on t h e sam e v a r i a b l e p r i n t ( " B e t w e e n - c a s e c o r r e l a t i o n s " ) c a s e v a r s _ c n a m e s [ g r e p ( " 1 " .cn e im e s}] # f i n d a l l v a r i a b l e nam e s f o r c a s e 1 c a s e v a r s .a u b s trin g C c a s e v a rs ,l.n c h a r(c a s e v a rs )- l) # re m o v e c a s e n u m b e r f r o m v a r i a b l e nam es f o r ( i i n l : l e n g t h ( c a s e v a r s ) ) { # c o m p a re sam e v a r i a b l e s f o r each case f o r ( j i n 1 : 4 ) { f o r ( k i n ( j + 1 ) : 5 ) { # co m p a re varX # C y c lo n ic .In d e x f o r c a s e -j and c a s e -k c o l.g r e p ( p a s te ( " C y c lo n ic . In d e x " , i , s e p * " " ) ,la b s ) ta b [ ,c o l] _ f .d o s p l( in ta b ,h r s [ i] .ts e q ,l,3 ,s p l= s p l) p rin t(p a ste (" C o m p a rin g " , c a s e v a r s [ i ] , j and " ,c a s e v a r s [ i ] ,k ,s e p = " " ) ) # E d g e.M e an j c o l _ g r e p ( p a s t e ( c a s e v a r s [ i] , j,s e p = " " ) .c n a m e s ) k c o l.g r e p ( p a s te ( c a s e v a r s [ i] ,k ,s e p = " " ) .c n a m e s ) c o l . g r e p ( p a s t e ( " E d g e .M ean" , i , s e p = '" ‘) , l a b s ) in ta b .g e t(p a s te (" e " ,1 s t[i],s e p * " " ) ) c o r t a b _ n a .o m i t ( c b i n d ( t a b in [ ,jc o l ] ,t a b i n [ ,k c o l ] )) # p r o p e r d i r m ust b e " a t t a c h ( ) " e d lin e _ c ( c o r ( c o r t a b ) [ 1 , 2 ] , d im (c o r ta b )[1 ] -2 , p a s t e ( c a s e v a r s [ i ] , j , s e p = " " ) . p a s t e ( c a s e v a r s [ i ] , k , s e p = " " ) ,jc o iq te b j.d b in d ( in ta b $ d a y * 2 4 + in ta b $ h o u r + in ta b $ m in u te /6 0 - t0 s [ i] , i n t a b [ , 4 : 6 ] ) # A dd tO t i m e s f o r d in l:n c o ls ){ t a b o u t [ c o u n t , 1 ] _ l i n e [ 1 ] } c o u n t _ c o u n t+ l t a b [ , c o l ] _ f . d o s p l ( i n t a b , h r s [ i ] , t s e q , 1 , 2 , s p l= s p l) } >} r e tu r n ( ta b o u t[1 : co u n t - 1 , ] ) # E d g e .S tD e v c o l _ g r e p ( p a s t e ( " E d g e . S tD e v " , i , s e p = " " ) , l a b s ) t a b [ , c o l ] _ f . d o s p l ( i n t a b , h r s [ i ] , t s e q , l , 3 , s p l= s p l) } # E d g e.M a x c o l . g r e p ( p a s t e ( " E d g e . M a x " . i , s e p = " " ) , l a b s ) t a b [ , c o l ] . f . d o s p l ( i n t a b , h r s [ i ] , t s e q , 1 , 4 , s p l= s p l) : : : : : : : : : : : : : f.m k n o rm .R " f.m k n o rm " < fu n c tio n ( n o n n a l» T ,s p l® T ){ # c r e a t e a n o rm a lis e d # J e t . T i l t c o l . g r e p ( p a s t e ( " J e t . T i l t " , i , s e p = " " ) .la b s ) " g lo b a l" ta b le f o r ea ch c a se I s t .g e t ( " c a s e l s t " ,p o s = l ) o b j s . c ( " N o r m a l i s e d . H o u r s " , " P r e s s u r e " , " C h a r t . V e l o c i t y " : " Im a g e . V e l o c i t y " , " C k h a h .,a e iK id .t|^ % ( p a s te (" V " , 1 s t [ i ] , " , r e p " , s e p = " " ) ) , " I m a g e .B e a r i n g " , " H i g h .C l o u d " , " C y c l o n i c . I n d e x " , E d g e .M e a n " ," E d g e .S tD e v " , "E d g e . g e t t ( ^ a s t e ( " G " , 1 s t [ i ] , s e p = " " ) ) ) t a b [ , c o l ] _ f . d o s p l ( i n t a b , h r s [ i ] , t s e q , 5 , 8 , sp l= s p l) " J e t . T i l t " , " H e a d . L e n g t h " , "Comma. B u l g e " , " B a r o c l i n i e . W i d t h " ) t 0 s _ c ( 5 9 8 , 3 2 0 , 6 9 8 , 1 8 6 , 1 5 2 . 5 ) # tO # H e a d .L e n g th f o r e a c h c a s e i n d a y i'2 4 + h o u r+ m in /6 0 c o l.g re p (p a s te (" H e a d . L e n g th " ,i,s e p * " " ) ,la b s ) b a s e n m s _ c ( " a 9 6 " , " j A " , " j B " , " n 9 7 " , " m 9 8 " ) # nam es u s e d ta b [ ,c o l]_ f.d o s p l(in ta b ,h rs [ i] ,ts e q .5 ,i0 ,s p l» s p l) i n h ig h c lo u d an d c y c lo n ic t a b l e s # C om m a.B ulge c o l .g r e p ( p a s t e ( " C o m m a . B u l g e " . i , s e p = " " ) . l a b s ) t a b [ , c o l ] _ f . d o s p l ( i n t a b , h r s [ i ] , t s e q , 5 , 9 , s p l= s p l) if(n o rm a l){ h r s .c ( 2 4 ,2 1 .5 ,2 5 .5 ,2 1 .5 .2 6 .2 ) # tim e n o r m a lis a tio n : tim e o f P h aseIV - t P h a s e l l t s e q _ s e q ( - l , 2 .1 ,0 .0 1 ) p r i n t ( " C a l c u l a t i n g tP I V -tP II n o rm a lis e d t a b l e " ) } e l s e { # u s e ra w t i m e v a l u e s h r s . c ( l , l , l , l , l ) # u s e t h e s e f o r n o n -n o r m a lis e d d a ta v a l u e s t s a q _ s e q ( - 2 6 , 5 5 , 0 . 5 ) # a p p r o x im a te t i m e r a n g e f o r a l l c a s e s o b j s [ 1 ] ." R a w .H o u r s " # c o r r e c t co lu m n nam e p r i n t ( " C a l c u l â t i n g r a w - t i m e b a s e d t a b l e " ) # B a r o c l i n i e . W id th c o l.g r e p ( p a s t e ( " B a r o c lin ie .W id th " ,i,s e p = " " ) .la b s ) ta b [ ,c o l] .f .d o s p l( in ta b ,h r s [ i] ,ts e q ,5 ,ll,s p l= s p l) } re tu r n ( ta b ) l a b s _ r e p ( 0 . ( l e n g t h ( o b j s ) - l ) * 5 ) # l e a v e o f f t i m e co lu m n f o r now f o r ( i i n l : l e n g t h ( l a b s ) ) { # a d d i n d e x n u m b e r t o co lu m n nam es l a b s [ i ] . p a s t e ( o b j s [ a s . i n t e g e r ( ( i - 1 ) / 5 + 2 ) ] , ( i - l ) % % 5 + l ,s e p = " " ) y # now a d d t h e t i m e c o lu m n l a b s _ c ( o b j s [ i ] . l a b s ) ro w s .le n g th ( ts e q ) c o ls _ le n g th (la b s ) t a b . a s . d a ta .fra m e ( m a tr ix ( r e p ( 0 , r o w s * c o ls ) .n c o l= c o ls ) ) a ttr ( ta b ," n a m e s " ) _ la b s t a b [ , l ] _ t s e q } f .o b sre g .R : : : : : : : f u n c ti o n ( x v a r , y v a r , d o . o rd = F ){ s p l_ f .d o 2 C o r ( x v a r , y v a r) f . V a r p l o t( s p l , 1 , 2 , d o .o rd = d o .o rd ) " f .o b s r e g " . > f .o r d e r .R " f .o r d e r " , f u n c tio n ( ta b ,n a .r e m o v e = T ,m in D F * F ,s o r tc o l= l.D F c o l= 2 ,la r g e f ir s t= T ) { i f (n a .re m o v e )'C i s v a r . !i s . n a ( a s . n u m e r i c ( s p l c o r [ , 1 ] ) ) t l _ t a b [ i s v a r , ] } else-C tl.ta b > f o r d i n 1 :5 ){ p r i n t (p a s te ( " F i l l i n g C ase", i , " v a r ia b le s " ) ) # F i l l v a rs f o r each c a s e # ss*s===ss==s==s=5=*ass=*!s:s==a # P r e s s u r e c o l.g r e p ( p a s te ( " P r e s s u r e " , i , se p = " " ) .la b s ) i f (m inD F )-[ # re m o v e l e s s t h a n DF d a g . o f fr e e d o m ro w s i n t a b . g e t ( p a s t e ( " P " , c a s e l s t [ i ] , " . r e p " , s e p = " " ) ) # m u st t 1 _ t 1 [ a s . n u m e r i c ( t l [ , D F c o l ] ) >=m inD F,] " a t t a c h O " c o r r e c t d i r f i r s t (w ith t h e d a ta i n i t ) t a b [ ,c o l] _ f .d o s p l( in ta b ,h r s [ i] ,ts e q ,g r e p ( " n u m .h o u r s " .c o ln a m e s (in ta b ) } , g re p ("m b ", c o ln a m e s (in ta b )) ,s p l= s p l) t 2 _ t l [ o r d e r ( t l [ , s o r t c o l ] ) , ] # o rd e re d s m a lle s t to l a r g e s t i f ( l a r g e f i r s t ) ■( # C h a r t . V e lo c ity c o l_ g r e p ( p a s te ( " C h a r t.V e lo c ity " ,i,s e p » " " ) , la b s ) r e t u r n ( t 2 [ d i m ( t 2 ) [1 ] : 1 , ] ) # f l i p s o r t o r d e r } else-C t a b [ ,c o l ] _ f .d o s p l ( f .v e l ( i n t a b ,g e t ( p a s t e ( " R P " .c a s e l s t [ i ] ,s e p = " " ) ) [ , ! ] ) ,r e tu r n ( t 2 ) > h r s [ i] ,ts e q ,l,2 ,s p l= s p l) } # C h a r t , B e a rin g c o l_ g re p (p a s te (" C h a rt. B e a r in g " ,! ,s e p = " " ).la b s ) ta b [ ,c o l] _ f .d o s p l( c b in d ( in ta b [ 2 :le n g th ( in ta b [ , 5 ] ) , ] , f .p d e r iv .R : : : : : : : : : : : : : : " f .p d e r iv " . f u n c t i o n ( t a b = r e p . p r e s ,o r d e r = l ) - C # p r o d u c e 1 s t and 167- 2nd d e r i v a t i v e i n h o u r l y i n t e r v a l s f o r p r e s s u r e s m b_tab$m b p l e n _ l e n g t h ( m b ) tB « q _ ta b $ n u m .h o u r s t r a n g e _ t s a q C p l e n 3 - t s e q C 2 ] + l # we l o s e t h e f i r s t o b s i n t a k i n g d i f f o f [ 2 ] - [ l ] d e lm b .m b [2 : p l e n ] - m b [ 1 : ( p l e n - 1 ) ] d e ltim a _ ts e q [2 : p l e n ] - t s e q [ l : ( p l e n - 1 ) ] d e r m b .d e l m b / d e lt i m e s p l . s p l i n e ( t s e q [2 : p l e n ] , d e r m b , n = t r a n g e ,m e th o d = " n a t u r a l " ) d m b .a s . d a t a . f r a m e ( s p l ) a t t r ( d m b ," n a m e s " ) _ c ( " n u m .h o u r s " ," m b " ) i f ( o r d e r = = l ) { r e tu r n ( d m b ) } e l s e { f.p d e r iv ( ta b = d m b ,o r d e r = o r d e r - l) } m te x t(te x t* g e t(" c a s e n a m e " ,p o s -l),s id e = l,o u te r = T ) # a n n o ta te p l o t # r e s to r e o r i g i n a l p a r a m e te r s p a r ( m f c o l = c ( l ,D ) p a r(o m a = c ( 2 , 0 , 0 , 0 ) ) f.p lo t2 p r e s .R : : : : : : : : : : : fu n c tio n ( d e lp o s = 0 ){ p a r ( m f c o l= c ( l,2 ) ) " f.p lo t2 p re s if ( d e lp o 8 = = 0 ) { f . p r e s p l o t () f . p l o t p d e r i v O > e ls e { f . p r e s p lo t( d e lx ® d e lp o s C l] ,d e ly = d e lp o s [2 ] ) f . p l o t p d e r i v ( l e g x * d e l p o s [ 3 ] ,le g y = d e lp o s [4 ] ) } f .P d if f .R " f.P d iff" . fu n c ti o n O - C # f i n d t h e P h a s e Î I I - I I d i f f e r e n c e b e tw e e n v a rs P I I s _ c ( - 1 0 ,- 7 ,- 9 . 5 , - 4 . 5 , -6 .2 ) # d e f in e t h e o u tp u t m a tr ix : c o l s C a s e l . . C ase 5 # ro w s: < v a r X > I I I . I l - C d i f f lm ax}m eaua|m in} # 5 c a s e s , 4 t r e a t m e n t s , 14 v a r i a b l e s r e s u l t s _ a s . d a ta .f r a m e ( m a tr ix ( 5 * 4 * 1 4 ,n c o l= 5 ) ) f o r d i n 1 :5 ){ # c a s e l e v e l c o u n t_ l f o r ( j i n 2 : le n g t h ( v a r n a u n e s ) ) { v n a m e .p a s t e ( v a r n a m e s C j ] , i , s a p * " " ) v a r . f . g e tv a a r(v n a m e ) v t i m e . v a r C ,1 ] i f ( ! l e n g t h ( v t i m e [ v t i m e = = P I I s [ i ] ] ) ) { # No o b s a t P I Î v t i m e .c (v tim e , P I I s [ i ] ) # t a c k i t on t h e end } i f ( ! l e n g t h ( v ti m e C v t i m e = = 0 ] ) ) { # No tO o b s v tim e _ c (v tim a ,0 ) } v tim e _ v tim e [ o r d e r ( v tim e ) ] # s o r t t h e new e n t r i e s v s p l _ f . d o s p l ( v a r , F , v t i m e , 1 , 2 ) v o u t.n a .o m it( c b in d C v tim e , v s p l ) ) v t e s t _ v a r f o r ( k i n 1 : d i m ( v o u t ) [1])■ ( i f ( ! d i m ( v a r [ ( v a r [ , l ] = = v o u t [ k , 1] ) , ] ) [ ! ] ) { # s p l i n e e n t r i e s n o t fo u n d i n o r i g i n a l v a r v t e s t _ r b i n d ( v t e s t ,v o u t [ k ,] ) # append e n t r y t o a copy y y v o u t_ v te s t[ o r d e r ( v te s t[ , ! ] ) , ] # and s o r t e v e ry th in g # f i l l t h e m a t r i x m g n u m s _ l : d i m ( v o u t ) [1 ] # g e t n u m b er o f ro w s m g n u m s_ m g n u m s [ v o u t [ , 1 ] > = P I I s [ i ] 6 v o u t C ,1 ] < *0] r n g v a r . v o u t [ r n g n u m s ,] r e s u l t 8 [ c o u n t, i ] _ rn g v a r [ d im (m g v a r ) [1 ] ,2 ] rn g v a r [ l,2 ] # d iffe re n c e P H I .I I r e s u l t s [c o u n t+ 1 ,i] _ m a x ( m g v a r [ ,2 ] ) re s u lts [c o u n t+ 2 ,i]_ m e a n (rn g v a r[ ,2 ] ) r e s u l t s [c o u n t+ 3 ,i] _ m in ( r n g v a r [ ,2 ] ) i f ( i = = l ) " ( # f i l l ro w .n a m e s t h e f i r s t t im e re s b a s e .p a s te (v a r n a m e s [ j], " I I I .I I " ,s e p = " " ) a t t r ( r e s u lts ," r o w .n a m e s " ) [ c o u n t] .p a s te ( r e s b a s e ," d if f " , sep = "") a t t r ( r e s u l t s , " r o w .n a m e s " ) [ c o u n t + 1 ] . p a s t e ( r e s b a s e , " m a x " , s e p » " " ) a t t r ( r e s u l t s , " ro w .n a m e s " ) [ c o u n t+ 2 ] .p a s te ( r e s b a s e , "m ean ", sep = "") a t t r ( r e s u l ts ," r o w .n a m e s " ) [ c o u n t + 3 ] .p a s t e ( r e s b a s e , " m in " ,s e p » " " ) m t e x t (te x t* = g e t (" c a s e n a m e " ,p o B » l) , s i d e = l , o u t e r = T ) a n n o ta te p l o t p a r ( m f c o l= c ( l,1 ) ) : : : : : : : : : : : : : : f .p l o t 4 V B .R f u n c tio n ( le g p o s = 0 ,F o u r U p = K U L L ) { b a s e n a m e .g e t ( " b a s e n a m e " ,p o s = l ) # " f .p l o t 4 V B " _ p a r ( m f r o w = c ( 2 ,2 ) ) f .F o u rU p O P v e lb e a r.g e t(p a s te (" R P " ,b a s a n a m e ,s e p ® " " ) ,p o s = l) V v e lb e a r .g e t( p a s te ( " R V " ,b a s e n a m e ,s e p = " " ) ,p o s = l) v e c s _ r b i n d ( g e t ( p a s t e ( "V ", b a se n a m e , " . r e p " ,s e p = " " ) ,p o s = l ) , g e t ( p a s t e ("V N ", b a s e n a m e , s e p = " " ) , p o s = D ) x b n d .r a n g e ( c ( r e p . p r e s $ n u m . h o u r s , r e p . v e c 8 $ n u m . h o u r s ) ) P v e l .f . v e l(d is tra w = P v e lb e a r[ ,1 ] ) V v e l.f . v e l( ta b = v e c s , d is tr a w = V v e lb a a r [ , 1 ] ) P a c c e l.f .a c c e l( d is t= P v e lb e a r [ ,l] ) V a c c e l.f .a c c e l( ta b » v e c s ,d is t* V v e lb e a r [ ,l] ) y b v e l.r a n g e ( c ( P v e l[ , 2 ] , V v e l [ ,2 ] ,P a c c e l [ ,2 ] , V a c c e l[ , 2 ] ) ) y b b e a r . r a n g e ( c ( P v e I b e a r [ , 2 ] , Vv e l b e a r [ , 2 ] ) ) v e l b n d _ c b i n d ( x b n d ,y b v e l ) b e a r b n d _ c b i n d ( x b n d ,y b b e a r ) i f (le g p o s -* 0 )-{ f .p lo tv e l(d is t* P v e lb e a r C ,l],b n d a = v e lb n d ,s u b = " l" ) f .p lo tv e l ( t a b = v e c s ,d i s t = V v e l b e a r [ , 1 ] ,b n d s = v e lb n d ,i n t e r v a l * 0 .5 , c h a r t = " I m a g e s " ,s u b = " 2 " ) } e l s e { f . p l o t v e l ( d i s t = P v e l b e a r [ ,1 ] ,b n d s = v e lb n d ,le g x = le g p o s [l], le g y = le g p o s [ 2 ] ,s u b = " l" ) f .p l o t v e l ( t a b = v e c s , d is t= V v e lb e a r[ , 1 ] ,b n d s « v o lb n d ,in te r v a l= 0 .5 , l e g x = l e g p o s [ 3 ] , l e g y = l e g p o s [ 4 ] ,c h a r t = " I m a g e s " , s u b = " 2 " ) > f .p lo t b e a r i n g ( B e a r = P v e l b e a r [ ,2 ] , b n d s =be a r b n d , s u b = "3 ") f . p l o t b e a r i n g ( B e a r * V v e l b e a r [ ,2 ] , b n d s = b e a rb n d , ta b * v 6 c s , i n t e r v a l l e . 5 ,c h a rt» " Im a g e s " , sub * "4 ") m te x t( te x t= g e t( " c a s e n a m e " ,p o s = i) ,s id e = l,o u te r = T ) a n n o ta te p l o t p a r(m fro w = c ( 1 ,1 ) ) # > c o u n t c o u n t +4 } > re tu m ( ra s u lts ) } : : : : : : : : : : : : : : f . p lo t2 g e o m .R : : : : : : : : : : : : : : # S ee f . p l o t t a b s f u n c # P l o t f i r s t a n d s e c o n d geom d e r i v a t i v e s " f .p l o t 2 g e o m " _ f u n c tio n ( g e o m ){ # c o l l e c t r a t e s d l .f .d e r i v a t i v e ( g e o m ) d 2 _ f . d e r iv a tiv e ( g e o m ,o r d e r » 2 ) # # i n c r e a s e o u t e r m a r g i n t o 3 c h a r s p a r ( o m a = c ( 2 ,0 , 3 , 0 ) ) # f o u r p l o t s : R o t, R le n , H l e n , J w id p a r ( m f c o l = c ( 2 , 2 ) ) t i t l e s . c ( " R o t a t i o n " , " R a d i a l L e n g t h " , "H ead L e n g t h " , " J e t W id th " ) t i t l e s _ c ( " J e t T i l t fr o m N -E R a t e s " , "Comma \ " B u l g e \ " R a d iu s R a t e s " , "Comma H ead L e n g th R a t e s " , " B a r o c l i n i e C lo u d W id th R a t e s " ) : : : : : : : : : : : : : : f . p lo tb e a r in g . R : : : : : : : : : : : : : : " f.p lo tb e a r in g " . f u n c tio n ( ta b * re p .p r e s ,B e a r ,b n d s = 0 ,le g x “ - 1 4 ,le g y = 0 .5 , in te rv a l= l,c h a r t= " C h a rts " ,s u b ® # B .f .b e a rin g (ta b , in te rv a l) h r s _ t a b $ n u m .h o u r s l e n . l e n g t h ( h r s ) t s e q . h r s [2 : l e n ] B .a s .d a ta .fra m e (m a trix (c (ts e q ,B e a r),n c o l= 2 )) a ttr ( B ," n a m e s " ) _ c ( " H o u r " ," B e a r in g " ) # I n t e r p o l a t i o n # t s e q . B l H o u r B e a r _ B $ B e a rin g tr a n g e .ts e q C le n g th (ts e q )] -ts e q C l] s p l.s p lin e ( ts e q ,B e a r ,n = r o u n d ( tr a n g e /in te r v a l) + l,m e th o d ® " n a tu r a l" ) t i t l e . p a s t e ( " G r o u n d T ra c k B e a rin g - " , c h a r t , s e p = " " ) if(b n d s = = 0 ){ b n d s . s p l y p l o t ( b n d s , m a i n = t i t l e , x la b = " H o u r s f r o m t O " ,y l a b = " D e g r e e 8 C lo c k w is e fr o m N o r th " , ty p e = " n " , su b = su b ) p o in ts ( B ) l i n e s ( s p l ) : : : : : : : : : : : : : f.p lo te d g e .R " f .p lo te d g e " . f o r d i n 1 :4 ){ # s e t up s c a l i n g D _ c (d l [ , i ] , d 2 [ , i ] ) f u n c t i o n ( l e g x l = 0 ,l e g x 2 ® 0 ) 'C b a s e n a m e .g e t ( " b a s e n a m e " ,p o s * l ) o b j . g e t ( p a s t e ( " e " , b a s e n a m e , s a p ® " " ) ,p o s = l ) T _ c ( d l [ , 5 ] , d 2 [ , 5 ] ) D rain .m in (D ) D m ax.m ax(D ) i f ( i > l ) { y l . " C o r r e c t e d K ilo m e tre B /-C H rfH r* 2 > " } e l s e { y rn g _ r a n g e ( o b j[ ,c (4 ,5 ) ]) y l _ " D e g r a e s o f A r c /< H r lH r “ 2 > " } p l o t ( c b i n d ( c ( m i n ( T ) , m a x ( T ) ) , c ( D m i n , D m a x ) ) , t y p e = " n " , m a i n = t i t l e s [ i ] , x l h i ) g " d b j A d q y 4 2 * a d ) j $ h o u r + o b j $ m i n u t e / 6 0 - g e t ( " t O " ,p o s ® l ) h o u r s fr o m t O " , y l a b = y l ) x rn g _ ra n g e (h rs ) lin e s ( x * c ( m in ( T ) ,m a x ( T ) ) ,y = c ( 0 ,0 ) ) e x t _ c b i n d ( c ( x r n g [ l ] , x m g [2 ] + ( x r n g [ 2 ] - x m g [ l ] ) » 0 . 4 ) , y r n g ) lin e s ( x = d l[ ,5 ] ,y * d l[ ,i] ,ty p e = " o " ) p a r ( o m a ® c ( 2 ,0 , 3 , 0 ) ) p a r ( m f r o w » c ( 2 ,1 ) ) l i n e s ( x = d 2 [ ,5 ] ,y = d 2 [ ,i ] , ty p e * " b " , lty = 2 ) # m ea n , s t . d e v a n d h i g h e s t v a l > p l o t ( e x t , t y p e ® " n " , m ain ® "E d g e S h a r p e n i n g " ,x l a b * " H o u r s 168 - fr o m t O " ,y l a b = " S o b e l G r a d i e n t M a g n itu d e " ) p o i n t s ( x = h r s ,y = o b j $ m e a n ,t y p e = " b " ,p c h = 1 9 ) p o i n t s ( x = h r s , y = o b j $ s t d o v , t y p e = " b " ,p c h = 2 2 ) f .p lo tta b s .R 9 p l o t o u tp u t p o in ts (x = h rs ,y » o b j$ s td e v ,ty p « = " b " ,p c h = 2 2 ) fro m d e r i v a t i v e s o f t a b l e s " f . p l o t t a b s " . f u n c t i o n ( t a b ) { l e g e n d ( l e g x l , y r n g [ 1 ] + ( y r n g [2 ] - y m g [ l ] ) * 0 . 7 5 , c ( "M ean" , ' ' S t . D ev" ) , pch=c)(lGQEW <)t t a b l e s a n d d a t a r a n g e s x l _ f .d é r iv â t i v e ( t a b ,r e c u r s 0 = l) y m a tl .f .d e r i v a t iv e ( t a b ) x 2 _ f .d e r i v a t i v e ( t a b , o rd e r= 2 ,r e c u r s e = i) y r n g .r a n g e (o b j$ in a x ) p l o t C x*ext C, 1] , y r n g , t y p e » " n " ,m a in = " E d g e y m a t2 _ f. d é r i v â t i v e ( t a b , o r d e r = 2 ) S h a r p e n in g " ,x l a b = " H o u r s f r o m t O " ,y l a b = " S o b e l G r a d i e n t M a g n itu d e " ) p o i n t s ( x * h r s , y = o b j $m ax , t y p e = " b " , p c h = 2 3 ) tm in _ m in ( c ( x l, x 2 ) ) tm a x „ m a x (c (x l, x 2 ) ) l e g e n d ( l e g x 2 , y r n g [ 1 ] + ( y r n g [ 2 ] - y m g C l ] ) * 0 . 6 5 , " Im a g e c .a ll.M U L L # co m b in e a l l c o lu m n s f o r ( i i n 1 : 4 ) { M a x ." ,p c h = 2 3 ) m te x t( te x t= g e t( " c a s e n a m e " , p o a = l ) , s i d e = l , o u te r= T ) # c .lo c a l.c ( y m a tl[ ,i] ,y m a t2 [ ,i] ) c .a ll_ c ( c . a l l , c .lo c a l) a n n o ta te p l o t > p ar(m fro w = c( 1 ,1 ) ) p a r(o m a * c ( 2 ,0 ,0 ,0 ) ) r m i n _ m in ( c . a l l ) r m a x .m a x ( c . a l l ) p lo t( c b in d ( c ( tm in ,tm a x ) ,c ( r m in ,r m a x ) ) , ty p e = ” n") p n t s y m _ c ( 1 9 ,2 2 ,2 3 ,2 4 ) f o r ( i i n 1 : 4 ) { # u se d i f f e r e n t l i n e ty p e s p a r ( l t y = i ) # f i r s t d e r iv . p o i n t s ( x = x l , y = y m a t [ , i ] , p c h * 2 2 ) l i n e s ( x = x l , y = y m a t[ , i ] ) # second d e r iv . p o in ts ( x = x 2 ,y = y m a t2 [ ,i] ,p c h = 2 3 ) ; : : ; : : : : : : : : : : f .p l o t g e o m .R # P l o t ra w g e o m e t r i c v a l u e s " f .p l o t g e o m " < - f u n c t i o n ( g eo m ){ # i n c r e a s e o u t e r m a rg in t o 3 c h a r s p a r ( o m a = c ( 2 ,0 ,3 ,0 ) ) # # f o u r p l o t s : R o t, R l e n , H le n , J w id p a r ( m f c o l = c ( 2 , 2 ) ) t i t l e s . c C ' R o t a t i o n " , " R a d i a l L e n g t h " , "H ea d L e n g t h " , " J e t W id th " ) t i t l e s . c C J e t T i l t fro m N -E ","C om m a \ " B u l g e \ " R a d iu s " , "Comma H ead L e n g t h " , " B a r o c l i n i e C lo u d W id th " ) > f .p lo tv e l.R " f.p lo tv e l" . fu n c tio n ( ta b = re p .p re s ,d is t,b n d s = 0 ,m u lt= l,le g x = - 1 4 ,le g y = 0 .5 ,in te rv a l= l,c h a rt= " C h a rts ' v e l . f . v e l( ta b , d i s t , m u lt, in te r v a l) a c c e l .f . a c c e l( ta b ,d i s t , m u lt, i n te r v a l) f o r ( i i n 1 : 4 ) { # C h e c k f o r NA’ s i f (! c o m p le te . c a s e s (t(g e o m C , i ] ) ) ) { f o r ( j in l:le n g th ( g e o m [ ,i] ) ) { i f ( i s .n a ( g e o m [ j ,i ] )) { g e o m [ j , i ] _ 0 }>} # s c a li n g if(b n d s = = 0 ){ D .c (v e l$ v e l,a c c e l$ a c c e l) T . c ( v e l$ n u m .h o u r s ,a c c e l$ n u m .h o u r s ) b n d . c b i n d ( c ( m i n ( T ) ,m a x ( T ) ) ,c ( m i n ( D ) ,m a x ( D ) ) ) } elsa-C b n d .b n d s } t i t l e . p a s t e ( " V e l o c i t y and A c c e le ra tio n - " , c h a r t) p lo t( b n d ,ty p e ® " n " ,m a in * title ,x la b * " I n te r p o la te d h o u rs fr o m t O " ,y l a b ® " C o r r e c t e d K i l o m e t r e s / { H r |H r " 2 } " , s u b = s u b ) lin e s ( x = v e l$ n u m .h o u r s ,y * v e l$ v e l,ty p e » " o " ) l i n e s ( x = a c c e l $ n u m . h o u r s , y = a c c a l $ a c c e l , t J T ) e ® " b " , l t y ® 2 ,p c h = 2 ) p l . c b i n d ( r e p . v e c s $ n u m .h o u r s , g e o m [, i ] ) n m _ r o u n d ( - 2 * r e p .v e c 6 $ n u m . h o u r s [ ! ] + ! ) s p . s p l i n e ( p i , n = n m ,m e t h o d » " n a t u r a l " ) i f ( i > l ) { # y l_ " G e o g r a p h ic D e g re e s" y l ." K i lo m e tr e s " > e ls e { y l_ " D a g r e e s o f A rc" } p l o t (s p ,ty p e = » " n " ,m a in = titl e s [ i ] ,x l a b = " I n te r p o l a t e d h o u r s fr o m t O " , y l a b » y l ) p o i n t s ( p l ) l i n o s ( s p ) } m te x t ( t e x t ^ g e t ( " c a s e n a m e " , p o s » l ) , s i d o * l , o u t e r = T ) # a n n o ta te p lo t # r e s t o r e o r i g i n a l p a r a m e te r s p a r ( m f c o l= c ( l,1 ) ) p a r ( o m a = c ( 2 ,0 ,0 ,0 ) ) le g e n d d e g x , le g y ,c (" V e lo c ity " , " A c c e le r a tio n " ) ,p c h = c ( l ,2 ) ) l e g e n d d e g x , l e g y , c ( " V . " , "A . " ) , p c h = c ( l , 2 ) ) f .p lo tp d e riv .R # P lo t f i r s t and second p re s s u re d e r iv a tiv e s " f .p l o t p d e r i v " . fu n c tio n ( le g x = -1 4 ,le g y = -l.5 ){ # c o l l e c t r a te s d l . f .p d e r iv O d 2 _ f . p d e r iv ( o r d e r = 2 ) # s e t u p s c a l i n g P _ c (d l$ m b ,d 2 $ m b ) T .c ( d l $ n u m .h o u r s ,d 2 $ n u m .h o u r s ) p l o t ( c b i n d ( c ( m i n ( T ) ,m a x ( T ) ) , c ( m i n ( P ) , m a x ( P ) ) ) ,t y p e * " n " , m a i a n d 2n d D e r i v a t i v e s " , x l a b = " I n t e r p o l a t e d h o u r s fr o m t O " , y l a b = " M i l l i b a r s / { H r I H r " 2 } " , s u b ® " 2 " ) l i n e s ( x = d l $ n u m .h o u r s ,y = d l $ m b ,t y p e * " o " ) l i n e s ( x = d 2 $ n u m .h o u r s , y* d 2 $ m b , t y p e = " b " , l t y = 2 , p c h * 2 ) le g e n d d e g x , le g y ,c ( " 1 s t D e riv ." ),p c h = c (l,2 )) } f .p r e s p lo t.R " f .p r e s p lo t" < - fu n c tio n ( d e lx = 0 .2 ,d o ly = 2 ) - ( # P r e s s u r e c e n tr e s p t i m e .r e p .p re s$ n u m . h o u rs p v a l.re p .p re s $ m b # p lo t p re ssu re p r n g . c ( m i n ( p t i m e ) ,m a x ( p t i m e ) ,m i n ( p v a l ) , m a x ( p v a l ) ) p b n d _ m a t r i x ( c ( ( p r n g [ l ] - d e l x * . 2 * a b s ( p r n g C l ] ) ) , ( p m g [ 2 ] + d e l x * a b s (p m g C 2 ] ) ) , ( p r n g [ 3 ] - d « p lo t ( p b n d ,t y p e = " n " , m ai n= " P re s s u r e O b s e r v a tio n s " ,x la b = " H o u r s fro m t O " , y la b ® " P re s s u re (m b )" , s u b = " 1 " ) p o i n t s ( p t i m e , p v a l ) l i n e s ( s p l i n e ( p t i m e , p v a l , m eth o d ® " n a t u r a l " ) ) l b l _ p a s t e ( s e q ( l : d i m ( r e p . p r e s ) [ 1 ] ) , , r e p .p r e s $ h o u r , " Z " , r e p . p r e s $ d a y , sep ® "") t e x t( p tim e , p v a l ,l a b e l s = l b l,p o s “ 4) D e r i v . " ," 2 n d : : : : : : : : : : : : : : f .p lo tra d .R " f.p lo tra d " . fu n c tio n ( b a s e n a ia e ){ h c l o u d .g e t( p a s t e ( " c " , b a s e n a m e ,s e p = " " ) ,p o s * l) e d g e s .g e t( p a s te ( " e " , b ase n am e, s e p = " " ) ,p o s = l) h o u r s .e d g a s [,l]* 2 4 + o d g e s [,2 ] + e d g e s [,3 ]/6 0 -g e t(" tO " ,p o s = l) p a r ( m f c o l = c ( l ,2 ) ) # s p l i t . s c r e e n ( c ( 1 ,2 ) ) # s c r e e n ( l) p l o t ( x = h o u r s , y = h c l o u d [ , 1 ] ,t y p o = " b " ,m a i n = " H i g h C lo u d P i x e l C o u n t" ,x l a b = " H o u r s fr o m t O " , y la b = " N u m b e r o f P i x e l s " ) # screen (2 ) p l o t ( x = h o u r s , y = h c l o u d [ , 2 ] , t y p e = " b " , m ain ® " C y c l o n i c I n d e x " ,x la b = " H o u r s f r o m t O " , y l a b = " I n d e x V a lu e " ) m te x t ( t e x t = g e t ( " c a s e n a m e " ,p o s = l) , s i d e = l , o u te r* T ) a n n o ta te p l o t # c l o s e . s c re e n (a ll® T ) p a r (m fc o l= c (l,D ) > : : : : : : : : : : : : : : f .p s d u m p .R " f .p s d u m p " . fu n c tio n ( file n a m e ) { d e v .p r in t ( d e v i c e = p o s t s c r i p t , p a p e r ® " l e t t e r " , h o r iz o n t a l= F ) s y s te m (p a s te (" m v R p lo t s .p s " ,f i l e n a m e ) ) } f.P te s t.R " f .P d if f " . f u n c t i o n O i # f i n d t h e P h a s e I I I - I I d i f f e r e n c e b e tw e e n v ars P IIs .c (-1 0 ,-7 ,- 9 .5 ,-4 .5 ,-6 .2 ) # d e f in e th e o u tp u t m a trix : c o l s C a s e l . . C ase 5 # ro w s: < v a r X > I I I . I l f d i f f I m a x Im e a n Im in } # 5 c a s e s , 4 t r e a t m e n t s , 14 v a r i a b l e s r e s u l t s . a s . d a ta .fra m e (m a trix (5 * 4 * 1 4 ,n c o l® 5 )) # f.p lo tre s .R " f.p lo tre s " . fu n c tio n ( re s file ) { c l o s e . s c r e e n O p l o t s _ d i m ( r e s f i l e [2 ] ) s p l i t . s c r e e n ( c (c e ilin g ( s q rt(p lo ts )) ,f lo o r ( s q r t( p lo ts ) ))) f o r ( i in l:p lo ts ){ s c r e e n ( i) p l o t ( r e s f i l e [ , i],ty p e = " o " ) } c lo s e . screen O > f o r ( i i n l:5 )-( # c a se l e v e l c o u n t.1 f o r ( j i n 2 : le n g th (v a rn a m e s )){ v n a m e .p a s t e ( v a r n a m e s [ j ] , i , s e p = " " ) v a r . f . g e t v a r ( v n am e) v t i m e _ v a r [ , 1 ] v s p l . f . d o s p l( v a r , F , v tim e ,1 ,2 ) # v lo g ic _ v tim e > = P II s [i] 6 vtim e< ® 0 # re m o v e o u t o f b o u n d s v a l u e s # v o u t . c b i n d ( v t i m e [ v l o g i c ] , v s p l E v l o g i c ] ) #HERE v o u t_ c b in d ( v tim e ,v s p l) # fill t h e m a t r i x r n g n u m s .1 r d i m ( v o u t ) [ 1 ] # get 169 n u m b sr o f r o w s m g n u m s.m g n v u n s [ v o u t [ , 1 ] > = P I I s [ i ] &v o u t [ , 1] < = 0 ] m g v a r . v o u t [m g n u m s , ] # set p l o t p a r a m s a n d c a s e n a m e f .F o u r U p O # c r e a te base re p o rt d ir e c to r y r e p o r t / " , basenam e, s e p * " " ) ) r e s u l t s [ c o u n t , i ] _ m g v a r [ d i m ( r n g v a r ) [1 ] , 2] m g v a r [1 ,2 ] # d i f f e r e n c e P H I . I I r e s u l t s [c o u n t+ l,l] _ m a x ( r n g v a r [ ,2 ] ) r e s u l t s [ c o u n t+ 2 , i ] _ m e a n ( r n g v a r [ , 2 ] ) r e s u l t s [c o u n t+ 3 , i ] _ m in ( r n g v a r [ , 2 ] ) # c a lls to re p o rtin g i f ( i = = l ) { # f i l l ro w .n a m e s t h e f i r s t t i m e r e s b a s e _ p a s t e ( v a m a m e s [ j ] , " 1 1 1 . I I " , s e p = ’' " ) a t t r (r e s u lts ," r o w .n a m e s " ) [ c o u n t] _ p a s te ( r e s b a s e ," d if f " , sep » "") a t t r ( r e s u i t s , " r o w . n a m e s " ) [ c o u n t + 1 ] . p a s t e ( r e s b a s e , " m a x " ,s e p * " " ) a ttr ( r e 8 u lts ," r o w .n a m e s " ) [ c o u n t+ 2 ] .p a s t e ( r e s b a s e , "m ean ", s e p = " ") a t t r ( r e s u l ts ," r o w .n a m e s " ) [ c o u n t + 3 ] .p a s t e ( r e s b a s e , " r a in " ,s e p = " " ) > c o u n t .c o u n t + 4 } s y s te m (p a s te (" m k d ir f u n c tio n s p r i n t ( " D a te s ") D _ m a tr ix ( l: 2 0 ,n c o l* 4 ) D [ , l ] . c ( a s . i n t e g e r ( s u b s t r ( s p r e s , 2 , 3 ) ) , a s . i n t e g e r ( s u b s t r ( s p r e s , 4 , 5 ) ) , p f r a m e [ 1 , 2 ] ,p : D [ , 2 ] _ c ( D [ l : 2 , l ] .p f r a m e [ l e n g t h C p f r a r a e [ , 1 ] ) , 2 ] , p f r a r a e [ l e n g t h ( p f r a m e [ , 1 ] ) ,3 ] , 0 ) v la t_ ls (p a tt= v e c p a t,p o s = l) D[ , 3 ] _ c ( a s . i n t e g e r ( s u b s t r ( v l s t [ l ] , 2 , 3 ) ) , v f r a m e [ 1 , 1 ] , v f r a m e [ 1 , 2 ] , v f r a m e [ 1 , 3 ] , vfram » v le n .le n g th ( v ls t) D [ , 4 ] _ c ( a s . i n t e g e r ( s u b s t r ( v l s t [ v l o n ] , 2 , 3 ) ) . v f r a r n e [ v l e n . l ] , v f r a m e [ v l e n , 2 ] ,v f r a m e [ v : D o u t.a s . d a ta .fra m e (D ) a ttr ( D o u t," n a m e s " ) _ c ( " F ir s t C h a r t " , " L a s t C h a r t " , " F i r s t I m a g e " , " L a s t Im a g e " ) a t t r ( D o u t . " r o w . n a m e s " ) _ c ( " Y e a r " . " M o n t h " , " D a y " . " H o u r " , " M i n u te " ) a s s i g n ( p a s t e ( " D " . b a s e n a m e , s e p ® " " ) , D o u t ,p o s = l ) } # re tu r n (ra s u lts ) p r i n t ( " B o u n d s " ) b o u n d s . f . b o u n d s () f . p s d u m p ( p a s t e ( " r e p o r t / " , b a s e n a m e , '/ b o u n d s . p s " , s e p ® " " ) ) } f .r e a d is t.R " f .r e a d is t" . fu n c t i o n ( r a n g e f ile = " c e n o u t" ) { t a b . r e a d .t a b l e ( r a n g e f i l e ) a t t r ( t a b , " n a m e s 'O .c ( " R a n g e " , " B e a r i n g " ) r e t u r n ( t a b ) } f .r e p lo t.R f .r e p lo t. f u n c tio n ( a r g s = 0 , fig = 0 )-[ i f ( f i g > 0 ) { # r e p lo t p r e - d e f in e d s e le c tio n 8 w itc h (fig , f .re p lo t( a r g s ^ c ( - 1 7 5 ,6 0 ,2 3 .2 1 ,1 .5 ,1 ,- 1 2 ,- 1 .7 ,- 2 0 ,2 4 0 ,- 2 1 ,1 0 0 ) ) , f . re p lo t( a rg s = c ( - 1 7 5 ,6 0 ,3 2 ,3 0 ,0 .7 ,1 ,1 0 ,- 1 .8 ,- 1 2 ,- 6 0 ,1 0 ,- 6 0 ) ) , f . r e p l o t ( a r g s * c ( - 1 7 5 ,6 0 ,1 3 ,1 2 ,1 ,1 ,2 ,- 0 .5 ,- 7 ,1 0 0 ,1 8 ,1 0 0 ) ) , f . re p lo t( a rg s = c ( - 1 5 2 ,6 5 ,4 7 ,4 4 ,0 .3 ,1 ,2 9 ,- 1 .5 ,1 .7 5 ,2 0 ,1 2 5 ) ) , f . r o p l o t ( a r g s = 'c ( - 1 7 5 , 6 0 , 6 5 , 6 0 , 0 . 3 , 0 . 1 , 2 6 , - 1 . 5 , l , - 4 0 , 1 5 , - 4 0 ) ) ) r e tu r n O > i f d e n g t h ( a r g s ) != 1 2 ){ p r i n t (" R e q u ire s a r g u m e n ts " ) ; r e t u r n ( ) ; f .p lo t2 p r e s ( ) f . psdum p ( p a s t e ( " r e p o r t / " , b a s e n a m e , " / p r e s s u r e . p s " , s e p = " " ) ) p r i n t ( " V e l o c i t y a n d B e a r i n g " ) f .p l o t 4 V B ( ) f . psdum p ( p a s t e ( " r e p o r t / " , b a s e n a m e , " / v e l b e a r . p s " , sep® ■ " ) ) p r i n t ( " C e n t r e s " ) f . c e n p l o t () f . p s d u m p (p a s te ( " re p o r t/ " , b asen am e, ■ /c e n tr e s .p s " ,s e p ® " " ) ) p r i n t ( " B e r g e r o n " ) d e e p e n i n g _ f . bom b() a s s ig n ( p a s te ( " B " .b a s e n a m e , s e p ® " " ), d e e p e n in g ,p o s = l) p r i n t ( " G e o m e tr y " ) # g e o m .f. t a b l e ( v e c p a t ) g e o m . f . t a b l e ( p a s t e ( " “ d " , s u b s t r i n g ( v e c p a t , 2 ) ,s e p ® " " ) ) # u s e v e c s p r o j e c t e d i n t o km d i s t a n c e s a s s ig n (p a s te (" G " .b a s e n a m e ,s e p ® " " ),g e o m ,p o s = l) 12 f o r m a t } } p rin t(" P re s s u re " ) f . b o u n d s (le g x = a rg s [ 1 ] , le g y = a r g s [ 2 ] ) ; f .p s d u m p ( p a s te ( " r e p o r t/" .b a s e n a m e ," /b o u n d s .p s " ,s e p = " " ) ) f .p l o t e d g e ( l e g x l = a r g s [ 3 ] ,le g x 2 = a rg s [ 4 ] ) ; f.p s d u m p ( p a s te ( " r e p o r t/" .b a s e n a m e , " / e d g e s . p s " , s e p = " " ) ) f.p lo t2 p r e s ( d e lp o s = a r g s [ 5 :8 ] ) ; f . p s d u m p ( p a s te ( " r e p o r t/" .b a s e n a m e , " / p r e s s u r e . p s " , s e p = " " ) ) f . p lo t4 V B (le g p o 8 = a rg s [ 9 : 1 2 ] ) ; f.p s d u m p ( p a s te ( " r e p o r t/" .b a s e n a m e , " / v e l b e a r . p s " , s e p = " " ) ) p r i n t ( " G e o m e try P l o t s " ) # ra w v a l u e s f .p lo t g e o m ( g e o m ) f .p s d u m p ( p a s te ( " r e p o r t/" .b a s e n a m e ," /g e o r a l.p s " ,s e p ® " " ) ) # 1 s t a n d 2 n d d e r i v a t i v e s f .p l o t 2 g e o m ( g e o m ) f .p s d u m p ( p a s te ( " r e p o r t/" .b a s e n a m e ," /g e o m 2 .p s " ,s e p ® " " ) ) p r in t( " R a d io m e tr ic " ) f.p lo tr a d ( b a s e n a m e ) f .p s d u m p (p a s te (" re p o rt/" .b a s e n a m e ," /ra d io m e tric .p s " sa p ® " " )) p r i n t ( "E d g es") f .p l o t e d g e () f .p s d u m p ( p a s te ( " r e p o r t/" .b a s e n a m e ," /e d g e s .p s " ,s e p : " " ) ) # Now c r e a t e o u t p u t f i l e # D a te s f . t a b o u t ( " D " , b a s e n a m e ) # B ounds f .te x to u t( b a s e n a m e , " b o u n d s . p s " ) # f.r e p o r t.R " f .r e p o r t" . P ro b e f . te x to u t( b a s e n a m e , "m an u al i n t e r p " ) # fu n c tio n ( s p r e 8 ,v e c p a t,b a s e n a m e ) { # r e p o r t P re s s u re f.te x to u t(b a s e n a m e , " p r e s s u r e . p s" ) # on p r e s s u r e c e n tr e s p r e s _ g e t( s p r e s ,p o s = l) P o s it i o n s f . t e x t o u t ( b a s e n a m e , " c e n t r e s . p s " ) # B e rg e ro n p y e a r_ 1 9 0 0 + a s .n u m e ric ( s u b s tr (s p re s ,2 ,3 )) f . t a b o u t ( " B " .b a s e n a m e ) # Raw R ad f . t a b o u t ( " G " , b a s e n a m e ) p d a t e s _ p r e s [ ,l ] p h o u r_ p r e s [,2 ] # Geom p l o t s f . t e x t o u t ( b a s e n a m e , " g e o m l . p s " ) p h o u r s _ ( p r e s [ , 1 ] - m in ( p r e s [ , 1 ] ) ) * 2 4 + p re s [ ,2 ] f . t e x t o u t ( b a s e n a m e , " g e o m 2 .p s " ) # R a d i o m e t r i c p m b .p r e s [ ,3 ] + 9 0 0 pmb [p m b < 9 3 0 ]_ p m b [p m b < 9 3 0 ]+ 1 0 0 # f .te x to u t(b a s e n a m e , " r a d io m e tr ic .p s " ) # p r e s . >- lOOOmb p e a s t _ p r e s [ , 4 ] * ( - l ) p n o r t h _ p r e s [ , 5 ] E d g e f . t e x t o u t ( b a s e n a m e , " e d g e s . p s " ) # PROBE p f r a m e . d a t a . f r a m e ( p y a a r , p d a t e s , p h o u r , p h o u r s , p m b, p e a s t , p n o r t h ) f . t e x t o u t ( b a s e n a m e , "PROBE") a t t r ( p f r a m e , " n a m e s " ) _ c ( " y e a r " , " d a y " , " h o u r " , " n u m .h o u r s " , " m b " , " e a s t i h g ' , " n o r t h i n g " ) # c o l l e c t d a ta on v e c to r c e n tre s : : : : : : : : : : : : : : f.s ta tic .R " f . s t a t i c " 90 d e g . e l s e { r u n . a s . d a t a . f r a m e ( c ( ( A [ l ] - B [ l ] ) , (B [ 2 ] - A [ 2 ] ) ) ) # c r e a t e new o b j s w i t h r e s u l t s r o t_ p i/2 -a ta n (ru n [2 ] /r u n [l]) a s s i g n ( p a s t e ( " P " , b a s e n a m e , " . r e p " , sep® ' " ) , p f r a m e ,p o 8 = l) h l _ s q r t ( r u n [ l ] “ 2 + r u n [ 2 ] “2 ) r < - 3 ♦ h l / s q r t (2 0 ) a s B i g n ( p a s t e ( " V " , b a s e n a m e , " . r e p " , sep® ' " ) , v f r a r n e ,p o s = l ) R _ a s .d a ta .fra m e (c ( C [ l] + r» c o s (ro t),C [2 ] + r* s in (r o t))) # r e t u r n r e a l r o t a t i o n and ru n r o t _ p i - a t a n ( r u n [ 2 ] / r u n [ l ] ) # s t o r e v a n ila copy f o r o th e r fu n c tio n s r u n . a s . d a t a . f r a m e ( c ( ( B [ 1 ] - A [ 1 ] ) , (B [ 2 ] -A [ 2 ] ) ) ) t o u s e a s s ig n ( " r e p .p r e s " ,p f r a m e ,p o s ® l) a s 8 ig n ( " r e p .v e c s " .v f r a r n e ,p o s = l) ff M ean R a d i a l L e n g th r a d s < - 6 9 : 7 3 rs u m < - 0 f o r ( i i n # s t o r e b a s e n a m e a s s i g n ( " b a s e n a m e " .b a s e n a m e ,p o s ® l ) 6 9 :7 3 ) { r a d s [ i ] < - s q r t ( ( v e c [ i , 1] - R [ l ] ) "2 + (v e c [ i , 2 ] - R [ 2 ] ) ‘ 2 ) 170 - re g re s s io n lin e rs u m <- rs u m + r a d s [ i ] } m e a n < - rs u m /5 re tu r n (s u m m a ry ( re g ) ) # Mean j e t w i d t h m _ r u n [ 2 ] / r u n [ l ] b _ A [2 3 -m » A [l] js u m < 0 j p t s < - 7 4 :7 7 f o r ( i i n 1 : 4 ) { y _ v a c [ j p t s [ i ] ,2 ] x in t_ ( y - b ) /m d x _ s q r t ( ( v e c [ j p t s [ i ] , 1 3 - x i n t ) " 2 ) w _ d x * s i n ( r o t ) js u m : : : : : : : : : : : : : : f .ta b le .R : : : : : : : : : " f .ta b le " # p u t i n th e la b e ls a t t r ( t a b , " n a m e s " ) _ c ( " R o t a t i o n " , " R a d i a l L e n g t h " , "H ead L e n g t h " , " J e t W id th " ) r e t u r n ( t a b ) : : : : : : : : : : : : : f .ta b o u t.R : : : : : : : : : : : : : : " f .t a b o u t " . f u n c tio n ( le a d ,b a s e ) - ( o b j . g e t ( p a s t e ( l e a d , b a s e , s e p = " " ) , p o s = l ) # bomb t a b l e h a s som e n o n - n u m e r i c s i f ( l e a d f = " B " ) { o b j_ ro u n d ( o b j,d ig its = 2 ) } e ls e { B _ o h j$ B e rg e r o n # i s t h i s r e a l l y n e c e s s a r y j u s t t o ro u n d a d a t a . f r a m e e n t r y ? o b j$ B e rg e ro n _ ro u n d (a s . n u m e ric ( a s . v e c to r ( B ) ) , d i g i t s= 2) > w r i t e . t a b l e ( o b j , file * " ta b o u t.tx t" ,q u o te » F A L S E ,s e p = • \ t " ) sy s t« m (p a s te (" c a t t a b o u t .t x t p e r i m k t a b .p l » " , " r e p o r t/" .b a s e , " /re p o r t" ,s e p = " ")) s y s te m (p a s te (" c a t t a b o u t .t x t p e r i m k t a b .p l > " ," r e p o r t /" .b a s e ," /" .l e a d ," ta b .t e x " ,s e p * " " ) ) I I > : : : : : : : : : : : : : f .te x to u t.R f u n c ti o n ( b a s e ,f il e ) - ( s y s te m ( p a s te ( "ech o r e p o r t/" ,b a s e ," /" .f ile ," > > re p o r t/" ,b a s e , " / r e p o r t " , s o p « " " )) " f .te x to u t" . > f .t p .R : : : : : : : : : : : : : : " f . t p " . fu n c tio n ( v a r) { # in ta r p o l tra n g e .r e p .v e c s ( h o u r s [ le n g th ( r e p .v e c s $ h o u r s ) ] i n t e r . s p l i n e ( r e p . v e c s ( h o u r s , v a r , n = tra n g e * 6 . m e th o d = " n a tu r a l" ) ln _ le n g th ( in te r $ x ) r e t _ l : l n f o r d in 1: ( l n - l ) ) { r a t e _ ( i n t e r ( y [ i + l ] - i n t e r ( y [ i ] ) / d n t e r $ x [ i + l ] - i n t e r $ x [ i ] )* 6 0 r e t C i]. r a t e } re tu r n (re t) : : : : : : : : : : : : : f .V a rp lo t.R " f . V a r p lo t" = PWC_DoglegIntensity ) return ( ( in te n s ity - PWC_DoglegIntensity ) / PWC_LowerSlope + PWC.DoglegTemp ); e ls e /* i f ( radiance < PWC_DoglegIntensity ) * / return PWC_UpperBound - in te n s ity / PWC_UpperSlope; } /* CERadianceToCelcius0 * / The