File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1111from segy .config import SegySettings
1212from segy .standards .codes import MeasurementSystem as segy_MeasurementSystem
1313from segy .standards .fields .trace import Rev0 as TraceHeaderFieldsRev0
14+ import zarr
1415
1516from mdio .api .io import _normalize_path
1617from mdio .api .io import to_mdio
2324from mdio .builder .schemas .v1 .units import LengthUnitModel
2425from mdio .builder .schemas .v1 .variable import VariableMetadata
2526from mdio .builder .xarray_builder import to_xarray_dataset
27+ from mdio .constants import ZarrFormat
2628from mdio .converters .exceptions import EnvironmentFormatError
2729from mdio .converters .exceptions import GridTraceCountError
2830from mdio .converters .exceptions import GridTraceSparsityError
@@ -431,8 +433,11 @@ def segy_to_mdio( # noqa PLR0913
431433 header_dtype = to_structured_type (segy_spec .trace .header .dtype )
432434
433435 if os .getenv ("MDIO__DO_RAW_HEADERS" ) == "1" :
434- logger .warning ("MDIO__DO_RAW_HEADERS is experimental and expected to change or be removed." )
435- mdio_template = _add_raw_headers_to_template (mdio_template )
436+ if zarr .config .get ("default_zarr_format" ) == ZarrFormat .V2 :
437+ logger .warning ("Raw headers are only supported for Zarr v3. Skipping raw headers." )
438+ else :
439+ logger .warning ("MDIO__DO_RAW_HEADERS is experimental and expected to change or be removed." )
440+ mdio_template = _add_raw_headers_to_template (mdio_template )
436441
437442 horizontal_unit = _get_horizontal_coordinate_unit (segy_dimensions )
438443 mdio_ds : Dataset = mdio_template .build_dataset (
You can’t perform that action at this time.
0 commit comments