Many of our precision forecasting applications require accurate solar position modelling. We extended that towards shadow projection with digital elevation models. For instance, yesterday Mount Kilimanjaro looked like this:
The sun is the engine of our weather. Without it, there would be no weather, nor anything else for that matter. Astronomy has given us the tooling to accurately determine the position of the sun relatively to a given time and location. Meteorology tells us what that does to weather.
Nowadays, weather models capture large scale and synoptical weather quite well. MeteoGroup enters the mixture for precision requests; to include information that weather models cannot or choose not to include on a very fine level. Part of that service requires accurate modeling of solar positions and the resulting solar rays around orographicly challenging areas. Simply put: is there shade, or not.
Shaded areas provide shelter for the heat. That can be a good thing, but for forecasts it's usually not. A shaded valley could mean the forecast is off by a few degrees. Not to mention what shade does to solar power farm yields.
How to cast shadows
Luckily others have solved the problem of shadow casting before. We use a recipe from here .
The logic is simple. Given that we know where the sun is, we virtually place ourselves on every desired location and check whether the sun is not hidden behind a static object.
Projecting the sun on the surface 
Calculating solar positions
On the other hand we also need to know where the sun is at a given time and location. We use the same math as in . For those interested, have a look here .
The last missing piece in the puzzle is an accurate elevation map of the earth.
The more accurate the map, the better the solution.
Luckily, there's an abundance of such - Digital Elevation Models they're called - made available freely.
We depend on NASA's shuttle radar topology mission data .
The latest version of this dataset accurately models the earth's surface up to roughly 30 by 30 square meter precision.
That's nearly good enough to discern buildings and large structures from one another!
Putting it together
Yesterday - the 5th of December 2016 - looked like this in the shadow landscape.
The area above spans about 100x100 kilometers. The orography is very challenging, immediately showing the value of this application.
Now let's have a look at a more colourful example. Below in the bottom right is Mount Fuji, Japan, also on the 5th.
And finally there's Mount Kilimanjaro in Tanzania.
We have several ideas. The most obvious is to include the shadow maps as an additional feature in spatial interpolation models. Results will hopefully follow soon.
A second purpose would be to calculate the sky view factor in our road surface model. Shade greatly determines how far a road can heat during the day or cool in twilight and dusk.
 Vectorial algebra algorithms for calculating terrain parameters from DEMs and solar radiation modelling in mountainous terrain. http://www.tandfonline.com/doi/abs/10.1080/713811744
 Improvement in solar declination computation. https://hal.archives-ouvertes.fr/hal-00993149/document
 NASA Shuttle Radar Topology Mission http://www2.jpl.nasa.gov/srtm/
 Digital Elevation Model raycasting in Python https://github.com/tomderuijter/python-dem-raycast
 Insolation and Geographic Calculations in R https://cran.r-project.org/web/packages/insol/index.html