# Typhoon overview

## Purpose of this document

This document explains **Typhoon**, the wavelet-based optical-flow / motion-estimation system used to estimate dense two-component horizontal wind fields from sequences of REAL aerosol-backscatter images.

It is intended for:

- researchers;
- students;
- collaborators;
- programmers;
- and AI-assisted analysis workflows.

This document explains:

- where Typhoon came from;
- what scientific problem it solves;
- how the method works conceptually;
- what assumptions underlie the retrieved wind fields;
- why aerosol structure matters;
- why REAL scan timing matters;
- how Typhoon was validated;
- why GPU/CUDA acceleration was important;
- the distinction between the reference Typhoon implementation and the public PyTyphoon implementation;
- and how Typhoon relates to the M2HATS public data products.

This is **not** an installation or source-code manual for the reference CUDA implementation.

A separate future document should describe the actual public M2HATS Typhoon netCDF products:

```text
M2HATS_Typhoon_data.md
```

---

# 1. Typhoon in one paragraph

**Typhoon** is a dense wavelet-based optical-flow algorithm for estimating fluid motion from successive images.

When applied to REAL aerosol lidar data, Typhoon estimates the apparent displacement of aerosol-backscatter structures between successive scans and converts those displacements into a two-component velocity field.

For nearly horizontal REAL scans, those two in-plane velocity components are interpreted as the two horizontal wind components.

Typhoon therefore provides a fundamentally different type of wind measurement from a Doppler lidar.

A Doppler lidar measures the component of velocity along the laser beam from the Doppler frequency shift.

Typhoon instead estimates wind **indirectly from the movement of spatial aerosol structures visible in sequential REAL images**.

---

# 2. Scientific origin

Typhoon grew out of Pierre Dérian's doctoral research on wavelets and fluid-motion estimation.

Pierre completed his Ph.D. at the University of Rennes 1 in France in 2012. His dissertation was conducted at:

```text
Inria Rennes - Bretagne Atlantique
Fluminance Team
```

under the supervision of Étienne Mémin and Patrick Héas.

The dissertation is:

> Pierre Dérian, *Wavelets and Fluid Motion Estimation*, Ph.D. dissertation, Université de Rennes 1, 2012.

Public HAL record:

```text
https://theses.hal.science/tel-00761919v1
```

The dissertation developed a multiscale wavelet framework for estimating dense motion fields from image sequences, with particular emphasis on fluid motion.

A related peer-reviewed description appeared as:

> Dérian, P., P. Héas, C. Herzet, and E. Mémin (2013), "Wavelets and Optical Flow Motion Estimation," *Numerical Mathematics: Theory, Methods and Applications*, 6, 116-137.

HAL record:

```text
https://inria.hal.science/hal-00737566v1
```

The method was designed for continuous motions such as turbulent fluid flows, where a useful estimator must handle:

- many spatial scales;
- potentially large displacements;
- dense vector fields;
- spatially coherent motion;
- and very large numbers of unknowns.

---

# 3. Development at Chico State

After completing his Ph.D., Pierre Dérian came to California State University, Chico and worked for approximately two years as a postdoctoral researcher under NSF support.

At Chico, Pierre worked with Shane D. Mayor and Christopher F. Mauzey to adapt and substantially accelerate Typhoon for use with REAL aerosol lidar imagery.

The atmospheric-lidar implementation and validation were published as:

> Dérian, P., C. F. Mauzey, and S. D. Mayor (2015), "Wavelet-Based Optical Flow for Two-Component Wind Field Estimation from Single Aerosol Lidar Data," *Journal of Atmospheric and Oceanic Technology*, 32, 1759-1778.

DOI:

```text
https://doi.org/10.1175/JTECH-D-15-0010.1
```

That work demonstrated that Typhoon could estimate dense two-component vector flow fields from sequential REAL aerosol images and compared those estimates with independent Doppler-lidar measurements.

---

# 4. What problem Typhoon solves

REAL is an elastic-backscatter aerosol lidar.

REAL measures the spatial distribution of aerosol backscatter.

It does **not** directly measure wind velocity.

However, aerosol structures are often transported by the surrounding air.

If recognizable aerosol-backscatter patterns move between two successive REAL scans, their displacement contains information about the underlying air motion.

