More stuff about Planets

Last updated on 1999.11.18 at 17:45 GMT

As stated in my other page on this subject, I have some software on which I'm working to try to get a better model of the evolution of a planet. It's in files evolve.tgz and evolve.zip (the latter is better for MSDOS, the former for Unix; don't forget to specify that you want a download (SHIFT-click in Netscape) otherwise you may get the binary stuff on the screen instead). Note that it needs either the GNU C libraries or my XLIB (see my Useful Stuff page) to link.

At the moment evolve.cc is only a calculation of max/min temperatures, but it seems to fit the Earth and Moon quite well for equatorial temperatures, and doesn't do too bad a job with other airless or light atmosphere planets (Venus is a totally different case!). However, when you go up in latitude (and especially when you add axial tilt and seasons) the temperatures are far too extreme. Probably adding atmospheric convection would help to even things out. So I have to figure out how to do that, preferably in an algebraic way (see plansim, below, for doing it by brute force)...


Another version is in plansim.tgz and plansim.zip which divides the surface up into trapezia (truncated triangles) with the height and width being lines of latitude and longitude. This one is intended to be able to simulate the effects of conduction, diffusion and (possibly) convection in transferring heat. It's really slow, though, with any vaguely reasonable resolution - the current source uses 10 degree east-west by 5 degree north-south areas, and with a time resolution of one 'tick' per hour still takes around a second per simulated day to calculate on a Sun Ultra 1 (three 'days' per second on a 233 MHz Pentium II under Linux). You have to let it run for several 'years' to stabilise (it starts with both poles bare, then the cold one starts accumulating ice (and the albedo goes up) and after 4-5 'years' it looks fairly stable. I'm still tweaking it to try to get less ice and a more even temperature, so the code is changing rapidly, look here for the latest version (and discard any cache entries). Note that once there's a lot of ice on the ground (over half the ground covered) there isn't much difference between 'day' and 'night' temperatures (which are 'ground' temperatures, not air temperatures - the air will vary a lot more).

It needs the curses text screen library (or an equivalent such as ncurses, and will adjust to the size of the screen at startup (screen resizing during execution will have odd effects); it also needs my XLIB library (see above). Note that a display width less than 80 characters wide may have problems, and one less than 25 lines high certainly will, it has been tested with an 80x25 display as well as with 160x66 and they work fine. With smaller displays you see a lower resolution (latitude in 10 degree increments, with under 50 lines on the display, longitude is a multiple of 5 degrees per increment, with an 80 column display you get 30 dgrees per column).

It now dumps the current state to a file when it exits (with 'q' - using CTRL-C will not only not dump the file but will likely screw up your display as well), this can be reloaded using a parameter (use -h or --help to see the command format). Any parameters which you specified initially are stored in the file and will be reloaded from there, if you want to change them you can edit the file (it's all in ASCII and numbers, read the source to see what anything is). Note that at the moment the dumped file is called planet.dmp, this should be a parameter or option but isn't yet.

I've found that using parameters -p1 -C0.01 -a.2 -H300 gives a roughly Earth-type temperature after 10 or so 'years'.

Question: why on Earth (pun) doesn't all the mosture in the air condense out at the poles and freeze there? How come we've got any seas left? Answers on a postcard (or by email if you prefer)...


I've also done some work on calculating sunrise and sunset, and the height of the sun above the horizon. My main reason for this was to support the above software and allow seasonal variations and specification of latitude and axial tilt, but it could be generally useful. Some of the files are from other people, but sunpos.cc and sunpos.h are my own work. I'll quote from the coments in my code:

Calculate sun height above horizon, ignoring refraction and taking the centre of the solar disk as the position for the height. Refraction and adjustments for the apparent size of the sun can be done by the calling program, which knows information such as pressure, solar radius and distance, etc.

It is assumed that the planet is a sphere and its orbit is circular. Adding oblateness would be fairly simple, but with a non-circular orbit the calculations get much more messy (it is no longer feasible to use a geocentric coordinate system, for instance).

Time is the planetary rotation in Solar Mean Time. For an inclination of 30°, this gives an error of quarter of an hour (assuming a 24 hour day) at the eighth points (half way between a solstice and an equinox). At 45° inclination the error is around 40 minutes, and at 60° it is over an hour and a quarter. Solar Mean Time is thus a reasonable approximation for planets on which anyone would want to live, the alternative being to adjust the day length constantly through the year.

Note that the date and time are not otherwise related. In particular, it is possible to hold the orbital position and rotate the planet. Since only the calling application knows the relationship between the day and the year, it's up to that application to adjust them accordingly (and, if neccessary, to convert between solar and sidereal times).

For sunHeight() angles are in degrees and the time and position in orbit in fractions of a circle (0..1 being 0..360 degrees). Function sunPos has the same parameters, but latitude and inclination are in radians instead of degrees and the orbital position and rotation are in radians instead of in fractions of a circle. Also, the structure returned contains both altitude and azimuth information, although the latter is currently not calculated.


This site is mirrored at http://www.keristor.co.uk, http://www.firedrake.org/keris/ and can also be accessed by ftp at ftp://ftp.firedrake.org/keris


If you have comments or want to contact me, my preferred email address for Internet mail is