This post is full of videos: unfortunately, substack does interesting compression for the first 4-5 seconds of every single video which makes them look a little blurry. Please keep watching I promise they get better!
On a recent trip to Salida, CO, I observed a wonderful monsoon storm. My day-to-day work involves a lot of wrangling various weather data sources, including the Multi-Radar/Multi-Sensor System (MRMS), a radar system developed by the National Severe Storms Laboratory (NSSL). I wondered: if I recorded this storm, could I harmonize the MRMS observations of the storm from that system and my video? This video features some dogs and humans living their lives, as well as the weather. Apologies!
Multi-Radar/Multi-Sensor Data
The MRMS is a bit of a modern wonder. It integrates data from weather radars, satellites, numerical weather prediction models, rain gauges and more into a gridded product. It is the source for many of the radar weather pages you’ll see over CONUS. The end result is that if you really want to, you can observe radar reflectivity, a proxy for precipitation intensity, at a nominal resolution of approximately 1 km over CONUS every 2-4 minutes, noting that the grid itself can be finer than the underlying measurements!! Earth Observation folks: consider what you might do with 1 km × 1 km data sampled every 2-4 minutes. The data can be accessed on AWS via the Open Data program, and the folks at dynamical.org/source cooperative have an icechunk store for some specific derived surface precipitation variables, although the data are only hourly.
For this post, we used the MRMS three-dimensional reflectivity mosaic, measured in decibels of reflectivity (dBZ), a logarithmic measure of the power of the radar signal reflected back from particles. Stronger reflectivity typically indicates larger or more numerous precipitation particles, although the specific relationship depends on precipitation type. For example, 15-30 dBZ signals are typically light precipitation, whereas 45-55 dBZ might mark heavy rain/convective thunderstorms and values above 65 dBZ can signify severe weather/large hail.
The full data cube for our study looks like this, plotted with the standard NWS radar palette: reflectivity in steps of 5 dBZ, blues for drizzle, greens for light rain, yellow and orange for heavy rain, red and beyond for the rare extreme.
An interesting aspect of this cubed-ness is that when weather radars show you a 2D map of the radar evolving with time, they are explicitly making a reduction choice: most show base reflectivity, or the lowest altitude scan. This gives you an idea of what is most likely falling onto the ground. However, some might offer composite reflectivity, or the maximum across all altitudes for a given pixel.
Where: deriving the camera parameters
My first thought was just to have the video of the storm and a composite reflectivity map side by side.
As with all geospatial problems, the crux lies in figuring out what happened where and when (yes, managers and executives, this dissolves nicely into the 3W framework1; feel free to steal this for your next cross-enterprise crusade). Since I don’t know exactly where the camera is pointed, we first need to figure that out in order to overlay the MRMS data with the video.
We used the Collegiate Peaks in the background to accurately establish the registration of the camera view. We first need to localize the skyline in our actual photo/video: we can do this by creating an edge map, specifically looking at where the scene gets darker for each vertical pixel column in the image:
We also need to establish the locations of the peaks using a digital elevation model (DEM) and then essentially build what the expected skyline would be given various camera tilt parameters. We can reconstruct the actual view angles of the camera by taking the DEM and marching hypothetical ‘rays’ forward until they hit their points of occlusion on the horizon. In 3D, this process looks like this:
But how do we know how the camera was oriented? The GPS coordinate gives us a location, but the camera actually gives us the information we need! By trying to fit the image to the DEM, we can determine what direction the camera was pointed in. There are four parameters we can fit: heading, pitch, roll and field of view. These motions and their effects on the final fitted skyline are shown below:
An exhaustive grid search over these four parameters would be prohibitive, so we reduce our search space as follows:
We perform an outer-loop search over
field of view (FoV):For each value of
FoVwe then perform a coarsened search where we blur the edge map to 8 px and search overpitchandheading, evaluating for fit over the blurred skyline, as shown in the video below. Thescoreis a measure of the fit between the proposed skyline and the edge map.
We then perform a finer-grained search initialized at the coarse optimum using the Nelder-Mead method, a gradient-free optimization method. This blogpost provides a pretty nice, intuitive explanation. In theory, we could just calculate the full fine grid and take the max score, which would take a little bit longer, rather than using Nelder-Mead. Because this is inside an outer loop, any extra compute/time does get blown up a little bit, but not prohibitively in this case, which is fairly simple.
Finally, we run the same Nelder-Mead method for the
rollparameter, initialized at 0 degrees, which is the assumption that the camera was level when recording.
Taking the best score/fit across these iterations yields the following parameters for the camera view:
Now that we have this information, we can finally slice our MRMS data and overlay a bird’s-eye view with our camera view at the available time steps. This allows us to see the radar data within the camera’s field of view.
When: Anchoring the Timestamps
Previously I mentioned that the data are available at approximately 2-minute intervals. This turns out to be a bit of a lie unfortunately. Especially since we are attempting to match up the MRMS data to specific timestamps in our video, we need to consider the fact that each map combines radar measurements from different stations, collected at different times. Reeves et al. 20172 find that mosaics for a given valid time may include observations that are up to 10 minutes old or more! There are quite a few radars that could contribute to the signal in our story, if the earth were flat and there were no mountains. However, because of terrain blockage and Earth’s curvature, we find that there are 3 main stations that contribute to our MRMS mosaic: Pueblo (KPUX), Denver (KFTG) and Grand Junction (KGJX). Even these only contribute at an elevation of 4.5 km above sea level (with a bottom edge of 3.1 km, this is the source of the ‘no data’ layers in our data cube diagram above).
Looking at our MRMS data the next thing to note is that the lower elevation layers only change every 4 minute cycle, remaining constant every 2 minutes, unlike the higher elevation layers which appear to refresh at a higher rate (nearly every 2 minutes). This means that the lower elevation data for a given file, in a given timestamp, are often running 4 minutes late! In the grand scheme of weather analytics, where things are often calculated on an hourly basis, this might not mean much, but in the context of matching to 30 fps video, it can cause a big lag. Upon investigation, we find that the timing of the lower elevation data matches the timing of the Pueblo (KPUX) station almost exactly. This information is unfortunately not in the final MRMS product, but in the raw Next Generation Weather Radar (NEXRAD) Unidata Level II bucket on s3. These files contain full volume scans: every radial of every tilt taken from a single station. Each of these radials carries its own timestamp, azimuth and elevation angle. To give an illustration of how the radar actually operates see the video below:
This results in the following lag for the low altitude scans in the MRMS data: we see that the lag is variable between 2.5 and 4 minutes over the duration of our video!

