PETROPHYSICS / PYTHON / AI & MACHINE LEARNING

Subsurface data, made usable.

Hi, I'm Andy McDonald and welcome to my corner of the internet.

I'm a petrophysicist and product manager who uses AI to solve real subsurface problems, with a focus on data quality first. Clean data is a luxury, so I spend my time turning messy logs into something usable, trusted, and ready for models and people alike. A lot of the data I work with is noisy or incomplete, so my job is to make sense of it before the machine learning ever gets a look in. I write and share ideas on Python, AI, and working with real data, especially in the subsurface world.

Andy McDonald portrait

Labs

Interactive 3D explainers for subsurface concepts. Change the rock, drill the well, and see what happens.

Pore Lab: a magnified cube of sandstone grains with water and oil in the pore space

Pore Lab

A magnified cube of reservoir sandstone. Change the porosity, grain size, clay and water saturation and watch the grains, water films and oil or gas rebuild in front of you, then slice through it or pull it apart into its bulk volumes.

Open Pore Lab ->
Bore Lab: a 3D earth section with the well drilling through an oil sand beside logs filling in as it drills

Bore Lab

Drill a well and watch its logs being made. Sensors trail the bit, gas and cuttings take time to reach surface, and mud filtrate creeps into the rock as you drill, so you can see why a log depends on when it was run.

Open Bore Lab ->

Selected writing

View all writing

A few selected articles that you may find useful.

Books

Python for Well Log Analysis and Visualisation cover

Python for Well Log Analysis and Visualisation

A combined resource of years of articles and posts for working with well log and petrophysical datasets

  • How to load and work with well log data in Python
  • Visualise well log data with matplotlib, seaborn and plotly
  • Apply machine learning techniques to explore facies and missing data prediction
In progress: drafting Chapter 1

Projects

A small selection of python, petrophysics and machine learning projects that I have worked on over the years.

Python & Petrophysics Notebook Series project image

Python & Petrophysics Notebook Series

Public / Open | Ongoing series of practical notebooks

A series of notebooks showing how I load, QC, analyse, and visualise well log and petrophysical data in Python, using real-world messy datasets rather than perfect examples.

  • Log QC, conditioning, and basic repair
  • Petrophysical calculations and crossplots
  • Visualisation patterns for subsurface data
pythonpetrophysicsnotebooksvisualisation
GitHub ->
SPWLA 2021 Machine Learning Workshop project image

SPWLA 2021 Machine Learning Workshop

Public / SPWLA | SPWLA 2021 workshop (course materials)

Co-instructor workshop materials covering applied ML workflows for well logs, with emphasis on QA/QC, interpretability, and what breaks when real data gets involved.

  • Supervised + unsupervised log workflows
  • Practical QA/QC and outlier handling
  • Hands-on tutorials and examples
machine learningwell logsQA/QCworkshops
GitHub ->
Building Consistent Sand Flags at Regional Scale project image

Building Consistent Sand Flags at Regional Scale

UK Continental Shelf (UKCS) | ~350 wells (regional study)

Standardised QC and sand flagging across a large mixed-vintage dataset to produce comparable sand flags for fairway, reservoir, and seal analysis.

  • Standardised sand flags from logs
  • Gross sand thickness and sand %
  • Coverage checks and gap handling
data qualityregional studiespetrophysicsmapping
Petrophysics & Geomechanics Under Incomplete Log Data project image

Petrophysics & Geomechanics Under Incomplete Log Data

Offshore Indonesia (West Madura) | 10 wells (geomechanics support)

QA/QC, conditioning, and repair of log data to support 1D/3D geomechanical modelling, including synthetic shear where key inputs were missing.

  • Washout/coal identification and conditioning
  • Synthetic shear via regression + neural nets
  • Geomechanical properties and fluid substitution
geomechanicslog repairuncertaintyapplied ML

Field-Scale Gas Reservoir Re-evaluation

UK Continental Shelf (Tyne & Trent) | ~20 wells (pre-FDP review)

Re-interpreted multiple gas intervals across a compartmentalised field, integrating MDT pressure data to support contact interpretation and bypassed pay assessment within dolomitic intervals.

  • Multi-interval interpretation across wells
  • MDT review and pressure gradient analysis
  • Compartmentalised reservoir intervals and FWL determination
gas reservoirspressure datainterpretationfield development
Reservoir Rock Typing Using Unsupervised Methods project image

Reservoir Rock Typing Using Unsupervised Methods

Middle East | 23 wells - TZB & TZG reservoirs

Integrated petrophysics and reservoir rock typing across 23 wells, deriving petrophysical groups from SCAL (MICP) and facies information, then predicting continuous rock types and permeability using self-organising maps.

  • Petrophysical groups from MICP and facies data
  • SOM-based prediction with blind testing per zone
  • Permeability prediction per group and mapping
rock typingunsupervised learningSCAL/MICPpermeabilitypetrophysics