specfem::runtime_configuration::seismogram

class seismogram

Seismogram class is used to instantiate seismogram writer.

Public Functions

inline seismogram(const std::string &output_format, const std::string &output_folder, const std::optional<bool> write_from_main)

Construct a new seismogram object.

Parameters:
  • output_format – Outpul seismogram file format

  • output_folder – Path to folder location where seismogram will be stored

  • write_from_main – Gather all seismogram data to rank 0 and write only from the main process

seismogram(const YAML::Node &Node)

Construct a new seismogram object.

Parameters:

Node – YAML node describing the seismogram writer

std::shared_ptr<specfem::io::writer> instantiate_seismogram_writer(const specfem::enums::elastic_wave wave_type, const specfem::enums::electromagnetic_wave electromagnetic_wave, const type_real dt, const type_real t0, const int nsteps_between_samples, std::optional<specfem::datetime::type> starttime = std::nullopt) const

Instantiate a seismogram writer object.

Parameters:
  • wave_type – Type of wavefield (Writes .BXY for SH waves and .BXX, .BXZ for P-SV waves)

  • electromagnetic_wave – Type of electromagnetic wavefield

  • dt – Time interval between subsequent timesteps

  • nsteps_between_samples – Number of timesteps between seismogram samples (seismogram sampling frequency). The solver start time (t0) is obtained at write time from the receivers iterator.

Returns:

std::shared_ptr<specfem::io::writer> Pointer to an instantiated writer object

inline std::optional<bool> get_write_from_main() const

Whether to gather all seismogram data to rank 0 and write only from the main process.

Private Members

std::string output_format

format of output file

std::string output_folder

Path to output folder.

std::optional<bool> write_from_main = std::nullopt

Gather to rank 0 and write from main proc.