11# Environment Variables
22
3- MDIO can be configured using environment variables to customize behavior for import, export,
3+ MDIO can be configured using environment variables to customize behavior for import, export,
44and validation operations. These variables provide runtime control without requiring code changes.
55
66## CPU and Performance
@@ -10,7 +10,7 @@ and validation operations. These variables provide runtime control without requi
1010** Type:** Integer
1111** Default:** Number of logical CPUs available
1212
13- Controls the number of CPUs used during SEG-Y export operations. Adjust this to balance
13+ Controls the number of CPUs used during SEG-Y export operations. Adjust this to balance
1414performance with system resource availability.
1515
1616``` shell
@@ -23,7 +23,7 @@ $ mdio segy export input.mdio output.segy
2323** Type:** Integer
2424** Default:** Number of logical CPUs available
2525
26- Controls the number of CPUs used during SEG-Y import operations. Higher values can
26+ Controls the number of CPUs used during SEG-Y import operations. Higher values can
2727significantly speed up ingestion of large datasets.
2828
2929``` shell
@@ -38,8 +38,8 @@ $ mdio segy import input.segy output.mdio --header-locations 189,193
3838** Type:** Float
3939** Default:** 2.0
4040
41- Sparsity ratio threshold that triggers warnings during grid validation. The sparsity ratio
42- measures how sparse the trace grid is compared to a dense grid. Values above this threshold
41+ Sparsity ratio threshold that triggers warnings during grid validation. The sparsity ratio
42+ measures how sparse the trace grid is compared to a dense grid. Values above this threshold
4343will log warnings but won't prevent operations.
4444
4545``` shell
@@ -51,8 +51,8 @@ $ export MDIO__GRID__SPARSITY_RATIO_WARN=3.0
5151** Type:** Float
5252** Default:** 10.0
5353
54- Sparsity ratio threshold that triggers errors and prevents operations. Use this to enforce
55- quality standards and prevent ingestion of excessively sparse datasets that may indicate
54+ Sparsity ratio threshold that triggers errors and prevents operations. Use this to enforce
55+ quality standards and prevent ingestion of excessively sparse datasets that may indicate
5656data quality issues.
5757
5858``` shell
@@ -67,7 +67,7 @@ $ export MDIO__GRID__SPARSITY_RATIO_LIMIT=15.0
6767** Default:** false
6868** Accepted values:** ` true ` , ` false ` , ` 1 ` , ` 0 ` , ` yes ` , ` no ` , ` on ` , ` off `
6969
70- When enabled, preserves the original SEG-Y textual file header during import.
70+ When enabled, preserves the original SEG-Y textual file header during import.
7171This is useful for maintaining full SEG-Y standard compliance and preserving survey metadata.
7272
7373``` shell
@@ -80,7 +80,7 @@ $ mdio segy import input.segy output.mdio --header-locations 189,193
8080** Type:** String (file path)
8181** Default:** None
8282
83- Path to a custom SEG-Y specification file that defines byte locations and data types for
83+ Path to a custom SEG-Y specification file that defines byte locations and data types for
8484trace headers. Use this to handle non-standard SEG-Y variants or custom header layouts.
8585
8686``` shell
@@ -94,20 +94,22 @@ $ mdio segy import input.segy output.mdio --header-locations 189,193
9494** Default:** false
9595** Accepted values:** ` true ` , ` false ` , ` 1 ` , ` 0 ` , ` yes ` , ` no ` , ` on ` , ` off `
9696
97- Enables buffered reads during SEG-Y header scans to optimize performance when reading from or
98- writing to cloud object storage (S3, GCS, Azure). This mode balances bandwidth usage with read
99- latency by processing the file twice: first to determine optimal buffering, then to perform the
97+ Enables buffered reads during SEG-Y header scans to optimize performance when reading from or
98+ writing to cloud object storage (S3, GCS, Azure). This mode balances bandwidth usage with read
99+ latency by processing the file twice: first to determine optimal buffering, then to perform the
100100actual ingestion.
101101
102102``` {note}
103103This variable is designed for cloud storage I/O, regardless of where the compute is running.
104104```
105105
106106** When to use:**
107+
107108- Reading from cloud storage (e.g., ` s3://bucket/input.segy ` )
108109- Writing to cloud storage (e.g., ` gs://bucket/output.mdio ` )
109110
110111** When to skip:**
112+
111113- Local file paths on fast storage
112114- Very slow network connections where bandwidth is the primary bottleneck
113115
@@ -124,11 +126,11 @@ $ mdio segy import s3://bucket/input.segy output.mdio --header-locations 189,193
124126** Default:** false
125127** Accepted values:** ` true ` , ` false ` , ` 1 ` , ` 0 ` , ` yes ` , ` no ` , ` on ` , ` off `
126128
127- Bypasses validation checks during MDIO operations. This is primarily intended for development,
129+ Bypasses validation checks during MDIO operations. This is primarily intended for development,
128130testing, or debugging scenarios where you need to work with non-standard data.
129131
130132``` {warning}
131- Disabling checks can lead to corrupted output or unexpected behavior. Only use this
133+ Disabling checks can lead to corrupted output or unexpected behavior. Only use this
132134when you understand the implications and are working in a controlled environment.
133135```
134136
@@ -170,13 +172,15 @@ mdio segy import input.segy output.mdio --header-locations 189,193
170172To make environment variables permanent, add them to your shell profile:
171173
172174** Bash/Zsh:**
175+
173176``` shell
174177# Add to ~/.bashrc or ~/.zshrc
175178export MDIO__IMPORT__CPU_COUNT=16
176179export MDIO__IMPORT__CLOUD_NATIVE=true
177180```
178181
179182** Windows:**
183+
180184``` console
181185# Set permanently in PowerShell (run as Administrator)
182186[System.Environment]::SetEnvironmentVariable('MDIO__IMPORT__CPU_COUNT', '16', 'User')
@@ -201,4 +205,3 @@ MDIO__IMPORT__CPU_COUNT=16
201205MDIO__GRID__SPARSITY_RATIO_LIMIT=15.0
202206MDIO__IMPORT__CLOUD_NATIVE=true
203207```
204-
0 commit comments