Better HN
topnewbestaskshowjobs
Log inSign up

counters

662 karma · joined Aug 30, 2020 (6y ago) · 256 submissions

Submissions

comment 2y ago · link · parent

Just write your code in JAX and run as usual?

comment 3y ago · link · parent

The recent "Neural General Circulation Models" pre-print [1] from Google Research indicates that the team built a spectral dycore from scratch using JAX; in Appendix A they note that it comes in at just over 20,000 lines of code! This model isn't quite "production grade" from the perspective of NWP (lacks microphysics and therefore any prognostic precipitation in the forecast), but it's the only project I can think of that has rapidly produced such a atmospheric model "from scratch" with a high degree of engineering rigor.

[1]: https://arxiv.org/abs/2311.07222

comment 3y ago · link · parent

My understanding is that they just use an AI-based precipitation nowcast (see [1]). Very different forecast/modeling problem than GraphCast.

[1]: https://arxiv.org/abs/1905.09932

comment 3y ago · link · parent

Pragmatically speaking, it doesn't really matter if one is better than the other, at least until there is a massive jump in forecast quality (e.g. advancing the Day 5 accuracy up to Day 3). In the real world, we would never take raw model guidance from _any_ source - the best forecasts invariably come from consensus systems that look across many different models. So it's good to have a diverse lineage of forecasting systems, as uncorrelated errors boost the performance of these consensus systems.

comment 3y ago · link · parent

At that point you're slipping into Laplace's Demon.

In practical terms, we see predictability horizons get _shorter_ when we increase observation density and spatial resolution of our models, because more, small errors from slightly imperfect observations and models still cascade to larger scales.

comment 3y ago · link · parent

Weather models are routinely run at resolutions as fine as 1-3 km - fine enough that we do not parameterize things like convection and allow the model to resolve these motions on its native grid. We typically do this over limited areas (e.g. domain the size of a continent), but plenty of groups have such simulations globally. It's just not practical (cost for compute and resulting data) to do this regularly, and it offers little by way of direct improvement in forecast quality.

Furthermore, we don't have to necessarily measure the whole atmosphere in 3D; physical constraints arising from Navier-Stokes still apply, and we use them in conjunction with the data we _do_ have to estimate a full 3D atmospheric state complete with uncertainties.

comment 3y ago · link · parent

GraphCast does predict rainfall - see https://charts.ecmwf.int/products/graphcast_medium-rain-acc?... for example.

comment 3y ago · link · parent

Yes, this is effectively what 4DVar data assimilation is [1]. But it's very, very expensive to continually run new forecasts with re-assimilated state estimates. Actually, one of the _biggest_ impacts that models like GraphCast might have is providing a way to do exactly this - rapidly re-running the forecast in response to updated initial conditions. By tracking changes in the model evolution over subsequent re-initializations like this, one could might be able to better quantify expected forecast uncertainty, even moreso than just by running large ensembles.

Expect lots of R&D in this area over the next two years...

[1]: https://www.ecmwf.int/en/about/media-centre/news/2022/25-yea...

comment 3y ago · link · parent

They're more-or-less the same thing.

comment 3y ago · link · parent

What you're describing is effectively how climate models work; we run a physical model which solves the equations that govern how the atmosphere works out forward in time for very long time integrations. You get "daily weather" out as far as you choose to run the model.

But this isn't a "weather forecast." Weather forecasting is an initial value problem - you care a great deal about how the weather will evolve from the current atmospheric conditions. Precisely because weather is a result of what happens in this complex, 3D fluid atmosphere surrounding the Earth, it happens that small changes in those initial conditions can have a very big impact on the forecast on relatively short time-periods - as little as 6-12 hours. Small perturbations grow into larger ones and feedback across spatial scales. Ultimately, by day ~3-7, you wind up with a very different atmospheric state than what you'd have if you undid those small changes in the initial conditions.

This is the essence of what "chaos" means in the context of weather prediction; we can't perfectly know the initial conditions we feed into the model, so over some relatively short time, the "model world" will start to look very different than the "real world." Even if we had perfect models - capable of representing all the physics in the atmosphere - we'd still have this issue as long as we had to imperfectly sample the atmosphere for our initial conditions.

So weather isn't inherently "unpredictable." And in fact, by running lots of weather models simultaneously with slightly perturbed initial conditions, we can suss out this uncertainty and improve our estimate of the forecast weather. In fact, this is what's so exciting to meteorologists about the new AI models - they're so much cheaper to run that we can much more effectively explore this uncertainty in initial conditions, which will indirectly lead to improved forecasts.

