Skip to the photon view

Monte Carlo Photons in a Cloud

Follow photons through cloud layers, gas and a surface. Watch the tallies converge, see which way the scattered light goes, and compare them with the two-stream approximation.

Photon paths

Photon paths through the column Side view of the column drawn to scale in altitude, with clouds, gas, the surface and recent photon paths coloured by fate. The numerical tallies are in the results table.
Reflected Transmitted directly Transmitted diffusely Absorbed in the column

The side edges wrap around (periodic boundaries); because the cloud is horizontally uniform this changes the picture, not the fluxes.

0 photons.

Tallies and the two-stream comparison

QuantityCountMonte Carlo± σBook two-streamDirect-beam two-streamExact

Convergence: how the error shrinks with N

Monte Carlo error against photon number Log–log plot of the difference between each Monte Carlo fraction and its reference, with the statistical error σ and a 1/√N guide. The same numbers are in the results table.

Solid lines: |Monte Carlo − reference|. Dashed lines: the statistical error σ. Grey: a 1/√N line. Direct transmittance is compared with the exact Beer's-law value, so its error keeps falling as 1/√N. The other references are the direct-beam two-stream, an approximation. Once σ is much smaller than the gap, the gap stops shrinking: that plateau is the two-stream error, not Monte Carlo noise.

How many scatterings, how far?

Histogram of the number of scatterings for reflected photons and for arrivals at the surface Histogram of the optical path traversed for reflected photons and for arrivals at the surface
Reflected photonsArrivals at the surface (transmitted)

Which way does the scattered light go?

Radiance factor of the light leaving the top of the column, against zenith angle Radiance factor of the scattered light arriving at the surface, against zenith angle

Values in a table
Radiance factor πI/F₀ ± σ in each 10° zenith bin. Empty bins show —.
Zenith angleLeaving the top: sun sidefar sideall azimuthsAt the surface: toward the sunaway from the sunall azimuths

Physics guide

What happens to a photon

Each photon enters the top of the domain travelling at the solar zenith angle θ₀. It travels a random optical path drawn from e−τ, then interacts. With probability ω₀ it scatters into a new direction drawn from the Henyey–Greenstein phase function with asymmetry parameter g. Otherwise it is absorbed. It continues until it is absorbed or leaves through the top.

The tallies are fractions of the incident flux. The reflectance 𝓡 counts photons that leave through the top. The transmittance 𝓣 is the flux reaching the surface: direct if the photon has never been scattered or reflected, diffuse otherwise. The absorptance 𝓐 of each layer counts photons absorbed there. Every photon ends in exactly one of 𝓡 or the 𝓐 rows, so they add up to 1.

A reflecting surface sends photons back up, and some of them return to the surface after scattering in the cloud. Each downward arrival counts toward 𝓣, just as a radiometer at the surface would see it, so 𝓣 can grow well beyond what the cloud transmits on the first pass. The surface absorbs the fraction 1 − A of what arrives: 𝓐surface = (1 − A)𝓣. A Lambertian surface reflects in random directions (uniform radiance); a specular surface reflects like a mirror. See Chapter 14.

The √N rule

σ = √( p(1 − p) / N )

If a fraction p of N photons share a fate, the uncertainty of p is σ above: four times as many photons halve the error. For a rare fate the relative error is about 1/√NX, where NX = pN is the number of photons in that population, so a rare outcome needs many more photons. That is what the "photons in each population" axis of the convergence plot shows.

Over a reflecting surface one photon can arrive at the surface several times, so the transmittance counts are not simple yes/no outcomes. For those rows σ = s/√N, where s is the spread of the number of arrivals per photon. The error still falls as 1/√N. See Chapter 14.

Two versions of the two-stream approximation

The two-stream approximation replaces the full angular distribution of radiance by an upward and a downward stream. The book's two-stream treats all of the light as diffuse, travelling at an average μ̄ = ½. It therefore does not depend on the solar angle at all. Through a layer of pure absorber it gives 𝓣 = e−2τ⋆, which is exactly Beer's law for a beam at 60°. That is why the comparison is fairest near θ₀ = 60°.

