Skip to content

cnv_segy2netcdf.py#

Utility script to convert SEG-Y files to netCDF format using segysak in parallel.

_converter(file, file_dir, **kwargs_segysak) #

Wrap function to convert SEG-Y to netCDF.

Source code in pseudo_3D_interpolation\cnv_segy2netcdf.py
def _converter(file, file_dir, **kwargs_segysak) -> None:
    """Wrap function to convert SEG-Y to netCDF."""
    name, suffix = os.path.splitext(file)
    out_nc = os.path.join(file_dir, name + '.seisnc')

    if kwargs_segysak == {}:
        kwargs_segysak = dict(cdp=5, cdpx=73, cdpy=77, silent=True)
    kwargs_segysak['strict'] = False

    # convert SEG-Y --> netCDF
    segy_converter(os.path.join(file_dir, file), out_nc, **kwargs_segysak)

Last update: Monday, 03 July 2023 at 09:46:51