Creating a Test Dataset

This short tutorial makes use of a resqpy test function to generate a small dataset which can be used in other tutorials. Creating a RESQML dataset from scratch is significantly more complicated than reading an existing dataset and will be covered in later tutorials.

Importing from a test module

Test modules can be acquired by cloning/downloading from the repository.

For the following import to work, the resqpy code will need to have high priority in the environmental PATH. This can be achieved with something like:

import sys
sys.path.insert(0, '/path/to/your/resqml')

The test modules included in the resqpy repository are primarily for automated testing to help ensure that code changes don’t break existing functionality. However, some of the modules can also be used to generate small test datasets for use in these tutorials, for example:

from tests.test_s_bend import test_s_bend_fn

If that import fails, you might need to track down the module and copy it into your working directory, and then try:

from test_s_bend import test_s_bend_fn

Alternatively, try modifying the PYTHONPATH environment variable prior to running your Python script so that one of those two formulations works.

Creating the S-bend dataset

Having imported the function, the S-bend dataset can be generated with:


You can substitute whatever path or filename you like, but you should use the extension .epc This file will be created, along with a paired hdf5 format file with the same name, but extension .h5

(The function generates a few warning messages, which might appear, depending on what Python log handling is active in your environment. These warnings can be ignored.)

About the S-bend model

The S-bend model contains some Ijk Grid objects, Wellbore Trajectory Representations and Blocked Wellbore Representations, plus a few other objects. The model contains some quite extreme geometries, as its main purpose is for testing that other code can handle some of the more challenging features that can be represented in RESQML.

In particular, the 3 grids have variants of a geometry which include two recumbent folds (with an inverted section of reservoir between). They all contain a totally pinched out layer. Two of the grids include several faults in the geometry, including some with a lateral slip between split pillars. One of those two grids also contains a K Gap.

Three of the four wells also have rather unrealistic trajectories, designed to test well to grid intersection code.

../_images/S-bend_1.png ../_images/S-bend_2.png

Checking the contents of the S-bend dataset

To check that the S-bend model has been generated, you can open it as shown in the previous tutorial:

import resqpy.model as rq
s_bend = rq.Model('s_bend.epc')

You can then check the list of parts with:

which should produce something like:


(The hexadecimal uuids will differ from those shown here, and it’s possible that the order of the list will be different.)