mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Changed hard coded temp directory pathes to built-in tempfile gettempdir().
This commit is contained in:
parent
a536ac2626
commit
d1b3e0781e
@ -1,5 +1,6 @@
|
|||||||
# Load ResInsight Processing Server Client Library
|
# Load ResInsight Processing Server Client Library
|
||||||
import rips
|
import rips
|
||||||
|
import tempfile
|
||||||
|
|
||||||
# Connect to ResInsight instance
|
# Connect to ResInsight instance
|
||||||
resinsight = rips.Instance.find()
|
resinsight = rips.Instance.find()
|
||||||
@ -11,7 +12,7 @@ project = resinsight.project
|
|||||||
wbsplots = project.descendants(rips.WellBoreStabilityPlot)
|
wbsplots = project.descendants(rips.WellBoreStabilityPlot)
|
||||||
|
|
||||||
# Chose a sensible output folder
|
# Chose a sensible output folder
|
||||||
dirname = "C:/temp"
|
dirname = tempfile.gettempdir()
|
||||||
|
|
||||||
# Loop through all Well Bore Stability plots
|
# Loop through all Well Bore Stability plots
|
||||||
for wbsplot in wbsplots:
|
for wbsplot in wbsplots:
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Load ResInsight Processing Server Client Library
|
# Load ResInsight Processing Server Client Library
|
||||||
import rips
|
import rips
|
||||||
|
import tempfile
|
||||||
# Connect to ResInsight instance
|
# Connect to ResInsight instance
|
||||||
resinsight = rips.Instance.find()
|
resinsight = rips.Instance.find()
|
||||||
# Example code
|
# Example code
|
||||||
@ -36,7 +37,7 @@ time_step = time_steps[len(time_steps) - 1]
|
|||||||
fracture_model_plot_collection = project.descendants(rips.FractureModelPlotCollection)[0]
|
fracture_model_plot_collection = project.descendants(rips.FractureModelPlotCollection)[0]
|
||||||
fracture_model_plot = fracture_model_plot_collection.new_fracture_model_plot(eclipse_case=case, fracture_model=fracture_model, time_step=time_step)
|
fracture_model_plot = fracture_model_plot_collection.new_fracture_model_plot(eclipse_case=case, fracture_model=fracture_model, time_step=time_step)
|
||||||
|
|
||||||
export_folder = "/tmp/"
|
export_folder = tempfile.gettempdir()
|
||||||
|
|
||||||
fracture_model_plot.export_to_file(directory_path=export_folder)
|
fracture_model_plot.export_to_file(directory_path=export_folder)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user