comment 3y ago · link · parent

You can try, but other models in this class have struggled when initialized using model states pulled from other analysis systems.

ECMWF publishes a tool that can help bootstrap simple inference runs with different AI models [1] (they have plugins for several). You could write a tool that re-maps a GDAS analysis to "look like" ERA-5 or IFS analysis, and then try feeding it into GraphCast. But YMMV if the integration is stable or not - models like PanguWx do not work off-the-shelf with this approach.

[1]: https://github.com/ecmwf-lab/ai-models

comment 3y ago · link · parent

Well, what is "real weather data?"

We have dozens of complementary and contradictory sources of weather information. Different types of satellites measuring EM radiation in different bands, weather stations, terrestrial weather radars, buoys, weather balloons... it's a massive hodge-podge of different systems measuring different things in an uncoordinated fashion.

Today, it's not really practical to assemble that data and directly feed it into an AI system. So the state-of-the-art in AI weather forecasting involves using an intermediate representation - "reanalysis" datasets which apply a sophisticated physics based weather model to assimilate all of these data sets into a single, self-consistent 3D and time-varying record of the state of the atmosphere. This data is the unsung hero of the weather revolution - just as the WMO's coordinated synoptic time observations for weather balloons catalyzed effective early numerical weather prediction in the 50's and 60's, accessible re-analysis data - and the computational tools and platforms to actually work with these peta-scale datasets - has catalyzed the advent of "pure AI" weather forecasting systems.

comment 3y ago · link · parent

Absolutely - but large ensembles are just the tip of the iceberg. Why bother producing an ensemble when you could just output the posterior distribution of many forecast predictands on a dense grid? One could generate the entire ensemble-derived probabilities from a single forward model run.

Another very cool application could incorporate generative modeling. Inject a bit of uncertainty in a some observations and study how the manifold of forecast outputs changes... ultimately, you could tackle things like studying the sensitivity of forecast uncertainty for, say, a tropical cyclone or nor'easter relative to targeted observations. Imagine a tool where you could optimize where a Global Hawk should drop rawindsondes over the Pacific Ocean to maximally decrease forecast uncertainty for a big winter storm impacting New England...

We may not be able to engineer the weather anytime soon, but in the next few years we may have a new type of crystal ball for anticipating its nuances with far more fidelity than ever before.

comment 3y ago · link · parent

It's worth pointing out that "state of the weather" is a little bit hand-wavy. The GraphCast model requires a fully-assimilated 3D atmospheric state - which means you still need to run a full-complexity numerical weather prediction system with a massive amount of inputs to actually get to the starting line for using this forecast tool.

Initializing directly from, say, geostationary and LEO satellite data with complementary surface station observations - skipping the assimilation step entirely - is clearly where this revolution is headed, but it's very important to explicitly note that we're not there yet (even in a research capacity).

comment 3y ago · link · parent

