(Space Calc Logo)
Space Calc
Doing the math, so you don't have to.

Climate Simulator

Introduction

Planetary climate is surprisingly complex. The main driver is wind, which forms six bands of convective cells, three above the equator and three below. These cells twist due to the Coriolis force, so that their ground passage is largely west-east. The cells' movements carry water inland. Over time, or especially if the water-laden wind hits mountains, rain falls, resulting in more-fertile land. For a more-detailed explanation, I recommend this great article.

Trying to guess the steady-state dynamics of all this by hand is prone to problems. Hence, I've written this calculator, which will run a (fairly ad-hoc, but roughly validated against Earth's climate) simulation. It should at least produce a result much better than one could practically do by hand.

Simply upload a heightmap, set the water level on the heightmap, and watch it go! You can save the results when a steady state is reached.

Note that the calculator requires WebGL, and I've only been able to test it with a "recent" version (the API is so problematic, I am unsure which one, but it's probably 2).

You can change the simulated resolution by adding the desired resolution at the end of the URL and refreshing (e.g. "climate-sim.php?width=1366&height=683").


Calculator

Upload Heightmap

Planetary Parameters

Water level on heightmap (range 0.0 to 1.0)

Equatorial rotation speed (negative denotes retrograde rotation)

Solar irradiance (at top of atmosphere, default 1361 W/m²)

Simulation

Your browser does not seem to support HTML5 canvas.
Water / Heightmap
Water Vapor
Temperature
Biomes
Wind
Draw wind arrows
Draw latitude/longitude main lines
Draw latitude/longitude grid
Draw heightmap, water, and temperature maps in grayscale
Soften biome edges

Examples

(compare to actual water vapor, temperature, biomes, and wind)

(see XKCD)

Compile Output

Any erroneous output would go here:


Limitations and Future Work

  • This calculator does not take into account seasonal variations (or axial tilt at all). This means important effects like the seasonal variation of the intertropical convergence zone cannot be captured. This is why India and China are calculated as being too dry.
  • A lot of the areas seem to be outside of the range of Earthly biomes, and I don't know why. They are currently being extrapolated. For higher insolations, for example, you can get the "tropical rainforest" biome instead of "literally on fire" terrain.
  • Almost all the formulae used for computation are ad-hoc, tweaked to reproduce Earth's biomes as a reference.
  • In particular, fluid mechanics are not solved.
  • There is no notion of pressure. The wind directions in-particular are extremely simple. This can lead to discontinuities in the biomes, especially near ±60° latitude.
  • The temperature is calculated locally. Blurring it a bit would help.
  • Not resolution-independent.
  • There is only one water height, and you can't have terrain below it.
  • The planet is a fixed radius and perfectly spherical.

If you have ideas for solving these, do get in-touch! The shaders driving this are not obfuscated, although they are massively hacky.