Conceptually:

```text
REAL scan at time t
        +
REAL scan at time t + dt
        |
        v
estimate displacement of aerosol structures
        |
        v
divide displacement by elapsed time
        |
        v
two-component velocity field
```

Typhoon performs the motion-estimation step.

---

# 5. Relationship to particle image velocimetry

The Typhoon/REAL approach is conceptually related to **particle image velocimetry (PIV)**.

In laboratory PIV:

- particles are intentionally seeded into a fluid;
- images of those particles are recorded;
- particle-pattern displacement is used to estimate fluid motion.

With REAL:

- the atmospheric aerosol distribution acts as the tracer;
- the tracer distribution is not controlled by the experimenter;
- the images represent spatial variations in aerosol backscatter rather than images of individual particles;
- the atmosphere is much larger and less controlled than a laboratory flow.

This makes the problem resemble both PIV and atmospheric-motion-vector retrieval from geophysical imagery.

---

# 6. Optical flow

**Optical flow** is a family of computer-vision methods for estimating apparent motion from a sequence of images.

For Typhoon, the observable image quantity is REAL aerosol-backscatter intensity.

The unknown is a two-dimensional displacement field.

In simplified form, Typhoon seeks a displacement field that makes structures in one image correspond as closely as possible to structures in the next image.

Unlike a traditional block-correlation method, Typhoon uses a **global dense formulation**.

That means the vector field is estimated as a connected spatial field rather than as a collection of completely independent local displacement estimates.

---

# 7. Dense vector fields

A major characteristic of Typhoon is that it produces a **dense** motion estimate.

In the mathematical formulation, a displacement vector can be estimated at every point or pixel of the image domain.

This contrasts with many traditional cross-correlation approaches, which typically produce one vector for each interrogation window and therefore generate a sparser vector field.

A dense representation is useful for studying spatially structured flow because it can retain smaller-scale variations that would otherwise be averaged within large correlation windows.

The displayed vectors in figures are often heavily decimated for readability.

The underlying Typhoon result can be much denser than the arrows visible in a published figure or PNG image.

---

# 8. Why wavelets are used

Fluid flows are inherently multiscale.

Large coherent motions and much smaller turbulent structures can exist simultaneously.

Wavelets provide a representation that is localized in both:

- physical space;
- and spatial scale.

Typhoon represents the unknown motion field using wavelet coefficients.

The solution is built from coarse scales toward finer scales.

Conceptually:

```text
estimate large-scale motion
        |
        v
add progressively finer-scale motion
        |
        v
refine the dense displacement field
```

This multiscale framework helps the estimator handle relatively large displacements while also retaining smaller spatial structures when the image information supports them.

---

# 9. Data model and regularization

Optical-flow estimation is an underdetermined inverse problem.

Image information alone does not uniquely determine both components of velocity everywhere.

Typhoon therefore combines two conceptual ingredients.

## 9.1 Data term

The data term measures how well a proposed displacement field explains the observed change between two images.

The REAL implementation uses a **displaced frame difference (DFD)** concept.

In simplified language:

> If an aerosol feature is transported from one location to another between two scans, the algorithm seeks a displacement field that maps the feature in the first image to its location in the next image.

## 9.2 Regularization

Regularization supplies additional spatial constraints that make the inverse problem solvable.

Simple first-order regularization tends to discourage strong spatial velocity gradients.

More sophisticated fluid-oriented regularizations can also be formulated.

The balance between fitting the image data and enforcing spatial regularity is controlled by processing parameters.

Therefore a Typhoon velocity field is an **estimated solution to an inverse problem**, not a direct measurement at every pixel.

---

# 10. Important assumption: aerosol-pattern persistence

The motion-estimation approach assumes that aerosol-backscatter structures persist sufficiently between successive images to be tracked.

In idealized form, the method assumes that a recognizable aerosol feature keeps a similar image signature as it moves.

This assumption can fail.

Aerosol patterns may change because of:

- turbulent diffusion;
- deformation;
- mixing;
- sources and sinks;
- humidity-dependent aerosol changes;
- vertical or other out-of-plane motion;
- rapidly changing illumination or measurement conditions.

