############################################################################### topo = omfvista.wrap(land_surface) ############################################################################### topo.plot(show_edges=False, texture=True) ############################################################################### # And now create an OMF project file for the surfaces proj = omf.Project( name='FORGE Surfaces', description= 'All surfaces for the 2019 FORGE Geothermal Student Competition ') proj.elements = [ land_surface, temp_225c, temp_175c, opal_mound_fault, negro_mag_fault, top_granitoid, ] proj.validate() ############################################################################### # Save the GIS project file omf.OMFWriter(proj, gdc19.get_project_path('surfaces.omf'))
# Load the shape files shapes = gdc19.read_shape_file_to_omf(gdc19.get_shp_path('FORGE_Outline'), topo_points=topo.points) shapes ############################################################################### boundary = shapes[0] boundary.name = 'boundary' boundary.validate() ############################################################################### omfvista.wrap(boundary).plot(show_edges=False) ############################################################################### # Now save out the GIS data to an OMF project file proj = omf.Project( name='FORGE GIS Data', description= 'All GIS data for the 2019 FORGE Geothermal Student Competition ') proj.elements = [boundary] proj.validate() ############################################################################### # Save the GIS project file omf.OMFWriter(proj, gdc19.get_project_path('gis.omf'))
# sphinx_gallery_thumbnail_number = 5 # Import project package import gdc19 ############################################################################### import vtki import PVGeo import omfvtk import pandas as pd import numpy as np ############################################################################### # Load all the datasets created in the data aggreagation section gis_data = omfvtk.load_project(gdc19.get_project_path('gis.omf')) print(gis_data.keys()) ############################################################################### surfaces = omfvtk.load_project(gdc19.get_project_path('surfaces.omf')) print(surfaces.keys()) ############################################################################### temperature_data = omfvtk.load_project(gdc19.get_project_path('temperature.omf')) print(temperature_data.keys()) ############################################################################### # Grab data to be used topo = surfaces['land_surface'] granitoid = surfaces['top_granitoid'] temp_175c = surfaces['temp_175c']
(ncz, ncy, ncx), order='F').ravel(), location='cells'), ], ) temp_model.validate() ############################################################################### # And one final sanity check omfvtk.wrap(temp_model).clip_box(gdc19.get_roi_bounds(), invert=False).plot(cmap='coolwarm') ############################################################################### # Write the data # ++++++++++++++ proj = omf.Project( name='FORGE Temperature Data', description= 'All temperature data/models for the 2019 FORGE Geothermal Student Competition ' ) proj.elements = [temperature, temp_model] proj.validate() ############################################################################### # Save the temperature project file omf.OMFWriter(proj, gdc19.get_project_path('temperature.omf'))
Decimate some of the surfaces to make them more manageable with web renderings in VTK.js """ import gdc19 import pandas as pd import numpy as np import pyvista import omfvista import PVGeo import omf ############################################################################### surfaces = omfvista.load_project(gdc19.get_project_path('surfaces.omf')) topo = surfaces['land_surface'] ############################################################################### # Decimate Topography Surface dec = topo.extract_geometry().decimate(0.99, inplace=False) dec.plot(notebook=True, show_edges=True, color=True) ############################################################################### # Re-do the texture mapping reader = omf.OMFReader(gdc19.get_project_path('surfaces.omf')) project = reader.get_project() # Assumes 'land_surface' is at index 0 surf = project.elements[0] tex = surf.textures[0]
import gdc19 import numpy as np from discretize import TreeMesh from discretize.utils import meshutils import omfvista from SimPEG.Utils import mkvc, modelutils import pyvista ############################################################################### # Load the Data # +++++++++++++ # Load the topography surface that was previously aggregated: surfaces = omfvista.load_project(gdc19.get_project_path('surfaces.omf')) surface = surfaces['land_surface'] surface = surface.elevation() surface.set_active_scalar('Elevation') # Get the topography XYZ points topo = surface.points ############################################################################### # Load the gravity data grav_data = pyvista.read(gdc19.get_gravity_path('grav_obs.vtk')) xyz = grav_data.points survey = pyvista.PolyData(xyz) ############################################################################### # Visualize the survey on the topo plotter = pyvista.Plotter()