Methods
Illustrative, not for reserves reporting or investment decisions
Everything on this site is built from public regulator files that you download yourself. This page says exactly which files, how we clean them, and how the decline curve works, so you can check or reproduce any number. The code is open: github.com/Jay-Kimani/TidyWells.
Data sources
| Province | Files we read | Where from |
|---|---|---|
| Alberta | Well Licence, Well Infrastructure, Conventional Volumetrics (monthly) | Petrinex public data. Volumetrics cover the current production year plus the previous four. |
| Saskatchewan | Well Licence, Well Infrastructure, Conventional Volumetrics (monthly) | Petrinex public data, same layout as Alberta. |
| British Columbia | Production Data (zone_prd), Well Index | BC Energy Regulator data centre. |
We do not host or redistribute any of these files. The tools run on files you load yourself, and the web tool never uploads them. Published analysis contains only our own aggregate results. Petrinex's terms permit non-commercial use with Crown copyright acknowledged and require consent for commercial use. BC's site terms ask for written permission before reproducing material. We summarise these terms in good faith; this is not legal advice, so check the terms yourself before reusing any data.
Units and rates
- Liquids are in cubic metres (m³) and gas in thousands of cubic metres (10³m³), as the regulators report them. We convert to barrels (×6.28981) and thousand cubic feet (×35.3147) for rates.
- Rates are volume per day. For Alberta and Saskatchewan we divide a month's volume by the calendar days in the month. For BC we divide by the producing days the regulator reports, which is more accurate for wells that were shut in part of the month.
Cleaning rules
- All identifiers are read as text, so leading zeros survive (a spreadsheet will silently drop them).
- Alberta and Saskatchewan well IDs link production to the Well Infrastructure file, which links to a licence number and then to the licensee. BC wells link by their UWI to the Well Index. The BC Well Index has no operator names.
- Licence numbers are zero-padded to seven characters. Licence status spellings are normalised (for example "ISSUED" and "Issued").
- The source files repeat some well IDs and licence numbers. We keep the row with the latest status date.
- The loader drops volume rows with masked IDs ("***") because they cannot be tied to a well; none were present in the Alberta or Saskatchewan files we used.
- BC production is reported by well and zone; we sum zones into one row per well and month.
- Only well-level production rows are used. Facility-level and injection or disposal rows are excluded.
Decline curve
- Model. Arps hyperbolic decline: q = qi / (1 + b·Di·t)1/b, where qi is the starting rate, Di the nominal annual decline and b controls how fast the decline slows. b = 0 is exponential decline.
- Fit. Least squares on the logarithm of the rate, starting at each well's highest month (ignoring ramp-up). b is searched on a grid from 0 to 2, and Di from 1% to 1,000% per year. Zero, negative and missing months are skipped. At least six usable points are required.
- Warnings. The fit warns when there are fewer than 12 points, when b hits its upper limit, when many different b values fit about equally well, when the rate is higher at the end than at the peak, or when the fit is poor. b is often poorly determined from production data alone, so we recommend comparing forecast volumes rather than b.
- Forecast. Hyperbolic decline until the instantaneous decline falls to a terminal rate (default 8% per year), then exponential. The web tool starts the forecast at the end of your data.
- Economics. Pre-tax and pre-royalty: volume × (price − variable cost), minus fixed costs, discounted monthly at the rate you enter. You supply prices and costs; we do not.
How we tested it
We fit wells on their first 45 months and predicted the next 12 for up to 500 random wells per group that produced in at least 50 of 57 months (January 2022 to September 2026). See the backtest write-up for results. The script is posts/backtest.py. The Python and browser fits are checked against each other by an automated test, and the loaders are tested on small made-up files.
Known limits
- Petrinex public volumetrics exclude oil sands, waste plants and some facility types, and hide confidential wells.
- Well volumes may be allocated from a battery rather than metered individually; we do not separate the two.
- The backtest only covers wells that kept producing; real accuracy across all wells would be lower.
- Alberta “oil” in the public volumetrics includes crude bitumen from wells licensed for it (about three quarters of the volume in the last 12 months); our Alberta oil figures mix the two. See Most licensed wells aren't producing.
- No well-level costs, royalties or taxes are modelled, and the tools are not a substitute for a reserves evaluation.
Use it in Python
Not on PyPI yet. From a copy of the repository, run pip install ., then:
import tidywells as tw
vol = tw.read_volumetrics("path/to/folder", province="AB")
infra = tw.read_well_infrastructure("Well Infrastructure-AB.csv.zip")
lic = tw.read_well_licence("Well Licence-AB.csv.zip")
wells = tw.join_wells(vol, infra, lic)
s = tw.monthly_series(vol, well_id, "OIL") # m3 per day, one value per month
t = [i / 12 for i in range(len(s))] # time in years
fit = tw.fit_arps(t, s.values * 6.28981) # bbl/d; returns qi, di, b, warnings