Such evolution can produce apparent image motion that does not correspond exactly to horizontal air motion.

Typhoon should therefore be regarded as an **indirect wind retrieval from aerosol motion**, not as a direct velocity measurement.

---

# 11. Why aerosol structure is essential

Strong lidar signal alone is not enough.

Typhoon needs spatially coherent features that can be tracked from one scan to the next.

A region may have strong aerosol backscatter but nearly uniform image intensity.

Such a region contains little information about two-dimensional displacement.

Conversely, regions with distinct streaks, filaments, plumes, gradients, or other coherent aerosol structures can provide strong motion information.

For this reason, the quality and spatial coverage of Typhoon wind fields depend strongly on atmospheric conditions.

---

# 12. Valid-data masking

The reference REAL/Typhoon processing system includes a method for identifying image regions that contain usable coherent aerosol structure.

The 2015 JTECH implementation estimated an **image signal-to-noise ratio** from the spatial covariance structure of the processed lidar imagery.

Regions lacking sufficient coherent structure were excluded from the motion-estimation domain.

This is scientifically important.

A dense optical-flow algorithm can mathematically produce a vector in a poorly textured region because regularization connects neighboring parts of the field.

But the existence of a numerical vector does not necessarily mean the image contains enough independent information to support that vector.

The reference workflow therefore masks regions where aerosol structure is inadequate.

---

# 13. REAL scans are not instantaneous

A REAL PPI scan is assembled sequentially.

The laser beam sweeps across the atmosphere while the wind continues to move aerosol structures.

Therefore different azimuths within a single scan are measured at different times.

At sufficiently high wind speed, this produces apparent spatial distortion in the scan.

This matters because Typhoon compares spatial structures between scans.

If the scan-time distortion is ignored, part of the apparent displacement can be caused by the scanning process itself.

---

# 14. Scan-motion correction

The reference REAL/Typhoon workflow includes an iterative correction for scan-motion distortion.

The basic sequence described in the 2015 JTECH paper is:

```text
estimate motion from a pair of scans
        |
        v
convert displacement to velocity
        |
        v
use estimated velocity to correct the scans for
motion that occurred during acquisition
        |
        v
estimate the motion again
        |
        v
repeat until the solution changes sufficiently little
```

The time at which the lidar beam is near the center of the scan is used as a reference time in that implementation.

The published Chico experiments usually required only a few iterations.

This correction is one reason the full reference REAL/Typhoon processing chain is more elaborate than simply applying an optical-flow routine to two PNG images.

---

# 15. From displacement to wind velocity

Optical flow first estimates displacement in image coordinates.

To obtain velocity, the displacement must be combined with:

- the physical spatial scale of the image;
- and the elapsed time between the scans.

Conceptually:

```text
velocity
    =
physical displacement
    /
time between corresponding images
```

For nearly horizontal REAL scan planes, the two estimated in-plane velocity components correspond approximately to the two horizontal wind components.

The vertical wind component is not retrieved from a single nearly horizontal two-dimensional scan sequence.

---

# 16. Cartesian gridding in the reference REAL/Typhoon workflow

REAL measurements are naturally collected on a polar grid:

```text
range × azimuth
```

The original reference Typhoon workflow described in the 2015 JTECH paper performed additional processing before motion estimation, including:

- REAL signal preprocessing;
- valid-data masking;
- scan-motion correction;
- interpolation onto a Cartesian grid.

For the published Chico validation work, the processed data were interpolated onto a regular Cartesian grid before the optical-flow calculation.

The real-time implementation used a CUDA-based nearest-neighbor interpolation method.

This is different from the simpler public M2HATS PPI viewer documented in:

```text
REAL_bscan_signal_processing.md
```

which maps native polar samples to Cartesian plotting coordinates without performing the same full Typhoon gridding workflow.

---

# 17. GPU/CUDA acceleration

The computational problem is large.

A dense flow estimate from a large image can involve hundreds of thousands of unknown velocity components, and the optimization repeatedly performs wavelet transforms and image warping.

To make Typhoon useful in real time with REAL, Pierre Dérian and Christopher Mauzey substantially redesigned and accelerated the implementation.

Important low-level operations, especially the wavelet transforms, were rewritten using NVIDIA's **CUDA** programming environment.

