Repository navigation
Expand file tree
/
Copy pathconfiguration.html
More file actions
931 lines (859 loc) · 53.8 KB
/
Copy pathconfiguration.html
File metadata and controls
931 lines (859 loc) · 53.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Configuration — MUR SST</title>
<meta name="description" content="Every configuration key the pipeline reads, how the stages are driven, and what to do when a run goes wrong.">
<link rel="stylesheet" href="assets/site.css">
</head>
<body>
<button class="menu-btn" aria-label="Toggle navigation" aria-expanded="false">☰</button>
<div class="layout">
<aside class="sidebar">
<a class="brand" href="index.html">
<strong>MUR SST</strong>
<span>Multi-scale Ultra-high Resolution analysis</span>
</a>
<nav>
<div class="nav-group">Start here</div>
<a href="index.html">Overview</a>
<a href="quickstart.html">Quick start</a>
<a href="architecture.html">Architecture</a>
<div class="nav-group">How it works</div>
<a href="algorithm.html">The MRVA algorithm</a>
<a href="lifecycle.html">Data lifecycle</a>
<a href="sequence.html">Daily execution</a>
<a href="mrva-internals.html">MRVA internals</a>
<div class="nav-group">Operating it</div>
<a href="configuration.html" aria-current="page">Configuration</a>
<a href="static-data.html">Static input data</a>
<a href="input-contract.html">Input contract</a>
<a href="sensors.html">Adding a sensor</a>
<a href="maap.html">Running on MAAP</a>
<div class="nav-group">Containers</div>
<a href="container-landice.html">Land/ice</a>
<a href="container-l2p.html">L2P</a>
<a href="container-iquam.html">iQUAM</a>
<a href="container-mrva.html">MRVA</a>
<div class="nav-group">Reference</div>
<a href="landice-encoding.html">Land/ice encoding</a>
<a href="future.html">Future enhancements</a>
<div class="nav-group">Project</div>
<a href="https://github.com/podaac/mur">Source on GitHub</a>
</nav>
</aside>
<main>
<div class="content">
<h1>Configuration</h1>
<p class="lede">Every configuration key the pipeline reads, how the stages are driven, and what to do when a run goes wrong.</p>
<nav class="toc" aria-label="On this page">
<b>On this page</b>
<ul>
<li><a href="#introduction">Introduction</a></li>
<li><a href="#prerequisites">Prerequisites</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#container-setup">Container Setup</a></li>
<li><a href="#configuration">Configuration</a></li>
<li><a href="#running-the-pipeline">Running the Pipeline</a></li>
<li><a href="#component-specific-execution">Component-Specific Execution</a></li>
<li><a href="#monitoring-and-logging">Monitoring and Logging</a></li>
<li><a href="#production-deployment">Production Deployment</a></li>
<li><a href="#troubleshooting">Troubleshooting</a></li>
<li><a href="#summary">Summary</a></li>
<li><a href="#references">References</a></li>
</ul>
</nav>
<h2 id="introduction">Introduction</h2>
<p>This document describes how to install, configure, and run the MUR preprocessing pipeline. It covers environment setup, container builds, configuration files, command-line operation, and troubleshooting.</p>
<p><strong>Note:</strong> All four stages (Land/Ice, iQUAM, L2P, MRVA) are implemented and operational via <code>run_mur_pipeline.py</code> (the <code>mur-pipeline</code> command). Every container now takes its inputs as explicit named flags rather than bind-mounted directories — see <a href="static-data.html">static input data</a> and each container page for the full flag list.</p>
<h2 id="prerequisites">Prerequisites</h2>
<h3 id="system-requirements">System Requirements</h3>
<p><strong>Minimum:</strong></p>
<ul>
<li><strong>CPU:</strong> 4 cores</li>
<li><strong>RAM:</strong> 16 GB</li>
<li><strong>Disk:</strong> 500 GB fast storage (SSD recommended)</li>
<li><strong>OS:</strong> Linux (Ubuntu 20.04+, CentOS 8+) or macOS</li>
</ul>
<p><strong>Recommended:</strong></p>
<ul>
<li><strong>CPU:</strong> 16+ cores (for parallel sensor processing)</li>
<li><strong>RAM:</strong> 32+ GB</li>
<li><strong>Disk:</strong> 2+ TB (1 TB fast SSD + bulk storage)</li>
<li><strong>Network:</strong> 100 Mbps+ (for PO.DAAC downloads)</li>
</ul>
<h3 id="software-dependencies">Software Dependencies</h3>
<p><strong>Required:</strong></p>
<ol>
<li><strong>Docker</strong>
<pre><code class="language-bash"># Install Docker (Ubuntu/Debian)
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER # Add user to docker group
newgrp docker # Apply group change
# Verify installation
docker --version
docker run hello-world</code></pre></li>
<li><strong>uv</strong> (Python package and environment manager)
<pre><code class="language-bash"># Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Add to PATH (add to ~/.bashrc or ~/.zshrc)
export PATH="$HOME/.cargo/bin:$PATH"
# Verify installation
uv --version</code></pre></li>
<li><strong>Python 3.11+</strong>
<ul>
<li>Usually installed with uv</li>
<li>Check: <code>python3 --version</code></li>
</ul>
</li>
</ol>
<p><strong>Optional:</strong></p>
<ul>
<li><strong>git</strong> - For cloning repository</li>
<li><strong>tmux</strong> or <strong>screen</strong> - For long-running processes</li>
<li><strong>htop</strong> - For monitoring resource usage</li>
</ul>
<h3 id="data-access-credentials">Data Access Credentials</h3>
<p><strong>NASA Earthdata Login (Required for L2P data):</strong></p>
<ol>
<li>Register for free account:
<ul>
<li>URL: https://urs.earthdata.nasa.gov/</li>
</ul>
</li>
<li>Approve PO.DAAC application:
<ul>
<li>URL: https://urs.earthdata.nasa.gov/approve_app?client_id=BO_n7nTIlMljdvU6kRRB3g</li>
</ul>
</li>
<li>Create <code>.netrc</code> file:
<pre><code class="language-bash">touch ~/.netrc
chmod 600 ~/.netrc
cat > ~/.netrc << 'EOF'
machine urs.earthdata.nasa.gov
login YOUR_EARTHDATA_USERNAME
password YOUR_EARTHDATA_PASSWORD
EOF</code></pre></li>
</ol>
<p><strong>Verify credentials:</strong></p>
<pre><code class="language-bash">curl -n https://podaac.jpl.nasa.gov/ # Should not prompt for login</code></pre>
<h2 id="installation">Installation</h2>
<h3 id="clone-repository">Clone Repository</h3>
<pre><code class="language-bash"># Clone the MUR repository
git clone https://github.com/podaac/mur.git
cd mur</code></pre>
<h3 id="setup-python-environment">Setup Python Environment</h3>
<pre><code class="language-bash"># Navigate to mur directory
cd mur/
# Sync environment (creates .venv and installs dependencies)
uv sync
# This creates:
# - .venv/ directory with Python environment
# - Installs all dependencies from pyproject.toml
# - Creates command shortcuts (mur-pipeline, mur-viewer)</code></pre>
<h3 id="activate-environment-optional">Activate Environment (Optional)</h3>
<pre><code class="language-bash"># Option 1: Activate manually
source .venv/bin/activate
# Now you can use commands directly:
mur-pipeline --help
mur-viewer --help
# Option 2: Use 'uv run' prefix (no activation needed)
uv run mur-pipeline --help
uv run mur-viewer --help</code></pre>
<p><strong>Note:</strong> <code>uv run</code> automatically manages the environment, so activation is optional.</p>
<h3 id="verify-installation">Verify Installation</h3>
<pre><code class="language-bash"># Check Python environment
uv run python --version # Should show Python 3.11+
# Check installed packages
uv pip list
# Test pipeline help
uv run mur-pipeline --help</code></pre>
<h2 id="container-setup">Container Setup</h2>
<h3 id="build-all-containers">Build All Containers</h3>
<p><strong>Prerequisite:</strong> the build needs a MATLAB license server. Copy the template and edit it before the first build:</p>
<pre><code class="language-bash">cd mur/
cp network.lic.example network.lic
# Edit network.lic with your license server details</code></pre>
<p><strong>Build with <code>build_module.sh</code> (from the <code>mur/</code> directory):</strong></p>
<pre><code class="language-bash"># Build everything: iquam, l2p, landice, mrva
./build_module.sh all
# Or one module at a time
./build_module.sh landice
./build_module.sh iquam
./build_module.sh l2p
./build_module.sh mrva
# Debug build: symbols, bounds checking, FP-exception trapping (still tagged :latest)
./build_module.sh mrva --debug
# Force a rebuild that ignores the Docker layer cache
./build_module.sh all --no-cache</code></pre>
<p>The script handles everything the raw <code>docker build</code> commands used to require by hand:</p>
<ul>
<li>Builds <code>mur-matlab-base:r2024b</code> first (via <code>build_matlab_base.sh</code>) if it isn't present</li>
<li>Fails early with a clear message if <code>network.lic</code> is missing</li>
<li>Always passes <code>--platform linux/amd64</code></li>
<li>Uses the parent <code>mur/</code> directory as build context so <code>common/</code> is reachable</li>
<li>Tags images <code>mur-iquam:latest</code>, <code>mur-l2p:latest</code>, <code>mur-landice:latest</code>, <code>mur-mrva:latest</code> — the names the <code>container_image</code> fields in <code>config.json</code> expect</li>
</ul>
<p><strong>Build time:</strong></p>
<ul>
<li>Base image (first time only): ~15-20 minutes (MATLAB runtime download/install)</li>
<li>Per module, first build: ~10-20 minutes (MATLAB compilation; MRVA also compiles Fortran)</li>
<li>Subsequent builds: ~2-3 minutes (cached layers)</li>
</ul>
<p><strong>Verify builds:</strong></p>
<pre><code class="language-bash">docker images | grep mur
# Should see:
# mur-matlab-base r2024b ... 3.5 GB
# mur-landice latest ... 2.5 GB
# mur-iquam latest ... 2.5 GB
# mur-l2p latest ... 2.5 GB
# mur-mrva latest ... 2.5 GB</code></pre>
<h3 id="manual-builds-advanced">Manual Builds (Advanced)</h3>
<p><code>build_module.sh</code> is the supported path — use raw <code>docker build</code> only when you need something the script doesn't cover: building the base image separately, pinning a non-<code>latest</code> tag, bisecting a Dockerfile change, or wiring the build into external CI.</p>
<p>Two rules apply to every module:</p>
<ol>
<li><strong>Build context is the parent <code>mur/</code> directory</strong> (the trailing <code>..</code>), because each Dockerfile pulls shared code from <code>common/</code>. The module's own <code>.dockerignore</code> controls what gets in.</li>
<li><strong>Always pass <code>--platform linux/amd64</code></strong>, including on Apple Silicon — production runs x86_64.</li>
</ol>
<p><strong>Step 1 — base image</strong> (all modules build <code>FROM mur-matlab-base:r2024b</code>):</p>
<pre><code class="language-bash">cd mur/matlab-base
docker build --platform linux/amd64 -t mur-matlab-base:r2024b -f Dockerfile ..</code></pre>
<p><strong>Step 2 — modules</strong> (any order; each only needs the base image):</p>
<pre><code class="language-bash">cd mur/landice
docker build --platform linux/amd64 -t mur-landice:latest -f Dockerfile ..
cd mur/iquam
docker build --platform linux/amd64 -t mur-iquam:latest -f Dockerfile ..
cd mur/l2p
docker build --platform linux/amd64 -t mur-l2p:latest -f Dockerfile ..
cd mur/mrva
docker build --platform linux/amd64 -t mur-mrva:latest -f Dockerfile ..</code></pre>
<p><strong>Debug build</strong> — what <code>build_module.sh --debug</code> passes:</p>
<pre><code class="language-bash">docker build --platform linux/amd64 --build-arg DEBUG=1 -t mur-mrva:latest -f Dockerfile ..</code></pre>
<p>If you tag an image anything other than <code>mur-<module>:latest</code>, update the matching <code>container_image</code> field in your <code>config.json</code>, or the pipeline will not find it.</p>
<h3 id="container-architecture">Container Architecture</h3>
<p>All containers follow the same multi-stage build pattern:</p>
<p><strong>Stage 1 (Builder):</strong></p>
<ul>
<li>Base: <code>mur-matlab-base:r2024b</code> (itself built <code>FROM mathworks/matlab:r2024b</code> with the compiler and runtime installer baked in, so modules don't each re-download it)</li>
<li>Compile MATLAB code to a standalone executable</li>
<li>MRVA adds an earlier Fortran stage (<code>intel/oneapi-hpckit</code>) for its compiled solvers</li>
</ul>
<p><strong>Stage 2 (Runtime):</strong></p>
<ul>
<li>Base: MATLAB Runtime R2024b</li>
<li>Copy compiled executable from builder</li>
<li>No MATLAB license required</li>
<li>Minimal size (~2.5 GB vs ~8 GB full MATLAB)</li>
</ul>
<h3 id="platform-compatibility">Platform Compatibility</h3>
<p>All images target <code>linux/amd64</code>, matching production. <code>build_module.sh</code> passes <code>--platform linux/amd64</code> for you; only manual <code>docker build</code> invocations need the flag spelled out, and they need it on Apple Silicon and on x86_64 Linux alike for consistent results.</p>
<h3 id="registry-deployment-optional">Publishing to the registry</h3>
<p>The published images live at <code>ghcr.io/podaac/mur/<module></code> —
<code>landice</code>, <code>l2p</code>, <code>iquam</code> and <code>mrva</code>.</p>
<div class="warn">
<p><strong>Images are built and pushed by hand, not by CI.</strong> Compiling the
MATLAB sources needs a licence checkout against the JPL licence servers, which is
only reachable from the JPL network — so the build runs on a VPN-connected
machine and someone pushes the result. No GitHub Actions workflow does this; a
merge publishes nothing.</p>
</div>
<p><strong>Push.</strong> The token needs the <code>write:packages</code> scope
(<code>gh auth refresh -h github.com -s write:packages,read:packages</code>):</p>
<pre><code class="language-bash">echo $(gh auth token) | docker login ghcr.io -u $GITHUB_USERNAME --password-stdin
docker tag mur-landice:latest ghcr.io/podaac/mur/landice:latest
docker tag mur-l2p:latest ghcr.io/podaac/mur/l2p:latest
docker tag mur-iquam:latest ghcr.io/podaac/mur/iquam:latest
docker tag mur-mrva:latest ghcr.io/podaac/mur/mrva:latest
docker push ghcr.io/podaac/mur/landice:latest
docker push ghcr.io/podaac/mur/l2p:latest
docker push ghcr.io/podaac/mur/iquam:latest
docker push ghcr.io/podaac/mur/mrva:latest</code></pre>
<p>Check first that no licence material survived the builder stage — the
module images are published, the builder's licence file must not be:</p>
<pre><code class="language-bash">docker run --rm --entrypoint sh mur-mrva:latest \
-c 'find / -name "*.lic" -not -path "*/matlabruntime/*" 2>/dev/null | head'</code></pre>
<p>Empty output is what you want.</p>
<p><strong>A package that did not exist before starts private.</strong> That is
a per-package setting, not a per-push one: set visibility once, on the package
page under
<a href="https://github.com/orgs/podaac/packages">the organisation's packages</a>,
and every later push to the same name keeps it. Until then an anonymous
<code>docker pull</code> gets a 403 while your own authenticated pull
succeeds, which makes the problem easy to miss —
<code>docker logout ghcr.io</code> before testing.</p>
<p>The repository link takes care of itself: each module's Dockerfile carries
<code>org.opencontainers.image.source</code>, so GHCR connects the package to
the repository when the image is published, and it appears under the
repository's Packages section. Packages are owned by the
<code>podaac</code> organisation, never by a repository — the
<code>mur/</code> in <code>mur/landice</code> is part of the package name, not
a repository scope.</p>
<p><strong>Pull (on other machines):</strong></p>
<pre><code class="language-bash">docker pull ghcr.io/podaac/mur/landice:latest
docker pull ghcr.io/podaac/mur/l2p:latest
docker pull ghcr.io/podaac/mur/iquam:latest
docker pull ghcr.io/podaac/mur/mrva:latest</code></pre>
<p>The pipeline names images the way <code>build_module.sh</code> tags them locally
(<code>mur-landice:latest</code> and friends, set per stage as
<code>container_image</code> in <code>config.json</code>), so after pulling either
retag or point <code>container_image</code> at the full registry reference.</p>
<h2 id="configuration">Configuration</h2>
<h3 id="configuration-file-configjson">Configuration File (config.json)</h3>
<p><strong>Location:</strong> <code>mur/config.json</code> for local testing (relative <code>testing/...</code> paths); <code>config.container.json</code> (or any path you point <code>--config</code> at) for a real deployment with absolute paths. See <code>config.example.json</code> for a fully-commented starting point.</p>
<p><strong>This is the actual schema <code>run_mur_pipeline.py</code> reads today</strong> — one top-level object per stage (<code>landice</code>, <code>l2p</code>, <code>iquam</code>, <code>mrva</code>), no <code>containers</code>/<code>paths</code>/<code>l2p_sensors</code> wrapper objects:</p>
<pre><code class="language-json">{
"landice": {
"container_image": "mur-landice:latest",
"static_resources_dir": "testing/static-resources",
"output_dir_p011": "testing/preprocessing/output/landice-p011",
"output_dir_p01": "testing/preprocessing/output/landice-p01"
},
"l2p": {
"container_image": "mur-l2p:latest",
"input_dir": "testing/preprocessing/inputs/l2p",
"output_dir": "testing/preprocessing/output/l2p",
"active_sensors": ["AMSR2R", "MODISA", "MODIST", "AVMTAG", "AVMTBG"],
"sensors": {
"AMSR2R": {
"collection_name": ["AMSR2-REMSS-L2P-v8.2", "AMSR2-REMSS-L2P_RT-v8.2"],
"start_date": "2023-01-01T00:00:00Z",
"region": "Global",
"day_range": [2, 2],
"stable": 2
}
}
},
"iquam": {
"container_image": "mur-iquam:latest",
"output_dir": "testing/preprocessing/output/iquam",
"logs_dir": "testing/preprocessing/logs",
"buoy_dayrange": 3,
"stable_latency": 2
},
"mrva": {
"container_image": "mur-mrva:latest",
"input_dir_bic": "testing/preprocessing/output/l2p",
"input_dir_iquam": "testing/preprocessing/output/iquam",
"input_dir_landice_p011": "testing/preprocessing/output/landice-p011",
"input_dir_landice_p01": "testing/preprocessing/output/landice-p01",
"static_resources_dir": "testing/static-resources",
"output_dir_csp": "testing/mrva/output/csp",
"output_dir_netcdf": "testing/mrva/output/netcdf",
"cache_dir": "testing/mrva/cache",
"logs_dir": "testing/mrva/logs",
"active_sensors": ["IQUAM0", "AMSR2R", "MODISA", "MODIST", "AVMTAG", "AVMTBG"],
"sensors": {
"IQUAM0": {"directory": "iquam", "region": "Global", "day_range": 3},
"AMSR2R": {"directory": "AMSR2R", "region": "Global", "day_range": 2}
}
}
}</code></pre>
<p>See <code>config.example.json</code> for every sensor filled in and inline comments. <code>l2p.sensors[X].day_range</code> is a <code>[backward, forward]</code> pair; <code>mrva.sensors[X].day_range</code> is a single symmetric int — these are genuinely different shapes between the two stages, not a typo.</p>
<h3 id="configuration-parameters">Configuration Parameters</h3>
<p><strong>Per-stage <code>container_image</code>:</strong> the Docker tag <code>run_mur_pipeline.py</code> invokes for that stage (default: <code>mur-<stage>:latest</code>).</p>
<p><strong><code>landice</code>:</strong></p>
<div class="table-wrap">
<table>
<thead><tr><th>Parameter</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>static_resources_dir</code></td><td>Root containing <code>grids/</code>, <code>mat/p01/</code>, <code>mat/p011/</code> — resolved into landice's six explicit <code>--*-file</code> flags (see <a href="static-data.html">Static input data</a>)</td></tr>
<tr><td><code>output_dir_p011</code> / <code>output_dir_p01</code></td><td>Per-resolution output roots</td></tr>
</tbody>
</table>
</div>
<p><strong><code>l2p</code>:</strong></p>
<div class="table-wrap">
<table>
<thead><tr><th>Parameter</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>input_dir</code></td><td>Root of downloaded L2P granules (<code><input_dir>/<SENSOR>/<year>/<doy>/</code>), populated separately by the <code>l2p-download</code> stage or a download cron — never by <code>l2p</code> itself</td></tr>
<tr><td><code>output_dir</code></td><td>BIC output root</td></tr>
<tr><td><code>active_sensors</code></td><td>Sensors processed by default (overridable per-run with <code>--sensors</code>)</td></tr>
<tr><td><code>sensors.<NAME>.collection_name</code></td><td>PO.DAAC collection ID(s) for downloads — a list, since AMSR2R has two (final + RT)</td></tr>
<tr><td><code>sensors.<NAME>.day_range</code></td><td><code>[backward, forward]</code> days around the analysis day</td></tr>
<tr><td><code>sensors.<NAME>.stable</code></td><td>Days before data is considered stable (stops being rewritten)</td></tr>
</tbody>
</table>
</div>
<p><strong><code>iquam</code>:</strong> <code>output_dir</code>, <code>logs_dir</code>, <code>buoy_dayrange</code> (± window), <code>stable_latency</code>.</p>
<p><strong><code>mrva</code>:</strong> <code>input_dir_bic</code>/<code>input_dir_iquam</code>/<code>input_dir_landice_p011</code>/<code>input_dir_landice_p01</code> (read from the other stages' <code>output_dir</code>s — keep these in sync, <code>run_mur_pipeline.py</code> validates it), <code>static_resources_dir</code>, <code>output_dir_csp</code>/<code>output_dir_netcdf</code>, <code>cache_dir</code>, <code>logs_dir</code>, <code>active_sensors</code> (now includes <code>IQUAM0</code> alongside the satellite sensors — MRVA's BIC+iQuam fan-in is built as one unified manifest), <code>sensors.<NAME>.day_range</code> (flat int, not a pair).</p>
<p><strong>Purge Configuration:</strong></p>
<p>The purge stage uses <code>l2p.input_dir</code> as the download root and <code>l2p.active_sensors</code> for the sensor list; its threshold/log-dir behavior is controlled by CLI flags (<code>--deep-purge</code>), not config keys. It only runs when explicitly requested via <code>--execute purge</code>.</p>
<h3 id="environment-variables">Environment Variables</h3>
<p><strong>Optional overrides:</strong></p>
<pre><code class="language-bash"># Override config file location
export MUR_CONFIG=/path/to/custom_config.json
# Override netrc location
export NETRC_PATH=/path/to/.netrc
# Docker registry prefix
export MUR_REGISTRY=ghcr.io/podaac
# Logging level
export MUR_LOG_LEVEL=DEBUG</code></pre>
<h3 id="directory-structure">Directory Structure</h3>
<p><strong>Actual layout</strong>, matching <code>config.json</code>'s defaults (relative to the repo root; use absolute paths in a real deployment config, as <code>config.container.json</code> does):</p>
<pre><code>testing/
├── static-resources/ # landice.static_resources_dir, mrva.static_resources_dir
│ ├── grids/, mat/p01/, mat/p011/ # landice's six static files
│ ├── seasonal/mur_###.nc # mrva --seasonal-file
│ ├── landice/CylinderP01_edge.bip # mrva --polar-cap-edge-file
│ └── L4/ # mrva --l4-reference-root (optional bootstrap)
├── preprocessing/
│ ├── inputs/l2p/<SENSOR>/YYYY/DOY/ # l2p.input_dir -- populated by the l2p-download
│ │ # stage or a download cron, never by `l2p` itself
│ └── output/
│ ├── landice-p01/YYYY/, landice-p011/YYYY/ # landice output_dir_p01/p011
│ ├── l2p/<SENSOR>/YYYY/ # l2p.output_dir == mrva.input_dir_bic
│ └── iquam/YYYY/ # iquam.output_dir == mrva.input_dir_iquam
└── mrva/
├── output/csp/YYYY/, output/netcdf/GLOB/JPL/MUR/v4/YYYY/DOY[nrt]/
├── cache/ # mrva.cache_dir (writable scratch + seasonal25 cache)
└── logs/</code></pre>
<p><strong>Create directories:</strong></p>
<pre><code class="language-bash">mkdir -p testing/static-resources/{grids,mat/p01,mat/p011,seasonal,landice,L4}
mkdir -p testing/preprocessing/inputs/l2p/{AMSR2R,MODISA,MODIST,AVMTAG,AVMTBG}
mkdir -p testing/preprocessing/output/{landice-p01,landice-p011,iquam}
mkdir -p testing/preprocessing/output/l2p/{AMSR2R,MODISA,MODIST,AVMTAG,AVMTBG}
mkdir -p testing/mrva/{output/csp,output/netcdf,cache,logs}</code></pre>
<p>Populate <code>testing/static-resources/</code> per <a href="static-data.html">Static input data</a> before running anything — nothing in the pipeline generates those files.</p>
<h2 id="running-the-pipeline">Running the Pipeline</h2>
<h3 id="basic-usage">Basic Usage</h3>
<p><strong>Run for yesterday (NRT mode):</strong></p>
<pre><code class="language-bash">uv run mur-pipeline --config config.json</code></pre>
<p><strong>Run for specific date:</strong></p>
<pre><code class="language-bash">uv run mur-pipeline --config config.json --date 2025-02-11</code></pre>
<p><strong>Run full 9-day window (NRT + REA modes):</strong></p>
<pre><code class="language-bash">uv run mur-pipeline --config config.json --all-stages</code></pre>
<h3 id="command-line-options">Command-Line Options</h3>
<p>The flags below are the actual <code>run_mur_pipeline.py</code> argparse surface — run <code>uv run mur-pipeline --help</code> for the authoritative, always-current version.</p>
<pre><code>usage: mur-pipeline --config CONFIG [--date DATE] [-p PROCESS_DAYS] [--all-stages]
[--preprocess-only] [--debug] [--netrc-path PATH]
[--execute STAGE] [--force-nrt] [--keep-containers]
[--force-date-download] [--deep-purge] [--sensors LIST]
[--collection NAME] [--deep-sync-days N]
required arguments:
--config CONFIG Path to config.json file
optional arguments:
--date DATE Simulate running on this date (YYYY-MM-DD); default: actual today
-p, --process-days DAYS Analysis day offset(s) from run day: single ('-1') or range ('-9:-1'); default: -1 (yesterday/NRT)
--all-stages Process full 9-day window (equivalent to --process-days -9:-1)
--preprocess-only Run landice/iquam/l2p only, skip MRVA
--debug Enable debug logging
--netrc-path PATH Path to .netrc file (default: ~/.netrc)
--execute STAGE Run only these stage(s): landice, l2p-download, l2p, iquam, mrva, purge
(comma-separated or repeatable; 'l2p-download' must be requested
explicitly -- it's never part of a default run, see below)
--force-nrt Force NRT mode for all dates, overriding automatic REA/NRT detection
--keep-containers Don't auto-remove containers after execution (debugging)
--force-date-download Use bounded ±day_range downloads instead of incremental mode (testing/backfill)
--deep-purge Purge stage sweeps every year subdirectory using the 9-day scan window
(implies --execute purge if no --execute given)
--sensors LIST Filter to specific sensors for L2P stages (comma-separated)
--collection NAME Filter a single AMSR2R collection when --sensors AMSR2R is given
--deep-sync-days N l2p-download re-queries the trailing N days instead of using the
incremental watermark (recovers orphaned granules; recommended: 9)</code></pre>
<p><strong>No <code>--verbose</code>/<code>-v</code> flag exists</strong> (use <code>--debug</code>), and there is no separate <code>--run-mrva</code> flag — MRVA runs by default alongside the other stages unless you pass <code>--preprocess-only</code> or a narrower <code>--execute</code> list.</p>
<p><strong>L2P downloading is decoupled from processing, matching production.</strong> <code>run_mur_pipeline.py</code> never downloads L2P granules on its own — the <code>l2p</code> stage only turns whatever's already on disk (under <code>l2p.input_dir</code>) into BIC files. Downloads happen via the separate <code>l2p-download</code> stage (<code>--execute l2p-download</code>), normally triggered by cron (see <code>run_l2p_download_cron.sh</code>/<code>run_l2p_deepsync_cron.sh</code> at the repo root) — make sure that's actually running (or backfill manually with <code>--execute l2p-download --force-date-download</code> for a specific date) before expecting <code>l2p</code>/<code>mrva</code> to have anything to process.</p>
<h3 id="processing-modes">Processing Modes</h3>
<p><strong>NRT (Near Real-Time) Mode:</strong></p>
<pre><code class="language-bash"># Process yesterday's data (default)
uv run mur-pipeline --config config.json
# Characteristics:
# - Uses previous day's MUR as background (L=6 coefficients)
# - Skips reprocessing stable data (age >= stability_latency)
# - Fast execution (~1-2 hours)
# - Optimized for operational delivery</code></pre>
<p><strong>REA (Reanalysis) Mode:</strong></p>
<pre><code class="language-bash"># Process specific historical date
uv run mur-pipeline --config config.json --date 2024-08-08
# Characteristics:
# - Starts from coarse scale (L=2), no background
# - Respects stability latency, reprocesses if needed
# - Slower execution (~2-4 hours)
# - Optimized for accuracy</code></pre>
<p><strong>Full Window (9-day scan):</strong></p>
<pre><code class="language-bash"># Process last 9 days (mix of REA and NRT)
uv run mur-pipeline --config config.json --all-stages
# Processes:
# - Days 1-4: REA mode (historical)
# - Days 5-9: NRT mode (recent)
# - Most comprehensive processing</code></pre>
<h3 id="execution-examples">Execution Examples</h3>
<p><strong>Example 1: Daily NRT Processing</strong></p>
<pre><code class="language-bash">#!/bin/bash
# daily_mur.sh - Run at 12:00 UTC daily
cd /path/to/mur
uv run mur-pipeline --config config.json 2>&1 | tee logs/mur_$(date +%Y%m%d).log
# Check for errors
if [ $? -eq 0 ]; then
echo "MUR processing completed successfully"
else
echo "MUR processing failed" | mail -s "MUR Alert" admin@example.com
fi</code></pre>
<p><strong>Example 2: Reprocess Specific Date</strong></p>
<pre><code class="language-bash"># Reprocess a specific date (e.g., after data correction)
uv run mur-pipeline --config config.json --date 2025-01-15</code></pre>
<p><strong>Example 3: Process Only Specific Components</strong></p>
<pre><code class="language-bash"># Process only land/ice
uv run mur-pipeline --config config.json --execute landice
# Process only iQUAM
uv run mur-pipeline --config config.json --execute iquam
# Process multiple stages
uv run mur-pipeline --config config.json --execute landice --execute iquam</code></pre>
<p><strong>Example 4: Purge Old L2P Downloads</strong></p>
<pre><code class="language-bash"># Clean up L2P download directories older than the configured threshold
uv run mur-pipeline --config config.json --execute purge</code></pre>
<p>The purge stage removes day-of-year directories from the L2P download area that are older than a rolling window threshold (default: 30 days). It reads paths and sensor lists from the pipeline config and writes a dated log report. This stage only runs when explicitly requested via <code>--execute purge</code> -- it is not part of the default pipeline run.</p>
<h2 id="component-specific-execution">Component-Specific Execution</h2>
<h3 id="landice-processing">Land/Ice Processing</h3>
<p><strong>Direct container execution:</strong> every static input is an individually bind-mounted file and named flag — see <a href="container-landice.html">Land/ice container</a> for the full six-file layout and <a href="static-data.html">Static input data</a> for where those files come from.</p>
<pre><code class="language-bash">docker run --rm \
--platform linux/amd64 \
--shm-size=512M \
-v /nas2/static-resources/grids/maskGLOBp01deg.gds:/input/landmask-p01.gds:ro \
-v /nas2/static-resources/mat/p01/saf2north.mat:/input/gridindex-north-p01.mat:ro \
-v /nas2/static-resources/mat/p01/saf2south.mat:/input/gridindex-south-p01.mat:ro \
-v /nas2/static-resources/grids/maskGlob1km.gds:/input/landmask-p011.gds:ro \
-v /nas2/static-resources/mat/p011/saf2north.mat:/input/gridindex-north-p011.mat:ro \
-v /nas2/static-resources/mat/p011/saf2south.mat:/input/gridindex-south-p011.mat:ro \
-v /nas2/output/p011:/data/output/p011 \
-v /nas2/output/p01:/data/output/p01 \
mur-landice:latest \
--year 2025 --doy 042 \
--landmask-p01-file /input/landmask-p01.gds \
--gridindex-north-p01-file /input/gridindex-north-p01.mat \
--gridindex-south-p01-file /input/gridindex-south-p01.mat \
--landmask-p011-file /input/landmask-p011.gds \
--gridindex-north-p011-file /input/gridindex-north-p011.mat \
--gridindex-south-p011-file /input/gridindex-south-p011.mat</code></pre>
<p><strong>Output:</strong></p>
<pre><code>/nas2/output/p01/2025/landiceP01_2025_042.gds.gz - Land/ice mask (0.01°, used by MUR v4)
/nas2/output/p01/2025/Global_ice_2025_042.bip - Ice SST points (0.01°)
/nas2/output/p011/2025/landice_2025_042.gds.gz - Land/ice mask (0.011°, legacy)
/nas2/output/p011/2025/Global_ice_2025_042.bip - Ice SST points (0.011°)</code></pre>
<p><strong>Runtime:</strong> 2-5 minutes</p>
<h3 id="iquam-buoy-processing">iQUAM Buoy Processing</h3>
<p><strong>Direct container execution:</strong> every input is a named flag; there is no positional or "use defaults" form, and no cache mount — see <a href="container-iquam.html">iQUAM container</a> for the full parameter list.</p>
<pre><code class="language-bash">docker run --rm \
--platform linux/amd64 \
--shm-size=512M \
-v /nas2/output/iquam:/data/output/iquam \
-v /nas2/logs/iquam:/data/logs \
mur-iquam:latest \
--year 2025 --doy 042 --mode nrt --reference-date 2025-02-12 \
--work-dir /tmp/makebic --log-dir /data/logs --output-dir /data/output/iquam \
--buoy-day-range 3 --stability-latency 2</code></pre>
<p><strong>Output:</strong></p>
<pre><code>/nas2/output/iquam/2025/Global_IQUAM0_2025_042.bii</code></pre>
<p><strong>Runtime:</strong> 2-5 minutes per day (no cache — every run downloads fresh)</p>
<h3 id="l2p-satellite-processing">L2P Satellite Processing</h3>
<p><strong>Direct container execution:</strong> every input is a named flag; <code>--granules-manifest</code> replaces the old bind-mounted input directory with a JSON manifest listing exactly which granule files this run needs (local path or <code>s3://</code> href per entry) — see <a href="container-l2p.html">L2P container</a> for the manifest schema. <code>run_mur_pipeline.py</code> builds this manifest automatically from <code>l2p.input_dir</code>; the example below is for manual/debug use.</p>
<pre><code class="language-bash">docker run --rm \
--platform linux/amd64 \
--shm-size=512M \
-v /nas2/preprocessing/inputs/l2p/MODISA:/nas2/preprocessing/inputs/l2p/MODISA:ro \
-v /tmp/manifest.json:/tmp/manifest.json:ro \
-v /nas2/preprocessing/output/l2p/MODISA:/data/output \
mur-l2p:latest \
--sensor MODISA --region Global --year 2025 --doy 042 --rewrite 1 \
--granules-manifest /tmp/manifest.json</code></pre>
<p><strong>Output:</strong></p>
<pre><code>/nas2/preprocessing/output/l2p/MODISA/2025/Global_MODISA_2025_042.bic.gz</code></pre>
<p><strong>Runtime:</strong></p>
<ul>
<li>AMSR2R: 5-10 minutes</li>
<li>MODISA: 10-20 minutes</li>
<li>MODIST: 10-20 minutes</li>
<li>AVMTBG: 5-10 minutes</li>
</ul>
<p><strong>In practice, use <code>run_mur_pipeline.py</code></strong> rather than invoking the container directly — it downloads/tracks granules, builds the manifest, and handles all sensors:</p>
<pre><code class="language-bash"># All active_sensors for one day
uv run mur-pipeline --config config.json --date 2025-02-11 --execute l2p
# One sensor only
uv run mur-pipeline --config config.json --date 2025-02-11 --execute l2p --sensors MODISA</code></pre>
<h3 id="mrva-analysis">MRVA Analysis</h3>
<p><strong>Direct container execution:</strong> every input is an explicit named flag — three static-resource files, three per-day landice-output files, one <code>--sensor-inputs-manifest</code> covering the BIC + iQuam fan-in (unified, both are the same shape internally), and two optional flags. See <a href="container-mrva.html">MRVA container</a> for the full flag list and <a href="static-data.html">Static input data</a> for where the static files come from. Output directories stay fixed bind mounts, unchanged from before.</p>
<pre><code class="language-bash">docker run --rm \
--platform linux/amd64 \
--memory=72g --shm-size=2g \
-v /nas2/static-resources:/nas2/static-resources:ro \
-v /nas2/preprocessing/output:/nas2/preprocessing/output:ro \
-v /tmp/manifest.json:/tmp/manifest.json:ro \
-v /nas2/mrva/output/csp:/data/output/csp \
-v /nas2/mrva/output/netcdf:/data/output/netcdf \
-v /nas2/mrva/cache:/data/cache \
-v /nas2/mrva/logs:/data/logs \
mur-mrva:latest \
--year 2025 --doy 042 --mode nrt \
--polar-cap-edge-file /nas2/static-resources/landice/CylinderP01_edge.bip \
--seasonal-file /nas2/static-resources/seasonal/mur_042.nc \
--landice-ice-p011-file /nas2/preprocessing/output/landice-p011/2025/Global_ice_2025_042.bip \
--landice-grid-p01-file /nas2/preprocessing/output/landice-p01/2025/landiceP01_2025_042.gds.gz \
--landice-icefiles-p011-file /nas2/preprocessing/output/landice-p011/2025/icefiles_2025_042.txt \
--sensor-inputs-manifest /tmp/manifest.json \
--l4-reference-root /nas2/static-resources/L4</code></pre>
<p>Optional flags: <code>--sensors</code> (comma-separated, default all configured), <code>--mur25-grid-file</code> (absent → skip MUR25 generation), <code>--prior-csp-file</code> (absent → build the reference field from scratch), <code>--l4-reference-root</code> (absent → no L4 bootstrap fallback in <code>trimbip3a</code>; <code>run_mur_pipeline.py</code> passes it only when the directory exists), <code>--debug</code>.</p>
<p><strong>Output:</strong></p>
<pre><code>testing/mrva/output/csp/2025/2025021109_MRVA4_Global.c00 .. .c11, .u06-.u08
testing/mrva/output/netcdf/GLOB/JPL/MUR/v4/2025/042nrt/20250211090000-JPL-L4_GHRSST-SSTfnd-MUR-GLOB-v02.0-fv04.1.nc</code></pre>
<p>(<code>nrt</code> suffix on the DOY directory for NRT runs; absent for REA. NRT output is always rewritten; REA output is kept if it already exists.)</p>
<p><strong>Runtime:</strong> 30-90 minutes (NRT), longer for REA (coarser starting scale, L0=2 vs L0=6).</p>
<p><strong>In practice, use <code>run_mur_pipeline.py</code></strong> — it resolves every static/landice-output file and builds the sensor-inputs manifest automatically:</p>
<pre><code class="language-bash">uv run mur-pipeline --config config.json --date 2025-02-11 --execute mrva --keep-containers</code></pre>
<p><code>--keep-containers</code> is worth using on a first attempt against real data — if MRVA fails, the container isn't auto-removed, so <code>docker logs <container_name></code> (name printed at startup, <code>mrva_<year>_<doy>_<timestamp></code>) shows the actual MATLAB error instead of just an exit code.</p>
<h2 id="monitoring-and-logging">Monitoring and Logging</h2>
<h3 id="log-locations">Log Locations</h3>
<p><strong>Pipeline orchestrator logs:</strong></p>
<pre><code class="language-bash"># Default: stdout/stderr
uv run mur-pipeline --config config.json 2>&1 | tee logs/pipeline.log
# Logs include:
# - Stage execution status
# - Container execution commands
# - Success/failure counts
# - Timing statistics</code></pre>
<p><strong>Container logs:</strong></p>
<pre><code class="language-bash"># View recent container logs
docker logs <container_id>
# Follow logs in real-time
docker logs -f <container_id>
# Save logs to file
docker logs <container_id> > landice.log 2>&1</code></pre>
<p><strong>Component-specific logs:</strong></p>
<pre><code>/nas2/logs/landice/YYYY/DOY.log
/nas2/logs/iquam/YYYY/DOY.log
/nas2/logs/l2p/SENSOR/YYYY/DOY.log</code></pre>
<h3 id="monitoring-tools">Monitoring Tools</h3>
<p><strong>Check processing status:</strong></p>
<pre><code class="language-bash"># View running containers
docker ps
# Monitor resource usage
docker stats
# System resources
htop # or top
df -h # Disk usage</code></pre>
<p><strong>Check output files:</strong></p>
<pre><code class="language-bash"># Count files for today
find /nas2/bic -name "*_2025_042.bic.gz" | wc -l
# Check file sizes
ls -lh /nas2/bic/*/2025/*_2025_042.bic.gz
# Verify all sensors processed
for sensor in AMSR2R MODISA MODIST AVMTBG; do
if [ -f /nas2/bic/$sensor/2025/G10_${sensor}_2025_042.bic.gz ]; then
echo "$sensor: OK"
else
echo "$sensor: MISSING"
fi
done</code></pre>
<h3 id="performance-metrics">Performance Metrics</h3>
<p><strong>Track processing times:</strong></p>
<pre><code class="language-bash"># Add timing to pipeline execution
time uv run mur-pipeline --config config.json
# Typical durations:
# - Land/Ice: 2-5 minutes
# - iQUAM: 5-15 minutes (first run), <1 min (cached)
# - L2P (all sensors): 30-60 minutes (sequential), 15-25 min (parallel)
# - Total preprocessing: 40-80 minutes</code></pre>
<p><strong>Storage usage tracking:</strong></p>
<pre><code class="language-bash"># Check daily growth
du -sh /nas2/bic/*/2025/ | sort -h
# Total storage by component
du -sh /nas2/{source,gds,bip,bii,bic}</code></pre>
<h2 id="production-deployment">Production Deployment</h2>
<h3 id="cron-scheduling">Cron Scheduling</h3>
<p><strong>Daily NRT processing (12:00 UTC):</strong></p>
<pre><code class="language-cron"># /etc/cron.d/mur-processing
0 12 * * * mur_user cd /path/to/mur && uv run mur-pipeline --config config.json >> /var/log/mur/daily.log 2>&1</code></pre>
<p><strong>Hourly L2P downloads:</strong></p>
<pre><code class="language-cron"># Download MODISA data every hour
0 * * * * mur_user /path/to/scripts/download_modisa.sh >> /var/log/mur/downloads.log 2>&1
# Download MODIST data every hour
15 * * * * mur_user /path/to/scripts/download_modist.sh >> /var/log/mur/downloads.log 2>&1</code></pre>
<p><strong>Example download script:</strong></p>
<pre><code class="language-bash">#!/bin/bash
# download_modisa.sh
TODAY=$(date -u +%Y-%m-%d)
podaac-data-subscriber \
-c MODIS_A-JPL-L2P-v2019.0 \
-d /nas2/source/podaac/MODISA \
--start-date "${TODAY}T00:00:00Z" \
--end-date "${TODAY}T23:59:59Z" \
--verbose</code></pre>
<h3 id="systemd-service-alternative-to-cron">Systemd Service (Alternative to Cron)</h3>
<p><strong>Create service file:</strong> <code>/etc/systemd/system/mur-processing.service</code></p>
<pre><code class="language-ini">[Unit]
Description=MUR SST Processing Pipeline
After=network.target docker.service
[Service]
Type=oneshot
User=mur_user
WorkingDirectory=/path/to/mur
Environment="PATH=/home/mur_user/.cargo/bin:/usr/bin"
ExecStart=/home/mur_user/.cargo/bin/uv run mur-pipeline --config config.json
StandardOutput=append:/var/log/mur/pipeline.log
StandardError=append:/var/log/mur/pipeline.log
[Install]
WantedBy=multi-user.target</code></pre>
<p><strong>Create timer:</strong> <code>/etc/systemd/system/mur-processing.timer</code></p>
<pre><code class="language-ini">[Unit]
Description=Run MUR processing daily at 12:00 UTC
[Timer]
OnCalendar=*-*-* 12:00:00
Persistent=true
[Install]
WantedBy=timers.target</code></pre>
<p><strong>Enable and start:</strong></p>
<pre><code class="language-bash">sudo systemctl daemon-reload
sudo systemctl enable mur-processing.timer
sudo systemctl start mur-processing.timer
# Check status
sudo systemctl status mur-processing.timer
sudo systemctl list-timers mur-processing.timer</code></pre>
<h3 id="high-availability-setup">High-Availability Setup</h3>
<p><strong>Multiple processing nodes:</strong></p>
<pre><code class="language-bash"># Node 1: Process even days
0 12 * * * [ $(($(date +\%d) \% 2)) -eq 0 ] && /path/to/run_pipeline.sh
# Node 2: Process odd days
0 12 * * * [ $(($(date +\%d) \% 2)) -eq 1 ] && /path/to/run_pipeline.sh</code></pre>
<p><strong>Shared storage (NFS/GlusterFS):</strong></p>
<pre><code class="language-bash"># Mount shared storage
sudo mount -t nfs storage.example.com:/nas2 /nas2
# Add to /etc/fstab for persistence
storage.example.com:/nas2 /nas2 nfs defaults 0 0</code></pre>
<h2 id="troubleshooting">Troubleshooting</h2>
<h3 id="common-issues">Common Issues</h3>
<p><strong>Issue 1: Docker permission denied</strong></p>
<pre><code>Error: permission denied while trying to connect to Docker daemon</code></pre>
<p><strong>Solution:</strong></p>
<pre><code class="language-bash"># Add user to docker group
sudo usermod -aG docker $USER
# Apply changes (logout/login or use newgrp)
newgrp docker
# Verify
docker ps</code></pre>
<p><strong>Issue 2: Container fails with "no space left on device"</strong></p>
<pre><code>Error: no space left on device</code></pre>
<p><strong>Solution:</strong></p>
<pre><code class="language-bash"># Check disk usage
df -h
# Clean Docker cache
docker system prune -a --volumes
# Check Docker disk usage
docker system df</code></pre>
<p><strong>Issue 3: MATLAB Runtime error (shm-size)</strong></p>
<pre><code>Error: Insufficient shared memory</code></pre>
<p><strong>Solution:</strong></p>
<pre><code class="language-bash"># Add --shm-size flag
docker run --shm-size=512M ...
# Or increase if needed
docker run --shm-size=1G ...</code></pre>
<p><strong>Issue 4: L2P download fails (authentication)</strong></p>
<pre><code>Error: 401 Unauthorized</code></pre>
<p><strong>Solution:</strong></p>
<pre><code class="language-bash"># Verify .netrc file
cat ~/.netrc
chmod 600 ~/.netrc
# Test authentication
curl -n https://podaac.jpl.nasa.gov/
# Re-approve PO.DAAC app
# Visit: https://urs.earthdata.nasa.gov/approve_app?client_id=BO_n7nTIlMljdvU6kRRB3g</code></pre>
<p><strong>Issue 5: Missing output files</strong></p>
<pre><code>Expected output not created</code></pre>
<p><strong>Solution:</strong></p>
<pre><code class="language-bash"># Check container logs
docker logs <container_id>
# Verify input data exists
ls /nas2/source/podaac/MODISA/2025/042/
# Check permissions
ls -ld /nas2/bic/MODISA/
# Run with verbose logging
docker run -e VERBOSE=1 ...</code></pre>
<h3 id="debug-mode">Debug Mode</h3>
<p><strong>Enable verbose logging:</strong></p>
<pre><code class="language-bash"># Pipeline orchestrator
uv run mur-pipeline --config config.json --verbose
# Container debugging
docker run -e DEBUG=1 -e VERBOSE=1 ...</code></pre>
<p><strong>Interactive container debugging:</strong></p>
<pre><code class="language-bash"># Override entrypoint to get shell
docker run -it --rm --entrypoint /bin/bash mur-landice:latest
# Inside container, run the compiled executable directly — it takes the
# same positional order entrypoint.sh's build_command assembles from the
# named flags: six static files (p01 landmask, p01 gridindex north/south,
# p011 landmask, p011 gridindex north/south), then the two output dirs,
# then year, then doy
ls /opt/landice/bin
/opt/landice/bin/LandiceProcessor \
/input/landmask-p01.gds /input/gridindex-north-p01.mat /input/gridindex-south-p01.mat \
/input/landmask-p011.gds /input/gridindex-north-p011.mat /input/gridindex-south-p011.mat \
/output/p011 /output/p01 2025 042</code></pre>
<p><strong>MRVA's compiled binary takes a different form</strong> — <code>entrypoint.sh</code> resolves every named flag, writes them into one generated JSON config file, and invokes <code>MrvaProcessor <year> <doy> <mode> <config_file_path></code> (just 4 positional args, not one per input — see <code>mrva/bin/entrypoint.sh</code>'s <code>write_config()</code>). To debug MRVA directly, either let <code>entrypoint.sh</code> build the config file for you and only override the final <code>exec</code>, or construct the JSON yourself matching <code>mrva4com_container.m</code>'s expected fields (<code>polar_cap_edge_file</code>, <code>seasonal_file</code>, <code>landice_ice_p011_file</code>, <code>landice_grid_p01_file</code>, <code>landice_icefiles_p011_file</code>, <code>sensor_inputs_root</code>, <code>l4_reference_root</code>, optional <code>mur25_grid_file</code>/<code>prior_csp_file</code>/<code>sensors</code>/<code>debug</code>) and pass its path directly:</p>
<pre><code class="language-bash">docker run -it --rm --entrypoint /bin/bash mur-mrva:latest
/opt/mrva/bin/MrvaProcessor 2025 042 nrt /tmp/mrva_config.json</code></pre>
<h3 id="performance-troubleshooting">Performance Troubleshooting</h3>
<p><strong>Slow processing:</strong></p>
<pre><code class="language-bash"># Check CPU usage
htop
# Check I/O wait
iostat -x 5
# Check network (if downloading)
iftop
# Run single sensor to isolate issue
docker run ... mur-l2p:latest AMSR2R ...</code></pre>
<p><strong>High memory usage:</strong></p>
<pre><code class="language-bash"># Monitor container memory
docker stats
# Limit container memory
docker run --memory=4g --memory-swap=8g ...</code></pre>
<h3 id="log-analysis">Log Analysis</h3>
<p><strong>Search for errors:</strong></p>
<pre><code class="language-bash"># Pipeline logs
grep -i error logs/pipeline.log
# Container logs
docker logs <container_id> 2>&1 | grep -i error
# System logs
journalctl -u mur-processing -n 100</code></pre>
<p><strong>Common error patterns:</strong></p>
<pre><code class="language-bash"># Missing input files
grep "FileNotFoundError" logs/*.log
# Container crashes
grep "signal" logs/*.log
# Timeout issues
grep "timeout" logs/*.log</code></pre>
<h2 id="summary">Summary</h2>
<p>The MUR preprocessing pipeline provides:</p>
<ul>
<li><strong>Easy installation:</strong> uv-based Python environment + Docker containers</li>
<li><strong>Flexible configuration:</strong> JSON config file with path customization</li>
<li><strong>Multiple modes:</strong> NRT for speed, REA for accuracy</li>
<li><strong>Component execution:</strong> Run individual stages or full pipeline</li>
<li><strong>Production-ready:</strong> Cron/systemd scheduling, logging, monitoring</li>
<li><strong>Troubleshooting:</strong> Comprehensive debug options and common solutions</li>
</ul>
<p><strong>Current Status:</strong> All four stages (Land/Ice, iQUAM, L2P, MRVA) are operational and produce a full NetCDF4 MUR product via <code>run_mur_pipeline.py</code>. Every container takes its inputs as explicit named flags (local path or <code>s3://</code> href, uniformly) rather than bind-mounted directories — see the <a href="input-contract.html">input contract</a> for the full design, and <a href="maap.html">running on MAAP</a> for the equivalent cloud-side status.</p>
<h2 id="references">References</h2>
<ul>
<li><a href="index.html">System overview</a> - System architecture overview</li>
<li><a href="lifecycle.html">Data lifecycle</a> - Data flow and caching</li>
<li><a href="sensors.html">Adding a sensor</a> - Adding new sensors</li>
<li><a href="static-data.html">Static input data</a> - Static/semi-static reference file layout and explicit-flag resolution</li>
<li><a href="maap.html">Running on MAAP</a> - MAAP (cloud) execution status, as distinct from this document's local-Docker focus</li>
<li>Component READMEs:
<ul>
<li><a href="container-landice.html">Land/ice container</a></li>
<li><a href="container-iquam.html">iQUAM container</a></li>
<li><a href="container-l2p.html">L2P container</a></li>
<li><a href="container-mrva.html">MRVA container</a></li>
</ul>
</li>
</ul>
<footer>
<p>Part of the <a href="https://github.com/podaac/mur">PO.DAAC MUR SST</a> project. This site is
the documentation — there is no separate Markdown copy to fall out of date.</p>
</footer>
</div>
</main>
</div>
<script src="https://cdn.jsdelivr.net/npm/mermaid@11.4.1/dist/mermaid.min.js"></script>
<script src="assets/site.js"></script>
</body>
</html>