seisflows.solver.specfem2d

This class provides utilities for the Seisflows solver interactions with Specfem2D. It builds upon the base Specfem class which generalizes all solver interactions with various versions of Specfem.

TODO

Internal paramater f0 is not currently used. Can we remove or integrate?

Module Contents

Classes

Specfem2D

Solver SPECFEM2D

class seisflows.solver.specfem2d.Specfem2D(source_prefix='SOURCE', multiples=False, **kwargs)

Bases: seisflows.solver.specfem.Specfem

Solver SPECFEM2D

SPECFEM2D-specific alterations to the base SPECFEM module

Parameters

type source_prefix

str

param source_prefix

Prefix of source files in path SPECFEM_DATA. Defaults to ‘SOURCE’

type multiples

bool

param multiples

set an absorbing top-boundary condition

Paths

***

__doc__
setup()

Setup the SPECFEM2D solver interface in a SeisFlows workflow Append coordinate files to exported model files so that we can use them for plotting later

smooth(input_path, output_path, parameters=None, span_h=None, span_v=None, use_gpu=False)

Specfem2D requires additional model parameters in directory to perform the xsmooth_sem task. This function will copy these files into the directory before performing the base smooth operations.

Kwargs should match arguments of solver.base.smooth()

Note

This operation is usually run with run(single=True) so only one task will be performing these operations.

Parameters
  • input_path (str) – path to data

  • output_path (str) – path to export the outputs of xcombine_sem

  • parameters (list) – optional list of parameters, defaults to self._parameters

  • span_h (float) – horizontal smoothing length in meters

  • span_v (float) – vertical smoothing length in meters

  • use_gpu (bool) – whether to use GPU acceleration for smoothing. Requires GPU compiled binaries and GPU compute node.