Scouting for better legacy

[Python]    [C++]    [C]    [Open source]    [HPC]    [Git]    [Statistics]        

Technical debt, algorithms and models of uncertainty - oh my! Meet the challenges the Scientific Computing team faces when developing an old friend.  

Since none of the X-Men are currently working in Equinor, we can’t rely on superpowers to know what a reservoir looks like. We leave that to domain experts, data and software like the Ensemble Reservoir Tool (ERT).



“In its simplest form, ERT is about creating a model of a reservoir that lets you reason about the future. Then, after obtaining more information such as production data, you can improve your model based on this new knowledge."

Markus Fanebust Dregi

Portrait of Markus Fanebust Dregi, who works as a software developer in Equinor

Since we can’t know for sure what a reservoir looks like, we use models that represent the various uncertainties. Thanks to ERT, we can represent these uncertainties by creating different models and simulating them all at the same time. This helps us get a better and more precise understanding of how the reservoir behaves. 

“There’s not a case of one model being the right one. Instead, using ERT we can create enough models to represent the uncertainty and probability of your reservoir,” Sondre Sortland explains.

Sondre Sortland working together with a colleague while developing the Ensemble Reservoir Tool
Someone wheeling their chair over to a colleague's desk for a discussion is not an uncommon sight in the Scout team. Here, Sondre and Øystein are in the middle of one!

Markus and Sondre are both part of the Scientific Computing team, Scout among us friends, that’s currently working on modernizing the tool. We’ve had the Ensemble Reservoir Tool available for more than 10 years, and it’s proven to be quite useful all across the board.

But that’s not all - it might be a very useful tool for our renewable energy projects as well. So grab a cup of coffee and get ready to head deeper into the daily workings of ERT and the Scout team.

ERT revamp

Work on updating and developing ERT focuses on three aspects:

  1. Improving the user experience
  2. Developing functionality to better analyze data
  3. Implement new algorithms

The renewable future

The Scout team is currently focusing on improving the general architecture and code quality but they’re also working on creating good API’s that will make ERT easier to use. This increased flexibility will both help our future reservoir modelling, and make it easier to adapt ERT into other domains, Sondre tells us.

Portrait of Sondre Sortland who works as a software developer in Equinor



“ERT could possibly have other areas of use, for example renewable energy. It’s really exciting to help develop something that could give us a competitive advantage in other parts of the company.”

Sondre Sortland

Currently, they have a test project running together with Research & Technology to see if it could be used for wind farms, Markus explains.

“We were quickly able to set up an initial workflow and get a test up and running for them. While we spent more time later cleaning and validating the data, I think it’s a positive sign that we were able to get it up and running so quickly.”

When working with software development in Equinor, video meetings and standups are a staple of the workday

The Scout team are mostly found in Bergen but they also have people working from the Netherlands and Romania.
Lars Petter Øren Hauge during a meeting of the Ensemble Reservoir Tool development team

Scout is a good mix of seasoned developers, like Lars Petter, but they also have graduates as part of the team.

The Scout team are mostly found in Bergen but they also have people working from the Netherlands and Romania.

Scout is a good mix of seasoned developers, like Lars Petter, but they also have graduates as part of the team.

Tackling old debt

Ever since it’s start in 2003, the Ensemble Reservoir Tool has been a success story and helped us be at the forefront of reservoir modelling. But for our developers this success also comes with a challenge, Øystein Olai Heggen tells us.



“We know the direction we want to take, but the challenge is getting there. We have to find a balance between providing new functionality that’s visible to the users and doing upgrades to the machinery.” 

Øystein Olai Heggen

Øystein Olai Heggen works as a software developer in Equinor

Imagine it as walking into a really messy room, filled to the brim with boxes. Even if you know where something is, you might have to move 20 boxes full of stuff to get to it. And if you move something, you might cause something to fall over entirely.

“We’re working with complex algorithms and problems, and a lot of the time there’s no straight-forward way of solving them,” Øystein says.

This messy room can appear quite easily when you don’t have the time or resources to make the proper changes to software. But on top of having to clean the room and make it look inviting for the next one to use it, the Scout team also have to make sure they’re adding new functionality to it. 

Creating a digital arm

Since ERT has this large amount of users, they’re naturally eager to see new features being implemented and added. 

“We get almost instant feedback to the updates we deploy and changes we make. It’s really motivating to keep on working,” Øystein smiles.

