Create an input file for process simulations with SHEMAT with spatial property distributions according to the geological units defined in a geogrid object.
The methods shown here require the Python package PySHEMAT to be installed. It is available on:
https://github.com/flohorovicic/PySHEMAT
For the sake of simplicity, we will load a geogrid object from a pickled file and create a SHEMAT input file on its basis.
In [5]:
import os, os.path
import sys
import pickle
# as long as not in Pythonpath, we have to set directory:
sys.path.append(r'/Users/flow/git/pygeomod')
sys.path.append(r'/Users/flow/git/PySHEMAT/')
import PySHEMAT as PS
import geogrid
In [7]:
# path to pickled geogrid file
os.chdir(r'/Users/flow/Documents/02_work/10_Geomodels/05_PB/PB_combined/exported_grids')
In [8]:
G1 = pickle.load(open('PB_comb_geogrid_lres.pkl'))
In [11]:
# File with properties for SHEMAT simulation:
property_file = 'CentralPerthBasin_shallow_properties.csv'
In [12]:
S1 = PS.create_empty_model(from_geogrid = G1,
topt = 'TEMP',
baset = 'WSD',
basal_heat_flux = 0.025,
thermal_cond_function_of_temp = True,
update_from_property_file = True,
geomodel_properties = property_file
)
In [13]:
# assign name of new SHEMAT file
shemat_filename = "PB_combined.nml"
S1.write_file(shemat_filename)
# create control file
PS.create_shemat_control_file(shemat_filename)
In [ ]: