Well as far as I can see no one has posted on modding the heightmap so I thought I'd share what I've found so far.
The height of the terrain is controlled by the files in the directory assets/art/terrain/heightmap. The files are 16x16 TGA images looking like this:
The closer to white the pixel the higher the terrain - the closer to black the lower. If you have a graphics editor that can show the HSV for the pixels then the V value effectively maps to the terrain height.
It seems like the sea level is effectively a hard-coded minimum height at which units can appear. So, I decided to attempt to raise the height of all terrains by an equal amount to bring the sea bed up to the level of the ocean. To do this, I simply adjusted the brightness of the following TGA files by the same amount: ocean1_1.tga and all the files in coasts and flats subdirectories. The heightmaps in the subdirectories hills, peaks and coastblendmasks seem to be heightmap filters that are applied after the initial heights are construct from the other files.
The result succeeds in the main aim in that units now walk on what was formerly the sea bed since the entire landscape is shifted up vertically.
Sadly, however the coast heights are no longer smooth and so the result is not really acceptable right now. See last two attached screenshots.
I have searched for the names of these heightmap TGAs, but the only reference to them I can find is in Civ4BeyondTheSword.exe. I think unless the tga files can be edited in such a way as to get the coastlines smooth then I can't go any further.
I'm interested to try making the shape of the terrain more interesting using the heightmaps too.
Edit: I wasn't saving the TGAs in quite the right format - I saved them using Paint Shop Pro and the coasts are now smooth.
