MY SIMULATOR
cloud base - m peak rain - mm/h lee - °C FPS 0
Oblique Side (cross-section) Top
Wind blows left to right. Beads = the air parcel, colour = temperature (blue cold, red warm). White cloud forms above the cloud-base plane, blue streaks are rain, the standing gauges show the local rain rate. Vertical scale is stretched (slider).
WebGL is not available here — the numbers, charts and numerical checks on the right still work.
Rain Shadow Transect Lab: Parcel Thermodynamics, Rain-Gauge Line and Lee-Side Warming
Moist air meets a mountain ridge. Forced up the windward slope it cools, reaches its lifting condensation level, forms cloud and rains; after the crest it sinks and warms, and because the rain took water and left the latent heat behind it arrives on the lee side warmer and drier. Follow one parcel along the whole transect, read the rain-gauge line and watch the numbers that produce the rain shadow.
Educational model with typical formulas. A single air layer follows the terrain (no flow splitting, no waves, no wind shear), standard-atmosphere pressure, Magnus saturation vapour pressure, saturated adiabat integrated by RK4, rain removed with a chosen efficiency, no ice, snow or entrainment. Rain rates are order-of-magnitude values for the chosen layer depth and wind, not a forecast. Vegetation and rain-gauge heights are illustrative.
Pause Reset Quality: High
Scenario
Air and mountain
Live readout
Parcel temperature against height
Rain-gauge transect
Experiment 1: how tall must the ridge be?
Ridge height sweep with the current air and width: cloud base, water condensed, peak rain and the lee-plain temperature and humidity.
Run sweep
Experiment 2: precipitation efficiency
0 = all condensate stays in the cloud (reversible: the air comes back unchanged), 1 = all falls out (pseudo-adiabatic). The rain shadow warming needs rain.
Run sweep
Experiment 3: how humid is the approaching air?
Run sweep
Independent numerical checks running...
Also run in Node: node src/check.js.
Controls Drag / one finger: orbit; wheel / pinch: zoom. Camera buttons: Oblique, Side, Top. All sliders act at once; the numbers, charts and 3D scene update together. Pause freezes the moving parcel and rain.
The science
Dry ascent. An unsaturated parcel rising without exchanging heat follows T = T0 (p/p0 )Rd /cp (about 9.8 K/km) with its mixing ratio r conserved, so it approaches saturation. The lifting condensation level zLCL is where r equals the saturation value rs = 0.622 es /(p − es ), with es = 6.112 exp(17.62 T/(243.12+T)) hPa (Magnus). Espy's rule zLCL ≈ 125 m × (T − Td ) is used as a check.
Saturated ascent. Above the LCL condensation releases latent heat and the parcel cools more slowly: dT/dz = −(g/cp )(1 + L rs /(Rd T)) / (1 + L² rs ε/(cp Rd T²)), integrated here by RK4. The water condensed per step is the drop of rs ; a fraction e (efficiency) of it falls out and the rest stays as cloud water.
Rain rate. For a layer of depth D carried at speed U over a slope, the rain rate is P(x) = e ρ D U (−drs /dx) (kg m-2 s-1 = mm/s) on the saturated windward side; it peaks where the cooling is steepest and drops to zero at and beyond the crest.
Descent and the rain shadow. After the crest the parcel descends along the dry adiabat once any retained cloud water has evaporated. Its water content is now lower, the heat of condensation was added during the ascent, so at the same height it is warmer than when it started: ΔT ≈ (L/cp ) Δrremoved (3 g/kg is about 7 K) and much drier, which is the foehn effect and the dry rain shadow.
Checks. (1) bisection LCL vs Espy; (2) equivalent potential temperature θe (Bolton 1980 formula) is conserved along the computed saturated ascent; (3) with efficiency 0 the descent returns the parcel to its start state; (4) latent heat of the removed water equals the lee warming; (5) 240 vs 960 steps agree.
Honest simplifications. Real orographic rain depends on the 2-D flow, cloud microphysics time scales (drops need time to grow and fall so rain is shifted downwind), blocking, convection, ice and snow, and the lee side often also has waves and turbulence. Efficiency, layer depth and wind are inputs here, not computed.
3D ridge, trees, clouds and gauges modelled in Blender, baked PBR textures; rendered with Three.js