Tutorials
Juyter Logo

Exporting Fields

GSTools provides simple exporting routines to convert generated fields to VTK files.

These can be viewed for example with Paraview.

import gstools as gs

x = y = range(100)
model = gs.Gaussian(dim=2, var=1, len_scale=10)
srf = gs.SRF(model)
field = srf((x, y), mesh_type="structured")
srf.vtk_export(filename="field")
'/Users/stevejpurves/dev/swung/gstools-transform22-tutorial/extra_01_misc/field.vtr'

The result displayed with Paraview: