The Modeling Lab
Learning objectives
- Build the book's earth in one workbench, section it at a chosen frequency, and say what the section holds at the top of the bed against the coefficient there
- Say why the top of a thin bed reads brighter at a low frequency, from the bed's thickness in time and the Ricker's peak-to-trough time
- Write the section as NumPy, CSV and SEG-Y, say what each costs in bytes, and say what a reader must be told besides the numbers
- Say what the Lab's convolutional section leaves out, and how much more the wave equation costs on the same earth
Everything, in One Place
The earlier parts built the pieces one at a time: the earth models (Section 3.1), the section they make (Section 3.4), the texture of a real rock (Section 9.2) and the files that carry a model away (Section 9.5). The figure puts them in one workbench. The earth is the book's own, the 160 by 120 grid of 5 m cells with a 30 m bed of the standard soft sand, brine, oil or gas, in the standard shale, flat, faulted, in a syncline, pinching out or as a channel. You can lay texture on it, set the peak frequency of the Ricker, and write the earth, its velocity, the section or a single trace as NumPy, CSV or SEG-Y. The figure draws what it writes and reads every file back from its bytes alone, so the size and the error it shows belong to the file and not to a promise. It runs the convolutional model, the cheapest rung of the ladder (Section 0.2), and it computes in your browser.
What the Section Holds
Take the faulted bed of gas sand and a 30 Hz Ricker. The shale is 2.80 km/s and the gas sand 2.34, so the top of the bed has an impedance coefficient of −0.138 and its base +0.138. The section, though, reads −0.142 on trace 60 at the sample nearest the top, 214.3 ms down, and 3 % brighter than the rock. The difference is the base. The bed is 25.6 ms thick in two-way time, the gas sand being slow, where shale of the same thickness would be 21.4 ms, a pushdown of 4.2 ms (Section 5.5). A 30 Hz Ricker takes = 13.0 ms from its peak to its trough, so the bed is nearly twice that, and the base's wavelet, of opposite sign, reaches the top only through its tail: it moves the top by −0.004 and no more.
Lower the frequency and the base comes closer to the top in wavelengths. At 14 Hz the Ricker takes 27.8 ms from peak to trough, longer than the bed, and the base's wavelet falls on the top's trough and adds: the top reads −0.199, 1.44 times its coefficient. The rock has not changed, and the top is brighter. This is the tuning of Section 2.3, here in a section you can write to a file, and it is why an amplitude read off a section is not a reflection coefficient.
The fluid does the rest. The brine sand's coefficient is +0.016, 12 % of the gas sand's −0.138, and on the same colour scale its section is nearly empty. The oil sand's is −0.064. Texture of 10 % rms, the largest the figure lays on, makes the contrast at the top vary from cell to cell: the top on trace 60 reads −0.099 against −0.142 clean, about 30 % weaker.
A File You Can Carry Away
The section holds 160 traces of 451 samples, 72,160 values. At four bytes each that is 288,640 bytes. NumPy adds a 128-byte header and the file is 288,768 bytes. SEG-Y adds 3,600 bytes of file header and 240 on each trace, 42,000 bytes, 12.7 % of the file, and is 330,640 bytes. CSV is text: with five decimals each value takes 8.1 bytes and the file is 585,520. The two binary files return every value to within 7.0e-9, the rounding of a 32-bit float; the CSV to 5.0e-6, half a unit of its last decimal. The decimals matter because the amplitudes are small. The top of the bed, −0.142, written with one decimal is −0.1, about 30 % out; with five it is −0.14200. The figure shows where the top of the bed sits in the file: trace 60, sample 215, byte 125,293, stored in SEG-Y as the four bytes BE 11 67 28 and read back as −0.14200.
A reader needs more than the numbers (Section 9.5). The SEG-Y interval field is defined in microseconds, so a section sampled every millisecond writes 1000 there and a reader that takes the field at its word is right. The earth and its velocity are in depth, and for them the figure writes the 5 m cell in the same field, which is its own convention and not the standard's: those files are 76,928 bytes as NumPy and 118,800 as SEG-Y. The earth is written as its impedance, which is what the convolutional model reads; the velocity is a separate view, because it is what a wave-equation code reads.
What the Lab Leaves Out
The Lab does not pretend to be more than the cheapest engine. A wave-equation code given the same earth reflects from its velocity alone, and the velocity contrast at the top of the gas bed is −0.089 against the impedance coefficient of −0.138, 36 % weaker, because the code does not carry the density (Section 5.6). The coefficient of the section is the one at normal incidence; at 30 degrees the exact P to P coefficient of the gas sand is −0.204, and the brine sand's, +0.016 at normal incidence, has changed sign to −0.021 (Sections 6.3 and 6.4). The section has no multiples, no diffractions, no shear waves and no loss, and Section 6.6 says when that matters.
The cost is the other thing the Lab leaves out. On this earth the acoustic wave equation takes 71.2 million multiply-adds against the convolution's 5.8 million, 12 times as much, and the elastic equation 43 times, because the elastic grid must resolve the slow shear wave. Laid with texture the slowest cell is 1.72 km/s and the fastest 3.76, and the acoustic count grows to 16 times. These are the costs of the kernel's model (Section 0.2), and they are why the Lab stays on the cheap rung. Which rung a question needs is the next section, the Fit-for-Purpose Reference Card (Section 12.2), and carrying the earth to a dedicated runtime is Section 12.3, Python Presets and Scaling Up.
References
- Gardner, G. H. F., Gardner, L. W., & Gregory, A. R. (1974). Formation velocity and density: The diagnostic basics for stratigraphic traps. Geophysics, 39, 770–780.
- Norris, M. W., & Faichney, A. K. (Eds.) (2002). SEG Y rev 1 data exchange format, Release 1.0, May 2002. SEG Technical Standards Committee, Society of Exploration Geophysicists.
- NumPy Developers. numpy.lib.format: binary serialization, format version 1.0 (the documentation of the .npy format in the NumPy package).
- Ricker, N. (1953). The form and laws of propagation of seismic wavelets. Geophysics, 18, 10–40.