Praise isn’t the only thing the large user base can provide however. Their feedback and knowledge of both the tool and domains is a key component to making sure the developers get the job done. After all, they’re the ones who are using ERT and need it to function properly.

“As a developer, some of the most interesting and exciting things I do is to help create an improved digital arm of someone’s workflow. Understanding the problem we want to solve and providing the users with this is really exciting.”

Markus Fanebust Dregi

When we talk about the ERT software, we also have to mention the Fast Model Update (FMU) concept. It’s the basis for what’s letting us create the reservoir models like we do now.  

Fast Model Update 101

A concept to help with automation and integration steps in a reservoir model workflow. Lets us run the whole model chain, from depth conversion to simulation, in batches. Consists of four parts:

Fully automated reservoir model workflows, utilizing a mix of commercial software such as RMS and Eclipse, and custom scripts.

ERT as a workflow manager. Orchestrates realizations and enables multiple versions of the same model to be run, in parallel.

Clusters for running the many parallel jobs.

ERT as a history matching tool. Lets us compare history to current data, do updates, and re-iterate the whole thing.

Learning from new data

And if we’re to believe geologist Per Olav Eide Svendsen, this combination of concept and tools have propelled their workflow forward.

“If you ask me, FMU and ERT have helped create a paradigm shift in the world of reservoir modelling. We’re ahead of the curve and developers are the ones helping us get there."

Per Olav Eide Svendsen

But being a developer and pushing the envelope entails much more than just writing code, Markus explains. 

“We have to understand what it’s all about, what ERT is trying to achieve and then describe this procedure for a computer to process. It’s an incredibly interesting problem to face because of what we might be able to learn from these reservoir models when we process new information,” Markus says.

Øystein Olai Heggen having a discussion with a colleague
Øystein is one of 12 developers working on developing ERT.

Sharing is caring

Scout is a big team with a big task ahead of them, but they’re not set in their ways of who does what. They’ve made a conscious decision to have everyone working on all the different areas and that as many of them as possible know about all the parts.

“This helps provide better quality to the code. If you know about the code from before it’s easier to provide feedback to it and we always have code reviews before anything goes out to production,” Øystein says.

All of ERT is an open source project, freely available on Github. This means they can make use of existing tools to make their job easier.

“The work we do now is creating something that’s less of a monolith. By dividing the code into modules and isolating pieces with clear tasks, we can sometimes substitute our own implementations with existing open-source tools,” Sondre says. 

“This also means we’ll be contributing back to these open source projects with new features or bug fixes,” he adds.

Markus Fanebust Dregi helping out Equinor colleagues working on the Ensemble Reservoir Tool
Team lead Markus during a discussion with Sondre and Øystein in their Bergen office.

Sondre explains that one of the largest challenges they face is improving code quality and making sure that everything works as intended - while at the same time doing large structural changes to the code.  

“There can be hundreds of simulations running across weeks, and it would be terrible if someone’s simulations crashed because of the work we did,” he says.

The move into the clouds should be much easier once they’ve finished restructuring the code. ERT might keep on giving us an advantage in the world of reservoir modelling and even in the world of renewables. 

“The way I see it ERT can help us understand our reservoirs better, help with improving production and even help cut emissions,” Markus says.

“I also think we have an upper hand if we’re able to use our knowledge and technology within renewables,” he adds.

Only time will tell what the future holds. But if you want to stay up to date on anything software-related from Equinor, then remember to subscribe to our newsletter below. Until next time!

People

Portrait of Markus Fanebust Dregi, who works as a software developer in Equinor

Markus Fanebust Dregi

Julius Parulek

Potrait of Zohar Malamant, who works as a software developer in Equinor

Zohar Malamant

Åsmund R. Birkeland

Sondre Sortland

Portrait of Jonas Grønås Drange, who works as a software developer in Equinor

Jonas Grønås Drange

Portrait of Øyvind Eide, who works with software development in Equinor

Øyvind Eide

Portrait of a man

Per Olav Eide Svendsen

Portrait of Øystein Olai Heggen, who works with software development in Equinor

Øystein Olai Heggen

Portrait of Lars Petter Øren Hauge, who works as a software developer in Equinor

Lars Petter Øren Hauge

Portrait of Eivind Smørgrav

Eivind Smørgrav

Morten Bendiksen

Stay in the Loop