Climate model code is so outdated, MIT starts from scratch
- Reference: 1649869334
- News link: https://www.theregister.co.uk/2022/04/13/climate_mit_fortran/
- Source link:
It's an ambitious project for MIT professors Raffaele Ferrari and Noelle Eckley Selin, who submitted their Bringing Computation to the Climate Challenge [1]proposal as part of MIT's Climate Grand Challenges (CGC). Out of 100 submissions, MIT picked [2]five projects to fund and support, one of which is Ferrari and Selin's.
"The goal of this grand challenge is to provide accurate and actionable scientific information to decision-makers to inform the most effective mitigation and adaptation strategies," the proposal said.
Students can't read model code
Ferrari was part of a group called the Climate Modelling Alliance ( [3]CLiMA ), which formed at Caltech with the Naval Postgraduate School and NASA's JPL in 2018 to modernize climate models. Much of the early work that formed the basis of the CGC project began at that time. You can find CLiMA's code on GitHub [4]here .
CLiMA made the determination that old climate models, many of which were built 50 years ago and coded in Fortran, had to go if there was going to be any progress toward better climate models. Now that he's working at MIT on the CGC project, he's realized that "traditional climate models are in a language [MIT] students can't even read."
[5]
The language that CLiMA chose, and the one being used for the MIT project, is statistical modeling language Julia, which another CLiMA researcher described as a serious challenge "because Julia hadn't been used on such a big science project before."
[6]
[7]
Ferrari said that the Julia gamble played off, leading to the current situation in which the team has built what it describes as a digital twin of the Earth that can simulate global climate conditions. Current models have low resolution: The smallest scale they can operate on is the 100-200 kilometer scale. Small-scale weather processes, like cloud cover, rainfall and sea ice, simply can't be accurately predicted.
[8]America to get world's 'most powerful' AI supercomputer to create the most detailed 3D map of the universe yet
[9]NASA installs a new and improved algorithm to better track near-Earth asteroids
[10]We need a 20MW 20,000-GPU-strong machine-learning supercomputer to build EU's planned digital twin of Earth
[11]ALGOL 60 at 60: The greatest computer language you've never used and grandaddy of the programming family tree
CLiMA's model is able to include small-scale climate elements, which CLiMA scientists say are fundamental to understanding larger processes. Interactions between small and large-scale climates happens constantly, Ferrari [12]said , and their exclusion means far less precision.
Precision on a global scale isn't the end goal, though: "We want to take this large-scale model and create what we call an 'emulator' that is only predicting a set of variables of interest, but it's been trained on the large-scale model," Ferrari said.
Ferrari's emulators would be limited to a small portion of the planet, but because the so-called "digital cousins" are trained on the global model they can understand the ways that large and small climate elements interact.
Climate modeling in your pocket?
The current way that climate models are run is inefficient, Selin [13]points out , because "if you wanted to use output from a global climate model, you usually would have to use output that's designed for general use."
Part of Selin and Ferrari's project would be to democratize access to climate models through the use of emulators and by taking end-user needs into account from the very beginning. Ultimately, the team hopes digital cousins could be run on devices as small as a smartphone, though they admit that's beyond the scope of the current project.
[14]
Digital cousins of small Earth regions, the team said, would save local institutions time and money establishing their own climate models, and their accuracy would enable forecasters to model their region in real-time with a wider range of scenarios.
Ultimately, Ferrari wants the project to create climate models that will be able to predict future events for which data doesn't exist. That opens up another challenge and researchers may need to spend some time on: "A new way of doing machine learning that learns from the data continually coming in and also takes into account the laws of physics and thermodynamics," MIT said. ®
Get our [15]Tech Resources
[1] https://climategrandchallenges.mit.edu/flagship-projects/bringing-computation-to-the-climate-challenge/
[2] https://news.mit.edu/2022/flagship-projects-climate-grand-challenges-0411
[3] https://clima.caltech.edu/
[4] https://github.com/CliMA
[5] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_onprem/hpc&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2YldIExO4CGrh1qCnMSpDpQAAAAQ&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0
[6] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_onprem/hpc&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44YldIExO4CGrh1qCnMSpDpQAAAAQ&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[7] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_onprem/hpc&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33YldIExO4CGrh1qCnMSpDpQAAAAQ&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0
[8] https://www.theregister.com/2021/05/27/most_powerful_ai/
[9] https://www.theregister.com/2021/12/08/nasa_asteroid_algorithm/
[10] https://www.theregister.com/2021/02/26/eu_climate_supercomputer/
[11] https://www.theregister.com/2020/05/15/algol_60_at_60/
[12] https://spectrum.mit.edu/spring-2021/climate-futures/
[13] https://news.mit.edu/2022/computing-our-climate-future-0413
[14] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_onprem/hpc&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44YldIExO4CGrh1qCnMSpDpQAAAAQ&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[15] https://whitepapers.theregister.com/
Re: "Dynamically typed"
It also prevents a lot of optimization - both size and time - which really matters when trying to deal with really large datasets.
Programming Fast Food
If your application cannot kill anybody and does not store anything of much value(say Facebook), then maybe it is justified to use a dynamically typed language.
In automotive, aerospace, trains and medical machinery you better use as much type safety you can get.
https://www.adacore.com/uploads/customers/CaseStudy_Eurofighter.pdf
Apparently, many FORTRAN programs have issues with index errors, according to Sir Tony Hoare. Index errors are considered a typing problem, too.
Static Typing / 2
https://www.adacore.com/papers/ada-and-spark-at-welch-allyn
https://www.adacore.com/papers/case-studies
https://www.adacore.com/industries/automotive
A language they cannot read?
Good grief! I picked up Fortran pretty quickly when I used it for a project. As soon as you know a handful of languages reading and understanding them is no big deal - if the code is well written. You can write nasty code in any language.
So they want to run regional climate models on small devices? Statistical or dynamical models? I mean this is not what people already do, because global climate models just don't have that resolution, especially for longer runs (common era or longer, on a good temporal resolution, not the sped up stuff) - which is a problem, and will remain problematic, because maths tells us it is. And no, this is not new. Although you can do a lot with simple stuff a la Hasselmann ('74? cannot remember)...
I should really check out the project, I feel the article glosses over these details. I'm pretty sure the project leads know more about this than I do, and it will be an interesting read!
Re: A language they cannot read?
Yup. My introduction to computing was a 5 day FORTRAN course of which I missed the first day.
Not being able to read it isn't much of a recommendation.
Re: A language they cannot read?
Part of the problem with existing models is that they are cruft upon cruft to many levels, so starting afresh is a good idea. I too wouldn't use a dynamically typed language that needs to be very optimised to be useful at scale. Since FORTRAN is still used for that type of fast vector program, it still would be a better choice than Julia. Modern FORTRAN now has a lot of goodies from modern language design - a far cry from my one-term course at uni in 1970 based on McCracken's book of that era!
cruft upon cruft to many levels,
OK .. but .. is this the same climate science no -one is allowed to question because it is settled ?
Re: A language they cannot read?
@Joe W “Good grief! I picked up Fortran pretty quickly when I used it for a project. As soon as you know a handful of languages reading and understanding them is no big deal - if the code is well written.”
They are not programmers they will not know a handful of languages. These students are probably postgraduate specialising in a field (climate science) after getting their first science degree. Modelling may only be a small of their postgraduate studies and could be the first time they have to do serious programming. So, unless they worked in Fortran before then it may not be able to pick it up quickly.
My first job out of university was working at a research institute on a government funded project. Everyone on the project except me (just a BSC in Computer and Mapping Science) had a doctorate.
Anyway, one thing I had to do was take computer models (large and small scale) that modelled nitrate concentration in the soil and turn them into modules that the system I was programming could call. Some were in C one was in Pascal and yes there were some in Fortran.
Now while the models worked not that I understood the maths elegant code they were not. The code was poorly structured no comments (who needs comments I know what it is doing said one of his model, coded in Fortran). None of them knew any language other than the one they had programmed in. The reason for this is they come through their science degrees then pick up some coding when they needed it.
Now I expect it is not as bad as that today as that was almost 30 years ago. But they will not be programmers the science they studied was not Computing.
Is ML the answer?
There's probably more historical data lying around on global and local weather than anything else. It sounds as if a generic ML (I won't call it AI) environment should be able to pick it up and predict future trends from past historical data with reasonable accuracy. So, why invent another model?
Alan
Re: Is ML the answer?
ML seems to be pretty good at extracting patterns from data that we dont yet have a clue about. But just cos we dont know what those patterns are doesnt mean they dont predict things more accurately than out current science.
Re: Is ML the answer?
Systematic meteorological record keeping isn't that old historically and the oldest records aren't that well distributed geographically. Some of the best records are from the UK which has notoriously changeable weather which must make them a tad noisy. The coverage of proxies such as tree rings and varves will be better.
Reinventing the square wheel
I dont know for certain but I'd imagine 43 year old BLAS and other fortran libraries that will do the heavy lifting are not replaced with Julia ones that wont be as fast as the Fortran ones which have been optimised for SIMD and other modern GPU speedups for, well generations. I doubt even the most experienced Julia group have the faintest idea how to match that.
Re: Reinventing the square wheel
Telling that Juia was built specifically to be able to easily call Fortran (and C) libraries.
Re: Reinventing the square wheel
I think there's a bit too much negativity about the Julia ecosystem here.
Both Fortran and Julia are LLVM under the covers. And Gnu Fortran is competitive to the LLVM kind.
But when running very large models using large clusters of speedy machines (400Gb Ethernet between nodes, for example) a lot of the problem is not CPU speed but managing to overlap CPU and IO and networking all at the same time. Otherwise one of those becomes the bottleneck and you can't easily make the calculation run faster.
Julia allows a computational software architecture that readily provides a lot of overlap. And it has some flexibility in how it is applied or tuned. Unlike the Fortran case.
Plus, a rewrite is a good career move.
students can't learn Fortran ?
students can't learn Fortran ?
... what do they do to them at the university these days ? lobotomy ?
I know python is bad but not that bad
Re: students can't learn Fortran ?
Probably more that they don't want to learn Fortran, and they think they'll get more of the best and brightest involved in climate modeling if they they use a more modern language.
Re: students can't learn Fortran ?
Yeah, but Julia?
Has anybody followed the money?
Re: students can't learn Fortran ?
Not being able to learn a simple language like FORTRAN doesn't sound like the best and brightest. Maybe that was one of those throw-away lines said without thinking and intended to diss the language.
Re: students can't learn Fortran ?
The students will be busy learning Julia and getting it working to model the climate model, so it's going to be a while before we get to start verifying that the new code replicates the original climate model. However that will be a very good experience for the students and will probably make them very good coders - it will be a good lesson:
println ("hello whirled")
But a FORTRAN programmer would just be writing the original code in Julia, FORTRAN programmers can write FORTRAN programs in any language - that's a traditional joke but the reality is that creating accurate and functional code is determined by the writer, not the language.
Julia? Really? I thought Uni was to help prep kids for the rest of their lives?
"he's realized that "traditional climate models are in a language [MIT] students can't even read.""
So basically, instead of teaching the kids Fortran (which is hardly dificult), they are going to throw out 50+ years of climate modeling, redo it all from scratch, and instead teach the kids Julia?
That makes zero sense. At least with Fortran, once they realize there is no money in climate modeling research, the poor kids will be able to get a job at the financial institution of their choice, and at a very high rate of pay. Julia? Not so much ...
The current model isn't good enough so they're going to train the now one on the results of the old. Why?
Because they've finally trained the old to provide the results they are looking for would be my guess ... can't have the new upsetting the apple cart, now can we? Might lose their funding.
Yes, as a matter of fact, I do find it sad that I have such a dim view of academia.
I mean sure, rebuilt your model however you want. However, if you pick a language like Julia then the only people who can tinker on it are both Climatologists AND Julia users. This may limit your pool. For now.
links
other link: https://news.mit.edu/2022/computing-our-climate-future-0413 "April 13, 2022"
Computing our climate future
To put global climate modeling at the fingertips of local decision-makers, some scientists think it’s time to rethink the system from scratch.
--------------------
as I see this is the github repo: https://github.com/CliMA
website: https://clima.caltech.edu/
https://clima.caltech.edu/publications/
"Dynamically typed"
That feels like a monumentally bad idea.
If you are in such a hurry that having a compiler bothering you when you get your types mixed up impedes your "progress", then you must be doing something wrong.