|
2 | 2 | "cells": [ |
3 | 3 | { |
4 | 4 | "cell_type": "markdown", |
5 | | - "id": "40a17e1f-53f0-4ec9-b2a4-2718acf2a59e", |
| 5 | + "id": "0", |
6 | 6 | "metadata": {}, |
7 | 7 | "source": [ |
8 | 8 | "The very first step is to download and install the FESAPI wheel : pip install fesapi" |
9 | 9 | ] |
10 | 10 | }, |
11 | 11 | { |
12 | 12 | "cell_type": "markdown", |
13 | | - "id": "a16222c5-064e-431d-9dae-d3d6c535a6b9", |
| 13 | + "id": "1", |
14 | 14 | "metadata": {}, |
15 | 15 | "source": [ |
16 | 16 | "Once FESAPI wheel installed, you need to first import it in order to be able to call its API (https://www.f2i-consulting.com/fesapi/doxygen/)" |
17 | 17 | ] |
18 | 18 | }, |
19 | 19 | { |
20 | 20 | "cell_type": "code", |
21 | | - "execution_count": 1, |
22 | | - "id": "fe2772db-0f12-4ba3-bd7c-17890092dc63", |
| 21 | + "execution_count": null, |
| 22 | + "id": "2", |
23 | 23 | "metadata": {}, |
24 | 24 | "outputs": [], |
25 | 25 | "source": [ |
|
28 | 28 | }, |
29 | 29 | { |
30 | 30 | "cell_type": "markdown", |
31 | | - "id": "0e0f0067-7c3e-4b4f-9da9-b6a4da7f8929", |
| 31 | + "id": "3", |
32 | 32 | "metadata": {}, |
33 | 33 | "source": [ |
34 | 34 | "Let's now create a DataObjectRepository in order to store Energistics dataobjects in-memory." |
35 | 35 | ] |
36 | 36 | }, |
37 | 37 | { |
38 | 38 | "cell_type": "code", |
39 | | - "execution_count": 2, |
40 | | - "id": "6d5cda5b-7627-4405-a4c0-ced8edbe9257", |
| 39 | + "execution_count": null, |
| 40 | + "id": "4", |
41 | 41 | "metadata": {}, |
42 | 42 | "outputs": [], |
43 | 43 | "source": [ |
|
46 | 46 | }, |
47 | 47 | { |
48 | 48 | "cell_type": "markdown", |
49 | | - "id": "d7d5c21e-8b14-4bd6-a78f-d0bef5014e4f", |
| 49 | + "id": "5", |
50 | 50 | "metadata": {}, |
51 | 51 | "source": [ |
52 | 52 | "Energistics local CRS and Energistics HDF Proxy dataobjects are respectively required when we want to export CRS aware dataobjects and RESQML2 representations. Let's create them and set them as default ones for all other Energistics dataobject we will create later." |
53 | 53 | ] |
54 | 54 | }, |
55 | 55 | { |
56 | 56 | "cell_type": "code", |
57 | | - "execution_count": 3, |
58 | | - "id": "5c3e7a41-5270-4a06-9125-af784c097f17", |
| 57 | + "execution_count": null, |
| 58 | + "id": "6", |
59 | 59 | "metadata": {}, |
60 | 60 | "outputs": [], |
61 | 61 | "source": [ |
|
76 | 76 | }, |
77 | 77 | { |
78 | 78 | "cell_type": "markdown", |
79 | | - "id": "dcfbaeab-a787-47ff-b323-437bb3b556df", |
| 79 | + "id": "7", |
80 | 80 | "metadata": {}, |
81 | 81 | "source": [ |
82 | 82 | "We can now create plenty of Energistics dataobjects. Let's try a Horizon 2d grid." |
83 | 83 | ] |
84 | 84 | }, |
85 | 85 | { |
86 | 86 | "cell_type": "code", |
87 | | - "execution_count": 4, |
88 | | - "id": "a987ec54-86a8-424f-9539-48b87a9e8dea", |
| 87 | + "execution_count": null, |
| 88 | + "id": "8", |
89 | 89 | "metadata": {}, |
90 | 90 | "outputs": [], |
91 | 91 | "source": [ |
|
96 | 96 | }, |
97 | 97 | { |
98 | 98 | "cell_type": "markdown", |
99 | | - "id": "b564949a-03b8-4988-b4d8-c779b2f3fe2a", |
| 99 | + "id": "9", |
100 | 100 | "metadata": {}, |
101 | 101 | "source": [ |
102 | 102 | "And let's set a 2x3 geometry on this 2d grid where the Z values equal hundred times the node index.\n", |
|
108 | 108 | }, |
109 | 109 | { |
110 | 110 | "cell_type": "code", |
111 | | - "execution_count": 5, |
112 | | - "id": "c6245f4b-5acd-454b-921d-99e767c36c79", |
| 111 | + "execution_count": null, |
| 112 | + "id": "10", |
113 | 113 | "metadata": {}, |
114 | 114 | "outputs": [], |
115 | 115 | "source": [ |
|
124 | 124 | }, |
125 | 125 | { |
126 | 126 | "cell_type": "markdown", |
127 | | - "id": "0580e85e-0040-423c-8825-ebfb511ba26f", |
| 127 | + "id": "11", |
128 | 128 | "metadata": {}, |
129 | 129 | "source": [ |
130 | 130 | "We can now serialize our DataObjectRepository into an EPC document in order to share it with other EPC aware application." |
131 | 131 | ] |
132 | 132 | }, |
133 | 133 | { |
134 | 134 | "cell_type": "code", |
135 | | - "id": "b5d289e6-c699-4d88-a870-3dae2baf14ee", |
| 135 | + "execution_count": null, |
| 136 | + "id": "12", |
136 | 137 | "metadata": {}, |
| 138 | + "outputs": [], |
137 | 139 | "source": [ |
138 | | - "# Create an EPC Document in the current folder nad named TestingFesapiWithPython.epc\n", |
| 140 | + "# Create an EPC Document named TestingFesapiWithPython.epc in the current folder\n", |
139 | 141 | "epc_file = fesapi.EpcDocument(file_name_without_extension + \".epc\")\n", |
140 | 142 | "epc_file.serializeFrom(repo)" |
141 | 143 | ] |
142 | 144 | }, |
143 | 145 | { |
144 | 146 | "cell_type": "markdown", |
145 | | - "id": "6614030b", |
| 147 | + "id": "13", |
146 | 148 | "metadata": {}, |
147 | 149 | "source": [ |
148 | 150 | "We can clear the repository to clean in memory repository and release HDF5 files." |
|
151 | 153 | { |
152 | 154 | "cell_type": "code", |
153 | 155 | "execution_count": null, |
154 | | - "id": "df354cf5", |
| 156 | + "id": "14", |
155 | 157 | "metadata": {}, |
156 | 158 | "outputs": [], |
157 | 159 | "source": [ |
|
161 | 163 | ], |
162 | 164 | "metadata": { |
163 | 165 | "kernelspec": { |
164 | | - "display_name": ".venv (3.11.9)", |
| 166 | + "display_name": "Python 3", |
165 | 167 | "language": "python", |
166 | 168 | "name": "python3" |
167 | 169 | }, |
|
175 | 177 | "name": "python", |
176 | 178 | "nbconvert_exporter": "python", |
177 | 179 | "pygments_lexer": "ipython3", |
178 | | - "version": "3.11.9" |
| 180 | + "version": "3.8" |
179 | 181 | } |
180 | 182 | }, |
181 | 183 | "nbformat": 4, |
|
0 commit comments