Performance Optimization of Ice Sheet Simulation Models
Information
Författare: Fredrika BrinkBeräknat färdigt: 2023-06
Handledare: Baptiste Vandecrux
Handledares företag/institution: The Geological Survey of Denmark and Greenland (GEUS)
Ämnesgranskare: Elisabeth Larsson
Övrigt: -
Presentation
Presentatör: Fredrika BrinkPresentationstid: 2023-06-01 09:15
Opponent: Siri Nordlander
Abstract
This study aims to examine how simulation models can be performance optimized in Python. Optimized in the sense of executing faster and enabling scaling up with more data. To meet this aim, two models simulating the Greenland ice sheet are studied. The simulation of ice sheets is an important part of glaciology and climate change research. By following an iterative spiral model of code development and evolution with focus on the bottlenecks, it is possible to optimize the most time-consuming code sections. Several iterations of implementing tools and techniques suitable for Python code are performed, such as implementing libraries, changing data structures, and improving code hygiene. Once the models are optimized, the upscaling with a new reanalysis dataset, called CARRA, created from observations and modelled outcomes combined, is studied. The results indicates that the most effective approach of performance optimizing is to implement the Numba library to compile critical code sections to machine code and to parallelize the simulations using Joblib. Depending on the data used and the size and granularity of the simulations, simulations between 1.5 and 3.2 times the speed are gained. When simulating CARRA data, the optimized code still results in faster simulations. However, the outcome demonstrates that differences exist between the ice sheets simulated by the dataset initially used and CARRA data. Even though the reanalysis dataset yields a different glaciological result, the overall changes in the ice sheet are similar to the changes shown in the initial dataset simulations. The reanalysis dataset could possibly be used for getting an overview of what is happening to the ice sheet, but not for making detailed analyses, where exact numbers are needed.