The 2015 JTECH paper reports that the CUDA implementation running on an NVIDIA GeForce GTX Titan was approximately:

```text
10-100 times faster
```

than the original implementation.

That improvement was sufficient to meet the real-time requirement for the REAL scan sequence used in that work.

The practical target was important:

> A vector flow field from one pair of REAL scans needed to be available before the next scan arrived.

Thus GPU acceleration was not simply a convenience. It was central to demonstrating real-time spatial wind retrieval from REAL imagery.

---

# 18. Typhoon is an algorithm, not just a GPU program

The scientific method and the computational implementation should be kept conceptually separate.

**Typhoon** refers to the wavelet-based motion-estimation methodology and associated software family.

The algorithm can, in principle, be implemented on different hardware and in different programming languages.

GPU/CUDA acceleration changes:

- execution speed;
- implementation details;
- practical image size;
- feasibility of real-time operation.

It does not change the basic scientific idea of estimating a dense displacement field from sequential images using a wavelet-based optical-flow formulation.

---

# 19. Validation with Doppler lidar

A major validation experiment was conducted in Chico, California, during 2013-2014.

REAL aerosol images were processed with Typhoon and compared with measurements from an independent Halo Photonics Doppler lidar.

The 2015 JTECH paper examined:

- instantaneous wind fields;
- time series of wind speed and direction;
- 10-minute averaged wind components;
- spatial comparisons;
- power spectra;
- spectral transfer functions.

The paper found strong agreement between Typhoon and the Doppler-lidar observations under favorable aerosol-imaging conditions.

For the combined set of selected high-quality daytime cases, the published comparison reported root-mean-square errors of approximately:

```text
0.29 m/s
```

for each of the two horizontal velocity components in the 10-minute averaged comparison.

The validation also demonstrated that performance depends strongly on the availability of coherent aerosol structure.

---

# 20. Typhoon does not always produce trustworthy wind everywhere

Users should not interpret a Typhoon field as uniformly reliable at every pixel.

Important limitations include:

- insufficient aerosol structure;
- low signal-to-noise ratio;
- large changes in aerosol intensity between scans;
- out-of-plane motion;
- turbulent diffusion;
- scan-motion distortion;
- very large displacements;
- image boundaries;
- regularization effects;
- processing-parameter choices.

In the 2015 validation study, some periods lacked sufficient coherent structure and therefore did not produce usable motion estimates in the region of interest.

Other periods showed false apparent motions associated with changing aerosol structures in the entrainment zone.

This is a fundamental aspect of image-based wind retrieval.

---

# 21. Spatial filtering and effective resolution

A dense vector at every output-grid location does **not** imply that every vector is an independent wind measurement at the grid spacing.

Typhoon uses a regularized inverse solution.

The retrieved field therefore has an effective spatial response that depends on:

- the input image resolution;
- aerosol texture;
- estimated motion scales;
- wavelet basis;
- regularization;
- algorithm parameters;
- masking;
- preprocessing.

The 2015 JTECH study used spectra and spectral transfer functions to characterize the spatial filtering properties of the retrieval.

Users doing turbulence-scale analyses should therefore distinguish between:

```text
output grid spacing
```

and:

```text
effective resolvable flow scale
```

They are not necessarily the same.

---

# 22. Reference implementation and ownership

The high-performance reference implementation developed for REAL is not simply an unrestricted public software package.

A 2014 joint-ownership agreement for **Typhoon V1.0** names:

- **Inria**;
- and the **CSU Chico Research Foundation**;

as joint owners of the software.

The agreement assigns an undivided:

```text
50% / 50%
```

ownership share between the two parties.

The agreement also describes the software as being disseminated under a proprietary-license framework, with commercial licenses subject to payment and academic licenses intended to be granted without charge.

The CSU Chico Research Foundation named in the historical agreement is the university auxiliary organization associated with the Chico contribution at that time. Institutional names and administrative structures may change, so users seeking a license should contact the current responsible organizations rather than relying on this document as legal advice.

This document is a scientific overview, not a licensing agreement.

---

# 23. What the 2014 Typhoon software package contained

The technical appendix of the joint-ownership agreement describes a Typhoon software family that included:

