Skip to main content

Importing LAS Well Logs

This guide covers importing geophysical well log data in LAS 2.0 (Log ASCII Standard) format into VRGS. Use it whenever you receive wireline or LWD data — gamma ray, resistivity, density, neutron, sonic, image-log channels, etc. — packaged as a .las file from a contractor, public repository, or in-house log database.

Already have a JSON well log?

VRGS continues to accept its native JSON well-log format alongside LAS. The LAS importer produces the same internal structure, so curves imported from either source render and serialize identically.

What is LAS 2.0?

LAS is the industry-standard ASCII interchange format for geophysical well logs, maintained by the Canadian Well Logging Society (CWLS). A LAS 2.0 file is a plain text file organised into named sections, each beginning with a tilde (~):

SectionPurpose
~VVersion + WRAP flag
~WWell information (name, location, KB elevation, depth range, NULL value)
~CCurve definitions (mnemonic, unit, description)
~POptional parameters (mud, bit size, run conditions)
~OFree-form "other" comments
~AASCII data block — depth + one column per curve

A minimal LAS file looks like this:

~V
VERS. 2.0 : CWLS LOG ASCII STANDARD - VERSION 2.0
WRAP. NO : ONE LINE PER DEPTH STEP
~W
STRT.M 1670.0000 : START DEPTH
STOP.M 1672.0000 : STOP DEPTH
STEP.M 1.0000 : STEP
NULL. -999.25 : NULL VALUE
WELL. ANY-WELL-1 : WELL
EKB .M 250.0 : KB ELEVATION
X .M 500000.0 : SURFACE X
Y .M 6000000.0 : SURFACE Y
~C
DEPT.M : DEPTH
GR .API: GAMMA RAY
~A
1670.0000 75.50
1671.0000 -999.25
1672.0000 88.10

VRGS supports LAS 2.0 unwrapped files. Wrapped files (WRAP. YES) and LAS 3.0 files are not supported (see Limitations).

Two ways to import

VRGS offers two entry points depending on whether you are creating new well objects or attaching curves to a well that already exists in the project tree.

1. Batch import — one new well per file

Use this when the LAS files are the source of truth: each file becomes a new Log object in the project tree.

  1. In the Project Group menu, choose Import Sed Logs…
  2. In the file-type filter, select LAS Well Log (*.las).
  3. Multi-select one or more .las files and click Open.
  4. VRGS creates a new log per file, names it from the LAS WELL mnemonic (or the filename if WELL is empty), populates the curves, and renders the 3D log strip alongside the well track.

Each log is registered through the standard object factory, so it appears in the Data Tree under Logs and persists with the project on save.

2. Per-log import — attach curves to an existing log

Use this when you have already created a Log object — for example you imported a deviation survey from a CSV track first, or you want to attach new curves to a re-logged well.

  1. In the Data Tree, right-click the existing log and choose Import → Geophysical Log Tracks…
  2. In the file-type filter, select LAS Well Log (*.las).
  3. Pick the file and click Open.
  4. The log's existing curves and data are replaced by the LAS contents. The log's existing deviation track is preserved (see Deviation handling).

How LAS fields map to VRGS

LAS sourceVRGS destinationNotes
~W WELL / UWILog nameFalls back to the filename (without extension) if absent
~W EKB / KB / EREF / EGLKB OffsetFirst non-zero match wins
~W X / XCOORD / SURFXSurface X (Easting)Skipped if the log already has a deviation track
~W Y / YCOORD / SURFYSurface Y (Northing)Skipped if the log already has a deviation track
~W STRT / STOP / STEPUsed to derive elevation of the log top + validate the data block
~W NULLSentinel value treated as missing dataDefault -999.25 if absent
~C mnemonic / unit / descriptionCurve name / unit / descrOne per curve
~A first columnDepth (assumed measured depth from KB)Drives the deviation interpolation
~A remaining columnsPer-curve sample valuesNULL sentinels become true nulls

After import, each curve also stores min / max calculated from the non-null data — these drive the log-track auto-scaling on the 2D log plot and the colour map of the 3D log strip.

Deviation handling

LAS 2.0 carries no deviation survey — only depth + curve values. VRGS resolves the 3D position of every sample using one of two strategies, chosen automatically:

A. The log already has a deviation track

If the log has 2 or more deviation samples loaded (e.g. you imported a .csv track via Import → Geophysical Log Tracks… before importing the LAS), VRGS preserves that track and interpolates XYZ at each LAS depth along it.

