Reconstructing past ocean physical properties

During the summer holiday, I took part in a research placement with Dr Pallavi Anand in the School of Environment, Earth and Ecosystem Sciences at the Open University, organised by the Nuffield Foundation. The placement involved coding a MATLAB toolkit to a more accessible program such as Python that would use paleoclimate data to solve for past seawater temperature, oxygen isotope and salinity.

The actual MATLAB code was split into 3 parts:

  • A system of equations
  • Monte Carlo Simulator
  • Display function

I hadn’t really tackled any big coding projects like this. Definitely not the one specifically made for application purpose outlined in the project: reconstructing past ocean physical properties. It was a challenge to even be aware about where to start. Thankfully, I am a computer science student, and had prior experience working with Python.

The system of equations wasn’t necessarily too complex. A large portion of my work was understanding those functions machines from early maths classes in primary school; it had to be clear what sort of information was going in and what sort of information was coming out. This way the worked solutions would not get muddled up and the wrong number could be entered for a completely different data set.

By far the hardest part of the program was understanding not only what Monte Carlo simulations are but also how exactly to apply them to the problem. The simple explanation even seems contradictory – applying random sampling to deterministic functions (functions that produce the same output for a given input i.e. there is no randomness within the function). This really did take the better part of a few days and even then, it was still very difficult. However, after trying my hardest to digest the information, I was finally able to produce a simulator that functioned properly.

The display function is drawn with the matplotlib module of python. Three subplots were made, example shown below : from the top Mg/Ca variability, Mg/Ca-Temperature and reconstructed Salinity.

Overall, it was fun to try and tackle this problem. I learnt a lot of skills that I had never even knew existed, and although some parts were challenging, they were very rewarding to crack. This framework would further benefit from better outputs and statistical constraints that give a more conclusive view on the processed data.

Pallavi said, “it was lovely to work with Ibsa on this project where he was able to build a framework for converting PSU Solver (MATLAB) toolkit on Python. This project is part of an ongoing international project to serve the community with accessible toolkit. Ibsa’s effort will be taken further to make an open access toolkit for palaeo seawater temperature and salinity reconstructions”.