It doesn't seem like MetNet outputs a complete 3D atmospheric state, just specific (and mostly surface-level) forecast predictands [1]. The analysis you're describing could be done with a traditional numerical weather prediction and data assimilation system (especially if that system implements 4DVar, since you'll already have the model adjoint available - well, technically the tangent linear, but still applicable here).

[1]: https://arxiv.org/pdf/2306.06079.pdf

comment 3y ago · link · parent

Windy visualizations raw or direct outputs from the weather forecast models run by agencies in the USA and Europe. These models are the "bread and butter" of operational weather forecasting, and are the baseline in accuracy for all weather forecasts generally.

That being said, you shouldn't treat these outputs as gospel. All these models will get the big picture correct, but they have limitations with respect to spatial resolution. So if you click on the Windy map and look at your local forecast, take it with a grain of salt - the model doesn't resolve down to the scale of your backyard. The status quo is for companies or agencies to use statistics or ML to "correct" the forecast against local observations, which dramatically improves the accuracy of forecasts like, "What will tomorrow's max temperature be" or, "what is the probability it will rain this evening?"

comment 3y ago · link · parent

In practice this is happening in many disciplines, for most research, on a daily basis. What _isn't_ happening is that the results of these replications are being independently peer reviewed, because that isn't incentivized. However, when replication fails for whatever reason, it usually leads to insights that themselves lead to stronger scientific work and better publications later on.

comment 3y ago · link · parent

The problem in this world of AI/weather is that "accuracy" is an extremely fuzzy concept. The leading pack of AI-NWP models (NVIDIA's FourCastNet, DeepMind's Graphcast, Huawei PanguWeather), when compared on an apples-to-apples basis with the leading pack of traditional NWP systems (NOAA GFS and ECMWF HRES) have similar accuracy metrics. But here, "accuracy" is an esoteric term that is far removed from how an end user would perceive how "good" any of these given models are at predicting tomorrow's afternoon high temperature at their house.

In the world of meteorology, the way you build an "accurate" (e.g. "user-perceived accuracy") forecast is to consume the entire previous class of forecasts and apply statistics/ML to post-process them. The greater your ability to probe uncertain in the forecasts from these models - e.g. by running larger ensembles or tailoring the ones you run to try to quantify the uncertainty more explicitly - the better your opportunity to improve those 'accuracy" metrics. So yes - the opportunity here is running larger sets of tailored forecast simulations as a way to statistically optimize forecast accuracy.

comment 3y ago · link · parent

> I've heard about AI machine learning forecasts for 10+ years now, waiting for one of them to be actually used in industry...

The problem is that they offer little to no advantage over the highly optimized ML-based forecast post-processing systems widely in use in the industry. You see an awful lot of hype from start-ups proclaiming their AI forecasts are "the most accurate ever"... when in reality they barely improve at all over the status quo that can be achieved with rather simple statistical modeling.

comment 3y ago · link · parent

ML/AI has been used in the weather forecasting world since the 1970's - most often to post-process forecast model output to better calibrate it against observations and correct for biases.

> One would think this would be one of the first areas that would adopt AI given the data available.

Actually, the challenge has been that there _isn't_ enough data available. Sure, we have lots of satellite observations and many other sources, but none of these paint a holistic picture of the atmosphere of the sort you'd need to actually forecast the weather with any precision. ERA-5 - a model-based "re-analysis" that assimilates many observations and tries to create a coherent picture - is only a few years old, and has been the keystone that unlocked all of this development over the past few years.

comment 3y ago · link · parent

It's specifically referring to these forecast models having accuracy about on par with the state-of-the-science global numerical weather forecast models. "Accuracy" here specifically means esoteric metrics like the "500mb anomaly correlation coefficient" (basically a summary statistic that tells you how well the 3D atmosphere fields predicted by the model match what we observe later on).

This entire class of global numerical weather forecast models has had more-or-less a monotonic increase in forecast accuracy over the past five decades. E.g., a 72 hour forecast from the current generation of these models has similar error statistics to a 24 hour forecast from its predecessors in the early 2000's.

What's special about these AI forecast models is that they are significantly cheaper to run than the existing global numerical weather forecast models. Modern meteorology involves a great deal of statistical analysis to overcome chaotic uncertainty. One way we build these statistical analyses is to run dozens of forecasts with the same model, using slightly different initial conditions, to see how the forecasts diverge. But these ensembles are very under-disperse - a few dozen members just doesn't fully sample the uncertainty. Now, if you can run 1000x the number of ensemble members, a whole new world of possibility opens up.

And that's before you consider just training the AI system to directly output a posterior distribution representing this uncertainty in the first place...

comment 3y ago · link · parent

lol I've suffered under that before... except it was an ex-Googler forcing bazel on us, all of a 10 person dev team working on a codebase that was probably less than 15,000 LOC across three or four packages that just _had_ to be packaged into a monorepo.

comment 3y ago · link · parent

> Ultimately, why not simply compute it and give the user a warning that the local measurement isn't compatible with proper AQI measurement?

You totally could, but in practice it doesn't always or obviously lead to a positive user experience our outcome.

comment 3y ago · link · parent

Probably the two most common and simplest are Barnes and Cressman interpolation (see [1] for a modern implementation of Barnes), which use inverse distance weighting to combine observations within a neighborhood. An improvement to these techniques frequently used to grid statistical weather forecasts is the BCDG method (see [2]).

The core idea of any objective analysis/interpolation scheme is that you model spatial relationships with some sort of function. Kriging exemplifies this - you fit a spatial covariance model and use that to predict values in the far field, using combinations of nearby values. I don't really have a good link or textbook reference at arms reach, but you can quickly re-frame this entire interpolation problem as a data assimilation one where you're attempting to approximate a solution to some 2D or 3D field using sparsely sampled observations; in the weather world, the Real-time Mesoscale Analysis used in the USA is a good example of a system which hybridizes a weather model and observations to create a high-resolution analysis [3].

A problem arises when the field you're analyzing can have shocks or variability much smaller than the scale that you're able to measure from your network. A front is a great example - across a front, temperature and wind direction will change over a very small distance, but most interpolation schemes will smear this out. The problem is that you really do care about that front and its location - that's where the interesting weather happens!

> And where does someone get high-resolution priors from?

A high-resolution weather forecast model, which uses physics to simulate the atmosphere and produce reference states. 3-km forecasts are readily and easily available in the US.

> Are you saying that companies have gone out and done a one-time mapping of temperature etc. at a e.g. 1-mile grid across the US?

No, this probably wouldn't be useful. Especially because we get a ~1-km mapping of lower troposphere temperatures from geostationary weather satellites every 10-15 minutes across the entire globe. May not be exactly "surface temperature", but it tells you a whole lot about high-frequency variability in temperature fields.

[1]: https://gmd.copernicus.org/preprints/gmd-2022-116/gmd-2022-1... [2]: https://journals.ametsoc.org/view/journals/wefo/24/2/2008waf... [3]: https://journals.ametsoc.org/view/journals/wefo/26/5/waf-d-1...

comment 3y ago · link · parent

Well, the underlying data might not actually be the same.

One country may lump in PM10 into their AQI, so if there is a dust storm or similar event, the AQI could spike. Other countries may only include PM2.5 or not include PM at all, which wouldn't capture the dust storm.

comment 3y ago · link · parent

The problem here is twofold.

First, many countries have their own laws and policies regarding air quality exposure. Often times these regulations use metrics about time-average exposure (e.g. the annual average 8-hr maximum ozone concentration) and can't trivially be converted between agencies. It causes very negative user experiences when your air quality summary disagrees with what a regulatory agency is putting out to the public due to a measurement technicality - much easier just to localize the data in the same way you'd localize the rest of the UI.

Second, we're stuck with AQI and similar indices because air quality is a multi-faceted problem with different components measured wildly differently. For instance, PM2.5 and PM10 are typically reported in ug/m^3 - but who actually knows what these measurements mean? What's the difference between 15 and 30 ug/m^3? It's very far outside of the experiences that many individuals have, so end users really struggle to interpret these values, even when you translate them into simple "low"/"medium"/"high" categories. Then of course gas-phase pollutants are typically reported in volume concentrations like parts-per-billion or parts-per-million. Aside from the fact that these values are very commonly misinterpreted as much smaller than they actually are, the difference in units adds another bit of complexity into users interpreting what they're seeing.

A well-designed air quality index could factor our all these challenges. I definitely h/t Breezometer for their attempts there, even if it is generally poorly received. But it's a very challenging problem no matter how you slice it.

comment 3y ago · link · parent

Eh, kriging is overkill relative to the skill you end up with since fine-grain spatial variability in weather can arise from a lot more than the static factors you can pull into such a scheme. This is why objective analysis techniques are typically preferred.

More importantly, high-resolution priors are universally available from weather models, so there is no need to just to ever naively interpolate between weather observation stations very far apart.

One of the reasons that consumer weather apps perform poorly is because in many cases, the companies producing them arbitrarily choose some sort of spatial or temporal resolution requirements, and then throw the problem to an engineer or data scientist who probably doesn't know much more than these simple interpolation techniques (and I absolutely lump kriging into the 'simple' category these days). A modicum of domain knowledge applied here produces a much better product with substantially less effort.

comment 3y ago · link · parent

Hey, all the thanks go to you! I really wish we could do more to reward contributions like this when they're coming from folks in the academic world... the impact of this work is easily on par with anything else you could do as a junior faculty.

Have you considered setting up a regular search on GitHub to try to find public codebases that are likely using your library? That might be a great complementary set of statistics that you can use to promote the impact of this work.

comment 3y ago · link · parent

Yeah, I agree 100% - I really support the approach of the developer here and am totally aligned with all the reasoning.

The libprima/prima codebase is very readable, even if you're not accustomed to modern Fortran (let alone Fortran period). It has fantastic comments throughout the numerical algorithms, and even though there are a lot of lines of code, in most places it really seems to be a minimally-complex implementation with very little magic. I haven't built anything against the codebase yet but based on the examples I feel it will be far easier than many other libraries out there.

A motivated developer could very quickly port this code to their preferred numerical programming language.

comment 3y ago · link · parent

No, all you need to do is memorize enough vocabulary and have enough chances to get lucky on occasion. You can have better odds if you learn the conditional probability of that vocabulary given surrounding words.

And this is all that GPT is doing.

1
56789