The interpolation:

  1. Sorts the existing track by Z descending (top first).
  2. Converts each LAS depth d to a target elevation z = KB - d (using the LAS file's EKB value).
  3. Linearly interpolates between the two bracketing track samples to place the curve sample.

This is the standard workflow when you have a real deviation survey: import the track first as CSV, then layer LAS curves on top.

B. The log has no track yet

VRGS builds a vertical track from the surface position:

  • Surface X / Y come from the LAS ~W X / Y mnemonics, or (0, 0) if absent. (You can override before import using CLogImporterLAS::SetSurfacePosition — there is no UI for this yet.)
  • Surface Z is EKB − STRT, so the top of the LAS depth range sits at the well head.
  • Each subsequent sample drops by (depth − STRT) metres.

This is suitable for vertical wells and quick-look situations. For deviated or horizontal wells, import the deviation survey first (see strategy A).

Working with imported curves

Once curves are loaded, VRGS treats them identically to JSON-imported curves:

  • The 2D log container (the panel that appears alongside the 3D view) draws each curve in its own track. Use the curve picker to select which mnemonic is the active log.
  • The active curve also drives the 3D log strip — the coloured ribbon that follows the well in the 3D scene, with width and direction controlled in the log's display options.
  • RGB tracks (e.g. R/G/B image log channels) can be assembled from any three numeric curves through the same display options.
  • The full curve set is persisted with the project as BSON inside the log's database row, so re-opening the project requires no re-import.

Round-tripping to JSON

To share a LAS-imported log with another VRGS user (or to inspect it), export it as JSON:

  1. Right-click the log in the Data Tree and choose Export…
  2. Pick JSON Well log (*.json) and save.

The exported JSON is the literal contents of the log's m_DigitalLog["JSONLog"] array — curves, data, deviation — and can be re-imported via Import → Geophysical Log Tracks… with the JSON Well Log filter selected.

Troubleshooting

"WRAP-mode LAS files are not supported"

Your file uses WRAP. YES in ~V, which spreads each depth step across multiple lines. Re-export it as unwrapped from the source software, or use a converter (lasio in Python, the CWLS wrapconv utility, etc.) to flatten before importing.

"LAS file has no ~C section or no curves declared"

The ~C curve-definition section is missing or empty. A valid LAS file must declare at least the depth column. Check that your file is true LAS 2.0 and not a renamed CSV.

"Data row column count does not match curve count"

A line in ~A has a different number of values than the count of ~C mnemonics. This is most often caused by:

  • Embedded tabs or extra whitespace inside a single value.
  • A truncated last line.
  • Hand-edited data with a missing column.

Open the file in a text editor and inspect the failing row.

NULL values appear as the curve minimum

VRGS converts every value matching the ~W NULL sentinel into a true null, which the 2D log container plots as the curve minimum (so the track stays connected). If you see a flat-line at the minimum across an interval, the source file legitimately had -999.25 values (or whatever sentinel the file declared).

The log is in the wrong place in 3D

If you imported the LAS without a prior deviation track and the LAS file's ~W X / Y mnemonics are missing or zero, the log will sit at the project origin. To fix: import the deviation survey separately as CSV via Import → Geophysical Log Tracks…, then re-import the LAS into the same log — the existing track will be preserved and the curves re-aligned.

KB offset looks wrong

VRGS reads EKB, KB, EREF, then EGL in that order, taking the first non-zero match. If your LAS uses a non-standard mnemonic for the KB elevation, the offset will default to 0.0 and the log will be positioned at depth = elevation. Either edit the file to use a standard mnemonic or set the KB offset manually in the log's properties after import.

Limitations

The current importer covers the LAS 2.0 spec as it appears in the vast majority of wireline deliverables. The following are not supported:

  • WRAP mode (WRAP. YES) — multi-line per depth step.
  • LAS 3.0 — the multi-array section model differs significantly and needs a separate parser.
  • Deviation surveys from sidecar files (e.g. .dev, .svy). Workaround: convert to CSV and import as a track first.
  • LAS export — VRGS exports curves only as JSON for now.
  • Coordinate-system reprojection — the X/Y mnemonics are taken at face value in the project CRS. If your LAS uses lat/lon (SLAT/SLON), set the surface position manually before import.
  • ~P parameters — read but not currently surfaced in the UI.

See also