-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug that when spacing in ECL keyword name
- Loading branch information
1 parent
2e43638
commit d4bd430
Showing
5 changed files
with
99 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
numpy<1.24 | ||
pyyaml | ||
xtgeo | ||
xtgeo>=2.20.7 | ||
fmu-dataio>=1.3.0 | ||
xtgeoviz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
"""Testing suite avg4.""" | ||
import pytest | ||
import xtgeo | ||
|
||
import xtgeoapp_grd3dmaps.avghc.grid3d_average_map as grid3d_average_map | ||
|
||
# ============================================================================= | ||
# Do tests | ||
# ============================================================================= | ||
|
||
|
||
def test_average_map4a(datatree): | ||
"""Test AVG with YAML config example 4a ECL w keywords with spaces; based on 2a.""" | ||
result = datatree / "map4a_folder" | ||
result.mkdir(parents=True) | ||
dump = result / "avg4a.yml" | ||
grid3d_average_map.main( | ||
[ | ||
"--config", | ||
"tests/yaml/avg4a.yml", | ||
"--dump", | ||
str(dump), | ||
"--mapfolder", | ||
str(result), | ||
"--plotfolder", | ||
str(result), | ||
] | ||
) | ||
mymap1 = xtgeo.surface_from_file( | ||
result / "zone2+3--avg4a_average_pressure--19991201.gri" | ||
) | ||
assert mymap1.values.mean() == pytest.approx(336.5236, abs=0.01) | ||
|
||
mymap2 = xtgeo.surface_from_file( | ||
result / "zone2+3--avg4a_average_w8f--19991201.gri" | ||
) | ||
assert mymap2.values.mean() == pytest.approx(0.837027, abs=0.01) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
title: Reek | ||
# Allow Eclipse keywords with spaces (e.g. traces i e100, like "W8 F") | ||
|
||
input: | ||
eclroot: tests/data/reek/REEK | ||
grid: $eclroot.EGRID | ||
|
||
# alternative approach to read a variables and dates: | ||
properties: | ||
- name: PORO | ||
source: $eclroot.INIT | ||
- name: PRESSURE | ||
source: tests/data/reek/REEK_LETTERS_W_SPACE.UNRST | ||
dates: ["19991201"] | ||
- name: "W8 F" | ||
source: tests/data/reek/REEK_LETTERS_W_SPACE.UNRST | ||
dates: ["19991201"] | ||
|
||
# For filters, there are properties defined at the same grid layout as | ||
# the grid read in input | ||
# | ||
# If several filters, they will be cumulative. | ||
# | ||
# In this case a ZONE filter is used instead of an explicit "zonation" setting; need | ||
# in most cases to be combined with "prefix" setting under "output" | ||
|
||
filters: | ||
- name: PORO | ||
source: $eclroot.INIT | ||
intvrange: [0.0, 1.0] # Filter for a continuous will be an interval | ||
- name: FACIES | ||
discrete: Yes | ||
source: tests/data/reek/reek_sim_facies2.roff | ||
discrange: [2] # Filter for a discrete will be spesic number sequence | ||
- name: Zone | ||
discrete: Yes | ||
source: tests/data/reek/reek_sim_zone.roff | ||
discrange: [2, 3] # Filter for a discrete will be spesic number sequence | ||
|
||
computesettings: | ||
zone: No | ||
all: Yes | ||
mask_zeros: Yes # means that ouput maps will be set to undef where zero | ||
|
||
# map definition (unrotated maps only, for rotated maps use a maptemplate...) | ||
mapsettings: | ||
xori: 457000 | ||
xinc: 50 | ||
yori: 5927000 | ||
yinc: 50 | ||
ncol: 200 | ||
nrow: 250 | ||
|
||
output: | ||
tag: avg4a # the tag will added to file name as extra info, e.g. as | ||
# z1--avg1a_average_poro.gri | ||
|
||
prefix: zone2+3 # replace the default 'all' prefix | ||
mapfolder: /tmp | ||
plotfolder: /tmp |