Skip to content

Commit b5b3861

Browse files
authored
Fixed output file names from the generated rms script (#746)
1 parent d73ac28 commit b5b3861

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/subscript/field_statistics/field_statistics.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,11 +1004,11 @@ def main():
10041004
prop_param = xtgeo.gridproperty_from_file(
10051005
filename,
10061006
fformat="roff")
1007-
prop_param.to_roxar(PRJ, GRIDNAME, name)
10081007
new_name = name
10091008
if label:
10101009
new_name = name + "_" + label
10111010
prop_param.name = new_name
1011+
prop_param.to_roxar(PRJ, GRIDNAME, new_name)
10121012
name = "ertbox--nactive_" + zone + "_" + str(iteration)
10131013
print(f"Read: {{name}} into {{GRIDNAME}}")
10141014
filename = Path(result_path) / Path(name + ".roff")
@@ -1039,7 +1039,10 @@ def main():
10391039
print(f"Read: {{name}} into {{GRIDNAME}}")
10401040
filename = Path(result_path) / Path(name + ".roff")
10411041
prop_param = xtgeo.gridproperty_from_file(filename, fformat="roff")
1042-
prop_param.to_roxar(PRJ, GRIDNAME, name)
1042+
new_name = name
1043+
if label:
1044+
new_name = name + "_" + label
1045+
prop_param.to_roxar(PRJ, GRIDNAME, new_name)
10431046
10441047
if __name__ == "__main__":
10451048
main()

0 commit comments

Comments
 (0)