Loading...
Loading...
Subsurface well data analysis toolkit for loading, processing, and analyzing well logs, projects, and formation tops. Built on lasio with enhanced curve processing. Use when Claude needs to: (1) Load wells from LAS files with metadata, (2) Work with multi-well Projects, (3) Process curves (despike, smooth, resample, normalize), (4) Manage formation tops, (5) Export well data to DataFrame/LAS/CSV, (6) Perform cross-well analysis and QC.
npx skill4agent add steadfastasart/geoscience-skills wellyfrom welly import Well, Project
# Load single well
w = Well.from_las('well.las')
# Access data
df = w.df() # DataFrame
gr = w.data['GR'] # Curve object
values = gr.values # numpy array
depth = gr.basis # depth array
# Well info
print(w.name, w.uwi)
print(w.data.keys()) # Available curves
# Load multiple wells
p = Project.from_las('wells/*.las')
for well in p:
print(well.name)| Class | Purpose |
|---|---|
| Single well with curves, location, tops |
| Collection of wells for multi-well workflows |
| Log curve with depth basis, units, and processing methods |
gr = w.data['GR']
print(gr.mnemonic, gr.units) # Metadata
print(gr.start, gr.stop, gr.step) # Depth rangegr = w.data['GR']
# Clean and filter
gr_clean = gr.despike(window=5, z=2)
gr_smooth = gr.smooth(window=11)
# Transform
gr_norm = gr.normalize() # 0-1 range
gr_resampled = gr.resample(step=0.5)
gr_clipped = gr.clip(top=1500, bottom=2000)w.tops = {
'TopFormationA': 1500.0,
'TopFormationB': 1750.0,
}
for name, depth in w.tops.items():
print(f"{name}: {depth} m")from welly import Project
p = Project.from_las('wells/*.las')
print(f"Loaded {len(p)} wells")
# Filter and analyze
for w in p:
if 'GR' in w.data:
print(f"{w.name}: GR mean={w.data['GR'].values.mean():.1f}")# To DataFrame
df = w.df()
# To LAS file
w.to_las('output.las')
# To CSV
df.to_csv('well_data.csv')| Mnemonic | Description | Units |
|---|---|---|
| GR | Gamma Ray | GAPI |
| NPHI | Neutron Porosity | v/v |
| RHOB | Bulk Density | g/cc |
| DT | Sonic | us/ft |
| RT/ILD | Deep Resistivity | ohm.m |
| CALI | Caliper | in |
curve.despike()curve.resample()| Tool | Best For |
|---|---|
| welly | Multi-well projects, curve processing, formation tops management |
| lasio | Low-level LAS file I/O, header manipulation, malformed files |
| petropy | Petrophysical calculations (Vsh, porosity, Sw, permeability) |
- [ ] Load wells with `Project.from_las('wells/*.las')`
- [ ] Check well count and names: `len(p)`, iterate wells
- [ ] Verify required curves exist in each well (`'GR' in w.data`)
- [ ] Despike and clean noisy curves: `curve.despike()`
- [ ] Resample to common depth basis for cross-well comparison
- [ ] Compute summary statistics per well (mean, min, max)
- [ ] Export cleaned data to LAS or DataFrame