The direct-beam two-stream carries the unscattered solar beam separately at its true μ₀ = cos θ₀, and only the scattered light in two streams. It follows the angle slider, and it handles the mirror-reflected beam from a specular surface. Move θ₀ away from 60° and watch the book's values drift away from the Monte Carlo while the direct-beam values follow it. See Chapter 14.

With diffuse illumination the sky sends equal radiance from every downward direction, as under an overcast layer above. Photons then enter at all angles, with more of them near the vertical (the flux-weighted mean μ is 2/3). Both two-stream versions are now driven by diffuse light at the top. The light that gets through without scattering is no longer e−τ⋆/μ₀ but the exact flux transmittance 2E₃(τ⋆), where E₃ is the exponential integral. The book's two-stream approximates this by e−2τ⋆.

Why the gap to two-stream stops shrinking

The Monte Carlo makes no approximation about angles. Its only error is statistical, so with enough photons it converges to the exact answer for this column. The two-stream answer has a fixed, systematic error from its two-direction simplification. As N grows, σ keeps falling as 1/√N, but |Monte Carlo − two-stream| levels off at the two-stream error. Direct transmittance is the exception: its reference, Beer's law e−τ⋆/μ₀, is exact, so that gap keeps shrinking. See Chapter 14.

How an absorbing gas changes a cloud

τ⋆ = τ⋆cloud + β Δz    ω₀ = ω₀,cloud τ⋆cloud / τ⋆

The gas fills the whole domain, so a cloud layer of depth Δz contains gas optical depth βΔz. That raises the layer's optical depth and lowers its single-scatter albedo, as the readouts under each cloud show. The scattering is unchanged, but each photon now has more chances to be absorbed, and photons that scatter many times are the most affected. Between the clouds the gas is a pure absorber (ω₀ = 0). The "of which by gas" rows split each layer's absorption between gas and droplets in proportion to their absorption optical depths, τ⋆cloud(1 − ω₀,cloud) : βΔz. See Chapter 14.

Ink and milk

Ink and milk of the same optical depth τ⋆ let the same fraction, e−τ⋆/μ₀, of an unscattered beam through. What differs is where the rest goes. In ink (ω₀ = 0) every photon that interacts is absorbed, so nothing is reflected and nothing arrives except the direct beam. In milk (ω₀ = 1) none are absorbed: each photon is scattered again and again until it leaves through the top or the bottom, so 𝓡 + 𝓣 = 1. Extinction is the sum of absorption and scattering, and removing light from a beam does not say which of the two did it. Save the tallies from one run, run the other, and compare the columns. See Chapter 8.

The angular distribution of the scattered light

The plots show the radiance I of the scattered light, as the radiance factor πI/F₀, where F₀ is the flux incident on the top of the column. A Lambertian (isotropic) radiance with the same flux has πI/F₀ equal to that flux fraction, and the dotted line marks it, so a curve above the line is brighter than isotropic in that direction. Each photon that leaves the top, or arrives at the surface after being scattered, is counted in a bin of zenith angle (10° wide), and a bin's radiance is its flux divided by the cosine of the zenith angle and the solid angle of the bin. Unscattered light is left out: the direct beam is a single direction, not a distribution. With a specular surface the mirror-reflected beam does appear, as a spike at the mirror angle.

The left of each plot is the sun's side and the right the far side. For light leaving the top, the left is where a satellite on the sun's side sees backscattered light, and the right is forward scattering seen from the side away from the sun. For light arriving at the surface, the left is the view looking toward the sun and the right is looking away from it. The dashed grey curve is the average over all azimuths, mirrored; where the coloured curve departs from it, the radiance depends on the angle to the sun. Bins near the zenith have tiny solid angles and hold few photons, so they are the noisiest; the error bars are ±σ with σ = radiance/√(photons in the bin). See Chapter 14.

Periodic side boundaries

A photon leaving one side of the picture re-enters on the other side at the same altitude and direction. This makes the finite picture stand for a cloud layer of infinite horizontal extent, the plane-parallel layer of the book. Because the layer is horizontally uniform, wrapping changes where paths are drawn but none of the tallies. See Chapter 14.