GoCAD Well File

What is a GoCAD Well File?

GoCAD (Geological Object Computer Aided Design) well files are industry-standard data formats used in the oil and gas, mining, and geoscience industries to store and exchange wellbore and borehole data. Developed by the GoCAD consortium and now part of Emerson's Paradigm software suite, these files provide a structured way to represent complex subsurface well information including well trajectories, geological properties, and geophysical measurements.

GoCAD well files are widely used because they efficiently store both spatial information (well path geometry) and associated property data (such as geological logs, geophysical measurements, and petrophysical properties) in a format that can be easily shared between different software applications and organizations.

GoCAD Well File Viewer

Upload and view GoCAD well data files

1
Upload Well Header File
📁
Drop GoCAD well file here
or click to browse (.wl file)

File Structure and Components

A complete GoCAD well dataset consists of three main file types:

1. Header File (.wl)

The .wl file is a plain text file that serves as the master control file for the well. It contains metadata, well trajectory information, and references to external binary data files.

Typical .wl File Structure:

GOCAD Well 1
HEADER {
  name: Well_Name
}
WREF 0 0 0
ZPOSITIVE Depth
ZM_FILE "wellname__zms@@"
ZM_NPTS 3000

STATION 1000.0 0.0 0.0 0.0
STATION 1100.0 5.0 45.0 0.0
...

WELL_CURVE {
  PROPERTY hylogger_data
  PROPERTY_NAME "wellname__curves@@"
  NPTS 3000
  SEEK 0
}

END

2. ZM Catalog File (__zms@@)

The __zms@@ file is a binary file containing measured depth (MD) values along the wellbore. Each entry is a single 32-bit IEEE 754 Float32 in big-endian format, representing a depth measurement in meters.

Important: The ZM file only contains measured depths, not XYZ coordinates. Spatial coordinates are computed on-the-fly from STATION data (inclination and azimuth angles) in the .wl header using the Minimum Curvature algorithm.

ZM File Binary Structure:

Byte 0-3:   First measured depth (float32, big-endian)
Byte 4-7:   Second measured depth (float32, big-endian)
Byte 8-11:  Third measured depth (float32, big-endian)
...
Byte N-N+3: Last measured depth (float32, big-endian)

3. Property Curves File (__curves@@)

The __curves@@ file is a binary file containing property measurements (geological logs, geophysical data, etc.) associated with depth intervals along the well. Data is stored as sequential 32-bit IEEE 754 floating-point numbers in big-endian format.

Curves File Binary Layout:

Property 1:
  Bytes 0 to (N×4-1):     Depth array (N floats)
  Bytes (N×4) to (2N×4-1): Property values (N floats)

Property 2 (if SEEK parameter is defined):
  Bytes (SEEK) to (SEEK+N×4-1):     Depth array (N floats)
  Bytes (SEEK+N×4) to (SEEK+2N×4-1): Property values (N floats)

The SEEK parameter in the .wl header specifies the byte offset where each property's data begins in the curves file. This allows multiple properties to be stored in a single binary file without interfering with each other.

Applications and Use Cases

GoCAD well files are used extensively in various geoscience applications:

Key Parameters and Definitions

STATION Data

The STATION records in the .wl header define the well trajectory using directional drilling survey measurements:

STATION MD INC AZI FLAG

Where:
  MD:   Measured Depth (meters or feet along wellbore)
  INC:  Inclination angle (degrees from vertical, 0°=vertical, 90°=horizontal)
  AZI:  Azimuth angle (degrees clockwise from North, 0°=N, 90°=E, 180°=S, 270°=W)
  FLAG: Status flag (typically 0)

NPTS (Number of Points)

The NPTS parameter specifies the number of data points for a property in the curves file. For example, NPTS 3000 means there are 3000 depth values and 3000 corresponding property values (6000 floats total for that property).

SEEK (Byte Offset)

The SEEK parameter indicates the byte position where a property's data begins in the curves file. SEEK 0 means reading starts at the beginning of the file, while SEEK 24000 means skipping the first 24,000 bytes to reach the next property.

ZM_NPTS (ZM Catalog Size)

ZM_NPTS defines the total number of measured depth entries in the __zms@@ file. This value should match the number of 4-byte float values in the binary ZM file.

Binary Data Format

GoCAD well files use IEEE 754 single-precision (32-bit) floating-point format with big-endian byte order for all binary data:

IEEE 754 Float32 Big-Endian Format:

Byte Order:  [MSB] Byte 0  Byte 1  Byte 2  Byte 3 [LSB]
Bit Layout:  [Sign bit (1)] [Exponent (8 bits)] [Mantissa (23 bits)]
Range:       ±1.18 × 10⁻³⁸ to ±3.40 × 10³⁸
Precision:   ~7 decimal digits
Why Big-Endian? GoCAD was developed on Unix/SPARC systems which use big-endian byte order. This format remains standard for GoCAD files to ensure cross-platform compatibility and backward compatibility with legacy data.

Advantages of GoCAD Well Format

Working with GoCAD Well Files

This web-based viewer provides several features for analyzing GoCAD well files:

Comparison with Other Well Data Formats

GoCAD vs. LAS (Log ASCII Standard)

GoCAD vs. WITSML (Wellsite Information Transfer Standard Markup Language)

Best Practices