```text
Typhoon 1.0
    CPU version

CuTyphoon 1.0
    GPU-accelerated CUDA version

CuTyphoon 1.0 (server)
    experimental server-oriented GPU version
```

The agreement describes `CuTyphoon` as a much faster GPU-accelerated implementation intended for advanced use.

The software family also used supporting wavelet, image-processing, and optimization libraries.

The exact historical build environment should not be treated as a current installation recipe.

---

# 24. Public PyTyphoon implementation

Pierre Dérian also maintains a public Python implementation:

```text
https://github.com/pderian/PyTyphoon
```

Repository name:

```text
PyTyphoon
```

PyTyphoon is useful for understanding and experimenting with the wavelet-based Typhoon methodology.

However, it is important not to confuse PyTyphoon with the reference REAL implementation.

The PyTyphoon documentation explicitly states that:

- it is a Python implementation of the Typhoon motion estimator;
- it supports dense 2-D and 3-D optical-flow estimation on wavelet bases;
- it is much slower than the reference CUDA implementation;
- it does not include all of the high-order regularizers available in the reference software;
- it is not the same implementation used in the published REAL validation work.

Therefore:

> **PyTyphoon is a public implementation of the Typhoon methodology, not a drop-in replacement for the full reference REAL/CUDA processing system.**

---

# 25. Typhoon and M2HATS

Typhoon was used with M2HATS REAL imagery to produce spatial horizontal vector flow fields.

Public M2HATS Typhoon-related products currently include:

```text
PNG images of vector flow fields
```

at:

```text
https://lidar.csuchico.edu/m2hats/images/winds/
```

and an existing collection of Typhoon-related netCDF archives at:

```text
https://lidar.csuchico.edu/m2hats/typhoon_nc/
```

The netCDF collection has not yet been fully re-audited for this documentation project.

Therefore this overview does **not** attempt to define:

- the exact netCDF variable names;
- dimensions;
- coordinate conventions;
- time conventions;
- masks;
- processing parameters;
- meanings of archive labels such as `FULL`, `MEAN`, `NONE`, `REF`, or `initREF`;
- or which archived configuration should be regarded as the preferred M2HATS product.

Those details should be documented only after inspecting the actual files.

That work belongs in:

```text
M2HATS_Typhoon_data.md
```

---

# 26. Recommended way for public users to work with M2HATS Typhoon results

For most users of the public M2HATS archive, the recommended workflow should eventually be:

```text
understand what Typhoon measures
        |
        v
obtain existing M2HATS Typhoon vector-field products
        |
        v
read coordinates, time, u, v, and quality information
        |
        v
visualize or analyze the wind fields
```

Users should **not** need to install the proprietary/reference CUDA implementation merely to work with already-computed public M2HATS vector fields.

A small public reader/viewer for the M2HATS Typhoon netCDF products would therefore be more useful to most users than an installation guide for the reference Typhoon source code.

---

# 27. Typhoon versus Doppler lidar

Typhoon and Doppler lidar measure wind in fundamentally different ways.

| Property | Typhoon + REAL | Doppler lidar |
|---|---|---|
| Primary measurement | Aerosol backscatter imagery | Doppler frequency shift |
| Wind information | Motion of aerosol structures | Radial velocity |
| Single-beam direct velocity? | No | Yes, radial component |
| Two horizontal components from one instrument? | Yes, through image motion in the scan plane | Not directly from one fixed beam |
| Requires spatial aerosol texture? | Yes | Requires sufficient backscatter/SNR, but not trackable image texture |
| Dense spatial field | Yes, under suitable conditions | Depends on scan/retrieval strategy |
| Main limitation | Image-motion assumptions and aerosol evolution | Line-of-sight geometry and retrieval assumptions |

The two approaches are complementary.

The independent Doppler-lidar validation was therefore especially valuable because it compared two wind-retrieval methods based on very different measurement physics.

---

# 28. Typhoon versus cross-correlation motion estimation

Traditional cross-correlation methods estimate displacement within local interrogation windows.

Typhoon differs in several important ways.

Cross-correlation typically:

- estimates one displacement per window;
- treats neighboring windows largely independently;
- requires a tradeoff between window size and spatial resolution;
- often produces a relatively sparse vector field.

Typhoon:

