Skip to content

Commit 3c84eee

Browse files
authored
bug-657_specified_chunks_separate_stored_chunks (TGSAI#674)
1 parent 1417d97 commit 3c84eee

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/mdio/segy/creation.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import annotations
44

55
import logging
6+
import warnings
67
from dataclasses import dataclass
78
from pathlib import Path
89
from shutil import copyfileobj
@@ -66,7 +67,12 @@ def mdio_spec_to_segy(
6667
Raises:
6768
MDIOMissingVariableError: If MDIO file does not contain SEG-Y headers.
6869
"""
69-
dataset = open_mdio(input_path, chunks=new_chunks)
70+
# NOTE: the warning analysis and the reason for its suppression are here:
71+
# https://github.com/TGSAI/mdio-python/issues/657
72+
warn = "The specified chunks separate the stored chunks along dimension"
73+
with warnings.catch_warnings():
74+
warnings.filterwarnings("ignore", message=warn, category=UserWarning)
75+
dataset = open_mdio(input_path, chunks=new_chunks)
7076

7177
if "segy_file_header" not in dataset:
7278
msg = (

0 commit comments

Comments
 (0)