Once we have the timings of the relevant low elevation sweeps from Pueblo (KPUX), we can empirically check if these line up with the actual rain curtain in the video better than the naive MRMS file timestamps. We do this by taking the band right above the skyline previously calculated: we average across this red band vertically so as to create a single line which represents bearing (left to right across video), colored by darkness, which approximately tracks the rain. We stack these brightness profiles through time to show how the dark rain features move across the view. For comparison, we take the strongest lowest-altitude radar echo along each bearing, between 3 and 35 km from the camera. We then compare the resulting patterns using either the MRMS timestamps or the inferred Pueblo observation times, asking which timing gives the closer match to the video. The answer appears to be Pueblo timing, so for our animation we will actually attempt to match things up using those timestamps.
When: Temporal Interpolation
Unfortunately, because of the 2-minute sampling period of the MRMS data, I found that the time series of the video (30/60 fps) and the MRMS data were severely mismatched. We use pySTEPS (Pulkkinen et al. 20193), a package for nowcasting of radar precipitation fields, to interpolate our radar data in time to match the video. We use variational echo tracking (VET) to interpolate displacement fields and produce a smooth animation. This method breaks down the acquisitions into nested coarse-to-fine grids and estimates the motion vector in each sector, starting with the coarsest, with a smoothness penalty. So if the vector field suddenly jumps at any cell, that is penalized.
For a time between two radar acquisitions, let α denote the fraction of the interval that has elapsed. We warp the earlier field forward through α of the interval and the later field backward through the remaining 1−α. We then blend the warped fields, weighting the earlier field by 1−α and the later field by α. The blend is calculated in linear reflectivity Z and then converted back to dBZ. You can see the end result below:
Finally! We can now show how the storm progressed and sync it up to the original video, using the reflectivity from the lowest complete altitude layer in our data cube.
Where: Spatial Projections
As mentioned before, the data are voxels (3D), not pixels (2D). Therefore, just as we can create a 2D projection vertically to create a max-reflectivity composite, we should in theory be able to create a 2D projection in any plane. Since I have video, what if we tried projecting the radar data into the sky in the video? We can do this using the same ray-tracing principles we used to situate the camera earlier, except that this time, instead of stopping when we hit a mountain peak, we’ll take the maximum reflectivity along the camera path, or the nearest voxel in the ray path exceeding 5 dBZ. One thing to note is that in order to do this on our temporally interpolated data, we now need to apply nowcasting/VET to all of the altitudes in our data cube, implementing layer-by-layer 2D motion estimation for the available layers, not just the lowest one.
The two different projections (strongest and nearest) end up looking like this when overlaid with the video:
I’m actually going back and forth on what makes the most sense in terms of visualizing this projection. On the one hand, nearest makes sense, as the ray travels quite far back with the strongest/maximum reduction. On the other hand, the view of the precipitation core is quite distorted and doesn’t line up with the rain in the video as well as it does with a maximum reduction, so I plotted both. So, to recap, we now have several ways of projecting the radar data: one is simply taking the lowest altitude slice, and the other is doing ray-marching and projecting it into the sky of our video. The final product is the video below!
Some Thoughts:
Beautiful Data
MRMS data are stunning. From a technological stand point in terms of implementation, temporal and spatial resolution, signals collected and the minutiae of assembling/compositing the data. It is truly awe inspiring to realize what can be done with these data, and I consider myself lucky to have access and be able to perform the types of analyses done here.
The models are getting good
I started this post off thinking it would be a fairly short one, and ended up spending a ton of time on it. I used Fable 5.1 to retrieve the data, process it, run analysis and produce figures. Although this was by no means a one-shot process, and took a lot of baby sitting, questioning and validation, I am certain that I would not have been able to write this post without it. For a sense of how agents, and my usage of agents is evolving in terms of analysis and visualization you can refer to my previous post from approximately 19 months ago. The rate of progress is dizzying, but the models still require much hand-holding. For example I had to point out the timestamp anchoring issue to Fable.
As always, this blog is a very long and complex search query to find fascinating people and make them route interesting stuff to my inbox. So if you believe that is you, please do reach out!
Reeves, H. D., L. Tang, J. Zhang, J. Brogden, and K. W. Howard (2017). “Latency within mosaicked radar products and its effect on aviation operations.” 18th Conference on Aviation, Range, and Aerospace Meteorology, American Meteorological Society, presentation 14.3. Abstract
Pysteps: an open-source Python library for probabilistic precipitation nowcasting (v1.0) https://gmd.copernicus.org/articles/12/4185/2019/














I fly LiDAR and use a Trimble receiver on a known control point during the flight. Getting the timestamps lined up matters for us too. Really cool seeing you bring the radar and storm footage together.
Wow!!! did you realize it would be so complex when you started....!?