- uses a global variational formulation;
- estimates the velocity field as a connected spatial object;
- uses wavelets to represent multiple spatial scales;
- can produce a dense vector field;
- uses explicit or implicit regularization to constrain the inverse problem.

Neither approach is universally superior under every imaging condition.

The Typhoon approach was developed specifically to exploit the spatially continuous nature of fluid motion.

---

# 29. What Typhoon does not provide

Typhoon should not be described as providing:

- direct Doppler velocity;
- vertical velocity from a single horizontal scan;
- absolute aerosol concentration;
- guaranteed wind vectors in texture-free regions;
- independent measurements at every output pixel;
- perfect instantaneous snapshots of the atmosphere.

Typhoon estimates **apparent in-plane fluid motion from sequential images**.

When applied carefully to nearly horizontal REAL imagery under favorable conditions, that apparent motion provides useful estimates of the horizontal wind field.

---

# 30. Relationship to REAL signal processing

Typhoon does not operate directly on untouched BSCAN digitizer counts.

REAL measurements must first be converted into useful aerosol-backscatter imagery.

For the current documented M2HATS processing sequence, see:

```text
REAL_bscan_signal_processing.md
```

The reference Typhoon workflow historically included additional preprocessing associated specifically with motion estimation, including:

- detection of image regions with sufficient coherent aerosol structure;
- scan-motion correction;
- Cartesian gridding.

Therefore the complete reference Typhoon pipeline is broader than the basic conversion of BSCAN data into a visually interpretable REAL image.

---

# 31. Related public documentation

M2HATS experiment overview:

```text
M2HATS_overview.md
```

M2HATS public data locations:

```text
M2HATS_data_locations.md
```

REAL instrument description:

```text
REAL_instrument_description.md
```

REAL BSCAN raw-data format:

```text
REAL_bscan_data_file_format.md
```

REAL signal processing:

```text
REAL_bscan_signal_processing.md
```

Future M2HATS Typhoon-product documentation:

```text
M2HATS_Typhoon_data.md
```

---

# 32. Primary references

## Dérian dissertation

Dérian, P. (2012), *Wavelets and Fluid Motion Estimation*, Ph.D. dissertation, Université de Rennes 1.

```text
https://theses.hal.science/tel-00761919v1
```

## Wavelet optical-flow method

Dérian, P., P. Héas, C. Herzet, and E. Mémin (2013), "Wavelets and Optical Flow Motion Estimation," *Numerical Mathematics: Theory, Methods and Applications*, 6, 116-137.

```text
https://inria.hal.science/hal-00737566v1
```

## REAL atmospheric-wind application and validation

Dérian, P., C. F. Mauzey, and S. D. Mayor (2015), "Wavelet-Based Optical Flow for Two-Component Wind Field Estimation from Single Aerosol Lidar Data," *Journal of Atmospheric and Oceanic Technology*, 32, 1759-1778.

```text
https://doi.org/10.1175/JTECH-D-15-0010.1
```

## Public Python implementation

```text
https://github.com/pderian/PyTyphoon
```

---

# 33. Compact mental model

A useful concise description is:

> **Typhoon is a wavelet-based dense optical-flow system that estimates two-component horizontal wind fields from the apparent motion of aerosol-backscatter structures in successive nearly horizontal REAL lidar scans. It does not measure wind directly. Instead, it solves a regularized inverse image-motion problem, masks regions lacking useful aerosol structure, accounts for scan-time distortion in the reference REAL workflow, and converts estimated spatial displacements into velocity. The high-performance reference implementation was accelerated with NVIDIA CUDA so that a dense flow field could be produced on the timescale of successive REAL scans.**

Keep the following cautions attached to that mental model:

1. Typhoon retrieves **image motion**, which is interpreted as air motion when aerosol structures behave as useful tracers.
2. The quality of the result depends strongly on aerosol texture and atmospheric evolution.
3. A dense output grid does not imply independent measurements at every grid point.
4. REAL scans are sequential and may require scan-motion correction.
5. The public PyTyphoon implementation is **not the same** as the reference CUDA implementation used in the REAL validation work.
6. Public M2HATS Typhoon wind products can be analyzed without installing or running the proprietary/reference Typhoon code.
