A playground to run AIFS experiments using serverless inference
Run AI weather forecasts on rented GPUs with a serverless Python library. This talk demonstrates reproducible forecasts and reforecasts from any historical date, managed in a versioned Zarr store.
Overview
The aifs-modal library is a thin serverless wrapper to easily run AIFS inference (for forecasts or reforecasts) on a rented GPU in one Python call, storing the outputs in a versioned Zarr store using Icechunk.
The demo shows how (claude and) I wired together anemoi-inference (ECMWF’s model runtime), Modal (serverless GPU), and Icechunk (git-like array storage) to get reproducible forecasts or reforecasts from any historical date, all driven from a local Jupyter notebook with no cluster, no Colab, no infrastructure to manage. Initial conditions can be ingested from ECMWF operational analysis or ERA5 reanalysis out of the box. Once the GPU job finishes, the output is managed in a versioned Icechunk store and opens instantly in your local notebook as an xarray Dataset for postprocessing. Ensemble forecasts are also supported: each member runs on a separate GPU in parallel, with members writing concurrently into the same Icechunk store.
Video
Transcript
Generated 3 months ago
Summary
Generating a talk summary...
View full transcript
I launched, the IFS model for weather forecasting. I'm looking how it how well it predicts a a given storm, for this example. And what I just did is, like, run it from 1 day before the storm to, so, basically let me just scroll here. Yeah. So, basically, I'm running it from 7 days before the storm to 1 day before the storm.
And these are the 7 forecasts that are now running, in parallel. So, basically, the idea of this is that, like, when we're running, when we're running, like, these AI weather models in storms, especially, we see that, they track very well. Often, the the sea level pressure is very well predicted. But then if you see the storm, actually, the the wind is not that well predicted. So as an example here, what, like, what I'm gonna do is, then I'm gonna try to see I'm gonna use a tool, a storm tracker.
Once the forecast finishes, I'm gonna use a storm tracker to try to see if the if the storm that, it's in the past. And I know the trajectory that that it did, if it's well predicted by the model. So, these forecasts are, like, I just run the it from my computer, but, like, they're running on, like, a serverless cloud GPU. So, basically yeah. I think they should have been mostly finished, but now they're being written Aswin, in Azure store in the cloud.
So, yeah, hopefully, a few of them should be done by now. But, until the 7 finish what I would like to show is that, I do that after the 7 finish. But, like, if they don't finish on time, I'm gonna do it before. But, basically, once I have once it ran, I'm just gonna try to see, like, out of the of the variables. I'm just gonna try to see, use the this storm tracker and try to find the storm tracks, like, with the time and position for each of the forecast.
So this, I ran it already before. And, hopefully yeah. So a few forecasts should have already finished. Yeah. So platform is boycotting me now.
Violating me again. I just wanted to show, like, infrastructure of how that look, but, I'm sure I'm gonna live them off that, I guess. Well so still, like, now, once the forecast have finished, I'm just gonna, like out of the tracks that I predicted, I'm just gonna see, I'm just gonna see and run this notebook locally. So, like, I just extracted these, storm tracks. And, now I'm loading the actual storm.
And here, just, like, recovering all the tracks from all the forecasts, and, basically yeah. So this is the figure that I'm interested in is I'm trying to see, like, what's, like when I start the forecast 7 days before. Yeah. Let me see if I can. Hopefully.
So if you don't have the image, probably. Yeah. Yeah. So, basically, like, I'm seeing here when I 7 days in advance, how well it matches the actual storm track in black, 6 day in advance, 5 days in advance, and so on and well. We see that at the end, it does get quite close.
So this is, like, an AI based model. And, what I would like to see now is to see, like, okay. Basically, if I use a physics based model, does it look the same? And especially, like, here, I get the storm track well, but do I get the wind well as what too? So, basically, the tool that I created that it's doing all this, demo that I'm just gonna, like, go quickly here to the, like, here are the links.
But the idea of the tool is basically that you can run everything from your computer and just, spawn the forecast on the cloud like, like I did here. And then, like, all the post processing, you can do it from your computer as well. So, yeah, now all the forecasts have finished. And yeah, so, like, we have, like, how the data structures look for this forecast. And we have, like, all the fields that have been generated.
So the idea overall is that all of this is in the cloud. All the forecasts have run-in the cloud. They have, reading the outputs and storage. But then there's so much fast processing that you can do on your computer. And and yeah.
So, basically, I think, like, that's kind of very important because in research, I see that a lot of people just, like, say, okay. Like, this was run on the GPU blah blah blah, but they don't share the workflow. And instead here, I can, like, just share a repo with all the notebooks and everything and all the steps so people can see, how the how the figure was generated. That was, like, the idea. Alright.
Thank you very much, Matthew. Any questions? 1 question. Do you work with only with Stormdew to also with other events like hail? I'm interested from the weather insurance perspective.
Yeah. So, I was focusing mostly on heatwaves myself, but now I'm working with a colleague that works on storms. So, like, now we're focusing on storms because I think, like, it's very interesting the weather processes, the physical process as well? So, like, that's why I'm and, like, we want to do, like, a lot of what if, like, what if there was more moisture? So, like, we're gonna start the model Aswin fake conditions where there's more more moisture or when, like, years from now where the atmosphere is hotter.
So but on like, there's a huge list of, like, I'm just focusing here on on sea level pressure, but there's, like, so many other variables that you can so, like, hail, I don't know, but, not directly at least, but, like, for everything related to wind, temperature, pressure, and so on. Yeah. Like Which data do you use exactly, like, the data source? So this was trained on the, IFS, operational archive, but we're also trying it on the ERA 5, which is, like, like a reanalysis where it should be more accurate. But Thank you.
1 last question. Do you have, like, 1 key metric which you use to compare the 2 different, models, numerically? Yeah. So The trajectory distance on the time or something? Yeah.
I mean, here, like, just like this just a draft for the demo, but, like, I was just, like, seeing, like, in days in advance the distance between the tracks. And, yeah, like, we can see, like, for the yellow colors and orange colors, it's much better because, like, we're starting it closer to when the storm happened, but, like, once you see after 5, 6, 7 days. Awesome. Thank you very much, Marcia. Alright.
And now