← Back to weekly journal

📝 Week 5

July 7, 2026

Updates

I wanted to run my refinery process cost model with a lot more crude oils because I was only using three in the past. I had also been assuming a US Gulf Coast refinery location, but costs vary depending on plant location.

I used deep research to find sources for refinery data, and found that GlobalData has information on refinery locations and capacities (MIT subscribes to it).

Next, I downloaded all available crude assays from BP online (35 crudes), and asked ChatGPT to assess which crudes are most likely used at each refinery. It generated this spreadsheet: refinery_crude_slate_inference_bp_matches.xlsx. I also saved the underlying Deep Research PDF here: Inferred Refinery Crude Slates and BP Assay Matches-2.pdf.

Crude–refinery matching logic

  1. Use refinery type and Nelson Complexity Index to infer crude tolerance.
  2. Adjust target API, sulphur, and acidity by region/country/import basin.
  3. Rank BP assays using API/sulphur/acidity distance plus a geographic/basin preference.

Then I used pi to build a new Python script that runs the refinery process cost model across all these refineries. The script outputs a spreadsheet of the main results (cost of treatment) for each refinery: all_refineries_top_match_treating_costs 2.numbers.

Using Backlog to structure the work

I used Backlog to break this refinery and crude analysis into a clear task plan. That helped me organize the work as a sequence of smaller steps rather than trying to solve the whole problem at once.

Backlog roadmap for refinery–crude analysis
TASK-2 and follow-on tasks
1. Build the data foundation
2.1 Inventory source datasets + define canonical schemas
2.2 Build normalized BP crude master table
2.3 Build normalized refinery master table
2.4 Derive country crude sourcing profiles
2. Build the matching logic
2.5 Define matching config + capability mappings
2.6 Implement refinery-to-BP crude scoring + ranking engine
2.7 Generate canonical v1 Excel workbook
2.8 Validate matches with targeted spot checks
3. Connect to the cost model
2.9 Integrate top crude matches into the downstream refinery model
2.21 Evaluate all top-3 matches per refinery + average downstream costs
Apply location factors, wind electricity prices, and refinery-specific crude slates
4. Expand coverage + visualize results
2.10–2.12 Expand crude coverage and repair sourcing gaps
2.13 Build interactive refinery-to-crude visualization dashboard
2.14–2.20 Improve trade-data logic and add matched-map sections
data setup matching engine cost model integration maps + dashboard

Maps

I also generated interactive maps of refinery locations, BP crude assay origins, and the inferred refinery–crude matches: Global Refineries and Crudes.

This interactive page provides a quick way to visualize where refineries are located, where the BP crude assays come from, and how the refinery–crude matching looks globally. Open Global Refineries and Crudes.