def test_getsetsurface_from_clipboard(): """Get and set a surface from a RMS project, from the clipboard container.""" if not os.path.isdir(proj[roxver]): raise RuntimeError( 'RMS test project is missing for roxar version {}'.format(roxver)) rox = RoxUtils(proj[roxver], readonly=False) roxproj = rox.project # direct initiate an instance from Roxar import x = xtgeo.surface_from_roxar(roxproj, 'basereek_rota', 'maps', stype='clipboard') x.to_file(os.path.join(td, 'upperreek_from_rms.gri')) tsetup.assert_equal(x.ncol, 554, 'NCOL of from RMS') # values from mean are read from statistics in RMS tsetup.assert_almostequal(x.values.mean(), 1742.3574, 0.001) # add and write to folder x.values += 100 x.to_roxar(roxproj, 'somenew', 'maps', stype='clipboard') rox.project.save() # read again y = xtgeo.surface_from_roxar(roxproj, 'somenew', 'maps', stype='clipboard') tsetup.assert_almostequal(y.values.mean(), 1842.3574, 0.001) rox.safe_close()
def import_well_roxapi( self, project, wname, trajectory="Drilled trajectory", logrun="log", lognames="all", lognames_strict=False, inclmd=False, inclsurvey=False, ): # pragma: no cover """Private function for loading project and ROXAPI well import""" rox = RoxUtils(project, readonly=True) _roxapi_import_well( self, rox, wname, trajectory, logrun, lognames, lognames_strict, inclmd, inclsurvey, ) rox.safe_close()
def export_bwell_roxapi(self, project, gname, bwname, wname, realisation=0): """Private function for loading project and ROXAPI blockwell import""" logger.info("Opening RMS project ...") rox = RoxUtils(project, readonly=True) _roxapi_export_bwell(self, rox, gname, bwname, wname, realisation) rox.safe_close()
def import_bwells_roxapi(self, project, gname, bwname, lognames=None, ijk=True, realisation=0): # pragma: no cover """Private function for loading project and ROXAPI blockwell import""" logger.info("Opening RMS project ...") rox = RoxUtils(project, readonly=True) _roxapi_import_bwells(self, rox, gname, bwname, lognames, ijk, realisation) rox.safe_close()
def export_bwell_roxapi(self, project, gname, bwname, wname, lognames="all", ijk=False, realisation=0): """Private function for blockwell export (store in RMS) from XTGeo to RoxarAPI""" logger.info("Opening RMS project ...") rox = RoxUtils(project, readonly=False) _roxapi_export_bwell(self, rox, gname, bwname, wname, lognames, ijk, realisation) if rox._roxexternal: rox.project.save() rox.safe_close()
def export_well_roxapi( self, project, wname, lognames="all", logrun="log", trajectory="Drilled trajectory", realisation=0, ): """Private function for well export (store in RMS) from XTGeo to RoxarAPI""" logger.info("Opening RMS project ...") rox = RoxUtils(project, readonly=False) _roxapi_export_well(self, rox, wname, lognames, logrun, trajectory, realisation) if rox._roxexternal: rox.project.save() rox.safe_close()