File: nco.html

package info (click to toggle)
nco 2.9.9-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 7,040 kB
  • ctags: 2,224
  • sloc: ansic: 17,950; sh: 11,178; cpp: 2,252; makefile: 1,277; lex: 1,041; perl: 586; yacc: 543
file content (7343 lines) | stat: -rw-r--r-- 562,744 bytes parent folder | download | duplicates (2)
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
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
<html lang="en">
<head>
<title>NCO 2.9.9 User's Guide</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="NCO 2.9.9 User's Guide">
<meta name="generator" content="makeinfo 4.7">
<link title="Top" rel="top" href="#Top">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc { font-variant:small-caps }
  span.roman { font-family: serif; font-weight: normal; } 
--></style>
</head>
<body>
<h1 class="settitle">NCO 2.9.9 User's Guide</h1>
<div class="node">
<p><hr>
<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Foreword">Foreword</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<br>
</div>

<ul class="menu">
<li><a accesskey="1" href="#Foreword">Foreword</a>
<li><a accesskey="2" href="#Summary">Summary</a>
<li><a accesskey="3" href="#Introduction">Introduction</a>
<li><a accesskey="4" href="#Strategies">Strategies</a>
<li><a accesskey="5" href="#Common-features">Common features</a>
<li><a accesskey="6" href="#Operator-Reference-Manual">Operator Reference Manual</a>
<li><a accesskey="7" href="#Contributing">Contributing</a>
<li><a accesskey="8" href="#General-Index">General Index</a>
</ul>

   <p><a name="fwd"></a> <!-- http://nco.sf.net/nco.html#fwd --><div class="node">
<p><hr>
<a name="Foreword"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Summary">Summary</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Top">Top</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
<br>
</div>

<h2 class="unnumbered">Foreword</h2>

<p><a name="index-foreword-1"></a><a name="index-Charlie-Zender-2"></a><acronym>NCO</acronym> is the result of software needs that arose while I worked
on projects funded by <acronym>NCAR</acronym>, <acronym>NASA</acronym>, and <acronym>ARM</acronym>. 
Thinking they might prove useful as tools or templates to others,
it is my pleasure to provide them freely to the scientific community. 
Many users (most of whom I have never met) have encouraged the
development of <acronym>NCO</acronym>. 
Thanks espcially to Jan Polcher, Keith Lindsay, Arlindo da Silva, John
Sheldon, and William Weibel for stimulating suggestions and
correspondence. 
Your encouragment motivated me to complete the <cite>NCO User's Guide</cite>. 
So if you like <acronym>NCO</acronym>, send me a note! 
I&nbsp;should<!-- /@w --> mention that <acronym>NCO</acronym> is not connected to or
officially endorsed by Unidata, <acronym>ACD</acronym>, <acronym>ASP</acronym>,
<acronym>CGD</acronym>, or Nike.<br>
   <pre class="sp">

</pre>
Charlie Zender<br>
May 1997<br>
Boulder, Colorado<br>

   <pre class="sp">


</pre>
Major feature improvements entitle me to write another Foreword. 
In the last five years a lot of work has been done refining
<acronym>NCO</acronym>. 
<a name="index-open-source-3"></a><acronym>NCO</acronym> is now an open source project and appears to be much
healthier for it. 
The list of illustrious institutions which do not endorse <acronym>NCO</acronym>
continues to grow, and now includes <acronym>UCI</acronym>.<br>
   <pre class="sp">

</pre>
Charlie Zender<br>
October 2000<br>
Irvine, California<br>

   <pre class="sp">


</pre>
The most remarkable advances in  <acronym>NCO</acronym> capabilities in the last
few years are due to contributions from the Open Source community. 
Especially noteworthy are the contributions of Henry Butowsky and Rorik
Peterson.<br>
   <pre class="sp">

</pre>
Charlie Zender<br>
January 2003<br>
Irvine, California<br>

   <p><a name="smr"></a> <!-- http://nco.sf.net/nco.html#smr --><div class="node">
<p><hr>
<a name="Summary"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Introduction">Introduction</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Foreword">Foreword</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
<br>
</div>

<h2 class="unnumbered">Summary</h2>

<p><a name="index-operators-4"></a><a name="index-summary-5"></a>This manual describes <acronym>NCO</acronym>, which stands for netCDF Operators. 
<acronym>NCO</acronym> is a suite of programs known as <dfn>operators</dfn>. 
Each operator is a standalone, command line program executed at the
shell-level like, e.g., <span class="command">ls</span> or <span class="command">mkdir</span>. 
The operators take netCDF file(s) (or <acronym>HDF4</acronym> files) as input,
perform an operation (e.g., averaging or hyperslabbing), and produce a
netCDF file as output. 
The operators are primarily designed to aid manipulation and analysis of
data. 
The examples in this documentation are typical applications of the
operators for processing climate model output. 
This reflects their origin, but the operators are as general as netCDF
itself.

   <p><a name="ntr"></a> <!-- http://nco.sf.net/nco.html#ntr --><div class="node">
<p><hr>
<a name="Introduction"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Strategies">Strategies</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Summary">Summary</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
<br>
</div>

<h2 class="chapter">1 Introduction</h2>

<p><a name="index-introduction-6"></a>

<ul class="menu">
<li><a accesskey="1" href="#Availability">Availability</a>
<li><a accesskey="2" href="#Compatability">Compatability</a>
<li><a accesskey="3" href="#Libraries">Libraries</a>
<li><a accesskey="4" href="#netCDF-2_002ex-vs_002e-3_002ex">netCDF 2.x vs. 3.x</a>
<li><a accesskey="5" href="#Help-and-Bug-reports">Help and Bug reports</a>
</ul>

<div class="node">
<p><hr>
<a name="Availability"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Compatability">Compatability</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Introduction">Introduction</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Introduction">Introduction</a>
<br>
</div>

<h3 class="section">1.1 Availability</h3>

<p><a name="index-_0040acronym_007bNCO_007d-availability-7"></a><a name="index-source-code-8"></a>The complete <acronym>NCO</acronym> source distribution is currently distributed
as a <dfn>compressed tarfile</dfn> from
<a href="http://sf.net/projects/nco">http://sf.net/projects/nco</a>
and from
<a href="http://dust.ess.uci.edu/nco/nco.tar.gz">http://dust.ess.uci.edu/nco/nco.tar.gz</a>. 
The compressed tarfile must be uncompressed and untarred before building
<acronym>NCO</acronym>. 
Uncompress the file with <span class="samp">gunzip nco.tar.gz</span>. 
Extract the source files from the resulting tarfile with <span class="samp">tar -xvf
nco.tar</span>. 
<acronym>GNU</acronym> <code>tar</code> lets you perform both operations in one step
with <span class="samp">tar -xvzf nco.tar.gz</span>.

   <p><a name="index-documentation-9"></a><a name="index-WWW-documentation-10"></a><a name="index-on_002dline-documentation-11"></a><a name="index-_0040acronym_007bHTML_007d-12"></a><a name="index-_0040TeX_007b_007dinfo-13"></a><a name="index-Info-14"></a><a name="index-_0040cite_007bUser_0027s-Guide_007d-15"></a><a name="index-_0040cite_007bNCO-User_0027s-Guide_007d-16"></a>The documentation for <acronym>NCO</acronym> is called the
<cite>NCO User's Guide</cite>. 
The <cite>User's Guide</cite> is available in Postscript, <acronym>HTML</acronym>,
<acronym>DVI</acronym>, TeXinfo, and Info formats. 
These formats are included in the source distribution in the files
<span class="file">nco.ps</span>, <span class="file">nco.html</span>, <span class="file">nco.dvi</span>, <span class="file">nco.texi</span>, and
<span class="file">nco.info*</span>, respectively. 
All the documentation descends from a single source file,
<span class="file">nco.texi</span>
<a rel="footnote" href="#fn-1" name="fnd-1"><sup>1</sup></a>. 
Hence the documentation in every format is very similar. 
However, some of the complex mathematical expressions needed to describe
<span class="command">ncwa</span> can only be displayed in the Postscript and <acronym>DVI</acronym>
formats.

   <p><a name="index-_0040acronym_007bNCO_007d-homepage-17"></a>If you want to quickly see what the latest improvements in <acronym>NCO</acronym>
are (without downloading the entire source distribution), visit the
<acronym>NCO</acronym> homepage at
<a href="http://nco.sf.net">http://nco.sf.net</a>. 
The <acronym>HTML</acronym> version of the <cite>User's Guide</cite> is also available
online through the World Wide Web at <acronym>URL</acronym>
<a href="http://nco.sf.net/nco.html">http://nco.sf.net/nco.html</a>. 
<a name="index-netCDF-18"></a>To build and use <acronym>NCO</acronym>, you must have netCDF installed. 
The netCDF homepage is
<a href="http://www.unidata.ucar.edu/packages/netcdf">http://www.unidata.ucar.edu/packages/netcdf</a>.

   <p>New <acronym>NCO</acronym> releases are announced on the netCDF list and on the
<code>nco-announce</code> mailing list
<a href="http://lists.sf.net/mailman/listinfo/nco-announce">http://lists.sf.net/mailman/listinfo/nco-announce</a>.

<div class="node">
<p><hr>
<a name="Compatability"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Libraries">Libraries</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Availability">Availability</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Introduction">Introduction</a>
<br>
</div>

<h3 class="section">1.2 Operating systems compatible with <acronym>NCO</acronym></h3>

<p><a name="index-_0040acronym_007bOS_007d-19"></a><a name="index-_0040acronym_007bIBM_007d-20"></a><a name="index-_0040acronym_007bNEC_007d-21"></a><a name="index-_0040acronym_007bSGI_007d-22"></a><a name="index-_0040acronym_007bHP_007d-23"></a><a name="index-_0040acronym_007bDEC_007d-24"></a><a name="index-Cray-25"></a><a name="index-Digital-26"></a><a name="index-Sun-27"></a><a name="index-Intel-28"></a><a name="index-Comeau-29"></a><a name="index-Compaq-30"></a><a name="index-Macintosh-31"></a><a name="index-Microsoft-32"></a><a name="index-Windows-33"></a><a name="index-compatability-34"></a><a name="index-portability-35"></a><a name="index-installation-36"></a><acronym>NCO</acronym> has been successfully ported and tested and is known to
work on the following 32 and 64 bit platforms:
<!-- alphabetize by OS name -->
<acronym>IBM AIX</acronym> 4.x, 5.x,
FreeBSD 4.x,
<acronym>GNU</acronym>/Linux 2.x, LinuxPPC, LinuxAlpha, LinuxSparc64,
<acronym>SGI IRIX</acronym> 5.x and 6.x,
MacOS&nbsp;X<!-- /@w --> 10.x,
<acronym>NEC</acronym> Super-UX 10.x,
<acronym>DEC OSF</acronym>,
Sun SunOS 4.1.x, Solaris 2.x,
<acronym>Cray UNICOS</acronym> 8.x&ndash;10.x,
all MS Windows. 
If you port the code to a new operating system, please send me a note
and any patches you required.

   <p><a name="index-_0040acronym_007bUNIX_007d-37"></a><a name="index-Unidata-38"></a><a name="index-UDUnits-39"></a>The major prerequisite for installing <acronym>NCO</acronym> on a particular
platform is the successful, prior installation of the netCDF library
(and, as of 2003, the UDUnits library). 
Unidata has shown a commitment to maintaining netCDF and UDUnits on all
popular <acronym>UNIX</acronym> platforms, and is moving towards full support for
the Microsoft Windows operating system (<acronym>OS</acronym>). 
Given this, the only difficulty in implementing <acronym>NCO</acronym> on a
particular platform is standardization of various C and Fortran
interface and system calls. 
<acronym>NCO</acronym> code is tested for <acronym>ANSI</acronym> compliance by
compiling with C&nbsp;compilers<!-- /@w --> including those from
<a name="index-_0040command_007bCC_007d-40"></a><a name="index-_0040command_007bc_002b_002b_007d-41"></a><a name="index-_0040command_007bcc_007d-42"></a><a name="index-_0040command_007bcomo_007d-43"></a><a name="index-_0040command_007bcxx_007d-44"></a><a name="index-_0040command_007bgcc_007d-45"></a><a name="index-_0040command_007bicc_007d-46"></a><a name="index-_0040command_007bxlC_007d-47"></a><a name="index-_0040command_007bxlc_007d-48"></a><acronym>GNU</acronym> (<span class="samp">gcc -std=c99 -pedantic -D_BSD_SOURCE</span> -Wall)
<a rel="footnote" href="#fn-2" name="fnd-2"><sup>2</sup></a>,
Comeau Computing (<span class="samp">como --c99</span>),
Cray (<span class="samp">cc</span>),
<acronym>HP</acronym>/Compaq/<acronym>DEC</acronym> (<span class="samp">cc</span>),
<acronym>IBM</acronym> (<span class="samp">xlc -c -qlanglvl=extended</span>),
Intel (<span class="samp">icc</span>),
<acronym>NEC</acronym> (<span class="samp">cc</span>),
<acronym>SGI</acronym> (<span class="samp">cc -LANG:std</span>),
and
Sun (<span class="samp">cc</span>). 
<a name="index-C_002b_002b-49"></a><a name="index-_0040acronym_007bISO_007d-50"></a><a name="index-_0040command_007blibnco_007d-51"></a><acronym>NCO</acronym> (all commands and the <span class="command">libnco</span> library) and
the C++ interface to netCDF (called <span class="command">libnco_c++</span>) comply with
the <acronym>ISO</acronym> C++ standards as implemented by
Comeau Computing (<span class="samp">como</span>),
Cray (<span class="samp">CC</span>),
<acronym>GNU</acronym> (<span class="samp">g++ -Wall</span>),
<acronym>HP</acronym>/Compaq/<acronym>DEC</acronym> (<span class="samp">cxx</span>),
<acronym>IBM</acronym> (<span class="samp">xlC</span>),
Intel (<span class="samp">icc</span>),
<acronym>NEC</acronym> (<span class="samp">c++</span>),
<acronym>SGI</acronym> (<span class="samp">CC -LANG:std</span>),
and
Sun (<span class="samp">CC -LANG:std</span>). 
<a name="index-_0040file_007bMakefile_007d-52"></a>See <span class="file">nco/bld/Makefile</span> and <span class="file">nco/src/nco_c++/Makefile.old</span> for
more details and exact settings.

   <p><a name="index-_0040acronym_007bANSI_007d-53"></a><a name="index-C89-54"></a><a name="index-_0040code_007bprintf_007d-55"></a>Until recently (and not even yet), <acronym>ANSI</acronym>-compliant has meant
compliance with the 1989 <acronym>ISO</acronym> C-standard, usually called C89 (with
minor revisions made in 1994 and 1995). 
C89 lacks variable-size arrays, restricted pointers, and some useful
<code>printf</code> formats. 
<a name="index-C99-56"></a>These are valuable features of C99, the 1999 <acronym>ISO</acronym> C-standard. 
<acronym>NCO</acronym> is C99-compliant where possible and C89-compliant where
necessary. 
Certain branches in the code are required to satisfy the native
<acronym>SGI</acronym> and SunOS C&nbsp;compilers<!-- /@w -->, which are strictly <acronym>ANSI</acronym>
C89 compliant, and cannot benefit from C99 features. 
However, C99 features are fully supported by modern <acronym>AIX</acronym>,
<acronym>GNU</acronym>, Intel, <acronym>NEC</acronym>, Solaris, and <acronym>UNICOS</acronym>
compilers. 
<acronym>NCO</acronym> requires a C99-compliant compiler as of <acronym>NCO</acronym>
version&nbsp;2.9.8<!-- /@w -->, released in August, 2004.

   <p>The most time-intensive portion of <acronym>NCO</acronym> execution is spent in
arithmetic operations, e.g., multiplication, averaging, subtraction. 
These operations were performed in Fortran by default until August,
1999. 
This was a design decision based on the relative speed of Fortran-based
object code vs. C-based object code in late 1994. 
C&nbsp;compilers<!-- /@w --> have dramatically improved their vectorization
capabilities since 1994. 
We have accordingly replaced all Fortran subroutines with C&nbsp;functions<!-- /@w -->. 
This greatly simplifies the task of building <acronym>NCO</acronym> on nominally
unsupported platforms. 
<a name="index-C-language-57"></a>As of August 1999, <acronym>NCO</acronym> built entirely in&nbsp;C<!-- /@w --> by default. 
This allowed <acronym>NCO</acronym> to compile on any machine with an
<acronym>ANSI</acronym> C&nbsp;compiler<!-- /@w -->. 
<a name="index-C99-58"></a><a name="index-C89-59"></a><a name="index-_0040code_007brestrict_007d-60"></a>In August 2004, the first C99 feature, the <code>restrict</code> type
qualifier, entered <acronym>NCO</acronym> in version 2.9.8. 
C&nbsp;compilers<!-- /@w --> can obtain better performance with C99 restricted
pointers since they inform the compiler when it may make Fortran-like
assumptions regarding pointer contents alteration. 
Subsequently, <acronym>NCO</acronym> requires a C99 compiler to build correctly
<a rel="footnote" href="#fn-3" name="fnd-3"><sup>3</sup></a>. 
<a name="index-automagic-61"></a>Furthermore, <acronym>NCO</acronym> automagically takes advantage of extensions
to <acronym>ANSI</acronym>&nbsp;C<!-- /@w --> when compiled with the <acronym>GNU</acronym> compiler
collection, <acronym>GCC</acronym>.

   <p>As of July 2000 and <acronym>NCO</acronym> version&nbsp;1.2<!-- /@w -->, <acronym>NCO</acronym> no
longer supports performing arithmetic operations in Fortran. 
We decided to sacrifice executable speed for code maintainability
Since no objective statistics were ever performed to quantify
the difference in speed between the Fortran and C&nbsp;code<!-- /@w -->,
the performance penalty incurred by this decision is unknown. 
Supporting Fortran involves maintaining two sets of routines for every
arithmetic operation. 
The <code>USE_FORTRAN_ARITHMETIC</code> flag is still retained in the
<span class="file">Makefile</span>. 
The file containing the Fortran code, <span class="file">nco_fortran.F</span>, has been
deprecated but can be resurrected if a volunteer comes forward. 
If you would like to volunteer to maintain <span class="file">nco_fortran.F</span> please
contact me.

<!-- Following section is obsolete -->
<ul class="menu">
<li><a accesskey="1" href="#Windows-Operating-System">Windows Operating System</a>
</ul>

   <p><a name="wnd"></a> <!-- http://nco.sf.net/nco.html#wnd --><div class="node">
<p><hr>
<a name="Windows-Operating-System"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#Compatability">Compatability</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Compatability">Compatability</a>
<br>
</div>

<h4 class="subsection">1.2.1 Compiling <acronym>NCO</acronym> for Microsoft Windows <acronym>OS</acronym></h4>

<p><a name="index-Windows-62"></a><a name="index-Microsoft-63"></a><a name="index-XP-_0028Microsoft-operating-system_0029-64"></a><a name="index-NT-_0028Microsoft-operating-system_0029-65"></a>
<a name="index-_0040code_007bUSE_005fFORTRAN_005fARITHMETIC_007d-66"></a><acronym>NCO</acronym> has been successfully ported and tested on the Microsoft
Windows (95/98/NT/2000/XP) operating systems. 
The switches necessary to accomplish this are included in the standard
distribution of <acronym>NCO</acronym>. 
Using the freely available Cygwin (formerly gnu-win32) development
environment
<a rel="footnote" href="#fn-4" name="fnd-4"><sup>4</sup></a>, the compilation process is very similar to
installing <acronym>NCO</acronym> on a <acronym>UNIX</acronym> system. 
<a name="index-preprocessor-tokens-67"></a><a name="index-_0040code_007bUSE_005fFORTRAN_005fARITHMETIC_007d-68"></a><a name="index-Cygwin-69"></a><a name="index-_0040code_007bgnu_002dwin32_007d-70"></a><a name="index-_0040code_007bWIN32_007d-71"></a><a name="index-_0040file_007bGNUmakefile_007d-72"></a><a name="index-_0040file_007bMakefile_007d-73"></a><a name="index-_0040code_007bf90_007d-74"></a>Set the <code>PVM_ARCH</code> preprocessor token to <code>WIN32</code>. 
Note that defining <code>WIN32</code> has the side effect of disabling
Internet features of <acronym>NCO</acronym> (see below). 
Unless you have a Fortran compiler (like <span class="command">g77</span> or <span class="command">f90</span>)
available, no other tokens are required. 
Users with fast Fortran compilers may wish to activate the Fortran
arithmetic routines. 
To do this, define the preprocessor token <code>USE_FORTRAN_ARITHMETIC</code>
in the makefile which comes with <acronym>NCO</acronym>, <span class="file">Makefile</span>, or in
the compilation shell.

   <p><a name="index-_0040acronym_007bUNIX_007d-75"></a><a name="index-_0040code_007bgetuid_007d-76"></a><a name="index-_0040code_007bgethostname_007d-77"></a><a name="index-_0040file_007b_003carpa_002fnameser_002eh_003e_007d-78"></a><a name="index-_0040file_007b_003cresolv_002eh_003e_007d-79"></a>The least portable section of the code is the use of standard
<acronym>UNIX</acronym> and Internet protocols (e.g., <code>ftp</code>, <code>rcp</code>,
<code>scp</code>, <code>getuid</code>, <code>gethostname</code>, and header files
<span class="file">&lt;arpa/nameser.h&gt;</span> and
<span class="file">&lt;resolv.h&gt;</span>). 
<a name="index-_0040code_007bftp_007d-80"></a><a name="index-_0040code_007brcp_007d-81"></a><a name="index-_0040code_007bscp_007d-82"></a><a name="index-_0040acronym_007bSSH_007d-83"></a><a name="index-remote-files-84"></a>Fortunately, these <acronym>UNIX</acronym>-y calls are only invoked by the single
<acronym>NCO</acronym> subroutine which is responsible for retrieving files
stored on remote systems (see <a href="#Remote-storage">Remote storage</a>). 
In order to support <acronym>NCO</acronym> on the Microsoft Windows platforms,
this single feature was disabled (on Windows <acronym>OS</acronym> only). 
This was required by Cygwin&nbsp;18.x<!-- /@w -->&mdash;newer versions of Cygwin may
support these protocols (let me know if this is the case). 
The <acronym>NCO</acronym> operators should behave identically on Windows and
<acronym>UNIX</acronym> platforms in all other respects.

   <p><a name="lbr"></a> <!-- http://nco.sf.net/nco.html#lbr --><div class="node">
<p><hr>
<a name="Libraries"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#netCDF-2_002ex-vs_002e-3_002ex">netCDF 2.x vs. 3.x</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Compatability">Compatability</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Introduction">Introduction</a>
<br>
</div>

<h3 class="section">1.3 Libraries</h3>

<p><a name="index-libraries-85"></a><a name="index-_0040code_007bLD_005fLIBRARY_005fPATH_007d-86"></a><a name="index-dynamic-linking-87"></a><a name="index-static-linking-88"></a>Like all executables, the <acronym>NCO</acronym> operators can be built using dynamic
linking. 
<a name="index-performance-89"></a><a name="index-operator-speed-90"></a><a name="index-speed-91"></a><a name="index-execution-time-92"></a>This reduces the size of the executable and can result in significant
performance enhancements on multiuser systems. 
Unfortunately, if your library search path (usually the
<span class="env">LD_LIBRARY_PATH</span> environment variable) is not set correctly, or if
the system libraries have been moved, renamed, or deleted since
<acronym>NCO</acronym> was installed, it is possible <acronym>NCO</acronym> operators
will fail with a message that they cannot find a dynamically loaded (aka
<dfn>shared object</dfn> or <span class="samp">.so</span>) library. 
This will produce a distinctive error message, such as
<span class="samp">ld.so.1: /usr/local/bin/ncea: fatal: libsunmath.so.1: can't
open file: errno=2</span>. 
If you received an error message like this, ask your system
administrator to diagnose whether the library is truly missing
<a rel="footnote" href="#fn-5" name="fnd-5"><sup>5</sup></a>, or whether you
simply need to alter your library search path. 
As a final remedy, you may re-compile and install <acronym>NCO</acronym> with all
operators statically linked.

<div class="node">
<p><hr>
<a name="netCDF-2_002ex-vs_002e-3_002ex"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Help-and-Bug-reports">Help and Bug reports</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Libraries">Libraries</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Introduction">Introduction</a>
<br>
</div>

<h3 class="section">1.4 netCDF 2.x vs. 3.x</h3>

<p><a name="index-netCDF-2_002ex-93"></a><a name="index-netCDF-3_002ex-94"></a>netCDF version&nbsp;2.x<!-- /@w --> was released in 1993. 
<acronym>NCO</acronym> (specifically <span class="command">ncks</span>) began soon after this in 1994. 
netCDF&nbsp;3.0<!-- /@w --> was released in 1996, and we were eager to reap the
performance advantages of the newer netCDF implementation. 
One netCDF&nbsp;3.x<!-- /@w --> interface call (<code>nc_inq_libvers</code>) was added to
<acronym>NCO</acronym> in January, 1998, to aid in maintainance and debugging. 
In March, 2001, the final conversion of <acronym>NCO</acronym> to netCDF&nbsp;3.x<!-- /@w -->
was completed (coincidentally on the same day netCDF&nbsp;3.5<!-- /@w --> was
released). 
<acronym>NCO</acronym> versions&nbsp;2.0<!-- /@w --> and higher are built with the
<code>-DNO_NETCDF_2</code> flag to ensure no netCDF&nbsp;2.x<!-- /@w --> interface calls
are used. 
<a name="index-_0040code_007bNO_005fNETCDF_005f2_007d-95"></a>
<a name="index-_0040acronym_007bHDF_007d-96"></a><a name="index-Hierarchical-Data-Format-97"></a><a name="index-Mike-Folk-98"></a>However, the ability to compile <acronym>NCO</acronym> with only netCDF&nbsp;2.x<!-- /@w -->
calls is worth maintaining because <acronym>HDF</acronym> version&nbsp;4<!-- /@w -->
<a rel="footnote" href="#fn-6" name="fnd-6"><sup>6</sup></a>
(available from <a href="http://hdf.ncsa.uiuc.edu">HDF</a>)
supports only the netCDF&nbsp;2.x<!-- /@w --> library calls
(see <a href="http://hdf.ncsa.uiuc.edu/UG41r3_html/SDS_SD.fm12.html#47784">http://hdf.ncsa.uiuc.edu/UG41r3_html/SDS_SD.fm12.html#47784</a>). 
Note that there are multiple versions of <acronym>HDF</acronym>. 
Currently <acronym>HDF</acronym> version&nbsp;4.x<!-- /@w --> supports netCDF&nbsp;2.x<!-- /@w --> and thus
<acronym>NCO</acronym> version&nbsp;1.2.x<!-- /@w -->. 
If <acronym>NCO</acronym> version&nbsp;1.2.x<!-- /@w --> (or earlier) is built with only
netCDF&nbsp;2.x<!-- /@w --> calls then all <acronym>NCO</acronym> operators should work with
<acronym>HDF4</acronym> files as well as netCDF files
<a rel="footnote" href="#fn-7" name="fnd-7"><sup>7</sup></a>. 
<a name="index-_0040code_007bNETCDF2_005fONLY_007d-99"></a>The preprocessor token <code>NETCDF2_ONLY</code> exists
in <acronym>NCO</acronym> version&nbsp;1.2.x<!-- /@w --> to eliminate all netCDF&nbsp;3.x<!-- /@w -->
calls. 
Only versions of <acronym>NCO</acronym> numbered 1.2.x and earlier have this
capability. 
The <acronym>NCO</acronym>&nbsp;1.2.x<!-- /@w --> branch will be maintained with bugfixes only
(no new features) until <acronym>HDF</acronym> begins to fully support the
netCDF&nbsp;3.x<!-- /@w --> interface (which is employed by <acronym>NCO</acronym>&nbsp;2.x<!-- /@w -->). 
If, at compilation time, <code>NETCDF2_ONLY</code> is defined, then
<acronym>NCO</acronym> version&nbsp;1.2.x<!-- /@w --> will not use any netCDF&nbsp;3.x<!-- /@w --> calls
and, if linked properly, the resulting <acronym>NCO</acronym> operators will work
with <acronym>HDF4</acronym> files. 
<a name="index-_0040file_007bMakefile_007d-100"></a>The <span class="file">Makefile</span> supplied with <acronym>NCO</acronym>&nbsp;1.2.x<!-- /@w --> is written
to simplify building in this <acronym>HDF</acronym> capability. 
When <acronym>NCO</acronym> is built with <code>make HDF4=Y</code>, the <span class="file">Makefile</span>
sets all required preprocessor flags and library links to build
with the <acronym>HDF4</acronym> libraries (which are assumed to reside under
<code>/usr/local/hdf4</code>, edit the <span class="file">Makefile</span> to suit your
installation).

   <p><a name="index-Unidata-101"></a><a name="index-_0040acronym_007bNCSA_007d-102"></a><acronym>HDF</acronym> version&nbsp;5.x<!-- /@w --> became available in 1999, but did not
support netCDF (or, for that matter, Fortran) as of December 1999. 
By early 2001, <acronym>HDF</acronym> version&nbsp;5.x<!-- /@w --> did support Fortran90. 
However, support for netCDF&nbsp;3.x<!-- /@w --> in <acronym>HDF</acronym>&nbsp;5.x<!-- /@w --> is
incomplete. 
Much of the HDF5-netCDF3 interface is complete, however, and it may be
separately downloaded from the
<a href="http://hdf.ncsa.uiuc.edu/HDF5/papers/netcdfh5.html">HDF5-netCDF</a>
website. 
Now that <acronym>NCO</acronym> uses only netCDF&nbsp;3.x<!-- /@w --> system calls we are
eager for HDF5 to add complete netCDF&nbsp;3.x<!-- /@w --> support. 
This is scheduled to occur sometime in 2005, with the release of netCDF
version&nbsp;4<!-- /@w -->, a collaboration between Unidata and <acronym>NCSA</acronym>.

   <p><a name="hlp"></a> <!-- http://nco.sf.net/nco.html#hlp -->
<a name="bug"></a> <!-- http://nco.sf.net/nco.html#bug --><div class="node">
<p><hr>
<a name="Help-and-Bug-reports"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#netCDF-2_002ex-vs_002e-3_002ex">netCDF 2.x vs. 3.x</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Introduction">Introduction</a>
<br>
</div>

<h3 class="section">1.5 Help and Bug reports</h3>

<p><a name="index-reporting-bugs-103"></a><a name="index-bugs_002c-reporting-104"></a><a name="index-core-dump-105"></a><a name="index-help-106"></a><a name="index-features_002c-requesting-107"></a>We generally receive three categories of mail from users: help requests,
bug reports, and feature requests. 
Notes saying the equivalent of "Hey, <acronym>NCO</acronym> continues to work
great and it saves me more time everyday than it took to write this
note" are a distant fourth.

   <p>There is a different protocol for each type of request. 
The common procedural etiquette is to communicate with us via
<acronym>NCO</acronym> Project Forums. 
Unless your request comes with money or you have damaging information
about our personal lives, use the Forums. 
They preserve a record of the questions and answers so that others
might learn from our exchange. 
Also, should <acronym>NCO</acronym> ever be funded (as is our hope), this record
will provide program officers with information they need to evaluate us.

   <p>Before posting to the <acronym>NCO</acronym> forums described below, you might
first <a href="https://sf.net/account/register.php">register</a>
your name and email address with SourceForge.net or else all of your
postings will be attributed to "nobody". 
Once registered you may choose to "monitor" any forum and to receive
(or not) email when there are any postings including responses to your
questions. 
We usually reply to the forum message, not to the original poster.

   <p>If you want us to include a new feature in <acronym>NCO</acronym>, check first to
see if that feature is already on the <a href="file:./TODO">TODO</a> list. 
If it is, why not implement that feature yourself and send us the patch? 
If the feature is not yet on the list, then send a note to the
<a href="http://sf.net/forum/forum.php?forum_id=9829">NCO Discussion forum</a>.

   <p>Read the manual before reporting a bug or posting a help request. 
Sending questions whose answers are not in the manual is the best
way to motivate us to write more documentation. 
We would also like to accentuate the contrapositive of this statement. 
If you think you have found a real bug <em>the most helpful thing you
can do is simplify the problem to a manageable size and then report it</em>. 
The first thing to do is to make sure you are running the latest
publicly released version of <acronym>NCO</acronym>.

   <p>Once you have read the manual, if you are still unable to get
<acronym>NCO</acronym> to perform a documented function, write help request. 
Follow the same procedure as described below for reporting bugs
(after all, it might be a bug). 
<a name="index-debugging-108"></a><a name="index-_0040code_007b_002dr_007d-109"></a><a name="index-_0040code_007b_002dD_007d-110"></a>That is, describe what you are trying to do, and include the complete
commands (run with <span class="samp">-D 5</span>), error messages, and version of
<acronym>NCO</acronym> (with <span class="samp">-r</span>). 
Post your help request to the
<a href="http://sf.net/forum/forum.php?forum_id=9830">NCO Help forum</a>.

   <p>If you think you are using the right command, but <acronym>NCO</acronym> is
misbehaving, then you might have found a bug. 
Incorrect numerical answers are the highest priority. 
We usually fix those within one or two days. 
Core dumps and sementation violations receive lower priority. 
They are always fixed.

   <p>How do you simplify a problem that may be revealing a bug? 
Cut out extraneous variables, dimensions, and metadata from the
offending files and re-run the command until it no longer breaks. 
Then back up one step and report the problem. 
Usually the file(s) will be very small, i.e., one variable with one or
two small dimensions ought to suffice. 
<a name="dbg"></a> <!-- http://nco.sf.net/nco.html#dbg -->
<a name="-D"></a> <!-- http://nco.sf.net/nco.html#-D --><a name="index-_0040code_007b_002dr_007d-111"></a><a name="index-_0040code_007b_002d_002drevision_007d-112"></a><a name="index-_0040code_007b_002d_002dversion_007d-113"></a><a name="index-_0040code_007b_002d_002dvrs_007d-114"></a><a name="index-_0040code_007b_002dD-_0040var_007bdebug_002dlevel_007d_007d-115"></a><a name="index-_0040code_007b_002d_002ddebug_002dlevel-_0040var_007bdebug_002dlevel_007d_007d-116"></a><a name="index-_0040code_007b_002d_002ddbg_005flvl-_0040var_007bdebug_002dlevel_007d_007d-117"></a><a name="index-_0040var_007bdebug_002dlevel_007d-118"></a><a name="index-_0040var_007bdbg_005flvl_007d-119"></a>Run the operator with <span class="samp">-r</span> and then run the command with
<span class="samp">-D 5</span> to increase the verbosity of the debugging output. 
It is very important that your report contain the exact error messages
and compile-time environment. 
Include a copy of your sample input file, or place one on a
publically accessible location, of the file(s). 
Post the full bug report to the
<a href="http://sf.net/bugs/?group_id=3331">NCO Project buglist</a>.

   <p><a name="index-installation-120"></a><a name="index-_0040command_007bautoconf_007d-121"></a><a name="index-_0040file_007bnco_002econfigure_002e_0024_0040_007bGNU_005fTRP_0040_007d_002efoo_007d-122"></a><a name="index-_0040file_007bnco_002econfig_002elog_002e_0024_0040_007bGNU_005fTRP_0040_007d_002efoo_007d-123"></a><a name="index-_0040file_007bnco_002emake_002e_0024_0040_007bGNU_005fTRP_0040_007d_002efoo_007d-124"></a><a name="index-_0040file_007bconfig_002eguess_007d-125"></a><a name="index-_0040file_007bconfigure_002eeg_007d-126"></a>Build failures count as bugs. 
Our limited machine access means we cannot fix all build failures. 
The information we need to diagnose, and often fix, build failures
are the three files output by <acronym>GNU</acronym> build tools,
<span class="file">nco.config.log.${GNU_TRP}.foo</span>,
<span class="file">nco.configure.${GNU_TRP}.foo</span>,
and <span class="file">nco.make.${GNU_TRP}.foo</span>. 
The file <span class="file">configure.eg</span> shows how to produce these files. 
Here <code>${GNU_TRP}</code> is the "<acronym>GNU</acronym> architecture triplet",
the <var>chip-vendor-OS</var> string returned by <span class="file">config.guess</span>. 
Please send us your improvements to the examples supplied in
<span class="file">configure.eg</span>. 
<a name="index-regressions-archive-127"></a>The regressions archive at <a href="http://dust.ess.uci.edu/nco/rgr">http://dust.ess.uci.edu/nco/rgr</a>
contains the build output from our standard test systems. 
You may find you can solve the build problem yourself by examining the
differences between these files and your own.

   <p><a name="str"></a> <!-- http://nco.sf.net/nco.html#str --><div class="node">
<p><hr>
<a name="Strategies"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Common-features">Common features</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Introduction">Introduction</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
<br>
</div>

<h2 class="chapter">2 Operator Strategies</h2>

<ul class="menu">
<li><a accesskey="1" href="#Philosophy">Philosophy</a>
<li><a accesskey="2" href="#Climate-model-paradigm">Climate model paradigm</a>
<li><a accesskey="3" href="#Output-files">Output files</a>
<li><a accesskey="4" href="#Appending">Appending</a>
<li><a accesskey="5" href="#Addition-Subtraction-Division-Multiplication-and-Interpolation">Addition Subtraction Division Multiplication and Interpolation</a>
<li><a accesskey="6" href="#Averaging-vs_002e-Concatenating">Averaging vs. Concatenating</a>
<li><a accesskey="7" href="#Large-numbers-of-input-files">Large numbers of input files</a>
<li><a accesskey="8" href="#Large-Datasets-and-Memory">Large Datasets and Memory</a>
<li><a accesskey="9" href="#Memory-usage">Memory usage</a>
<li><a href="#Operator-limitations">Operator limitations</a>
</ul>

<p><a name="phl"></a> <!-- http://nco.sf.net/nco.html#phl --><div class="node">
<p><hr>
<a name="Philosophy"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Climate-model-paradigm">Climate model paradigm</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Strategies">Strategies</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Strategies">Strategies</a>
<br>
</div>

<h3 class="section">2.1 <acronym>NCO</acronym> operator philosophy</h3>

<p><a name="index-philosophy-128"></a><a name="index-climate-model-129"></a>
The main design goal has been to produce operators that can be invoked
from the command line to perform useful operations on netCDF files. 
Many scientists work with models and observations which produce too much
data to analyze in tabular format. 
Thus, it is often natural to reduce and massage this raw or primary
level data into summary, or second level data, e.g., temporal or spatial
averages. 
These second level data may become the inputs to graphical and
statistical packages, and are often more suitable for archival and
dissemination to the scientific community. 
<acronym>NCO</acronym> performs a suite of operations useful in manipulating data
from the primary to the second level state. 
<a name="index-_0040acronym_007bNCL_007d-130"></a><a name="index-_0040acronym_007bIDL_007d-131"></a><a name="index-Perl-132"></a><a name="index-Yorick-133"></a>Higher level interpretive languages (e.g., <acronym>IDL</acronym>, Yorick,
Matlab, <acronym>NCL</acronym>, Perl, Python),
and lower level compiled languages (e.g., C, Fortran) can always perform
any task performed by <acronym>NCO</acronym>, but often with more overhead. 
NCO, on the other hand, is limited to a much smaller set of arithmetic
and metadata operations than these full blown languages.

   <p><a name="index-command-line-switches-134"></a>Another goal has been to implement enough command line switches so that
frequently used sequences of these operators can be executed from a
shell script or batch file. 
Finally, <acronym>NCO</acronym> was written to consume the absolute minimum
amount of system memory required to perform a given job. 
The arithmetic operators are extremely efficient; their exact memory
usage is detailed in <a href="#Memory-usage">Memory usage</a>.

   <p><a name="clm"></a> <!-- http://nco.sf.net/nco.html#clm --><div class="node">
<p><hr>
<a name="Climate-model-paradigm"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Output-files">Output files</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Philosophy">Philosophy</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Strategies">Strategies</a>
<br>
</div>

<h3 class="section">2.2 Climate model paradigm</h3>

<p><a name="index-climate-model-135"></a><a name="index-_0040acronym_007bNCAR_007d-136"></a><a name="index-_0040acronym_007bGCM_007d-137"></a>
<acronym>NCO</acronym> was developed at <acronym>NCAR</acronym> to aid analysis and
manipulation of datasets produced by General Circulation Models
(<acronym>GCM</acronym>s). 
Datasets produced by <acronym>GCM</acronym>s share many features with all gridded
scientific datasets and so provide a useful paradigm for the explication
of the <acronym>NCO</acronym> operator set. 
Examples in this manual use a <acronym>GCM</acronym> paradigm because latitude,
longitude, time, temperature and other fields related to our natural
environment are as easy to visualize for the layman as the expert.

   <p><a name="out"></a> <!-- http://nco.sf.net/nco.html#out --><div class="node">
<p><hr>
<a name="Output-files"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Appending">Appending</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Climate-model-paradigm">Climate model paradigm</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Strategies">Strategies</a>
<br>
</div>

<h3 class="section">2.3 Temporary output files</h3>

<p><a name="index-data-safety-138"></a><a name="index-error-tolerance-139"></a><a name="index-safeguards-140"></a><a name="index-temporary-output-files-141"></a><acronym>NCO</acronym> operators are designed to be reasonably fault tolerant, so
that if there is a system failure or the user aborts the operation (e.g.,
with <kbd>C-c</kbd>), then no data are lost. 
The user-specified <var>output-file</var> is only created upon successful
completion of the operation
<a rel="footnote" href="#fn-8" name="fnd-8"><sup>8</sup></a>. 
This is accomplished by performing all operations in a temporary copy
of <var>output-file</var>. 
The name of the temporary output file is constructed by appending
<code>.pid</code><var>&lt;process ID&gt;</var><code>.</code><var>&lt;operator name&gt;</var><code>.tmp</code> to the
user-specified <var>output-file</var> name. 
When the operator completes its task with no fatal errors, the temporary
output file is moved to the user-specified <var>output-file</var>. 
Note the construction of a temporary output file uses more disk space
than just overwriting existing files &ldquo;in place&rdquo; (because there may be
two copies of the same file on disk until the <acronym>NCO</acronym> operation
successfully concludes and the temporary output file overwrites the
existing <var>output-file</var>). 
<a name="index-performance-142"></a><a name="index-operator-speed-143"></a><a name="index-speed-144"></a><a name="index-execution-time-145"></a>Also, note this feature increases the execution time of the operator
by approximately the time it takes to copy the <var>output-file</var>. 
Finally, note this feature allows the <var>output-file</var> to be the same
as the <var>input-file</var> without any danger of &ldquo;overlap&rdquo;.

   <p><a name="-A"></a> <!-- http://nco.sf.net/nco.html#-A -->
<a name="-O"></a> <!-- http://nco.sf.net/nco.html#-O --><a name="index-_0040code_007b_002dA_007d-146"></a><a name="index-_0040code_007b_002dO_007d-147"></a><a name="index-_0040code_007b_002d_002dapn_007d-148"></a><a name="index-_0040code_007b_002d_002dappend_007d-149"></a><a name="index-_0040code_007b_002d_002dovr_007d-150"></a><a name="index-_0040code_007b_002d_002doverwrite_007d-151"></a><a name="index-overwriting-files-152"></a><a name="index-appending-to-files-153"></a>Other safeguards exist to protect the user from inadvertently
overwriting data. 
If the <var>output-file</var> specified for a command is a pre-existing file,
then the operator will prompt the user whether to overwrite (erase) the
existing <var>output-file</var>, attempt to append to it, or abort the
operation. 
However, in processing large amounts of data, too many interactive
questions slows productivity. 
Therefore <acronym>NCO</acronym> also implements two ways to override its own
safety features, the <span class="samp">-O</span> and <span class="samp">-A</span> switches. 
Specifying <span class="samp">-O</span> tells the operator to overwrite any existing
<var>output-file</var> without prompting the user interactively. 
Specifying <span class="samp">-A</span> tells the operator to attempt to append to any
existing <var>output-file</var> without prompting the user interactively. 
These switches are useful in batch environments because they suppress
interactive keyboard input.

   <p><a name="apn"></a> <!-- http://nco.sf.net/nco.html#apn --><div class="node">
<p><hr>
<a name="Appending"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Addition-Subtraction-Division-Multiplication-and-Interpolation">Addition Subtraction Division Multiplication and Interpolation</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Output-files">Output files</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Strategies">Strategies</a>
<br>
</div>

<h3 class="section">2.4 Appending variables to a file</h3>

<p>A&nbsp;frequently<!-- /@w --> useful operation is adding variables from one file to
another. 
<a name="index-concatenation-154"></a><a name="index-appending-variables-155"></a><a name="index-merging-files-156"></a><a name="index-pasting-variables-157"></a>This is referred to as <dfn>appending</dfn>, although some prefer the
terminology <dfn>merging</dfn> <a rel="footnote" href="#fn-9" name="fnd-9"><sup>9</sup></a> or <dfn>pasting</dfn>. 
Appending is often confused with what <acronym>NCO</acronym> calls
<dfn>concatenation</dfn>. 
In <acronym>NCO</acronym>, concatenation refers to splicing a variable along the
record dimension. 
Appending, on the other hand, refers to adding variables from one file
to another
<a rel="footnote" href="#fn-10" name="fnd-10"><sup>10</sup></a>. 
In this sense, <span class="command">ncks</span> can append variables from one file to
another file. 
This capability is invoked by naming two files on the command line,
<var>input-file</var> and <var>output-file</var>. 
When <var>output-file</var> already exists, the user is prompted whether to
<dfn>overwrite</dfn>, <dfn>append/replace</dfn>, or <dfn>exit</dfn> from the command. 
Selecting <dfn>overwrite</dfn> tells the operator to erase the existing
<var>output-file</var> and replace it with the results of the operation. 
Selecting <dfn>exit</dfn> causes the operator to exit&mdash;the <var>output-file</var>
will not be touched in this case. 
Selecting <dfn>append/replace</dfn> causes the operator to attempt to place
the results of the operation in the existing <var>output-file</var>,
See <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a>.

   <p><a name="unn"></a> <!-- http://nco.sf.net/nco.html#unn --><a name="index-union-of-two-files-158"></a><a name="index-disjoint-files-159"></a>The simplest way to create the union of two files is
<pre class="example">     ncks -A fl_1.nc fl_2.nc
</pre>
   <p>This puts the contents of <span class="file">fl_1.nc</span> into <span class="file">fl_2.nc</span>. 
The <span class="samp">-A</span> is optional. 
On output, <span class="file">fl_2.nc</span> is the union of the input files,
regardless of whether they share dimensions and variables,
or are completely disjoint. 
The append fails if the input files have differently named record
dimensions (since netCDF supports only one), or have dimensions of the
same name but different sizes.

   <p><a name="bnr"></a> <!-- http://nco.sf.net/nco.html#bnr --><div class="node">
<p><hr>
<a name="Addition-Subtraction-Division-Multiplication-and-Interpolation"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Averaging-vs_002e-Concatenating">Averaging vs. Concatenating</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Appending">Appending</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Strategies">Strategies</a>
<br>
</div>

<h3 class="section">2.5 Addition Subtraction Division Multiplication and Interpolation</h3>

<p>Users comfortable with <acronym>NCO</acronym> semantics may find it easier to
perform some simple mathematical operations in <acronym>NCO</acronym> rather than
higher level languages. 
<span class="command">ncbo</span> (see <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a>) does file
addition, subtraction, multiplication, division, and broadcasting. 
<span class="command">ncflint</span> (see <a href="#ncflint-netCDF-File-Interpolator">ncflint netCDF File Interpolator</a>) does
file addition, subtraction, multiplication and interpolation. 
Sequences of these commands can accomplish simple but powerful
operations from the command line.

   <p><a name="averagers"></a> <!-- http://nco.sf.net/nco.html#averagers --><div class="node">
<p><hr>
<a name="Averaging-vs_002e-Concatenating"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Large-numbers-of-input-files">Large numbers of input files</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Addition-Subtraction-Division-Multiplication-and-Interpolation">Addition Subtraction Division Multiplication and Interpolation</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Strategies">Strategies</a>
<br>
</div>

<h3 class="section">2.6 Averagers vs. Concatenators</h3>

<p><a name="sym_ncea"></a> <!-- http://nco.sf.net/nco.html#sym_ncea -->
<a name="sym_ncrcat"></a> <!-- http://nco.sf.net/nco.html#sym_ncrcat --><a name="index-symbolic-links-160"></a>The most frequently used operators of <acronym>NCO</acronym> are probably the
averagers and concatenators. 
Because there are so many permutations of averaging (e.g., across files,
within a file, over the record dimension, over other dimensions, with or
without weights and masks) and of concatenating (across files, along the
record dimension, along other dimensions), there are currently no fewer
than five operators which tackle these two purposes: <span class="command">ncra</span>,
<span class="command">ncea</span>, <span class="command">ncwa</span>, <span class="command">ncrcat</span>, and <span class="command">ncecat</span>. 
These operators do share many capabilities <a rel="footnote" href="#fn-11" name="fnd-11"><sup>11</sup></a>, but each has its unique specialty. 
Two of these operators, <span class="command">ncrcat</span> and <span class="command">ncecat</span>, are for
concatenating hyperslabs across files. 
The other two operators, <span class="command">ncra</span> and <span class="command">ncea</span>, are for
averaging hyperslabs across files
<a rel="footnote" href="#fn-12" name="fnd-12"><sup>12</sup></a>. 
First, let's describe the concatenators, then the averagers.

<ul class="menu">
<li><a accesskey="1" href="#Concatenation">Concatenation</a>
<li><a accesskey="2" href="#Averaging">Averaging</a>
<li><a accesskey="3" href="#Interpolating">Interpolating</a>
</ul>

<p><a name="cnc"></a> <!-- http://nco.sf.net/nco.html#cnc --><div class="node">
<p><hr>
<a name="Concatenation"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Averaging">Averaging</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Averaging-vs_002e-Concatenating">Averaging vs. Concatenating</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Averaging-vs_002e-Concatenating">Averaging vs. Concatenating</a>
<br>
</div>

<h4 class="subsection">2.6.1 Concatenators <span class="command">ncrcat</span> and <span class="command">ncecat</span></h4>

<p><a name="index-_0040command_007bncecat_007d-161"></a><a name="index-_0040command_007bncrcat_007d-162"></a>
Joining independent files together along a record dimension is called
<dfn>concatenation</dfn>. 
<span class="command">ncrcat</span> is designed for concatenating record variables, while
<span class="command">ncecat</span> is designed for concatenating fixed length variables. 
Consider five files, <span class="file">85.nc</span>, <span class="file">86.nc</span>,
<small class="dots">...</small>&nbsp;<span class="file">89.nc</span><!-- /@w --> each containing a year's worth of data. 
Say you wish to create from them a single file, <span class="file">8589.nc</span>
containing all the data, i.e., spanning all five years. 
If the annual files make use of the same record variable, then
<span class="command">ncrcat</span> will do the job nicely with, e.g.,
<code>ncrcat 8?.nc 8589.nc</code>. 
The number of records in the input files is arbitrary and can vary from
file to file. 
See <a href="#ncrcat-netCDF-Record-Concatenator">ncrcat netCDF Record Concatenator</a>, for a complete description of
<span class="command">ncrcat</span>.

   <p>However, suppose the annual files have no record variable, and thus
their data are all fixed length. 
<a name="index-ensemble-163"></a><a name="index-climate-model-164"></a>For example, the files may not be conceptually sequential, but rather
members of the same group, or <dfn>ensemble</dfn>. 
Members of an ensemble may have no reason to contain a record dimension. 
<span class="command">ncecat</span> will create a new record dimension (named <var>record</var>
by default) with which to glue together the individual files into the
single ensemble file. 
If <span class="command">ncecat</span> is used on files which contain an existing record
dimension, that record dimension is converted to a fixed-length
dimension of the same name and a new record dimension (named
<code>record</code>) is created. 
Consider five realizations, <span class="file">85a.nc</span>, <span class="file">85b.nc</span>,
<small class="dots">...</small>&nbsp;<span class="file">85e.nc</span><!-- /@w --> of 1985 predictions from the same climate
model. 
Then <code>ncecat 85?.nc 85_ens.nc</code> glues the individual realizations
together into the single file, <span class="file">85_ens.nc</span>. 
If an input variable was dimensioned [<code>lat</code>,<code>lon</code>], it will
have dimensions [<code>record</code>,<code>lat</code>,<code>lon</code>] in the output file. 
A&nbsp;restriction<!-- /@w --> of <span class="command">ncecat</span> is that the hyperslabs of the
processed variables must be the same from file to file. 
Normally this means all the input files are the same size, and contain
data on different realizations of the same variables. 
See <a href="#ncecat-netCDF-Ensemble-Concatenator">ncecat netCDF Ensemble Concatenator</a>, for a complete description
of <span class="command">ncecat</span>.

   <p><a name="index-_0040command_007bncpdq_007d-165"></a><span class="command">ncpdq</span> makes it possible to concatenate files along any
dimension, not just the record dimension. 
First, use <span class="command">ncpdq</span> to convert the dimension to be concatenated
(i.e., extended with data from other files) into the record dimension. 
Second, use <span class="command">ncrcat</span> to concatenate these files. 
Finally, if desirable, use <span class="command">ncpdq</span> to revert to the original
dimensionality. 
As a concrete example, say that files <span class="file">x_01.nc</span>, <span class="file">x_02.nc</span>,
<small class="dots">...</small>&nbsp;<span class="file">x_10.nc</span><!-- /@w --> contain time-evolving datasets from spatially
adjacent regions. 
The time and spatial coordinates are <code>time</code> and <code>x</code>, respectively. 
Initially the record dimension is <code>time</code>. 
Our goal is to create a single file that contains joins all the
spatially adjacent regions into one single time-evolving dataset.
<pre class="example">     for idx in 01 02 03 04 05 06 07 08 09 10; do # Bourne Shell
       ncpdq -a x,time x_${idx}.nc foo_${idx}.nc # Make x record dimension
     done
     ncrcat foo_??.nc out.nc       # Concatenate along x
     ncpdq -a time,x out.nc out.nc # Revert to time as record dimension
</pre>
   <p>Note that <span class="command">ncrcat</span> will not concatenate fixed-length variables,
whereas <span class="command">ncecat</span> concatenates both fixed-length and record
variables along a new record variable. 
To conserve system memory, use <span class="command">ncrcat</span> where possible.

   <p><a name="avg"></a> <!-- http://nco.sf.net/nco.html#avg --><div class="node">
<p><hr>
<a name="Averaging"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Interpolating">Interpolating</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Concatenation">Concatenation</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Averaging-vs_002e-Concatenating">Averaging vs. Concatenating</a>
<br>
</div>

<h4 class="subsection">2.6.2 Averagers <span class="command">ncea</span>, <span class="command">ncra</span>, and <span class="command">ncwa</span></h4>

<p><a name="index-_0040command_007bncea_007d-166"></a><a name="index-_0040command_007bncra_007d-167"></a><a name="index-_0040command_007bncwa_007d-168"></a>
The differences between the averagers <span class="command">ncra</span> and <span class="command">ncea</span>
are analogous to the differences between the concatenators. 
<span class="command">ncra</span> is designed for averaging record variables from at least
one file, while <span class="command">ncea</span> is designed for averaging fixed length
variables from multiple files. 
<span class="command">ncra</span> performs a simple arithmetic average over the record
dimension of all the input files, with each record having an equal
weight in the average. 
<span class="command">ncea</span> performs a simple arithmetic average of all the input
files, with each file having an equal weight in the average. 
Note that <span class="command">ncra</span> cannot average fixed-length variables,
but <span class="command">ncea</span> can average both fixed-length and record variables. 
To conserve system memory, use <span class="command">ncra</span> rather than
<span class="command">ncea</span> where possible (e.g., if each <var>input-file</var> is one
record long). 
The file output from <span class="command">ncea</span> will have the same dimensions
(meaning dimension names as well as sizes) as the input hyperslabs
(see <a href="#ncea-netCDF-Ensemble-Averager">ncea netCDF Ensemble Averager</a>, for a complete description of
<span class="command">ncea</span>). 
The file output from <span class="command">ncra</span> will have the same dimensions as
the input hyperslabs except for the record dimension, which will have a
size of&nbsp;1<!-- /@w --> (see <a href="#ncra-netCDF-Record-Averager">ncra netCDF Record Averager</a>, for a complete
description of <span class="command">ncra</span>).

   <p><a name="ntp"></a> <!-- http://nco.sf.net/nco.html#ntp --><div class="node">
<p><hr>
<a name="Interpolating"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#Averaging">Averaging</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Averaging-vs_002e-Concatenating">Averaging vs. Concatenating</a>
<br>
</div>

<h4 class="subsection">2.6.3 Interpolator <span class="command">ncflint</span></h4>

<p><a name="index-_0040command_007bncflint_007d-169"></a>
<span class="command">ncflint</span> can interpolate data between or two files. 
Since no other operators have this ability, the description of
interpolation is given fully on the <span class="command">ncflint</span> reference page
(see <a href="#ncflint-netCDF-File-Interpolator">ncflint netCDF File Interpolator</a>). 
Note that this capability also allows <span class="command">ncflint</span> to linearly
rescale any data in a netCDF file, e.g., to convert between differing
units.

   <p><a name="lrg"></a> <!-- http://nco.sf.net/nco.html#lrg --><div class="node">
<p><hr>
<a name="Large-numbers-of-input-files"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Large-Datasets-and-Memory">Large Datasets and Memory</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Averaging-vs_002e-Concatenating">Averaging vs. Concatenating</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Strategies">Strategies</a>
<br>
</div>

<h3 class="section">2.7 Working with large numbers of input files</h3>

<p><a name="index-files_002c-numerous-input-170"></a><a name="index-_0040code_007b_002dn-_0040var_007bloop_007d_007d-171"></a>
Occasionally one desires to digest (i.e., concatenate or average)
hundreds or thousands of input files. 
<a name="index-automagic-172"></a><a name="index-_0040acronym_007bNASA-EOSDIS_007d-173"></a>Unfortunately, data archives (e.g., <acronym>NASA EOSDIS</acronym>) may not
name netCDF files in a format understood by the <span class="samp">-n </span><var>loop</var>
switch (see <a href="#Specifying-input-files">Specifying input files</a>) that automagically generates
arbitrary numbers of input filenames. 
The <span class="samp">-n </span><var>loop</var> switch has the virtue of being concise,
and of minimizing the command line. 
This helps keeps output file small since the command line is stored
as metadata in the <code>history</code> attribute
(see <a href="#History-attribute">History attribute</a>). 
However, the <span class="samp">-n </span><var>loop</var> switch is useless when there is no
simple, arithmetic pattern to the input filenames (e.g.,
<span class="file">h00001.nc</span>, <span class="file">h00002.nc</span>, <small class="dots">...</small>&nbsp;<span class="file">h90210.nc</span><!-- /@w -->). 
Moreover, filename globbing does not work when the input files are too
numerous or their names are too lengthy (when strung together as a
single argument) to be passed by the calling shell to the <acronym>NCO</acronym>
operator
<a rel="footnote" href="#fn-13" name="fnd-13"><sup>13</sup></a>. 
When this occurs, the <acronym>ANSI</acronym> C-standard <code>argc</code>-<code>argv</code>
method of passing arguments from the calling shell to a C-program (i.e.,
an <acronym>NCO</acronym> operator) breaks down. 
There are (at least) three alternative methods of specifying the input
filenames to <acronym>NCO</acronym> in environment-limited situations.

   <p><a name="stdin"></a> <!-- http://nco.sf.net/nco.html#stdin --><a name="index-standard-input-174"></a><a name="index-_0040code_007bstdin_007d-175"></a>The recommended method for sending very large numbers (hundreds or
more, typically) of input filenames to the multi-file operators is
to use the <dfn>standard input</dfn>, aka <code>stdin</code>, feature of
<acronym>UNIX</acronym>.
<pre class="example">     # Pipe large numbers of filenames to stdin
     /bin/ls | grep ${CASEID}_'......'.nc | ncecat -O -o foo.nc
</pre>
   <p>This method avoids all constraints on command line size imposed by
the operating system. 
A drawback to this method is that the <code>history</code> attribute
(see <a href="#History-attribute">History attribute</a>) does not record the name of any input
files since the names were not passed on the command line. 
This makes determining the data provenance at a later date difficult. 
<a name="index-_0040code_007bnco_005finput_005ffile_005fnumber_007d-176"></a><a name="index-_0040code_007bnco_005finput_005ffile_005flist_007d-177"></a><a name="index-global-attributes-178"></a>To remedy this situation, multi-file operators store the number of
input files in the <code>nco_input_file_number</code> global attribute and the
input file list itself in the <code>nco_input_file_list</code> global attribute
(see <a href="#Input-file-list-attributes">Input file list attributes</a>). 
Although this does not preserve the exact command used to generate the
file, it does retains all the information required to reconstruct the
command and determine the data provenance.

   <p><a name="index-globbing-179"></a><a name="index-shell-180"></a><a name="index-extended-regular-expressions-181"></a><a name="index-regular-expressions-182"></a><a name="index-pattern-matching-183"></a><a name="index-_0040command_007bxargs_007d-184"></a><a name="index-_0040acronym_007bUNIX_007d-185"></a>A second option is to use the <acronym>UNIX</acronym> <span class="command">xargs</span> command. 
This simple example selects as input to <span class="command">xargs</span> all the
filenames in the current directory that match a given pattern. 
For illustration, consider a user trying to average millions of
files which each have a six character filename. 
If the shell buffer can not hold the results of the corresponding
globbing operator, <span class="file">??????.nc</span>, then the filename globbing
technique will fail. 
Instead we express the filename pattern as an extended regular
expression, <span class="file">......\.nc</span> (see <a href="#Variable-subsetting">Variable subsetting</a>). 
We use <span class="command">grep</span> to filter the directory listing for this pattern
and to pipe the results to <span class="command">xargs</span> which, in turn, passes the
matching filenames to an <acronym>NCO</acronym> multi-file operator, e.g.,
<span class="command">ncecat</span>.
<pre class="example">     # Use xargs to transfer filenames on the command line
     /bin/ls | grep ${CASEID}_'......'.nc | xargs -x ncecat -o foo.nc
</pre>
   <p><a name="index-pipes-186"></a>The single quotes protect the only sensitive parts of the extended
regular expression (the <span class="command">grep</span> argument), and allow shell
interpolation (the <code>${CASEID}</code> variable substitution) to
proceed unhindered on the rest of the command. 
<span class="command">xargs</span> uses the <acronym>UNIX</acronym> pipe feature to append the
suitably filtered input file list to the end of the <span class="command">ncecat</span>
command options. 
<a name="index-output-file-187"></a><a name="index-input-files-188"></a><a name="index-_0040code_007b_002do-_0040var_007bfl_005fout_007d_007d-189"></a>The <code>-o foo.nc</code> switch ensures that the input files supplied by
<span class="command">xargs</span> are not confused with the output file name. 
<span class="command">xargs</span> does, unfortunately, have its own limit (usually about
20,000 characters) on the size of command lines it can pass. 
Give <span class="command">xargs</span> the <span class="samp">-x</span> switch to ensure it dies if it
reaches this internal limit. 
When this occurs, use either the <code>stdin</code> method above, or the
symbolic link presented next.

   <p><a name="index-symbolic-links-190"></a>Even when its internal limits have not been reached, the
<span class="command">xargs</span> technique may not be sophisticated enough to handle
all situations. 
A full scripting language like Perl can handle any level of complexity
of filtering input filenames, and any number of filenames. 
The technique of last resort is write a script that creates symbolic
links between the irregular input filenames and a set of regular,
arithmetic filenames that <span class="samp">-n </span><var>loop</var> switch understands. 
<a name="index-Perl-191"></a>For example, the following Perl script a monotonically enumerated
symbolic link to up to one million <span class="file">.nc</span> files in a directory. 
If there are 999,999 netCDF files present, the links are named
<span class="file">000001.nc</span> to <span class="file">999999.nc</span>:
<a name="index-_0040code_007b_002dn-_0040var_007bloop_007d_007d-192"></a>
<pre class="example">     # Create enumerated symbolic links
     /bin/ls | grep \.nc | perl -e \
     '$idx=1;while(&lt;STDIN&gt;){chop;symlink $_,sprintf("%06d.nc",$idx++);}'
     ncecat -O -n 999999,6,1 000001.nc foo.nc
     # Remove symbolic links when finished
     /bin/rm ??????.nc
</pre>
   <p>The <span class="samp">-n </span><var>loop</var> option tells the <acronym>NCO</acronym> operator to
automatically generate the filnames of the symbolic links. 
This circumvents any <acronym>OS</acronym> and shell limits on command line size. 
The symbolic links are easily removed once <acronym>NCO</acronym> is finished. 
<a name="index-_0040code_007bhistory_007d-193"></a>One drawback to this method is that the <code>history</code> attribute
(see <a href="#History-attribute">History attribute</a>) retains the filename list of the symbolic
links, rather than the data files themselves. 
This makes it difficult to determine the data provenance at a later date.

<div class="node">
<p><hr>
<a name="Large-Datasets-and-Memory"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Memory-usage">Memory usage</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Large-numbers-of-input-files">Large numbers of input files</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Strategies">Strategies</a>
<br>
</div>

<h3 class="section">2.8 Working with large datasets</h3>

<p><a name="index-large-datasets-194"></a><a name="index-LFS-195"></a><a name="index-Large-File-Support-196"></a>
<dfn>Large datasets</dfn> are those files that are comparable in size to the
amount of random access memory (<acronym>RAM</acronym>) in your computer. 
Many users of <acronym>NCO</acronym> work with files larger than 100&nbsp;MB<!-- /@w -->. 
Files this large not only push the current edge of storage technology,
they present special problems for programs which attempt to access the
entire file at once, such as <span class="command">ncea</span> and <span class="command">ncecat</span>. 
<a name="index-swap-space-197"></a>If you work with a 300&nbsp;MB<!-- /@w --> files on a machine with only 32&nbsp;MB<!-- /@w --> of
memory then you will need large amounts of swap space (virtual memory on
disk) and <acronym>NCO</acronym> will work slowly, or even fail. 
There is no easy solution for this. 
The best strategy is to work on a machine with sufficient amounts of
memory and swap space. 
Since about 2004, many users have begun to produce or analyze files
exceeding 2&nbsp;GB<!-- /@w --> in size. 
These users should familiarize themselves with <acronym>NCO</acronym>'s Large
File Support (<acronym>LFS</acronym>) capabilities (see <a href="#Large-File-Support">Large File Support</a>). 
The next section will increase your familiarity with <acronym>NCO</acronym>'s
memory requirements. 
With this knowledge you may re-design your data reduction approach to
divide the problem into pieces solvable in memory-limited situations.

   <p><a name="index-server-198"></a><a name="index-_0040acronym_007bUNICOS_007d-199"></a><a name="index-Cray-200"></a>If your local machine has problems working with large files, try running
<acronym>NCO</acronym> from a more powerful machine, such as a network server. 
Certain machine architectures, e.g., Cray <acronym>UNICOS</acronym>, have special
commands which allow one to increase the amount of interactive memory. 
<a name="index-_0040code_007bilimit_007d-201"></a>On Cray systems, try to increase the available memory with the
<code>ilimit</code> command. 
<a name="index-_0040acronym_007bGNU_007d_002fLinux-202"></a><a name="index-_0040code_007bulimit_007d-203"></a><a name="index-_0040code_007bcore-dump_007d-204"></a>If you get a memory-related core dump
(e.g., <span class="samp">Error exit (core dumped)</span>) on a <acronym>GNU</acronym>/Linux system,
try increasing the process-available memory with <code>ulimit</code>.

   <p><a name="index-speed-205"></a>The speed of the <acronym>NCO</acronym> operators also depends on file size. 
When processing large files the operators may appear to hang, or do
nothing, for large periods of time. 
In order to see what the operator is actually doing, it is useful to
activate a more verbose output mode. 
This is accomplished by supplying a number greater than&nbsp;0<!-- /@w --> to the
<span class="samp">-D </span><var>debug-level</var> (or <span class="samp">--debug-level</span>, or
<span class="samp">--dbg_lvl</span>) switch. 
<a name="index-_0040code_007b_002dD-_0040var_007bdebug_002dlevel_007d_007d-206"></a><a name="index-_0040code_007b_002d_002ddebug_002dlevel-_0040var_007bdebug_002dlevel_007d_007d-207"></a><a name="index-_0040code_007b_002d_002ddbg_005flvl-_0040var_007bdebug_002dlevel_007d_007d-208"></a><a name="index-_0040var_007bdebug_002dlevel_007d-209"></a><a name="index-_0040var_007bdbg_005flvl_007d-210"></a><a name="index-debugging-211"></a>When the <var>debug-level</var> is nonzero, the operators report their
current status to the terminal through the <var>stderr</var> facility. 
Using <span class="samp">-D</span> does not slow the operators down. 
Choose a <var>debug-level</var> between&nbsp;1<!-- /@w --> and&nbsp;3<!-- /@w --> for most situations,
e.g., <code>ncea -D 2 85.nc 86.nc 8586.nc</code>. 
A&nbsp;full<!-- /@w --> description of how to estimate the actual amount of memory the
multi-file <acronym>NCO</acronym> operators consume is given in
<a href="#Memory-usage">Memory usage</a>.

   <p><a name="mmr"></a> <!-- http://nco.sf.net/nco.html#mmr --><div class="node">
<p><hr>
<a name="Memory-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Operator-limitations">Operator limitations</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Large-Datasets-and-Memory">Large Datasets and Memory</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Strategies">Strategies</a>
<br>
</div>

<h3 class="section">2.9 Approximate <acronym>NCO</acronym> memory requirements</h3>

<p><a name="index-memory-requirements-212"></a><a name="index-memory-available-213"></a><a name="index-RAM-214"></a><a name="index-swap-space-215"></a><a name="index-peak-memory-usage-216"></a>
Many people use <acronym>NCO</acronym> on gargantuan files which dwarf the
memory available (free <acronym>RAM</acronym> plus swap space) even on today's powerful
machines. 
These users will want <acronym>NCO</acronym> to consume the absolute minimum
peak memory possible so that their scripts do not have to tediously cut
files into smaller pieces that fit into memory. 
We commend these greedy users for pushing <acronym>NCO</acronym> to its limits!

   <p><a name="index-threads-217"></a><a name="index-OpenMP-218"></a><a name="index-shared-memory-machines-219"></a>This section describes the memory <acronym>NCO</acronym> requires during
operation. 
The required memory is based on the underlying algorithms. 
The description below is the memory usage per thread. 
Users with shared memory machines may use the threaded <acronym>NCO</acronym>
operators (see <a href="#OpenMP-threading">OpenMP threading</a>). 
The peak and sustained memory usage will scale accordingly,
i.e., by the number of threads. 
Memory consumption patterns of all operators are similar, with
the exception of <span class="command">ncap</span>.

<ul class="menu">
<li><a accesskey="1" href="#Memory-Usage-of-Single-and-Multi_002dfile-Operators">Memory Usage of Single and Multi-file Operators</a>
<li><a accesskey="2" href="#Memory-Usage-of-ncap">Memory Usage of ncap</a>
</ul>

<div class="node">
<p><hr>
<a name="Memory-Usage-of-Single-and-Multi_002dfile-Operators"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Memory-Usage-of-ncap">Memory Usage of ncap</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Memory-usage">Memory usage</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Memory-usage">Memory usage</a>
<br>
</div>

<h4 class="subsection">2.9.1 Memory Usage of Single and Multi-file Operators</h4>

<p><a name="index-multi_002dfile-operators-220"></a>The multi-file operators currently comprise the record operators,
<span class="command">ncra</span> and <span class="command">ncrcat</span>, and the ensemble operators,
<span class="command">ncea</span> and <span class="command">ncecat</span>. 
The record operators require <em>much less</em> memory than the ensemble
operators. 
This is because the record operators operate on one single record (i.e.,
time-slice) at a time, wherease the ensemble operators retrieve the
entire variable into memory. 
Let MS be the peak sustained memory demand of an operator,
FT be the memory required to store the entire contents of all the
variables to be processed in an input file,
FR be the memory required to store the entire contents of a
single record of each of the variables to be processed in an input file,
VR be the memory required to store a single record of the
largest record variable to be processed in an input file,
VT be the memory required to store the largest variable
to be processed in an input file,
VI be the memory required to store the largest variable
which is not processed, but is copied from the initial file to the
output file. 
All operators require MI = VI during the initial copying of
variables from the first input file to the output file. 
This is the <em>initial</em> (and transient) memory demand. 
The <em>sustained</em> memory demand is that memory required by the
operators during the processing (i.e., averaging, concatenation)
phase which lasts until all the input files have been processed. 
The operators have the following memory requirements:
<span class="command">ncrcat</span> requires MS &lt;= VR. 
<span class="command">ncecat</span> requires MS &lt;= VT. 
<span class="command">ncra</span> requires MS = 2FR + VR. 
<span class="command">ncea</span> requires MS = 2FT + VT. 
<span class="command">ncbo</span> requires MS &lt;= 2VT. 
<span class="command">ncpdq</span> requires MS &lt;= 2VT. 
<span class="command">ncflint</span> requires MS &lt;= 2VT. 
Note that only variables which are processed, i.e., averaged or
concatenated, contribute to MS. 
Memory is never allocated to hold variables which do not appear in the
output file (see <a href="#Variable-subsetting">Variable subsetting</a>).

<div class="node">
<p><hr>
<a name="Memory-Usage-of-ncap"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#Memory-Usage-of-Single-and-Multi_002dfile-Operators">Memory Usage of Single and Multi-file Operators</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Memory-usage">Memory usage</a>
<br>
</div>

<h4 class="subsection">2.9.2 Memory Usage of <span class="command">ncap</span></h4>

<p><a name="index-_0040command_007bncap_007d-221"></a><a name="index-binary-operations-222"></a><a name="index-unary-operations-223"></a><a name="index-memory-leaks-224"></a><a name="index-left-hand-casting-225"></a><span class="command">ncap</span> has unique memory requirements due its ability to process
arbitrarily long scripts of any complexity. 
All script acceptable to <span class="command">ncap</span> are ultimately processed as a
sequence of binary or unary operations. 
<span class="command">ncap</span> requires MS &lt;= 2VT under most conditions. 
An exception to this is when left hand casting (see <a href="#Left-hand-casting">Left hand casting</a>) is used to stretch the size of derived variables beyond the
size of any input variables. 
Let VC be the memory required to store the largest variable
defined by left hand casting. 
In this case, MS &lt;= 2VC.

   <p><a name="index-malloc_0028_0029-226"></a><span class="command">ncap</span> scripts are complete dynamic and may be of arbitrary
length. 
A script that contains many thousands of operations, may uncover a
slow memory leak even though each single operation consumes little
additional memory. 
Memory leaks are usually identifiable by their memory usage signature. 
Leaks cause peak memory usage to increase monotonically with time
regardless of script complexity. 
Slow leaks are very difficult to find. 
Sometimes a <span class="command">malloc()</span> failure is the only noticeable clue to
their existance. 
If you have good reasons to believe that a <span class="command">malloc()</span> failure
is ultimately due to an <acronym>NCO</acronym> memory leak (rather than
inadequate <acronym>RAM</acronym> on your system), then we would be very
interested in receiving a detailed bug report.

<div class="node">
<p><hr>
<a name="Operator-limitations"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#Memory-usage">Memory usage</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Strategies">Strategies</a>
<br>
</div>

<h3 class="section">2.10 Performance limitations of the operators</h3>

     <ol type=1 start=1>
<li><a name="index-buffering-227"></a>No buffering of data is performed during <span class="command">ncvarget</span> and
<span class="command">ncvarput</span> operations. 
<a name="index-performance-228"></a><a name="index-operator-speed-229"></a><a name="index-speed-230"></a><a name="index-execution-time-231"></a>Hyperslabs too large too hold in core memory will suffer substantial
performance penalties because of this.

     <li><a name="index-monotonic-coordinates-232"></a>Since coordinate variables are assumed to be monotonic, the search for
bracketing the user-specified limits should employ a quicker algorithm,
like bisection, than the two-sided incremental search currently
implemented.

     <li><a name="index-_0040var_007bC_005fformat_007d-233"></a><a name="index-_0040var_007bFORTRAN_005fformat_007d-234"></a><a name="index-_0040var_007bsignedness_007d-235"></a><a name="index-_0040var_007bscale_005fformat_007d-236"></a><a name="index-_0040var_007badd_005foffset_007d-237"></a><var>C_format</var>, <var>FORTRAN_format</var>, <var>signedness</var>,
<var>scale_format</var> and <var>add_offset</var> attributes are ignored by
<span class="command">ncks</span> when printing variables to screen.

     <li><a name="index-Yorick-238"></a>Some random access operations on large files on certain architectures
(e.g., 400&nbsp;MB<!-- /@w --> on <acronym>UNICOS</acronym>) are <em>much</em> slower with these
operators than with similar operations performed using languages that
bypass the netCDF interface (e.g., Yorick). 
The cause for this is not understood at present.
     </ol>

   <p><a name="ftr"></a> <!-- http://nco.sf.net/nco.html#ftr --><div class="node">
<p><hr>
<a name="Common-features"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Operator-Reference-Manual">Operator Reference Manual</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Strategies">Strategies</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
<br>
</div>

<h2 class="chapter">3 Features common to most operators</h2>

<p>Many features have been implemented in more than one operator and are
described here for brevity. 
The description of each feature is preceded by a box listing the
operators for which the feature is implemented. 
<a name="index-command-line-switches-239"></a>Command line switches for a given feature are consistent across all
operators wherever possible. 
If no &ldquo;key switches&rdquo; are listed for a feature, then that particular
feature is automatic and cannot be controlled by the user.

<ul class="menu">
<li><a accesskey="1" href="#Internationalization">Internationalization</a>
<li><a accesskey="2" href="#OpenMP-threading">OpenMP threading</a>
<li><a accesskey="3" href="#Large-File-Support">Large File Support</a>
<li><a accesskey="4" href="#Command-line-options">Command line options</a>
<li><a accesskey="5" href="#Specifying-input-files">Specifying input files</a>
<li><a accesskey="6" href="#Specifying-output-files">Specifying output files</a>
<li><a accesskey="7" href="#Remote-storage">Remote storage</a>
<li><a accesskey="8" href="#File-retention">File retention</a>
<li><a accesskey="9" href="#Variable-subsetting">Variable subsetting</a>
<li><a href="#Coordinate-variables">Coordinate variables</a>
<li><a href="#Fortran-indexing">Fortran indexing</a>
<li><a href="#Hyperslabs">Hyperslabs</a>
<li><a href="#Multislabs">Multislabs</a>
<li><a href="#UDUnits-Support">UDUnits Support</a>
<li><a href="#Wrapped-coordinates">Wrapped coordinates</a>
<li><a href="#Stride">Stride</a>
<li><a href="#Missing-values">Missing values</a>
<li><a href="#Operation-Types">Operation Types</a>
<li><a href="#Type-conversion">Type conversion</a>
<li><a href="#Suppressing-interactive-prompts">Suppressing interactive prompts</a>
<li><a href="#History-attribute">History attribute</a>
<li><a href="#Input-file-list-attributes">Input file list attributes</a>
<li><a href="#NCAR-CCSM-Conventions">NCAR CCSM Conventions</a>
<li><a href="#ARM-Conventions">ARM Conventions</a>
<li><a href="#Operator-version">Operator version</a>
</ul>

   <p><a name="i18n"></a> <!-- http://nco.sf.net/nco.html#i18n --><div class="node">
<p><hr>
<a name="Internationalization"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#OpenMP-threading">OpenMP threading</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Common-features">Common features</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.1 Internationalization</h3>

<p><a name="index-Internationalization-240"></a><a name="index-I18N-241"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: All operators<br>
Short options: All<br>
Long options: All<br>
</td></tr></table>
   <a name="index-L10N-242"></a><acronym>NCO</acronym> support for <dfn>internationalization</dfn> of textual input
and output (e.g., Warning messages) is nascent. 
We hope to produce foreign language string catalogues in 2004. 
<!-- fxm: Work on this section -->

   <p><a name="omp"></a> <!-- http://nco.sf.net/nco.html#omp -->
<a name="openmp"></a> <!-- http://nco.sf.net/nco.html#openmp --><div class="node">
<p><hr>
<a name="OpenMP-threading"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Large-File-Support">Large File Support</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Internationalization">Internationalization</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.2 OpenMP threading</h3>

<p><a name="index-OpenMP-243"></a><a name="index-threads-244"></a><a name="index-_0040acronym_007bSMP_007d-245"></a><a name="index-shared-memory-parallelism-246"></a><a name="index-parallelism-247"></a><a name="index-_0040code_007bnco_005fopenmp_005fthread_005fnumber_007d-248"></a><a name="index-_0040code_007b_002d_002dthr_005fnbr-_0040var_007bthr_005fnbr_007d_007d-249"></a><a name="index-_0040code_007b_002d_002dthreads-_0040var_007bthr_005fnbr_007d_007d-250"></a><a name="index-_0040code_007b_002d_002domp_005fnum_005fthreads-_0040var_007bthr_005fnbr_007d_007d-251"></a><a name="index-_0040code_007b_002dt-_0040var_007bthr_005fnbr_007d_007d-252"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: <span class="command">ncbo</span>, <span class="command">ncea</span>, <span class="command">ncpdq</span>,
<span class="command">ncra</span>, <span class="command">ncrcat</span>, <span class="command">ncwa</span><br>
Short options: <span class="samp">-t</span><br>
Long options: <span class="samp">--thr_nbr</span>, <span class="samp">--threads</span>,
<span class="samp">--omp_num_threads</span><br>
</td></tr></table>
   <acronym>NCO</acronym> supports shared memory parallelism (<acronym>SMP</acronym>) when
compiled with an OpenMP-enabled compiler. 
Threads requests and allocations occur in two stages. 
First, users may request a specific number of threads <var>thr_nbr</var> with
the <span class="samp">-t</span> switch (or its long option equivalents, <span class="samp">--thr_nbr</span>,
<span class="samp">--threads</span>, and <span class="samp">--omp_num_threads</span>). 
If not user-specified, OpenMP obtains <var>thr_nbr</var> from the
<code>OMP_NUM_THREADS</code> environment variable, if present, or from the
<acronym>OS</acronym>, if not.

   <p><a name="index-_0040var_007bthr_005fnbr_007d-253"></a><a name="index-_0040code_007bOMP_005fNUM_005fTHREADS_007d-254"></a><a name="index-_0040command_007bncrcat_007d-255"></a><a name="index-_0040command_007bncwa_007d-256"></a><a name="index-_0040command_007bncpdq_007d-257"></a><a name="index-large-datasets-258"></a><acronym>NCO</acronym> may modify <var>thr_nbr</var> according to its own internal
settings before it requests any threads from the system. 
Certain operators contain hard-code limits to the number of threads they
request. 
We base these limits on our experience and common sense, and to reduce
potentially wasteful system usage by inexperienced users. 
For example, <code>ncrcat</code> is extremely I/O-intensive. 
No one has demonstrated that threading improves <code>ncrcat</code>
performance so we restrict <var>thr_nbr</var> &lt;= 1 for <code>ncrcat</code>. 
Compute-intensive operators (<code>ncwa</code> and <code>ncpdq</code>)
are expected to benefit the most from threading. 
The greatest increases in throughput due to threading will occur on
large dataset where each thread performs millions or more floating
point operations. 
Otherwise, the system overhead of setting up threads may outweigh
the theoretical speed enhancements due to <acronym>SMP</acronym> parallelism. 
However, no one has ever demonstrated that the <acronym>SMP</acronym> parallelism
scales well beyone four threads for these operators. 
Hence we restrict <var>thr_nbr</var> &lt;= 4 for all operators. 
We encourage users to play with these limits (edit file
<span class="file">nco_omp.c</span>) and send us their feedback.

   <p><a name="index-debugging-259"></a><a name="index-_0040var_007bdbg_005flvl_007d-260"></a>Once the initial <var>thr_nbr</var> has been modified for any
operator-specific limits, <acronym>NCO</acronym> requests the system to allocate
a team of <var>thr_nbr</var> threads for the body of the code. 
The operating system then decides how many threads to allocate
based on this request. 
Users may keep track of this information by running the operator with
<var>dbg_lvl</var> &gt; 0.

   <p>By default, operators with thread attach one global attribute to any
file they create or modify. 
The <code>nco_openmp_thread_number</code> global attribute contains the
number of threads the operator used to process the input files. 
This information helps to verify that the answers with threaded and
non-threaded operators are equal to within machine precision. 
<a name="index-benchmarks-261"></a>This information is also useful for benchmarking.

   <p><a name="lfs"></a> <!-- http://nco.sf.net/nco.html#lfs --><div class="node">
<p><hr>
<a name="Large-File-Support"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Command-line-options">Command line options</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#OpenMP-threading">OpenMP threading</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.3 Large File Support</h3>

<p><a name="index-LFS-262"></a><a name="index-Large-File-Support-263"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: All operators<br>
Short options: All<br>
Long options: All<br>
</td></tr></table>
   <acronym>NCO</acronym> support for large files is in place and works but is not
well documented yet.

   <p><a name="cmd_ln"></a> <!-- http://nco.sf.net/nco.html#cmd_ln --><div class="node">
<p><hr>
<a name="Command-line-options"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Specifying-input-files">Specifying input files</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Large-File-Support">Large File Support</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.4 Command line options</h3>

<p><a name="index-command-line-options-264"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: All operators<br>
Short options: All<br>
Long options: All<br>
</td></tr></table>
   <a name="index-_0040acronym_007bPOSIX_007d-265"></a><a name="index-_0040acronym_007bUNIX_007d-266"></a><a name="index-_0040acronym_007bGNU_007d-267"></a><a name="index-switches-268"></a><acronym>NCO</acronym> achieves flexibility by using <dfn>command line options</dfn>. 
These options are implemented in all traditional <acronym>UNIX</acronym> commands
as single letter <dfn>switches</dfn>, e.g., <span class="samp">ls -l</span>. 
For many years <acronym>NCO</acronym> used only single letter option names. 
In late 2002, we implemented <acronym>GNU</acronym>/<acronym>POSIX</acronym> extended
or long option names for all options. 
This was done in a backward compatible way such that the full
functionality of <acronym>NCO</acronym> is still available through the familiar
single letter options. 
In the future, however, some features of <acronym>NCO</acronym> may require the
use of long options, simply because we have nearly run out of single
letter options. 
More importantly, mnemonics for single letter options are often
non-intuitive so that long options provide a more natural way of
expressing intent.

   <p><a name="index-long-options-269"></a>Extended options, also called long options, are implemented using the
system-supplied <span class="file">getopt.h</span> header file, if possible. 
<a name="index-_0040code_007bBSD_007d-270"></a><a name="index-_0040code_007bgetopt_007d-271"></a><a name="index-_0040code_007bgetopt_005flong_007d-272"></a><a name="index-_0040file_007bgetopt_002eh_007d-273"></a>This provides the <span class="command">getopt_long</span> function to <acronym>NCO</acronym>
<a rel="footnote" href="#fn-14" name="fnd-14"><sup>14</sup></a>.

   <p><a name="index-_0040code_007b_002dD-_0040var_007bdebug_002dlevel_007d_007d-274"></a><a name="index-_0040code_007b_002d_002ddbg_005flvl-_0040var_007bdebug_002dlevel_007d_007d-275"></a>The syntax of <dfn>short options</dfn> (single letter options) is
<kbd>-</kbd><var>key</var> <var>value</var> (dash-key-space-value). 
Here, <var>key</var> is the single letter option name, e.g.,
<span class="samp">-D 2</span>.

   <p>The syntax of <dfn>long options</dfn> (multi-letter options) is
<kbd>--</kbd><var>long_name</var> <var>value</var>
(dash-dash-key-space-value), e.g., <span class="samp">--dbg_lvl 2</span> or
<kbd>--</kbd><var>long_name</var><kbd>=</kbd><var>value</var>
(dash-dash-key-equal-value), e.g., <span class="samp">--dbg_lvl=2</span>. 
Thus the following are all valid for the <span class="samp">-D</span> (short version)
or <span class="samp">--dbg_lvl</span> (long version) command line option.
<pre class="example">     ncks -D 3 in.nc        # Short option
     ncks --dbg_lvl=3 in.nc # Long option, preferred form
     ncks --dbg_lvl 3 in.nc # Long option, alternate form
</pre>
   <p class="noindent">The last example is preferred for two reasons. 
First, <span class="samp">--dbg_lvl</span> is more specific and less ambiguous than
<span class="samp">-D</span>. 
The long option form makes scripts more self documenting and less error
prone. 
Often long options are named after the source code variable whose value
they carry. 
Second, the equals sign <kbd>=</kbd> joins the key (i.e., <var>long_name</var>) to
the value in an uninterruptible text block. 
Experience shows that users are less likely to mis-parse commands when
restricted to this form.

   <p><acronym>GNU</acronym> implements a superset of the <acronym>POSIX</acronym> standard
which allows any unambiguous truncation of a valid option to be used.
<pre class="example">     ncks -D 3 in.nc        # Short option
     ncks --dbg_lvl=3 in.nc # Long option, full form
     ncks --dbg=3 in.nc     # Long option, unambiguous truncation
     ncks --db=3 in.nc      # Long option, unambiguous truncation
     ncks --d=3 in.nc       # Long option, ambiguous truncation
</pre>
   <p class="noindent">The first four examples are equivalent and will work as expected. 
The final example will exit with an error since <span class="command">ncks</span> cannot
disambiguate whether <span class="samp">--d</span> is intended as a truncation of
<span class="samp">--dbg_lvl</span>, of <span class="samp">--dimension</span>, or of some other long option.

   <p><acronym>NCO</acronym> provides many long options for common switches. 
For example, the debugging level may be set in all operators with any
of the switches <span class="samp">-D</span>, <span class="samp">--debug-level</span>, or <span class="samp">--dbg_lvl</span>. 
This flexibility allows users to choose their favorite mnemonic. 
For some, it will be <span class="samp">--debug</span> (an unambiguous truncation of
<span class="samp">--debug-level</span>, and other will prefer <span class="samp">--dbg</span>. 
Interactive users usually prefer the minimal amount of typing, i.e.,
<span class="samp">-D</span>. 
We recommend that scripts which are re-usable employ some form of
the long options for future maintainability.

   <p>This manual generally uses the short option syntax. 
This is for historical reasons and to conserve space. 
The remainder of this manual specifies the full <var>long_name</var> of
each option. 
Users are expected to pick the unambiguous truncation of each option
name that most suits their taste.

   <p><a name="fl_in"></a> <!-- http://nco.sf.net/nco.html#fl_in -->
<a name="in"></a> <!-- http://nco.sf.net/nco.html#in -->
<a name="input"></a> <!-- http://nco.sf.net/nco.html#input --><div class="node">
<p><hr>
<a name="Specifying-input-files"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Specifying-output-files">Specifying output files</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Command-line-options">Command line options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.5 Specifying input files</h3>

<p><a name="index-input-files-276"></a><a name="index-globbing-277"></a><a name="index-regular-expressions-278"></a><a name="index-wildcards-279"></a><a name="index-_0040code_007bNINTAP_007d-280"></a><a name="index-Processor_002c-_0040acronym_007bCCM_007d-281"></a><a name="index-_0040acronym_007bCCM_007d-Processor-282"></a><a name="index-_0040code_007b_002dn-_0040var_007bloop_007d_007d-283"></a><a name="index-_0040code_007b_002d_002dnintap-_0040var_007bloop_007d_007d-284"></a><a name="index-_0040code_007b_002dp-_0040var_007binput_002dpath_007d_007d-285"></a><a name="index-_0040code_007b_002d_002dpth-_0040var_007binput_002dpath_007d_007d-286"></a><a name="index-_0040code_007b_002d_002dpath-_0040var_007binput_002dpath_007d_007d-287"></a><a name="index-_0040var_007binput_002dpath_007d-288"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability (<code>-n</code>): <span class="command">ncea</span>, <span class="command">ncecat</span>, <span class="command">ncra</span>, <span class="command">ncrcat</span><br>
Availability (<code>-p</code>): All operators<br>
Short options: <span class="samp">-n</span>, <span class="samp">-p</span><br>
Long options: <span class="samp">--nintap</span>, <span class="samp">--pth</span>, <span class="samp">--path</span><br>
</td></tr></table>
   It is important that the user be able to specify multiple input files
without tediously typing in each by its full name. 
<a name="index-_0040acronym_007bUNIX_007d-289"></a>There are four different ways of specifying input files to <acronym>NCO</acronym>:
explicitly typing each, using <acronym>UNIX</acronym> shell wildcards, and using
the <acronym>NCO</acronym> <span class="samp">-n</span> and <span class="samp">-p</span> switches (or their long option
equivalents, <span class="samp">--nintap</span> or <span class="samp">--pth</span> and <span class="samp">--path</span>,
respectively). 
To illustrate these methods, consider the simple problem of using
<span class="command">ncra</span> to average five input files, <span class="file">85.nc</span>, <span class="file">86.nc</span>,
<small class="dots">...</small>&nbsp;<span class="file">89.nc</span><!-- /@w -->, and store the results in <span class="file">8589.nc</span>. 
Here are the four methods in order. 
They produce identical answers.
<pre class="example">     ncra 85.nc 86.nc 87.nc 88.nc 89.nc 8589.nc
     ncra 8[56789].nc 8589.nc
     ncra -p <var>input-path</var> 85.nc 86.nc 87.nc 88.nc 89.nc 8589.nc
     ncra -n 5,2,1 85.nc 8589.nc
</pre>
   <p>The first method (explicitly specifying all filenames) works by brute
force. 
The second method relies on the operating system shell to <dfn>glob</dfn>
(expand) the <dfn>regular expression</dfn> <code>8[56789].nc</code>. 
The shell passes valid filenames which match the expansion to
<span class="command">ncra</span>. 
The third method uses the <span class="samp">-p </span><var>input-path</var> argument to specify
the directory where all the input files reside. 
<acronym>NCO</acronym> prepends <var>input-path</var> (e.g.,
<span class="file">/data/usrname/model</span>) to all <var>input-files</var> (but not to
<var>output-file</var>). 
Thus, using <span class="samp">-p</span>, the path to any number of input files need only
be specified once. 
Note <var>input-path</var> need not end with <span class="samp">/</span>; the <span class="samp">/</span> is
automatically generated if necessary.

   <p>The last method passes (with <span class="samp">-n</span>) syntax concisely describing
the entire set of filenames
<a rel="footnote" href="#fn-15" name="fnd-15"><sup>15</sup></a>. 
<a name="index-multi_002dfile-operators-290"></a><a name="index-files_002c-multiple-291"></a>This option is only available with the <dfn>multi-file operators</dfn>:
<span class="command">ncra</span>, <span class="command">ncrcat</span>, <span class="command">ncea</span>, and <span class="command">ncecat</span>. 
By definition, multi-file operators are able to process an arbitrary
number of <var>input-files</var>. 
This option is very useful for abbreviating lists of filenames
representable as
<var>alphanumeric_prefix</var>+<var>numeric_suffix</var>+<span class="file">.</span>+<var>filetype</var>
where <var>alphanumeric_prefix</var> is a string of arbitrary length and
composition, <var>numeric_suffix</var> is a fixed width field of digits, and
<var>filetype</var> is a standard filetype indicator. 
For example, in the file <span class="file">ccm3_h0001.nc</span>, we have
<var>alphanumeric_prefix</var> = <span class="file">ccm3_h</span>, <var>numeric_suffix</var> =
<span class="file">0001</span>, and <var>filetype</var> = <span class="file">nc</span>.

   <p><acronym>NCO</acronym> is able to decode lists of such filenames encoded using the
<span class="samp">-n</span> option. 
The simpler (3-argument) <span class="samp">-n</span> usage takes the form
<code>-n </code><var>file_number</var><code>,</code><var>digit_number</var><code>,</code><var>numeric_increment</var>
where <var>file_number</var> is the number of files, <var>digit_number</var> is
the fixed number of numeric digits comprising the <var>numeric_suffix</var>,
and <var>numeric_increment</var> is the constant, integer-valued difference
between the <var>numeric_suffix</var> of any two consecutive files. 
The value of <var>alphanumeric_prefix</var> is taken from the input file,
which serves as a template for decoding the filenames. 
In the example above, the encoding <code>-n 5,2,1</code> along with the input
file name <span class="file">85.nc</span> tells <acronym>NCO</acronym> to
construct five (5) filenames identical to the template <span class="file">85.nc</span>
except that the final two (2) digits are a numeric suffix to be
incremented by one (1) for each successive file. 
Currently <var>filetype</var> may be either be empty, <span class="file">nc</span>,
<span class="file">cdf</span>, <span class="file">hdf</span>, or <span class="file">hd5</span>. 
If present, these <var>filetype</var> suffixes (and the preceding <span class="file">.</span>)
are ignored by <acronym>NCO</acronym> as it uses the <span class="samp">-n</span> arguments to
locate, evaluate, and compute the <var>numeric_suffix</var> component of
filenames.

   <p><a name="index-wrapped-filenames-292"></a><a name="index-climate-model-293"></a>Recently the <span class="samp">-n</span> option has been extended to allow convenient
specification of filenames with &ldquo;circular&rdquo; characteristics. 
This means it is now possible for <acronym>NCO</acronym> to automatically
generate filenames which increment regularly until a specified maximum
value, and then wrap back to begin again at a specified minimum value. 
The corresponding <span class="samp">-n</span> usage becomes more complex, taking one or
two additional arguments for a total of four or five, respectively:
<code>-n
</code><var>file_number</var><code>,</code><var>digit_number</var><code>,</code><var>numeric_increment</var><code>[,</code><var>numeric_max</var><code>[,</code><var>numeric_min</var><code>]]</code>
where <var>numeric_max</var>, if present, is the maximum integer-value of
<var>numeric_suffix</var> and <var>numeric_min</var>, if present, is the minimum
integer-value of <var>numeric_suffix</var>. 
Consider, for example, the problem of specifying non-consecutive input
files where the filename suffixes end with the month index. 
In climate modeling it is common to create summertime and wintertime
averages which contain the averages of the months June&ndash;July&ndash;August,
and December&ndash;January&ndash;February, respectively:
<pre class="example">     ncra -n 3,2,1 85_06.nc 85_0608.nc
     ncra -n 3,2,1,12 85_12.nc 85_1202.nc
     ncra -n 3,2,1,12,1 85_12.nc 85_1202.nc
</pre>
   <p>The first example shows that three arguments to the <span class="samp">-n</span> option
suffice to specify consecutive months (<code>06, 07, 08</code>) which do not
&ldquo;wrap&rdquo; back to a minimum value. 
The second example shows how to use the optional fourth and fifth
elements of the <span class="samp">-n</span> option to specify a wrap value to <acronym>NCO</acronym>. 
The fourth argument to <span class="samp">-n</span>, if present, specifies the maximum
integer value of <var>numeric_suffix</var>. 
In this case the maximum value is&nbsp;12,<!-- /@w --> and will be formatted as
<span class="file">12</span> in the filename string. 
The fifth argument to <span class="samp">-n</span>, if present, specifies the minimum
integer value of <var>numeric_suffix</var>. 
The default minimum filename suffix is&nbsp;1,<!-- /@w --> which is formatted as
<span class="file">01</span> in this case. 
Thus the second and third examples have the same effect, that is, they
automatically generate, in order, the filenames <span class="file">85_12.nc</span>,
<span class="file">85_01.nc</span>, and <span class="file">85_02.nc</span> as input to <acronym>NCO</acronym>.

   <p><a name="fl_out"></a> <!-- http://nco.sf.net/nco.html#fl_out -->
<a name="out"></a> <!-- http://nco.sf.net/nco.html#out -->
<a name="output"></a> <!-- http://nco.sf.net/nco.html#output --><div class="node">
<p><hr>
<a name="Specifying-output-files"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Remote-storage">Remote storage</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Specifying-input-files">Specifying input files</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.6 Specifying output files</h3>

<p><a name="index-output-file-294"></a><a name="index-input-files-295"></a><a name="index-positional-arguments-296"></a><a name="index-command-line-switches-297"></a><a name="index-_0040code_007b_002do-_0040var_007bfl_005fout_007d_007d-298"></a><a name="index-_0040code_007b_002d_002doutput-_0040var_007bfl_005fout_007d_007d-299"></a><a name="index-_0040code_007b_002d_002dfl_005fout-_0040var_007bfl_005fout_007d_007d-300"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: All operators<br>
Short options: <span class="samp">-o</span><br>
Long options: <span class="samp">--fl_out</span>, <span class="samp">--output</span><br>
</td></tr></table>
   <acronym>NCO</acronym> commands produce no more than one output file, <var>fl_out</var>. 
Traditionally, users specify <var>fl_out</var> as the final argument to the
operator, following all input file names. 
This is the <dfn>positional argument</dfn> method of specifying input and
ouput file names. 
The positional argument method works well in most applications. 
<acronym>NCO</acronym> also supports specifying <var>fl_out</var> using the command
line switch argument method, <span class="samp">-o </span><var>fl_out</var>.

   <p>Specifying <var>fl_out</var> with a switch, rather than as a positional
argument, allows <var>fl_out</var> to precede input files in the argument
list. 
<a name="index-multi_002dfile-operators-301"></a>This is particularly useful with multi-file operators for three reasons. 
Multi-file operators may be invoked with hundreds (or more) filenames. 
Visual or automatic location of <var>fl_out</var> in such a list is
difficult when the only syntactic distinction between input and output
files is their position. 
<a name="index-_0040command_007bxargs_007d-302"></a><a name="index-input-files-303"></a>Second, specification of a long list of input files may be difficult
(see <a href="#Large-numbers-of-input-files">Large numbers of input files</a>). 
Making the input file list the final argument to an operator facilitates
using <span class="command">xargs</span> for this purpose. 
Some alternatives to <span class="command">xargs</span> are very ugly and undesirable. 
Finally, many users are more comfortable specifying output files
with <span class="samp">-o </span><var>fl_out</var> near the beginning of an argument list. 
<a name="index-compilers-304"></a><a name="index-linkers-305"></a>Compilers and linkers are usually invoked this way.

   <p><a name="rmt"></a> <!-- http://nco.sf.net/nco.html#rmt --><div class="node">
<p><hr>
<a name="Remote-storage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#File-retention">File retention</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Specifying-output-files">Specifying output files</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.7 Accessing files stored remotely</h3>

<p><a name="index-_0040code_007brcp_007d-306"></a><a name="index-_0040code_007bscp_007d-307"></a><a name="index-_0040file_007b_002erhosts_007d-308"></a><a name="index-_0040acronym_007bNCAR-MSS_007d-309"></a><a name="index-_0040acronym_007bMSS_007d-310"></a><a name="index-Mass-Store-System-311"></a><a name="index-_0040acronym_007bURL_007d-312"></a><a name="index-_0040code_007bftp_007d-313"></a><a name="index-remote-files-314"></a><a name="index-synchronous-file-access-315"></a><a name="index-asynchronous-file-access-316"></a><a name="index-_0040code_007b_002d_002dpth-_0040var_007binput_002dpath_007d_007d-317"></a><a name="index-_0040code_007b_002d_002dpath-_0040var_007binput_002dpath_007d_007d-318"></a><a name="index-_0040code_007b_002d_002dlcl-_0040var_007boutput_002dpath_007d_007d-319"></a><a name="index-_0040code_007b_002d_002dlocal-_0040var_007boutput_002dpath_007d_007d-320"></a><a name="index-_0040code_007b_002dl-_0040var_007boutput_002dpath_007d_007d-321"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: All operators<br>
Short options: <span class="samp">-p</span>, <span class="samp">-l</span><br>
Long options: <span class="samp">--pth</span>, <span class="samp">--path</span>, <span class="samp">--lcl</span>, <span class="samp">--local</span><br>
</td></tr></table>
   All <acronym>NCO</acronym> operators can retrieve files from remote sites as well
as from the local file system. 
A&nbsp;remote<!-- /@w --> site can be an anonymous <acronym>FTP</acronym> server, a machine on
which the user has <span class="command">rcp</span> or <span class="command">scp</span> privileges, or
<acronym>NCAR</acronym>'s Mass Storage System (<acronym>MSS</acronym>). 
To access a file via an anonymous <acronym>FTP</acronym> server, supply the
remote file's <acronym>URL</acronym>. 
To access a file using <span class="command">rcp</span> or <span class="command">scp</span>, specify the
Internet address of the remote file. 
Of course in this case you must have <span class="command">rcp</span> or <span class="command">scp</span>
privileges which allow transparent (no password entry required) access
to the remote machine. 
This means that <span class="file">~/.rhosts</span> or <span class="file">~/ssh/authorized_keys</span> must
be set accordingly on both local and remote machines.

   <p><a name="index-_0040command_007bmsrcp_007d-322"></a><a name="index-_0040command_007bmsread_007d-323"></a><a name="index-_0040command_007bnrnet_007d-324"></a>To access a file on <acronym>NCAR</acronym>'s <acronym>MSS</acronym>, specify the full <acronym>MSS</acronym> pathname of the
remote file. 
<acronym>NCO</acronym> will attempt to detect whether the local machine has direct
(synchronous) <acronym>MSS</acronym> access. 
In this case, <acronym>NCO</acronym> attempts to use the <acronym>NCAR</acronym>
<span class="command">msrcp</span> command
<a rel="footnote" href="#fn-16" name="fnd-16"><sup>16</sup></a>, or, failing that, <code>/usr/local/bin/msread</code>. 
Otherwise <acronym>NCO</acronym> attempts to retrieve the <acronym>MSS</acronym> file
through the (asynchronous) Masnet Interface Gateway System
(<acronym>MIGS</acronym>) using the <span class="command">nrnet</span> command.

   <p>The following examples show how one might analyze files stored on
remote systems.
<pre class="example">     ncks -l ./ ftp://dust.ess.uci.edu/pub/zender/nco/in.nc
     ncks -l ./ dust.ess.uci.edu:/home/zender/nco/in.nc
     ncks -l ./ /ZENDER/nco/in.nc
     ncks -l ./ mss:/ZENDER/nco/in.nc
     ncks -l ./ -p http://www.cdc.noaa.gov/cgi-bin/nph-nc/Datasets/\
     ncep.reanalysis.dailyavgs/surface air.sig995.1975.nc
</pre>
   <p class="noindent">The first example will work verbatim on your system if your system is
connected to the Internet and is not behind a firewall. 
The second example will work on your system if you have <span class="command">rcp</span>
or <span class="command">scp</span> access to the machine <code>dust.ess.uci.edu</code>. 
The third example will work from <acronym>NCAR</acronym> computers with local
access to  the <span class="command">msrcp</span>, <span class="command">msread</span>, or <span class="command">nrnet</span>
commands. 
The fourth command will work if your local version of <acronym>NCO</acronym> was
built with <acronym>DODS/OPeNDAP</acronym> capability (see <a href="#DODS_002fOPeNDAP">DODS/OPeNDAP</a>). 
The above commands can be rewritten using the <span class="samp">-p </span><var>input-path</var>
option as follows:
<a name="index-_0040code_007b_002dp-_0040var_007binput_002dpath_007d_007d-325"></a><a name="index-_0040var_007binput_002dpath_007d-326"></a><a name="index-_0040code_007b_002dl-_0040var_007boutput_002dpath_007d_007d-327"></a><a name="index-_0040var_007boutput_002dpath_007d-328"></a>
<pre class="example">     ncks -p ftp://dust.ess.uci.edu/pub/zender/nco -l ./ in.nc
     ncks -p dust.ess.uci.edu:/home/zender/nco -l ./ in.nc
     ncks -p /ZENDER/nco -l ./ in.nc
     ncks -p mss:/ZENDER/nco -l ./ in.nc
</pre>
   <p class="noindent">Using <span class="samp">-p</span> is recommended because it clearly separates the
<var>input-path</var> from the filename itself, sometimes called the
<dfn>stub</dfn>. 
<a name="index-stub-329"></a>When <var>input-path</var> is not explicitly specified using <span class="samp">-p</span>,
<acronym>NCO</acronym> internally generates an <var>input-path</var> from the first
input filename. 
The automatically generated <var>input-path</var> is constructed by stripping
the input filename of everything following the final <span class="samp">/</span> character
(i.e., removing the stub). 
The <span class="samp">-l </span><var>output-path</var> option tells <acronym>NCO</acronym> where to
store the remotely retrieved file and the output file. 
Often the path to a remotely retrieved file is quite different than the
path on the local machine where you would like to store the file. 
If <span class="samp">-l</span> is not specified then <acronym>NCO</acronym> internally generates an
<var>output-path</var> by simply setting <var>output-path</var> equal to
<var>input-path</var> stripped of any machine names. 
If <span class="samp">-l</span> is not specified and the remote file resides on the
<acronym>NCAR</acronym> <acronym>MSS</acronym> system, then the leading character of
<var>input-path</var>, <span class="samp">/</span>, is also stripped from <var>output-path</var>. 
Specifying <var>output-path</var> as <span class="samp">-l ./</span> tells <acronym>NCO</acronym> to
store the remotely retrieved file and the output file in the current
directory. 
Note that <span class="samp">-l .</span> is equivalent to <span class="samp">-l ./</span> though the latter is
recommended as it is syntactically more clear.

<ul class="menu">
<li><a accesskey="1" href="#DODS_002fOPeNDAP">DODS/OPeNDAP</a>
</ul>

   <p><a name="DODS"></a> <!-- http://nco.sf.net/nco.html#DODS -->
<a name="OPeNDAP"></a> <!-- http://nco.sf.net/nco.html#OPeNDAP -->
<a name="dods"></a> <!-- http://nco.sf.net/nco.html#dods -->
<a name="opendap"></a> <!-- http://nco.sf.net/nco.html#opendap --><div class="node">
<p><hr>
<a name="DODS_002fOPeNDAP"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#Remote-storage">Remote storage</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Remote-storage">Remote storage</a>
<br>
</div>

<h4 class="subsection">3.7.1 <acronym>DODS</acronym>/<acronym>OPeNDAP</acronym></h4>

<p><a name="index-_0040acronym_007bDODS_007d-330"></a><a name="index-_0040acronym_007bHTTP_007d-protocol-331"></a><a name="index-_0040env_007bDODS_005fROOT_007d-332"></a><a name="index-Distributed-Oceanographic-Data-System-333"></a><a name="index-oceanography-334"></a><a name="index-data-access-protocol-335"></a><a name="index-Open_002dsource-Project-for-a-Network-Data-Access-Protocol-336"></a><a name="index-_0040acronym_007bOPeNDAP_007d_002e-337"></a><a name="index-server-338"></a><a name="index-client_002dserver-339"></a>The Distributed Oceanographic Data System (<acronym>DODS</acronym>) provides
useful replacements for common data interface libraries like netCDF. 
The <acronym>DODS</acronym> versions of these libraries implement network
transparent access to data via a client-server data access protocol
that uses the <acronym>HTTP</acronym> protocol for communication. 
Although <acronym>DODS</acronym>-technology originated with oceanography data,
it applyies to virtually all scientific data. 
In recognition of this, the data access protocol underlying
<acronym>DODS</acronym> (which is what <acronym>NCO</acronym> cares about) has been
renamed the Open-source Project for a Network Data Access Protocol,
<acronym>OPeNDAP</acronym>. 
We use the terms <acronym>DODS</acronym> and <acronym>OPeNDAP</acronym> interchangeably,
and often write <acronym>DODS</acronym>/<acronym>OPeNDAP</acronym> for now. 
In the future we will deprecate <acronym>DODS</acronym> in favor of
<acronym>OPeNDAP</acronym>
<a rel="footnote" href="#fn-17" name="fnd-17"><sup>17</sup></a>.

   <p><acronym>NCO</acronym> may be <acronym>DODS/OPeNDAP</acronym>-enabled by linking
<acronym>NCO</acronym> to the <acronym>DODS/OPeNDAP</acronym> libraries. 
<a name="index-_0040file_007bMakefile_007d-340"></a>This is described in the <acronym>DODS/OPeNDAP</acronym> documentation and
automagically implemented in <acronym>NCO</acronym> build mechanisms
<a rel="footnote" href="#fn-18" name="fnd-18"><sup>18</sup></a>. 
The <span class="file">./configure</span> mechanism automatically enables <acronym>NCO</acronym> as
<acronym>DODS/OPeNDAP</acronym> clients if it can find the required
<acronym>DODS/OPeNDAP</acronym> libraries
<a rel="footnote" href="#fn-19" name="fnd-19"><sup>19</sup></a>. 
 in the usual locations. 
The <span class="env">$DODS_ROOT</span> environment variable may be used to override the
default <acronym>DODS/OPeNDAP</acronym> library location at <acronym>NCO</acronym>
compile-time. 
Building <acronym>NCO</acronym> with <span class="file">bld/Makefile</span> and the command
<code>make DODS=Y</code> adds the (non-intuitive) commands to link to the
<acronym>DODS/OPeNDAP</acronym> libraries installed in the <span class="env">$DODS_ROOT</span>
directory. 
The file <span class="file">doc/dods.sh</span> contains a generic script intended to help
users install <acronym>DODS/OPeNDAP</acronym> before building <acronym>NCO</acronym>. 
The documentation at the
<a href="http://www.unidata.ucar.edu/packages/dods">DODS Homepage</a>
is voluminous. 
Check there and on the
<a href="http://www.unidata.ucar.edu/packages/dods/home/mailLists/">DODS mail lists</a>. 
to learn more about the extensive capabilities of <acronym>DODS/OPeNDAP</acronym>
<a rel="footnote" href="#fn-20" name="fnd-20"><sup>20</sup></a>.

   <p>Once <acronym>NCO</acronym> is <acronym>DODS/OPeNDAP</acronym>-enabled the operators are
<acronym>DODS/OPeNDAP</acronym> clients. 
All <acronym>DODS/OPeNDAP</acronym> clients have network transparent access to
any files controlled by a <acronym>DODS/OPeNDAP</acronym> server. 
Simply specify the input file path(s) in <acronym>URL</acronym> notation and all
<acronym>NCO</acronym> operations may be performed on remote files made
accessible by a <acronym>DODS/OPeNDAP</acronym> server. 
For example, this extracts (remotely) an equatorial hyperslab,
from <acronym>NCEP daily reanalyses</acronym> data of the year 1969 made freely
available by a <acronym>NOAA</acronym> <acronym>DODS/OPeNDAP</acronym> server. 
Then it sends the hyperslab to the local <span class="command">ncwa</span> client which
computes and stores (locally) the regional mean surface pressure
(in&nbsp;Pa)<!-- /@w -->.
<pre class="example">     ncwa -O -C -a lat,lon,time -d lon,-10.,10. -d lat,-10.,10. -l ./ -p \
     http://www.cdc.noaa.gov/cgi-bin/nph-nc/Datasets/ncep.reanalysis.dailyavgs/surface \
     pres.sfc.1969.nc foo.nc
</pre>
   <p class="noindent"><a name="index-packing-341"></a><a name="index-unpacking-342"></a>All with one command! 
The data in this particular input file also happen to be packed
(see <a href="#Intrinsic-functions">Intrinsic functions</a>), although this is completely transparent
to the user since <acronym>NCO</acronym> automatically unpacks them before
attempting arithmetic.

   <p><acronym>NCO</acronym> obtains remote files from the <acronym>DODS/OPeNDAP</acronym> server
(e.g., <span class="file">www.cdc.noaa.gov</span>) rather than the local machine. 
Input files are first copied to the local machine, then processed. 
The <acronym>DODS/OPeNDAP</acronym> server performs data access, hyperslabbing,
and transfer to the local machine. 
<a name="index-I_002fO-343"></a>This allows the I/O to appear to <acronym>NCO</acronym> as if the input files
were local. 
The local machine performs all arithmetic operations. 
Only the hyperslabbed output data are transferred over the network (to
the local machine) for the number-crunching to begin. 
The advantages of this are obvious if you are examining small parts of
large files stored at remote locations.

   <p><a name="rtn"></a> <!-- http://nco.sf.net/nco.html#rtn --><div class="node">
<p><hr>
<a name="File-retention"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Variable-subsetting">Variable subsetting</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Remote-storage">Remote storage</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.8 Retention of remotely retrieved files</h3>

<p><a name="index-file-deletion-344"></a><a name="index-file-removal-345"></a><a name="index-file-retention-346"></a><a name="index-_0040code_007b_002dR_007d-347"></a><a name="index-_0040code_007b_002d_002drtn_007d-348"></a><a name="index-_0040code_007b_002d_002dretain_007d-349"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: All operators<br>
Short options: <span class="samp">-R</span><br>
Long options: <span class="samp">--rtn</span>, <span class="samp">--retain</span><br>
</td></tr></table>
   In order to conserve local file system space, files retrieved from
remote locations are automatically deleted from the local file system
once they have been processed. 
Many <acronym>NCO</acronym> operators were constructed to work with numerous
large (e.g., 200&nbsp;MB<!-- /@w -->) files. 
Retrieval of multiple files from remote locations is done serially. 
Each file is retrieved, processed, then deleted before the cycle
repeats. 
In cases where it is useful to keep the remotely-retrieved files on the
local file system after processing, the automatic removal feature may be
disabled by specifying <span class="samp">-R</span> on the command line.

   <p><a name="index-_0040acronym_007bFTP_007d-350"></a><a name="index-_0040acronym_007bSSH_007d-351"></a><a name="index-_0040acronym_007bmsrcp_007d-352"></a>Note that the remote retrieval features of <acronym>NCO</acronym> can always be
used to retrieve <em>any</em> file, including non-netCDF files, via
<span class="command">SSH</span>, anonymous <acronym>FTP</acronym>, or <span class="command">msrcp</span>. 
Often this method is quicker than using a browser, or running an
<acronym>FTP</acronym> session from a shell window yourself. 
<a name="index-server-353"></a>For example, say you want to obtain a <acronym>JPEG</acronym> file from a weather
server.
<pre class="example">     ncks -R -p ftp://weather.edu/pub/pix/jpeg -l ./ storm.jpg
</pre>
   <p class="noindent">In this example, <span class="command">ncks</span> automatically performs an anonymous
<acronym>FTP</acronym> login to the remote machine and retrieves the specified
file. 
When <span class="command">ncks</span> attempts to read the local copy of <span class="file">storm.jpg</span>
as a netCDF file, it fails and exits, leaving  <span class="file">storm.jpg</span> in
the current directory.

   <p><a name="index-_0040acronym_007bDODS_007d-354"></a><a name="index-server-355"></a>If your <acronym>NCO</acronym> is <acronym>DODS</acronym>-enabled (see <a href="#DODS_002fOPeNDAP">DODS/OPeNDAP</a>),
then you may use <acronym>NCO</acronym> to retrieve any files (including netCDF,
<acronym>HDF</acronym>, etc.) served by a <acronym>DODS</acronym> server to your local
machine. 
For example,
<pre class="example">     ncks -R -l ./ -p \
     http://www.cdc.noaa.gov/cgi-bin/nph-nc/Datasets/ncep.reanalysis.dailyavgs/surface \
     pres.sfc.1969.nc
</pre>
   <p>Note that <acronym>NCO</acronym> is never the preffered way to transport files
from remote machines. 
For large jobs, that is best handled by <acronym>FTP</acronym>, <acronym>SSH</acronym>,
or <span class="command">wget</span>. 
It may occasionally be useful to use <acronym>NCO</acronym> to transfer files
when your other preferred methods are not available locally.

   <p><a name="var"></a> <!-- http://nco.sf.net/nco.html#var --><div class="node">
<p><hr>
<a name="Variable-subsetting"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Coordinate-variables">Coordinate variables</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#File-retention">File retention</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.9 Including/Excluding specific variables</h3>

<p><a name="index-_0040code_007b_002dv-_0040var_007bvar_007d_007d-356"></a><a name="index-_0040code_007b_002d_002dvariable-_0040var_007bvar_007d_007d-357"></a><a name="index-_0040code_007b_002dx_007d-358"></a><a name="index-_0040code_007b_002d_002dexclude_007d-359"></a><a name="index-_0040code_007b_002d_002dxcl_007d-360"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: (<span class="command">ncap</span>), <span class="command">ncbo</span>, <span class="command">ncea</span>,
<span class="command">ncecat</span>, <span class="command">ncflint</span>, <span class="command">ncks</span>, <span class="command">ncpdq</span>,
<span class="command">ncra</span>, <span class="command">ncrcat</span>, <span class="command">ncwa</span><br>
Short options: <span class="samp">-v</span>, <span class="samp">-x</span><br>
Long options: <span class="samp">--variable</span>, <span class="samp">--exclude</span> or <span class="samp">--xcl</span><br>
</td></tr></table>
   Variable subsetting is implemented with the <span class="samp">-v
</span><var>var</var><span class="samp">[,...]</span> and <span class="samp">-x</span> options. 
A&nbsp;list<!-- /@w --> of variables to extract is specified following the <span class="samp">-v</span>
option, e.g., <span class="samp">-v time,lat,lon</span>. 
Not using the <span class="samp">-v</span> option is equivalent to specifying all
variables. 
The <span class="samp">-x</span> option causes the list of variables specified with
<span class="samp">-v</span> to be <em>excluded</em> rather than <em>extracted</em>. 
Thus <span class="samp">-x</span> saves typing when you only want to extract fewer than
half of the variables in a file. 
<a name="index-memory-requirements-361"></a>Remember, if averaging or concatenating large files stresses your
systems memory or disk resources, then the easiest solution is often to
use the <span class="samp">-v</span> option to retain only the variables you
really need (see <a href="#Memory-usage">Memory usage</a>). 
Note that, due to its special capabilities, <span class="command">ncap</span> interprets
the <span class="samp">-v</span> switch differently
(see <a href="#ncap-netCDF-Arithmetic-Processor">ncap netCDF Arithmetic Processor</a>). 
For <span class="command">ncap</span>, the <span class="samp">-v</span> switch takes no arguments and indicates
that <em>only</em> user-defined variables should be output. 
<span class="command">ncap</span> neither accepts nor understands the <var>-x</var> switch.

   <p><a name="rx"></a> <!-- http://nco.sf.net/nco.html#rx -->
<a name="wildcarding"></a> <!-- http://nco.sf.net/nco.html#wildcarding --><a name="index-extended-regular-expressions-362"></a><a name="index-regular-expressions-363"></a><a name="index-pattern-matching-364"></a><a name="index-wildcards-365"></a><a name="index-_0040command_007begrep_007d-366"></a><a name="index-_0040acronym_007bGNU_007d-367"></a>As of <acronym>NCO</acronym> 2.8.1 (August, 2003), variable name arguments
of the <span class="samp">-v</span> switch may contain <dfn>extended regular expressions</dfn>. 
For example, <span class="samp">-v '^DST'</span> selects all variables beginning with the
string <span class="samp">DST</span>. 
Extended regular expressions are defined by the <acronym>GNU</acronym>
<span class="command">egrep</span> command. 
The meta-characters used to express pattern matching operations are
<span class="samp">^$+?.*[]{}|</span>. 
If the regular expression pattern matches <em>any</em> part of a variable
name then that variable is selected. 
This capability is called <dfn>wildcarding</dfn>, and is very useful for
sub-setting large data files.

   <p><a name="index-_0040acronym_007bPOSIX_007d-368"></a><a name="index-_0040code_007bregex_007d-369"></a>Because of its wide availability, <acronym>NCO</acronym> uses the <acronym>POSIX</acronym>
regular expression library <code>regex</code>. 
Regular expressions of arbitary complexity may be used. 
Since netCDF variable names are relatively simple constructs, only a
few varieties of variable wildcards are likely to be useful. 
For convenience, we define the most useful pattern matching operators
here:
<a name="index-_0040code_007b_002e_007d-_0028wildcard-character_0029-370"></a><a name="index-_0040code_007b_0024_007d-_0028wildcard-character_0029-371"></a><a name="index-_0040code_007b_005e_007d-_0028wildcard-character_0029-372"></a><a name="index-_0040code_007b_003f_007d-_0028filename-expansion_0029-373"></a><a name="index-_0040code_007b_002a_007d-_0028filename-expansion_0029-374"></a>
     <dl>
<dt><span class="samp">^</span><dd>Matches the beginning of a string
<br><dt><span class="samp">$</span><dd>Matches the end of a string
<br><dt><span class="samp">.</span><dd>Matches any single character
</dl>
   The most useful repetition and combination operators are
<a name="index-_0040code_007b_003f_007d-_0028wildcard-character_0029-375"></a><a name="index-_0040code_007b_002a_007d-_0028wildcard-character_0029-376"></a><a name="index-_0040code_007b_002b_007d-_0028wildcard-character_0029-377"></a><a name="index-_0040code_007b_007c_007d-_0028wildcard-character_0029-378"></a>
     <dl>
<dt><span class="samp">?</span><dd>The preceding regular expression is optional and matched at most once
<br><dt><span class="samp">*</span><dd>The preceding regular expression will be matched zero or more times
<br><dt><span class="samp">+</span><dd>The preceding regular expression will be matched one or more times
<br><dt><span class="samp">|</span><dd>The preceding regular expression will be joined to the following regular
expression. 
The resulting regular expression matches any string matching either
subexpression. 
</dl>
   To illustrate the use of these operators in extracting variables,
consider a file with variables <code>Q</code>, <code>Q01</code>&ndash;<code>Q99</code>,
<code>Q100</code>, <code>QAA</code>&ndash;<code>QZZ</code>, <code>Q_H2O</code>, <code>X_H2O</code>,
<code>Q_CO2</code>, <code>X_CO2</code>.
<pre class="example">     ncks -v 'Q+' in.nc               # Select variables that start with Q
     ncks -v '^Q+.?.' in.nc           # Select Q, Q01--Q99, QAA--QZZ, etc.
     ncks -v '^Q..' in.nc             # Select Q01--Q99, QAA--QZZ, etc.
     ncks -v '^Q[0-9][0-9]' in.nc     # Select Q01--Q99
     ncks -v '^Q[[:digit:]]{2}' in.nc # Select Q01--Q99
     ncks -v 'H2O$' in.nc             # Select Q_H2O, X_H2O
     ncks -v 'H2O$|CO2$' in.nc        # Select Q_H2O, X_H2O, Q_CO2, X_CO2
     ncks -v '^Q[0-9][0-9]' in.nc     # Select Q01--Q99, Q100
     ncks -v '^Q[0-9][0-9]$' in.nc    # Select Q01--Q99
     ncks -v '^[a-z]_[a-z]{3}$' in.nc # Select Q_H2O, X_H2O, Q_CO2, X_CO2
</pre>
   <p>Beware&mdash;two of the most frequently used repetition pattern matching
operators, <span class="samp">*</span> and <span class="samp">?</span>, are also valid pattern matching
operators for filename expansion (globbing) at the shell-level. 
Confusingly, they have different meanings in extended regular
expressions than in shell-level filename expansion. 
In an extended regular expression, <span class="samp">*</span> matches zero or more
occurences of the preceding regular expression. 
Thus <span class="samp">Q*</span> selects all variables, and <span class="samp">Q+.*</span> selects all
variables containing <span class="samp">Q</span> (the <span class="samp">+</span> ensures the preceding item
matches at least once). 
To match zero or one occurence of the preceding regular expression,
use <span class="samp">?</span>. 
Thus <span class="samp">Q?</span> selects all variables, <span class="samp">Q+.?</span> selects all
Documentation for the <acronym>UNIX</acronym> <span class="command">egrep</span> command details the extended
regular expressions that <acronym>NCO</acronym> supports.

   <p><a name="index-globbing-379"></a><a name="index-shell-380"></a><a name="index-_0040command_007bbash_007d-381"></a><a name="index-_0040command_007bcsh_007d-382"></a><a name="index-quotes-383"></a>One must be careful to protect any special characters in the regular
expression specification from being interpreted (globbed) by the shell. 
This is accomplish by enclosing special characters within single or
double quotes
<pre class="example">     ncra -v Q?? in.nc out.nc   # Error: Shell attempts to glob wildcards
     ncra -v '^Q+..' in.nc out.nc # Correct: NCO interprets wildcards
     ncra -v '^Q+..' in*.nc out.nc
</pre>
   <p>The final example shows that commands may use a combination of variable
wildcarding and shell filename expansion (globbing). 
For globbing, <span class="samp">*</span> and <span class="samp">?</span> <em>have nothing to do</em> with the
preceding regular expression! 
In shell-level filename expansion, <span class="samp">*</span> matches any string,
including the null string and <span class="samp">?</span> matches any single character. 
Documentation for <span class="command">bash</span> and <span class="command">csh</span> describe the rules of
filename expansion (globbing).

   <p><a name="crd"></a> <!-- http://nco.sf.net/nco.html#crd -->
<a name="-C"></a> <!-- http://nco.sf.net/nco.html#-C -->
<a name="-c"></a> <!-- http://nco.sf.net/nco.html#-c --><div class="node">
<p><hr>
<a name="Coordinate-variables"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Fortran-indexing">Fortran indexing</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Variable-subsetting">Variable subsetting</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.10 Including/Excluding coordinate variables</h3>

<p><a name="index-_0040code_007b_002dC_007d-384"></a><a name="index-_0040code_007b_002dc_007d-385"></a><a name="index-_0040code_007b_002d_002dno_002dcoords_007d-386"></a><a name="index-_0040code_007b_002d_002dno_002dcrd_007d-387"></a><a name="index-_0040code_007b_002d_002dcoords_007d-388"></a><a name="index-_0040code_007b_002d_002dcrd_007d-389"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: <span class="command">ncap</span>, <span class="command">ncbo</span>, <span class="command">ncea</span>,
<span class="command">ncecat</span>, <span class="command">ncflint</span>, <span class="command">ncks</span>, <span class="command">ncpdq</span>,
<span class="command">ncra</span>, <span class="command">ncrcat</span>, <span class="command">ncwa</span><br>
Short options: <span class="samp">-C</span>, <span class="samp">-c</span><br>
Long options: <span class="samp">--no-coords</span>, <span class="samp">--no-crd</span>, <span class="samp">--crd</span>, <span class="samp">--coords</span><br>
</td></tr></table>
   By default, coordinates variables associated with any variable appearing
in the <var>output-file</var> will also appear in the <var>output-file</var>, even
if they are not explicitly specified, e.g., with the <span class="samp">-v</span> switch. 
Thus variables with a latitude coordinate <code>lat</code> always carry the
values of <code>lat</code> with them into the <var>output-file</var>. 
This feature can be disabled with <span class="samp">-C</span>, which causes <acronym>NCO</acronym>
to not automatically add coordinates to the variables appearing in the
<var>output-file</var>. 
However, using <span class="samp">-C</span> does not preclude the user from including some
coordinates in the output files simply by explicitly selecting the
coordinates with the <var>-v</var> option. 
The <span class="samp">-c</span> option, on the other hand, is a shorthand way of
automatically specifying that <em>all</em> coordinate variables in the
<var>input-files</var> should appear in the <var>output-file</var>. 
Thus <span class="samp">-c</span> allows the user to select all the coordinate variables
without having to know their names.

   <p><a name="ftn"></a> <!-- http://nco.sf.net/nco.html#ftn -->
<a name="-F"></a> <!-- http://nco.sf.net/nco.html#-F --><div class="node">
<p><hr>
<a name="Fortran-indexing"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Hyperslabs">Hyperslabs</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Coordinate-variables">Coordinate variables</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.11 C &amp; Fortran index conventions</h3>

<p><a name="index-index-conventions-390"></a><a name="index-Fortran-index-convention-391"></a><a name="index-C-index-convention-392"></a><a name="index-_0040code_007b_002dF_007d-393"></a><a name="index-_0040code_007b_002d_002dfortran_007d-394"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: <span class="command">ncbo</span>, <span class="command">ncea</span>, <span class="command">ncecat</span>,
<span class="command">ncflint</span>, <span class="command">ncks</span>, <span class="command">ncpdq</span>, <span class="command">ncra</span>,
<span class="command">ncrcat</span>, <span class="command">ncwa</span><br>
Short options: <span class="samp">-F</span><br>
Long options: <span class="samp">--fortran</span><br>
</td></tr></table>
   <a name="index-I_002fO-395"></a>The <span class="samp">-F</span> switch changes <acronym>NCO</acronym> to read and write with
Fortran index conventions. 
By default, <acronym>NCO</acronym> uses C-style (0-based) indices for all I/O. 
In&nbsp;C<!-- /@w -->, indices count from&nbsp;0<!-- /@w --> (rather than&nbsp;1<!-- /@w -->), and
dimensions are ordered from slowest (inner-most) to fastest
(outer-most) varying. 
In Fortran, indices count from&nbsp;1<!-- /@w --> (rather than&nbsp;0<!-- /@w -->), and
dimensions are ordered from fastest (inner-most) to slowest
(outer-most) varying. 
<a name="index-transpose-396"></a>Hence C&nbsp;and<!-- /@w --> Fortran data storage conventions represent mathematical
transposes of eachother. 
<a name="index-record-variable-397"></a>Note that record variables contain the record dimension as the most
slowly varying dimension. 
See <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a> for techniques
to re-order (including transposes) dimensionse and to reverse data
storage order.

   <p><a name="index-record-dimension-398"></a>Consider a file <span class="file">85.nc</span> containing 12&nbsp;months<!-- /@w --> of data in the
record dimension <code>time</code>. 
The following hyperslab operations produce identical results, a
June-July-August average of the data:
<pre class="example">     ncra -d time,5,7 85.nc 85_JJA.nc
     ncra -F -d time,6,8 85.nc 85_JJA.nc
</pre>
   <p>Printing variable <var>three_dmn_var</var> in file <span class="file">in.nc</span> first with
C&nbsp;indexing<!-- /@w --> conventions, then with Fortran indexing conventions
results in the following output formats:
<pre class="example">     % ncks -v three_dmn_var in.nc
     lat[0]=-90 lev[0]=1000 lon[0]=-180 three_dmn_var[0]=0
     ...
     % ncks -F -v three_dmn_var in.nc
     lon(1)=0 lev(1)=100 lat(1)=-90 three_dmn_var(1)=0
     ...
</pre>
   <p><a name="dmn"></a> <!-- http://nco.sf.net/nco.html#dmn -->
<a name="-d"></a> <!-- http://nco.sf.net/nco.html#-d --><div class="node">
<p><hr>
<a name="Hyperslabs"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Multislabs">Multislabs</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Fortran-indexing">Fortran indexing</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.12 Hyperslabs</h3>

<p><a name="index-hyperslab-399"></a><a name="index-dimension-limits-400"></a><a name="index-coordinate-limits-401"></a><a name="index-_0040code_007b_002dd-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-402"></a><a name="index-_0040code_007b_002d_002ddimension-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-403"></a><a name="index-_0040code_007b_002d_002ddmn-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-404"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: <span class="command">ncbo</span>, <span class="command">ncea</span>, <span class="command">ncecat</span>,
<span class="command">ncflint</span>, <span class="command">ncks</span>, <span class="command">ncpdq</span>, <span class="command">ncra</span>,
<span class="command">ncrcat</span>, <span class="command">ncwa</span><br>
Short options: <span class="samp">-d</span><br>
Long options: <span class="samp">--dimension</span>, <span class="samp">--dmn</span><br>
</td></tr></table>
   A&nbsp;<dfn>hyperslab</dfn><!-- /@w --> is a subset of a variable's data. 
The coordinates of a hyperslab are specified with the <code>-d
</code><var>dim</var><code>,[</code><var>min</var><code>][,[</code><var>max</var><code>]]</code> short option (or with the
<span class="samp">--dimension</span> or <span class="samp">--dmn</span> long options). 
The bounds of the hyperslab to be extracted are specified by the
associated <var>min</var> and <var>max</var> values. 
A&nbsp;half<!-- /@w -->-open range is specified by omitting either the <var>min</var> or
<var>max</var> parameter but including the separating comma. 
The unspecified limit is interpreted as the maximum or minimum value in
the unspecified direction. 
A&nbsp;cross<!-- /@w -->-section at a specific coordinate is extracted by specifying only
the <var>min</var> limit and omitting a trailing comma. 
Dimensions not mentioned are passed with no reduction in range. 
The dimensionality of variables is not reduced (in the case of a
cross-section, the size of the constant dimension will be one). 
If values of a coordinate-variable are used to specify a range or
cross-section, then the coordinate variable must be monotonic (values
either increasing or decreasing). 
In this case, command-line values need not exactly match coordinate
values for the specified dimension. 
Ranges are determined by seeking the first coordinate value to occur in
the closed range [<var>min</var>,<var>max</var>] and including all subsequent
values until one falls outside the range. 
The coordinate value for a cross-section is the coordinate-variable
value closest to the specified value and must lie within the range or
coordinate-variable values.

   <p>Coordinate values should be specified using real notation with a decimal
point required in the value, whereas dimension indices are specified
using integer notation without a decimal point. 
This convention serves only to differentiate coordinate values from
dimension indices. 
It is independent of the type of any netCDF coordinate variables. 
For a given dimension, the specified limits must both be coordinate
values (with decimal points) or dimension indices (no decimal points).

   <p><a name="index-_0040code_007bNC_005fBYTE_007d-405"></a><a name="index-_0040code_007bNC_005fCHAR_007d-406"></a>User-specified coordinate limits are promoted to double precision values
while searching for the indices which bracket the range. 
Thus, hyperslabs on coordinates of type <code>NC_BYTE</code> and
<code>NC_CHAR</code> are computed numerically rather than lexically, so the
results are unpredictable.

   <p><a name="index-wrapped-coordinates-407"></a>The relative magnitude of <var>min</var> and <var>max</var> indicate to the
operator whether to expect a <dfn>wrapped coordinate</dfn>
(see <a href="#Wrapped-coordinates">Wrapped coordinates</a>), such as longitude. 
If <var>min</var> &gt; <var>max</var>, the <acronym>NCO</acronym> expects the
coordinate to be wrapped, and a warning message will be printed. 
When this occurs, <acronym>NCO</acronym> selects all values outside the domain
[<var>max</var> &lt; <var>min</var>], i.e., all the values exclusive of the
values which would have been selected if <var>min</var> and <var>max</var> were
swapped. 
If this seems confusing, test your command on just the coordinate
variables with <span class="command">ncks</span>, and then examine the output to ensure
<acronym>NCO</acronym> selected the hyperslab you expected (coordinate wrapping
is currently only supported by <span class="command">ncks</span>).

   <p>Because of the way wrapped coordinates are interpreted, it is very
important to make sure you always specify hyperslabs in the
monotonically increasing sense, i.e., <var>min</var> &lt; <var>max</var>
(even if the underlying coordinate variable is monotonically
decreasing). 
The only exception to this is when you are indeed specifying a wrapped
coordinate. 
The distinction is crucial to understand because the points selected by,
e.g., <code>-d longitude,50.,340.</code>, are exactly the complement of the
points selected by <code>-d longitude,340.,50.</code>.

   <p>Not specifying any hyperslab option is equivalent to specifying full
ranges of all dimensions. 
This option may be specified more than once in a single command
(each hyperslabed dimension requires its own <code>-d</code> option).

   <p><a name="msa"></a> <!-- http://nco.sf.net/nco.html#msa --><div class="node">
<p><hr>
<a name="Multislabs"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#UDUnits-Support">UDUnits Support</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Hyperslabs">Hyperslabs</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.13 Multislabs</h3>

<p><a name="index-multislab-408"></a><a name="index-_0040code_007b_002dd-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-409"></a><a name="index-_0040code_007b_002d_002ddimension-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-410"></a><a name="index-_0040code_007b_002d_002ddmn-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-411"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: <span class="command">ncks</span><br>
Short options: <span class="samp">-d</span><br>
Long options: <span class="samp">--dimension</span>, <span class="samp">--dmn</span><br>
</td></tr></table>
   In late 2002, <span class="command">ncks</span> added support for specifying a
<dfn>multislab</dfn> for any variable. 
A&nbsp;multislab<!-- /@w --> is a union of one or more hyperslabs
which is specified by chaining together hyperslab commands, i.e.,
<kbd>-d</kbd> options (see <a href="#Hyperslabs">Hyperslabs</a>). 
This allows multislabs to overcome some restraints which limit
hyperslabs.

   <p>A&nbsp;single<!-- /@w --> <kbd>-d</kbd> option can only specify a contiguous and/or regularly
spaced multi-dimensional array of data. 
Multislabs are constructed from multiple <kbd>-d</kbd> options and may
therefore have non-regularly spaced arrays. 
For example, suppose it is desired to operate on all longitudes
from 10.0 to 20.0 and from 80.0 to 90.0&nbsp;degrees<!-- /@w -->. 
The combined range of longitudes is not selectable in a single
hyperslab specfication of the form
<span class="samp">-d </span><var>lon</var><span class="samp">,</span><var>min</var><span class="samp">,</span><var>max</var> or
<span class="samp">-d </span><var>lon</var><span class="samp">,</span><var>min</var><span class="samp">,</span><var>max</var><span class="samp">,</span><var>stride</var> because its
elements are irregularly spaced in coordinate space (and presumably
in index space too). 
The multislab specification for obtaining these values is simply
the union of the hyperslabs specifications that comprise the multislab,
i.e.,
<pre class="example">     ncks -d lon,10.,20. -d lon,80.,90. in.nc out.nc
     ncks -d lon,10.,15. -d lon,15.,20. -d lon,80.,90. in.nc out.nc
</pre>
   <p class="noindent">Any number of hyperslabs specifications may be chained together
to specify the multislab. 
Multislabs are more efficient than the alternative of sequentially
performing hyperslab operations and concatenating the results. 
<a name="index-I_002fO-412"></a>This is because <acronym>NCO</acronym> employs a novel multislab algorithm to
minimize the number of I/O operations when retrieving irregularly spaced
data from disk.

   <p>Users may specify redundant ranges of indices in a multislab, e.g.,
<pre class="example">     ncks -d lon,0,4 -d lon,2,9,2 in.nc out.nc
</pre>
   <p class="noindent">This command retrieves the first five longitudes, and then every other
longitude value up to the tenth. 
Elements 0, 2, and&nbsp;4<!-- /@w --> are specified by both hyperslab arguments (hence
this is redundant) but will count only once if an arithmetic operation
is being performed. 
The <acronym>NCO</acronym> multislab algorithm retrieves each element from disk
once and only once. 
Thus users may take some shortcuts in specifying multislabs and the
algorithm will obtain the intended values. 
Specifying redundant ranges is not encouraged, but may be useful on
occasion and will not result in unintended consequences.

   <p>A&nbsp;final<!-- /@w --> example shows the real power of multislabs. 
Suppose the <var>Q</var> variable contains three dimensional arrays of
distinct chemical constituents in no particular order. 
We are interested in the NOy species in a certain geographic range. 
Say that NO, NO2, and N2O5 are elements&nbsp;0<!-- /@w -->, 1, and&nbsp;5<!-- /@w --> of the
<var>species</var> dimension of <var>Q</var>. 
The multislab specification might look something like
<pre class="example">     ncks -d species,0,1 -d species,5 -d lon,0,4 -d lon,2,9,2 in.nc out.nc
</pre>
   <p class="noindent">Multislabs are powerful because they may be specified for every
dimension at the same time. 
Thus multislabs obsolete the need to execute multiple <span class="command">ncks</span>
commands to gather the desired range of data. 
We envision adding multislab support to all arithmetic operators in the
future.

   <p><a name="UDUnits"></a> <!-- http://nco.sf.net/nco.html#UDUnits --><div class="node">
<p><hr>
<a name="UDUnits-Support"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Wrapped-coordinates">Wrapped coordinates</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Multislabs">Multislabs</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.14 UDUnits Support</h3>

<p><a name="index-UDUnits-413"></a><a name="index-Unidata-414"></a><a name="index-_0040code_007bunits_007d-415"></a><a name="index-attribute_002c-_0040code_007bunits_007d-416"></a><a name="index-_0040code_007b_002dd-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-417"></a><a name="index-_0040code_007b_002d_002ddimension-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-418"></a><a name="index-_0040code_007b_002d_002ddmn-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-419"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: <span class="command">ncbo</span>, <span class="command">ncea</span>, <span class="command">ncecat</span>,
<span class="command">ncflint</span>, <span class="command">ncks</span>, <span class="command">ncpdq</span>, <span class="command">ncra</span>,
<span class="command">ncrcat</span>, <span class="command">ncwa</span><br>
Short options: <span class="samp">-d</span><br>
Long options: <span class="samp">--dimension</span>, <span class="samp">--dmn</span><br>
</td></tr></table>
   There is more than one way to hyperslab a cat. 
The <a href="http://www.unidata.ucar.edu/packages/udunits">UDUnits</a> package
provides a library which, if present, <acronym>NCO</acronym> uses to translate
user-specified physical dimensions into the physical dimensions of data
stored in netCDF files. 
Unidata provides UDUnits under the same terms as netCDF, so sites should
install both. 
Compiling <acronym>NCO</acronym> with UDUnits support is currently optional but
may become required in a future version of <acronym>NCO</acronym>.

   <p>Two examples suffice to demonstrate the power and convenience of UDUnits
support. 
<a name="index-MKS-units-420"></a>First, consider extraction of a variable containing non-record
coordinates with physical dimensions stored in MKS units. 
In the following example, the user extracts all wavelengths
in the visible portion of the spectrum in terms of the units
very frequently used in visible spectroscopy, microns:
<pre class="example">     % ncks -O -C -u -v wvl -d wvl,"0.4 micron","0.7 micron" in.nc
     wvl[0]=5e-07 meter
</pre>
   <p class="noindent"><a name="index-_0040code_007bunits_007d-421"></a>The hyperslab returns the correct values because the <var>wvl</var> variable
is stored on disk with a length dimension that UDUnits recognizes in the
<code>units</code> attribute. 
The automagical algorithm that implements this functionality is worth
describing since understanding it helps one avoid some potential
pitfalls. 
First, the user includes the physical units of the hyperslab dimensions
she supplies, separated by a simple space from the numerical values of
the hyperslab limits. 
She encloses each coordinate specifications in quotes so that the shell
does not break the <em>value-space-unit</em> string into separate
arguments before passing them to <acronym>NCO</acronym>. 
Double quotes (<kbd>"foo"</kbd>) or single quotes (<kbd>'foo'</kbd>) are equally
valid for this purpose. 
Second, <acronym>NCO</acronym> recognizes that units translation is requested
because each hyperslab argument contains text characters and non-initial
spaces. 
Third, <acronym>NCO</acronym> determines whether the <var>wvl</var> is dimensioned
with a coordinate variable that has a <code>units</code> attribute. 
<a name="index-coordinate-variable-422"></a>In this case, <var>wvl</var> itself is a coordinate variable. 
The value of its <code>units</code> attribute is <code>meter</code>. 
Thus <var>wvl</var> passes this test so UDUnits conversion is attempted. 
If the coordinate associated with the variable does not contain a
<code>units</code> attribute, then <acronym>NCO</acronym> aborts. 
Fourth, <acronym>NCO</acronym> passes the specified and desired dimension strings
(microns are specified by the user, meters are required by
<acronym>NCO</acronym>) to the UDUnits library. 
Fifth, the UDUnits library that these dimension are commensurate
and it returns the appropriate linear scaling factors to convert from
microns to meters to <acronym>NCO</acronym>. 
If the units are incommensurate (i.e., not expressible in the same
fundamental MKS units), or are not listed in the UDUnits database, then
NCO aborts since it cannot determine the user's intent. 
Finally, <acronym>NCO</acronym> uses the scaling information to convert the
user-specified hyperslab limits into the same physical dimensions as
those of the corresponding cooridinate variable on disk. 
At this point, <acronym>NCO</acronym> can perform a coordinate hyperslab using
the same algorithm as if the user had specified the hyperslab without
requesting units conversion.

   <p><a name="index-_0040code_007bunits_007d-423"></a><a name="index-_0040code_007btime_007d-424"></a>The translation and dimennterpretation of time coordinates shows a more
powerful, and probably more common, application of the UDUnits feature. 
In this example, the user prints all data between the eighth and ninth
of December, 1999, from a variable whose time dimension is hours
since the year 1900:
<pre class="example">     % ncks -O -C -u -v time_udunits -d time_udunits,"1999-12-08 \
     12:00:0.0","1999-12-09 00:00:0.0",2 in.nc foo2.nc
     % time_udunits[1]=876018 hours since 1900-01-01 00:00:0.0
</pre>
   <p class="noindent"><a name="index-stride-425"></a><a name="index-whitespace-426"></a>Here, the user invokes the stride (see <a href="#Stride">Stride</a>) capability to obtain
every other timeslice. 
This is possible because the UDUnits feature is additive, not
exclusive&mdash;it works in conjunction with all other hyperslabbing
(see <a href="#Hyperslabs">Hyperslabs</a>) options and in all operators which support
hyperslabbing. 
The following example shows how one might average data in a
time period spread across multiple input files
<pre class="example">     ncra -O -d time,"1939-09-09 12:00:0.0","1945-05-08 00:00:0.0" \
     in1.nc in2.nc in3.nc out.nc
</pre>
   <p class="noindent">Note that there is no excess whitespace before or after the individual
elements of the <span class="samp">-d</span> argument. 
<a name="index-shell-427"></a>This is important since, as far as the shell knows, <span class="samp">-d</span> takes
only <em>one</em> command-line argument. 
Parsing this argument into its component
<var>dim</var><code>,[</code><var>min</var><code>],[</code><var>max</var><code>],</code><var>stride</var> elements
(see <a href="#Hyperslabs">Hyperslabs</a>) is the job of <acronym>NCO</acronym>. 
When unquoted whitespace is present between these elements, the shell
passes <acronym>NCO</acronym> arugment fragments which will not parse as
intended.

   <p><a name="index-Climate-and-Forecast-Metadata-Convention-428"></a><a name="index-CF-convention-429"></a>The <a href="http://www.unidata.ucar.edu/packages/udunits">UDUnits</a>
package documentation describes the supported formats of time
dimensions. 
Among the metadata conventions which adhere to these formats are the
<a href="http://www.cgd.ucar.edu/cms/eaton/cf-metadata/CF-working.html">Climate and Forecast (CF) Conventions</a> and the
<a href="http://ferret.wrc.noaa.gov/noaa_coop/coop_cdf_profile.html">Cooperative Ocean/Atmosphere Research Data Service (COARDS) Conventions</a>. 
The following <span class="samp">-d arguments</span> extract the same data using
commonly encountered time dimension formats:
<!-- fxm add more formats here -->
<pre class="example">     -d time,"1918-11-11 11:00:0.0","1939-09-09 00:00:0.0"
</pre>
   <p class="noindent">All of these formats include at least one dash <kbd>-</kbd> in a
non-leading character position (a dash in a leading character position
is a negative sign). 
<acronym>NCO</acronym> assumes that a non-leading dash in a limit string
indicates that a UDUnits date conversion is requested.

   <p><a name="index-MKS-units-430"></a><a name="index-God-431"></a>netCDF variables should always be stored with MKS (i.e., God's) units,
so that application programs may assume MKS dimensions apply to all
input variables. 
The UDUnits feature is intended to alleviate some of the <acronym>NCO</acronym>
user's pain when handling MKS units. 
It connects users who think in human-friendly units (e.g.,
miles, millibars, days) to extract data which are always stored in God's
units, MKS (e.g., meters, Pascals, seconds). 
The feature is not intended to encourage writers to store data in
esoteric units (e.g., furlongs, pounds per square inch, fortnights).

   <p><a name="wrp"></a> <!-- http://nco.sf.net/nco.html#wrp --><div class="node">
<p><hr>
<a name="Wrapped-coordinates"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Stride">Stride</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#UDUnits-Support">UDUnits Support</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.15 Wrapped coordinates</h3>

<p><a name="index-wrapped-coordinates-432"></a><a name="index-longitude-433"></a><a name="index-_0040code_007b_002dd-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-434"></a><a name="index-_0040code_007b_002d_002ddimension-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-435"></a><a name="index-_0040code_007b_002d_002ddmn-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-436"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: <span class="command">ncks</span><br>
Short options: <span class="samp">-d</span><br>
Long options: <span class="samp">--dimension</span>, <span class="samp">--dmn</span><br>
</td></tr></table>
   A&nbsp;<dfn>wrapped&nbsp;coordinate</dfn><!-- /@w --> is a coordinate whose values increase or
decrease monotonically (nothing unusual so far), but which represents a
dimension that ends where it begins (i.e., wraps around on itself). 
Longitude (i.e., degrees on a circle) is a familiar example of a wrapped
coordinate. 
Longitude increases to the East of Greenwich, England, where it is
defined to be zero. 
Halfway around the globe, the longitude is 180&nbsp;degrees<!-- /@w --> East (or West). 
Continuing eastward, longitude increases to 360&nbsp;degrees<!-- /@w --> East at
Greenwich. 
The longitude values of most geophysical data are either in the range
[0,360), or [&minus;180,180). 
In either case, the Westernmost and Easternmost longitudes are
numerically separated by 360&nbsp;degrees<!-- /@w -->, but represent contiguous
regions on the globe. 
For example, the Saharan desert stretches from roughly 340 to
50&nbsp;degrees<!-- /@w --> East. 
Extracting the hyperslab of data representing the Sahara from a global
dataset presents special problems when the global dataset is stored
consecutively in longitude from 0 to 360&nbsp;degrees<!-- /@w -->. 
This is because the data for the Sahara will not be contiguous in the
<var>input-file</var> but is expected by the user to be contiguous in the
<var>output-file</var>. 
In this case, <span class="command">ncks</span> must invoke special software routines to
assemble the desired output hyperslab from multiple reads of the
<var>input-file</var>.

   <p>Assume the domain of the monotonically increasing longitude coordinate
<code>lon</code> is 0 &lt; <var>lon</var> &lt; 360. 
<span class="command">ncks</span> will extract a hyperslab which crosses the Greenwich
meridian simply by specifying the westernmost longitude as <var>min</var> and
the easternmost longitude as <var>max</var>. 
The following commands extract a hyperslab containing the Saharan desert:
<pre class="example">     ncks -d lon,340.,50. in.nc out.nc
     ncks -d lon,340.,50. -d lat,10.,35. in.nc out.nc
</pre>
   <p class="noindent">The first example selects data in the same longitude range as the Sahara. 
The second example further constrains the data to having the same
latitude as the Sahara. 
The coordinate <code>lon</code> in the <var>output-file</var>, <span class="file">out.nc</span>, will
no longer be monotonic! 
The values of <code>lon</code> will be, e.g., <span class="samp">340, 350, 0, 10, 20, 30,
40, 50</span>. 
This can have serious implications should you run <span class="file">out.nc</span> through
another operation which expects the <code>lon</code> coordinate to be
monotonically increasing. 
Fortunately, the chances of this happening are slim, since <code>lon</code>
has already been hyperslabbed, there should be no reason to hyperslab
<code>lon</code> again. 
Should you need to hyperslab <code>lon</code> again, be sure to give
dimensional indices as the hyperslab arguments, rather than coordinate
values (see <a href="#Hyperslabs">Hyperslabs</a>).

   <p><a name="srd"></a> <!-- http://nco.sf.net/nco.html#srd --><div class="node">
<p><hr>
<a name="Stride"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Missing-values">Missing values</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Wrapped-coordinates">Wrapped coordinates</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.16 Stride</h3>

<p><a name="index-stride-437"></a><a name="index-_0040code_007b_002dd-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_002c_005b_0040var_007bmax_007d_005d_002c_0040var_007bstride_007d_007d-438"></a><a name="index-_0040code_007b_002d_002ddimension-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_002c_005b_0040var_007bmax_007d_005d_002c_0040var_007bstride_007d_007d-439"></a><a name="index-_0040code_007b_002d_002ddmn-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_002c_005b_0040var_007bmax_007d_005d_002c_0040var_007bstride_007d_007d-440"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: <span class="command">ncks</span>, <span class="command">ncra</span>, <span class="command">ncrcat</span><br>
Short options: <span class="samp">-d</span><br>
Long options: <span class="samp">--dimension</span>, <span class="samp">--dmn</span><br>
</td></tr></table>
   <span class="command">ncks</span> offers support for specifying a <dfn>stride</dfn> for any
hyperslab, while <span class="command">ncra</span> and <span class="command">ncrcat</span> suport the
<var>stride</var> argument only for the record dimension. 
The <var>stride</var> is the spacing between consecutive points in a
hyperslab. 
A&nbsp;<var>stride</var><!-- /@w --> of&nbsp;1<!-- /@w --> means pick all the elements of the
hyperslab, but a <var>stride</var> of&nbsp;2<!-- /@w --> means skip every other element,
etc. 
Using the <var>stride</var> option with <span class="command">ncra</span> and <span class="command">ncrcat</span>
makes it possible, for instance, to average or concatenate regular
intervals across multi-file input data sets.

   <p>The <var>stride</var> is specified as the optional fourth argument to the
<span class="samp">-d</span> hyperslab specification:
<code>-d </code><var>dim</var><code>,[</code><var>min</var><code>][,[</code><var>max</var><code>]][,[</code><var>stride</var><code>]]</code>. 
Specify <var>stride</var> as an integer (i.e., no decimal point) following
the third comma in the <span class="samp">-d</span> argument. 
There is no default value for <var>stride</var>. 
Thus using <span class="samp">-d time,,,2</span> is valid but <span class="samp">-d time,,,2.0</span> and
<span class="samp">-d time,,,</span> are not. 
When <var>stride</var> is specified but <var>min</var> is not, there is an
ambiguity as to whether the extracted hyperslab should begin with (using
C-style, 0-based indexes) element&nbsp;0<!-- /@w --> or element <span class="samp">stride-1</span>. 
<acronym>NCO</acronym> must resolve this ambiguity and it chooses element&nbsp;0<!-- /@w -->
as the first element of the hyperslab when <var>min</var> is not specified. 
Thus <span class="samp">-d time,,,</span><var>stride</var> is syntactically equivalent to
<span class="samp">-d time,0,,</span><var>stride</var>. 
This means, for example, that specifying the operation
<span class="samp">-d time,,,2</span> on the array <span class="samp">1,2,3,4,5</span> selects the hyperslab
<span class="samp">1,3,5</span>. 
To obtain the hyperslab <span class="samp">2,4</span> instead, simply explicitly specify
the starting index as&nbsp;1,<!-- /@w --> i.e., <span class="samp">-d time,1,,2</span>.

   <p>For example, consider a file <span class="file">8501_8912.nc</span> which contains 60
consecutive months of data. 
Say you wish to obtain just the March data from this file. 
Using 0-based subscripts (see <a href="#Fortran-indexing">Fortran indexing</a>) these
data are stored in records 2,&nbsp;14,&nbsp;<small class="dots">...</small>&nbsp;50<!-- /@w --> so the desired
<var>stride</var> is&nbsp;12.<!-- /@w -->
Without the <var>stride</var> option, the procedure is very awkward. 
One could use <span class="command">ncks</span> five times and then use <span class="command">ncrcat</span> to
concatenate the resulting files together:
<a name="index-Bourne-Shell-441"></a><a name="index-C-Shell-442"></a>
<pre class="example">     for idx in 02 14 26 38 50; do # Bourne Shell
       ncks -d time,${idx} 8501_8912.nc foo.${idx}
     done
     foreach idx (02 14 26 38 50) # C Shell
       ncks -d time,${idx} 8501_8912.nc foo.${idx}
     end
     ncrcat foo.?? 8589_03.nc
     rm foo.??
</pre>
   <p>With the <var>stride</var> option, <span class="command">ncks</span> performs this hyperslab
extraction in one operation:
<pre class="example">     ncks -d time,2,,12 8501_8912.nc 8589_03.nc
</pre>
   <p>See <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a>, for more information on <span class="command">ncks</span>.

   <p>The <var>stride</var> option is supported by <span class="command">ncra</span> and
<span class="command">ncrcat</span> for the record dimension only. 
This makes it possible, for instance, to average or concatenate regular
intervals across multi-file input data sets.
<pre class="example">     ncra -F -d time,3,,12 85.nc 86.nc 87.nc 88.nc 89.nc 8589_03.nc
     ncrcat -F -d time,3,,12 85.nc 86.nc 87.nc 88.nc 89.nc 8503_8903.nc
</pre>
   <p><a name="mss_val"></a> <!-- http://nco.sf.net/nco.html#mss_val --><div class="node">
<p><hr>
<a name="Missing-values"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Operation-Types">Operation Types</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Stride">Stride</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.17 Missing values</h3>

<p><a name="index-missing-values-443"></a><a name="index-data_002c-missing-444"></a><a name="index-averaging-data-445"></a><a name="index-_0040code_007bmissing_005fvalue_007d-446"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: <span class="command">ncap</span>, <span class="command">ncbo</span>, <span class="command">ncea</span>,
<span class="command">ncflint</span>, <span class="command">ncpdq</span>, <span class="command">ncra</span>, <span class="command">ncwa</span><br>
Short options: None<br>
</td></tr></table>

   <p>The phrase <dfn>missing data</dfn> refers to data points that are missing,
invalid, or for any reason not intended to be arithmetically processed
in the same fashion as valid data. 
<a name="index-arithmetic-operators-447"></a>The <acronym>NCO</acronym> arithmetic operators attempt to handle missing data in
an intelligent fashion. 
There are four steps in the <acronym>NCO</acronym> treatment of missing data:
     <ol type=1 start=1>
<li>Identifying variables which may contain missing data.

     <p><acronym>NCO</acronym> follows the convention that missing data should be stored
with the <var>missing_value</var> specified in the variable's
<code>missing_value</code> attribute. 
The <em>only</em> way <acronym>NCO</acronym> recognizes that a variable <em>may</em>
contain missing data is if the variable has a <code>missing_value</code>
attribute. 
In this case, any elements of the variable which are numerically equal
to the <var>missing_value</var> are treated as missing data.

     <li>Converting the <var>missing_value</var> to the type of the variable, if
neccessary.

     <p>Consider a variable <var>var</var> of type <var>var_type</var> with a
<code>missing_value</code> attribute of type <var>att_type</var> containing the
value <var>missing_value</var>. 
As a guideline, the type of the <code>missing_value</code> attribute should be
the same as the type of the variable it is attached to. 
If <var>var_type</var> equals <var>att_type</var> then <acronym>NCO</acronym>
straightforwardly compares each value of <var>var</var> to
<var>missing_value</var> to determine which elements of <var>var</var> are to be
treated as missing data. 
<a name="index-C-language-448"></a>If not, then <acronym>NCO</acronym> converts <var>missing_value</var> from
<var>att_type</var> to <var>var_type</var> by using the implicit conversion rules
of&nbsp;C<!-- /@w -->, or, if <var>att_type</var> is <code>NC_CHAR</code>
<a rel="footnote" href="#fn-21" name="fnd-21"><sup>21</sup></a>, by typecasting the results of the C&nbsp;function<!-- /@w -->
<code>strtod(</code><var>missing_value</var><code>)</code>. 
<a name="index-_0040command_007bncatted_007d-449"></a>You may use the <acronym>NCO</acronym> operator <span class="command">ncatted</span> to change the
<code>missing_value</code> attribute and all data whose data is
<var>missing_value</var> to a new value
(see <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a>).

     <li>Identifying missing data during arithmetic operations.

     <p><a name="index-performance-450"></a><a name="index-operator-speed-451"></a><a name="index-speed-452"></a><a name="index-execution-time-453"></a><a name="index-arithmetic-operators-454"></a>When an <acronym>NCO</acronym> arithmetic operator processes a variable <var>var</var>
with a <code>missing_value</code> attribute, it compares each value of
<var>var</var> to <var>missing_value</var> before performing an operation. 
Note the <var>missing_value</var> comparison inflicts a performance penalty
on the operator. 
Arithmetic processing of variables which contain the
<code>missing_value</code> attribute always incurs this penalty, even when
none of the data are missing. 
Conversely, arithmetic processing of variables which do not contain the
<code>missing_value</code> attribute never incurs this penalty. 
In other words, do not attach a <code>missing_value</code> attribute to a
variable which does not contain missing data. 
This exhortation can usually be obeyed for model generated data, but it
may be harder to know in advance whether all observational data will be
valid or not.

     <li>Treatment of any data identified as missing in arithmetic operators.

     <p><a name="index-_0040command_007bncea_007d-455"></a><a name="index-_0040command_007bncra_007d-456"></a><a name="index-_0040command_007bncwa_007d-457"></a><a name="index-_0040command_007bncbo_007d-458"></a><a name="index-_0040command_007bncflint_007d-459"></a><acronym>NCO</acronym> averagers (<span class="command">ncra</span>, <span class="command">ncea</span>, <span class="command">ncwa</span>)
do not count any element with the value <var>missing_value</var> towards the
average. 
<span class="command">ncbo</span> and <span class="command">ncflint</span> define a <var>missing_value</var> result
when either of the input values is a <var>missing_value</var>. 
Sometimes the <var>missing_value</var> may change from file to file in a
multi-file operator, e.g., <span class="command">ncra</span>. 
<acronym>NCO</acronym> is written to account for this (it always compares a
variable to the <var>missing_value</var> assigned to that variable in the
current file). 
Suffice it to say that, in all known cases, <acronym>NCO</acronym> does &ldquo;the
right thing&rdquo;.

     <p>It is impossible to determine and store the correct result of a binary
operation in a single variable. 
One such corner case occurs when both operands have differing
<var>missing_value</var> attributes, i.e., attributes with different
numerical values. 
Since the output (result) of the operation can only have one
<var>missing_value</var>, some information may be lost. 
In this case, <acronym>NCO</acronym> always defines the output variable to have
the same <var>missing_value</var> as the first input variable. 
Prior to performing the arithmetic operation, all values of the second
operand equal to the second <var>missing_value</var> are replaced with the
first <var>missing_value</var>. 
Then the arithmetic operation proceeds as normal, comparing each element
of each operand to a single <var>missing_value</var>. 
Comparing each element to two distinct <var>missing_value</var>'s would be
much slower and would be no likelier to yield a more satisfactory
answer. 
In practice, judicious choice of <var>missing_value</var> values prevents any
important information from being lost.

        </ol>

   <p><a name="op_typ"></a> <!-- http://nco.sf.net/nco.html#op_typ --><div class="node">
<p><hr>
<a name="Operation-Types"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Type-conversion">Type conversion</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Missing-values">Missing values</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.18 Operation Types</h3>

<p><a name="index-operation-types-460"></a><a name="index-_0040code_007bavg_007d-461"></a><a name="index-_0040code_007bsqravg_007d-462"></a><a name="index-_0040code_007bavgsqr_007d-463"></a><a name="index-_0040code_007bmin_007d-464"></a><a name="index-_0040code_007bmax_007d-465"></a><a name="index-_0040code_007brmssdn_007d-466"></a><a name="index-_0040code_007brms_007d-467"></a><a name="index-_0040code_007bttl_007d-468"></a><a name="index-_0040code_007bsqrt_007d-469"></a><a name="index-average-470"></a><a name="index-mean-471"></a><a name="index-total-472"></a><a name="index-minimum-473"></a><a name="index-maximum-474"></a><a name="index-root_002dmean_002dsquare-475"></a><a name="index-standard-deviation-476"></a><a name="index-variance-477"></a><a name="index-_0040code_007b_002dy-_0040var_007bop_005ftyp_007d_007d-478"></a><a name="index-_0040code_007b_002d_002doperation-_0040var_007bop_005ftyp_007d_007d-479"></a><a name="index-_0040code_007b_002d_002dop_005ftyp-_0040var_007bop_005ftyp_007d_007d-480"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: <span class="command">ncra</span>, <span class="command">ncea</span>, <span class="command">ncwa</span><br>
Short options: <span class="samp">-y</span><br>
Long options: <span class="samp">--operation</span>, <span class="samp">--op_typ</span><br>
</td></tr></table>
   The <span class="samp">-y </span><var>op_typ</var> switch allows specification of many different
types of operations
Set <var>op_typ</var> to the abbreviated key for the corresponding operation:
     <dl>
<dt><code>avg</code><dd>Mean value (default)
<br><dt><code>sqravg</code><dd>Square of the mean
<br><dt><code>avgsqr</code><dd>Mean of sum of squares
<br><dt><code>max</code><dd>Maximium value
<br><dt><code>min</code><dd>Minimium value
<br><dt><code>rms</code><dd>Root-mean-square (normalized by <var>N</var>)
<br><dt><code>rmssdn</code><dd>Root-mean square (normalized by <var>N-1</var>)
<br><dt><code>sqrt</code><dd>Square root of the mean
<br><dt><code>ttl</code><dd>Sum of values
</dl>
   If an operation type is not specified with <span class="samp">-y</span> then the operator
will perform an arithmetic average by default. 
The mathematical definition of each operation is given below. 
See <a href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a>, for additional information on
masks and normalization. 
Averaging is the default, and will be described first so the
terminology for the other operations is familiar.

   <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
<p><b>Note for HTML users</b>:
<br>The definition of mathematical operations involving rank reduction
(e.g., averaging) relies heavily on mathematical expressions which
cannot easily be represented in HTML. 
<b>See the <a href="./nco.pdf">printed manual</a> for much more detailed
and complete documentation of this subject.</b></td></tr></table>

   <p>The definitions of some of these operations are not universally useful. 
Mostly they were chosen to facilitate standard statistical
computations within the <acronym>NCO</acronym> framework. 
We are open to redefining and or adding to the above. 
If you are interested in having other statistical quantities
defined in <acronym>NCO</acronym> please contact the <acronym>NCO</acronym> project
(see <a href="#Help-and-Bug-reports">Help and Bug reports</a>).

<p class="noindent">EXAMPLES

   <p><a name="min"></a> <!-- http://nco.sf.net/nco.html#min -->
<a name="max"></a> <!-- http://nco.sf.net/nco.html#max -->
<a name="rms"></a> <!-- http://nco.sf.net/nco.html#rms -->Suppose you wish to examine the variable <code>prs_sfc(time,lat,lon)</code>
which contains a time series of the surface pressure as a function of
latitude and longitude. 
Find the minimium value of <code>prs_sfc</code> over all dimensions:
<pre class="example">     ncwa -y min -v prs_sfc in.nc foo.nc
</pre>
   <p class="noindent">Find the maximum value of <code>prs_sfc</code> at each time interval for each
latitude:
<pre class="example">     ncwa -y max -v prs_sfc -a lon in.nc foo.nc
</pre>
   <p class="noindent">Find the root-mean-square value of the time-series of <code>prs_sfc</code> at
every gridpoint:
<pre class="example">     ncra -y rms -v prs_sfc in.nc foo.nc
     ncwa -y rms -v prs_sfc -a time in.nc foo.nc
</pre>
   <p class="noindent">The previous two commands give the same answer but <span class="command">ncra</span> is
preferred because it has a smaller memory footprint. 
<a name="index-degenerate-dimension-481"></a>Also, <span class="command">ncra</span> leaves the (degenerate) <code>time</code> dimension in the
output file (which is usually useful) whereas <span class="command">ncwa</span> removes the
<code>time</code> dimension.

<p class="noindent">These operations work as expected in multi-file operators. 
Suppose that <code>prs_sfc</code> is stored in multiple timesteps per file
across multiple files, say <span class="file">jan.nc</span>, <span class="file">feb.nc</span>,
<span class="file">march.nc</span>. 
We can now find the three month maximium surface pressure at every point.
<pre class="example">     ncea -y max -v prs_sfc jan.nc feb.nc march.nc out.nc
</pre>
   <p><a name="stddvn"></a> <!-- http://nco.sf.net/nco.html#stddvn -->It is possible to use a combination of these operations to compute
the variance and standard deviation of a field stored in a single file
or across multiple files. 
The procedure to compute the temporal standard deviation of the surface
pressure at all points in a single file <span class="file">in.nc</span> involves three
steps.
<pre class="example">     ncwa -O -v prs_sfc -a time in.nc out.nc
     ncbo -O --op_typ=sub -v prs_sfc in.nc out.nc out.nc
     ncra -O -y rmssdn out.nc out.nc
</pre>
   <p>First the output file <span class="file">out.nc</span> is contructed containing the
temporal mean of <code>prs_sfc</code>. 
Next <span class="file">out.nc</span> is overwritten with the deviation from the mean. 
Finally <span class="file">out.nc</span> is overwritten with the root-mean-square of
itself. 
Note the use of <span class="samp">-y rmssdn</span> (rather than <span class="samp">-y rms</span>) in the
final step. 
This ensures the standard deviation is correctly normalized by one fewer
than the number of time samples. 
The procedure to compute the variance is identical except for the use of
<span class="samp">-y var</span> instead of <span class="samp">-y rmssdn</span> in the final step.

   <p>The procedure to compute the spatial standard deviation of a field
in a single file <span class="file">in.nc</span> involves three steps.
<pre class="example">     ncwa -O -v prs_sfc,gw -a lat,lon -w gw in.nc out.nc
     ncbo -O --op_typ=sub -v prs_sfc,gw in.nc out.nc out.nc
     ncwa -O -y rmssdn -v prs_sfc -a lat,lon -w gw out.nc out.nc
</pre>
   <p>First the appropriately weighted (with <span class="samp">-w gw</span>) spatial mean values
are written to the output file. 
This example includes the use of a weighted variable specified with
<span class="samp">-w gw</span>. 
When using weights to compute standard deviations one must remember to
include the weights in the initial output files so that they may be used
again in the final step. 
The initial output file is then overwritten with the gridpoint
deviations from the spatial mean. 
Finally the root-mean-square of the appropriately weighted spatial
deviations is taken.

   <p>The procedure to compute the standard deviation of a time-series across
multiple files involves one extra step since all the input must first be
collected into one file.
<pre class="example">     ncrcat -O -v tpt in.nc in.nc foo1.nc
     ncwa -O -a time foo1.nc foo2.nc
     ncbo -O --op_typ=sub -v tpt foo1.nc foo2.nc foo2.nc
     ncra -O -y rmssdn foo2.nc out.nc
</pre>
   <p>The first step assembles all the data into a single file. 
This may require a lot of temporary disk space, but is more or less
required by the <span class="command">ncbo</span> operation in the third step.

   <p><a name="typ_cnv"></a> <!-- http://nco.sf.net/nco.html#typ_cnv --><div class="node">
<p><hr>
<a name="Type-conversion"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Suppressing-interactive-prompts">Suppressing interactive prompts</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Operation-Types">Operation Types</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.19 Type conversion</h3>

<p><a name="index-type-conversion-482"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: <span class="command">ncap</span>, <span class="command">ncbo</span>, <span class="command">ncea</span>,
<span class="command">ncra</span>, <span class="command">ncwa</span><br>
Short options: None<br>
</td></tr></table>
   <a name="index-promotion-483"></a><a name="index-demotion-484"></a><a name="index-automatic-type-conversion-485"></a><a name="index-manual-type-conversion-486"></a>Type conversion (often called <dfn>promotion</dfn> or <dfn>demotion</dfn>) refers
to the casting of one fundamental data type to another, e.g., converting
<code>NC_SHORT</code> (two bytes) to <code>NC_DOUBLE</code> (eight bytes). 
Type conversion is automatic when the language carries out this
promotion according to an internal set of rules without explicit user
intervention. 
In contrast, manual type conversion refers to explicit user commands to
change the type of a variable or attribute. 
Most type conversion happens automatically, yet there are situations in
which manual type conversion is advantageous.

<ul class="menu">
<li><a accesskey="1" href="#Automatic-type-conversion">Automatic type conversion</a>
<li><a accesskey="2" href="#Manual-type-conversion">Manual type conversion</a>
</ul>

<div class="node">
<p><hr>
<a name="Automatic-type-conversion"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Manual-type-conversion">Manual type conversion</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Type-conversion">Type conversion</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Type-conversion">Type conversion</a>
<br>
</div>

<h4 class="subsection">3.19.1 Automatic type conversion</h4>

<p>As a general rule, automatic type conversions should be avoided for at
least two reasons. 
First, type conversions are expensive since they require creating
(temporary) buffers and casting each element of a variable from
the type it was stored at to some other type. 
Second, the dataset's creator probably had a good reason
for storing data as, say, <code>NC_FLOAT</code> rather than <code>NC_DOUBLE</code>. 
In a scientific framework there is no reason to store data with more
precision than the observations were made. 
Thus <acronym>NCO</acronym> tries to avoid performing automatic type conversions
when performing arithmetic.

   <p><a name="index-C-language-487"></a><a name="index-Fortran-488"></a>Automatic type conversion during arithmetic in the languages&nbsp;C<!-- /@w --> and
Fortran is performed only when necessary. 
All operands in an operation are converted to the most precise type
before the operation takes place. 
However, following this parsimonious conversion rule dogmatically
results in numerous headaches. 
For example, the average of the two <code>NC_SHORT</code>s <code>17000s</code> and
<code>17000s</code> results in garbage since the intermediate value which
holds their sum is also of type <code>NC_SHORT</code> and thus cannot
represent values greater than 32,767
<a rel="footnote" href="#fn-22" name="fnd-22"><sup>22</sup></a>. 
There are valid reasons for expecting this operation to succeed and
the <acronym>NCO</acronym> philosophy is to make operators do what you want, not
what is most pure. 
Thus, unlike C and Fortran, but like many other higher level interpreted
languages, <acronym>NCO</acronym> arithmetic operators will perform automatic type
conversion when all the following conditions are met
<a rel="footnote" href="#fn-23" name="fnd-23"><sup>23</sup></a>:
     <ol type=1 start=1>
<li>The operator is <span class="command">ncea</span>, <span class="command">ncra</span>, or <span class="command">ncwa</span>. 
<span class="command">ncbo</span> is not yet included in this list because subtraction did
not benefit from type conversion. 
This will change in the future
<!-- fxm TODO #265 -->
<li>The arithmetic operation could benefit from type conversion. 
Operations that could benefit (e.g., from larger representable sums)
include averaging, summation, or any "hard" arithmetic. 
Type conversion does not benefit searching for minima and maxima
(<span class="samp">-y min</span>, or <span class="samp">-y max</span>). 
<li>The variable on disk is of type <code>NC_BYTE</code>, <code>NC_CHAR</code>,
<code>NC_SHORT</code>, or <code>NC_INT</code>. 
Type <code>NC_DOUBLE</code> is not type converted because there is no type of
higher precision to convert to. 
Type <code>NC_FLOAT</code> is not type converted because, in our judgement,
the performance penalty of always doing so would outweigh the (extremely
rare) potential benefits.
        </ol>

   <p>When these criteria are all met, the operator promotes the variable in
question to type <code>NC_DOUBLE</code>, performs all the arithmetic
operations, casts the <code>NC_DOUBLE</code> type back to the original type,
and finally writes the result to disk. 
The result written to disk may not be what you expect, because of
incommensurate ranges represented by different types, and because of
(lack of) rounding. 
First, continuing the above example, the average (e.g., <span class="samp">-y avg</span>)
of <code>17000s</code> and <code>17000s</code> is written to disk as <code>17000s</code>. 
The type conversion feature of <acronym>NCO</acronym> makes this possible since
the arithmetic and intermediate values are stored as <code>NC_DOUBLE</code>s,
i.e., <code>34000.0d</code> and only the final result must be represented
as an <code>NC_SHORT</code>. 
Without the type conversion feature of <acronym>NCO</acronym>, the average would
have been garbage (albeit predictable garbage near <code>-15768s</code>). 
Similarly, the total (e.g., <span class="samp">-y ttl</span>) of <code>17000s</code> and
<code>17000s</code> written to disk is garbage (actually <code>-31536s</code>) since
the final result (the true total) of 34000 is outside the range
of type <code>NC_SHORT</code>.

   <p><a name="index-_0040code_007bfloor_007d-489"></a>Type conversions use the <code>floor</code> function to convert floating point
number to integers. 
Type conversions do not attempt to round floating point numbers to the
nearest integer. 
Thus the average of <code>1s</code> and <code>2s</code> is computed in double
precisions arithmetic as
(<code>1.0d</code> + <code>1.5d</code>)/2) = <code>1.5d</code>. 
This result is converted to <code>NC_SHORT</code> and stored on disk as
<code>floor(1.5d)</code> = <code>1s</code>
<a rel="footnote" href="#fn-24" name="fnd-24"><sup>24</sup></a>. 
Thus no "rounding up" is performed. 
The type conversion rules of&nbsp;C<!-- /@w --> can be stated as follows:
If <var>n</var> is an integer then any floating point value <var>x</var>
satisfying

<!-- texi2html does not like @math{} -->
<p><var>n</var> &lt;= <var>x</var> &lt; <var>n+1</var>

   <p>will have the value <var>n</var> when converted to an integer.

<div class="node">
<p><hr>
<a name="Manual-type-conversion"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#Automatic-type-conversion">Automatic type conversion</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Type-conversion">Type conversion</a>
<br>
</div>

<h4 class="subsection">3.19.2 Manual type conversion</h4>

<p><a name="index-_0040command_007bncap_007d-490"></a><span class="command">ncap</span> provides intrinsic functions for performing manual type
conversions. 
This, for example, converts variable <code>tpt</code> to external type
<code>NC_SHORT</code> (a C-type <code>short</code>), and variable <code>prs</code> to
external type <code>NC_DOUBLE</code> (a C-type <code>double</code>).
<pre class="example">     ncap -O -s "tpt=short(tpt);prs=double(prs);" in.nc out.nc
</pre>
   <p>See <a href="#ncap-netCDF-Arithmetic-Processor">ncap netCDF Arithmetic Processor</a>, for more details.

   <p><a name="ovr"></a> <!-- http://nco.sf.net/nco.html#ovr --><div class="node">
<p><hr>
<a name="Suppressing-interactive-prompts"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#History-attribute">History attribute</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Type-conversion">Type conversion</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.20 Suppressing interactive prompts</h3>

<p><a name="index-overwriting-files-491"></a><a name="index-appending-to-files-492"></a><a name="index-force-overwrite-493"></a><a name="index-force-append-494"></a><a name="index-_0040code_007b_002dO_007d-495"></a><a name="index-_0040code_007b_002dA_007d-496"></a><a name="index-_0040code_007b_002d_002doverwrite_007d-497"></a><a name="index-_0040code_007b_002d_002dovr_007d-498"></a><a name="index-_0040code_007b_002d_002dapn_007d-499"></a><a name="index-_0040code_007b_002d_002dappend_007d-500"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: All operators<br>
Short options: <span class="samp">-O</span>, <span class="samp">-A</span><br>
Long options: <span class="samp">--ovr</span>, <span class="samp">--overwrite</span>, <span class="samp">--apn</span>, <span class="samp">--append</span><br>
</td></tr></table>
   If the <var>output-file</var> specified for a command is a pre-existing file,
then the operator will prompt the user whether to overwrite (erase) the
existing <var>output-file</var>, attempt to append to it, or abort the
operation. 
However, in processing large amounts of data, too many interactive
questions can be a curse to productivity. 
Therefore <acronym>NCO</acronym> also implements two ways to override its own safety
features, the <span class="samp">-O</span> and <span class="samp">-A</span> switches. 
Specifying <span class="samp">-O</span> tells the operator to overwrite any existing
<var>output-file</var> without prompting the user interactively. 
Specifying <span class="samp">-A</span> tells the operator to attempt to append to any
existing <var>output-file</var> without prompting the user interactively. 
These switches are useful in batch environments because they suppress
interactive keyboard input.

   <p><a name="hst"></a> <!-- http://nco.sf.net/nco.html#hst -->
<a name="-h"></a> <!-- http://nco.sf.net/nco.html#-h --><div class="node">
<p><hr>
<a name="History-attribute"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Input-file-list-attributes">Input file list attributes</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Suppressing-interactive-prompts">Suppressing interactive prompts</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.21 History attribute</h3>

<p><a name="index-_0040code_007bhistory_007d-501"></a><a name="index-timestamp-502"></a><a name="index-global-attributes-503"></a><a name="index-attributes_002c-global-504"></a><a name="index-_0040code_007b_002dh_007d-505"></a><a name="index-_0040code_007b_002d_002dhst_007d-506"></a><a name="index-_0040code_007b_002d_002dhistory_007d-507"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: All operators<br>
Short options: <span class="samp">-h</span><br>
Long options: <span class="samp">--hst</span>, <span class="samp">--history</span><br>
</td></tr></table>
   All operators automatically append a <code>history</code> global attribute to
any file they create or modify. 
The <code>history</code> attribute consists of a timestamp and the full string
of the invocation command to the operator, e.g., <span class="samp">Mon May 26 20:10:24
1997: ncks in.nc foo.nc</span>. 
The full contents of an existing <code>history</code> attribute are copied
from the first <var>input-file</var> to the <var>output-file</var>. 
The timestamps appear in reverse chronological order, with the most
recent timestamp appearing first in the <code>history</code> attribute. 
Since <acronym>NCO</acronym> and many other netCDF operators adhere to the
<code>history</code> convention, the entire data processing path of a given
netCDF file may often be deduced from examination of its <code>history</code>
attribute. 
As of May, 2002, <acronym>NCO</acronym> is case-insensitive to the spelling
of the <code>history</code> attribute name. 
Thus attributes named <code>History</code> or <code>HISTORY</code> (which are
non-standard and not recommended) will be treated as valid history
attributes. 
When more than one global attribute fits the case-insensitive search
for "history", the first one found will be used. 
<code>history</code> attribute
<a name="index-_0040command_007bncatted_007d-508"></a>To avoid information overkill, all operators have an optional switch
(<span class="samp">-h</span>, <span class="samp">--hst</span>, or <span class="samp">--history</span>) to override
automatically appending the <code>history</code> attribute
(see <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a>). 
Note that the <span class="samp">-h</span> switch also turns off writing the
<code>nco_input_file_list</code> attribute for multi-file operators
(see <a href="#Input-file-list-attributes">Input file list attributes</a>).

   <p><a name="fl_lst_in_att"></a> <!-- http://nco.sf.net/nco.html#fl_lst_in_att --><div class="node">
<p><hr>
<a name="Input-file-list-attributes"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#NCAR-CCSM-Conventions">NCAR CCSM Conventions</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#History-attribute">History attribute</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.22 Input file list attributes</h3>

<p><a name="index-_0040code_007bnco_005finput_005ffile_005flist_007d-509"></a><a name="index-_0040code_007bnco_005finput_005ffile_005fnumber_007d-510"></a><a name="index-_0040code_007bstdin_007d-511"></a><a name="index-global-attributes-512"></a><a name="index-attributes_002c-global-513"></a><a name="index-_0040code_007b_002dH_007d-514"></a><a name="index-_0040code_007b_002d_002dfl_005flst_005fin_007d-515"></a><a name="index-_0040code_007b_002d_002dfile_005flist_007d-516"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: <span class="command">ncea</span>, <span class="command">ncecat</span>, <span class="command">ncra</span>, <span class="command">ncrcat</span><br>
Short options: <span class="samp">-H</span><br>
Long options: <span class="samp">--fl_lst_in</span>, <span class="samp">--file_list</span><br>
</td></tr></table>
   Many methods of specifying large numbers of input file names pass
these names via pipes, encodings, or argument transfer programs
(see <a href="#Large-numbers-of-input-files">Large numbers of input files</a>). 
When these methods are used, the input file list is not explicitly
passed on the command line. 
This results in a loss of information since the <code>history</code>
attribute no longer contains the exact command by which the file
was created.

   <p><acronym>NCO</acronym> solves this dilemma by archiving input file list
attributes. 
When the input file list to a multi-file operator is specified
via <code>stdin</code>, the operator, by default, attaches two global
attributes to any file they create or modify. 
The <code>nco_input_file_number</code> global attribute contains the number of
input files, and <code>nco_input_file_list</code> contains the file names,
specified as standard input to the multi-file operator. 
This information helps to verify that all input files the user thinks
were piped through <code>stdin</code> actually arrived. 
Without the <code>nco_input_file_list</code> attribute, the information is lost
forever and the &ldquo;chain of evidence&rdquo; would be broken.

   <p>The <span class="samp">-H</span> switch overrides (turns off) the default behavior of
writing the input file list global attributes when input is from
<code>stdin</code>. 
The <span class="samp">-h</span> switch does this too, and turns off the <code>history</code>
attribute as well (see <a href="#History-attribute">History attribute</a>). 
Hence both switches allows space-conscious users to avoid storing what
may amount to many thousands of filenames in a metadata attribute.

   <p><a name="cnv_CCSM"></a> <!-- http://nco.sf.net/nco.html#cnv_CCSM --><div class="node">
<p><hr>
<a name="NCAR-CCSM-Conventions"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ARM-Conventions">ARM Conventions</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Input-file-list-attributes">Input file list attributes</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.23 <acronym>NCAR CCSM</acronym> Conventions</h3>

<p><a name="index-_0040acronym_007bNCAR-CCSM_007d-conventions-517"></a><a name="index-_0040acronym_007bCCSM_007d-conventions-518"></a><a name="index-UDUnits-519"></a><a name="index-_0040code_007bgw_007d-520"></a><a name="index-_0040code_007bORO_007d-521"></a><a name="index-_0040code_007bdate_007d-522"></a><a name="index-_0040code_007bdatesec_007d-523"></a><a name="index-_0040code_007btime_007d-524"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: <span class="command">ncbo</span>, <span class="command">ncea</span>, <span class="command">ncecat</span>,
<span class="command">ncflint</span>, <span class="command">ncra</span>, <span class="command">ncwa</span><br>
Short options: None<br>
</td></tr></table>
   <acronym>NCO</acronym> recognizes <acronym>NCAR CCSM</acronym> history tapes, and treats
them specially. 
If you do not work with <acronym>NCAR CCSM</acronym> data then you may skip this
section. 
The <acronym>CCSM</acronym> netCDF convention is described at
<a href="http://www.cgd.ucar.edu/csm/experiments/output.format.html">http://www.cgd.ucar.edu/csm/experiments/output.format.html</a>. 
Most of the <acronym>CCSM</acronym> netCDF convention is transparent to
<acronym>NCO</acronym>
<a rel="footnote" href="#fn-25" name="fnd-25"><sup>25</sup></a>. 
There are no known pitfalls associated with using any <acronym>NCO</acronym>
operator on files adhering to this convention
<a rel="footnote" href="#fn-26" name="fnd-26"><sup>26</sup></a>. 
However, to facilitate maximum user friendliness, <acronym>NCO</acronym> does
treat certain variables in some <acronym>CCSM</acronym> files specially. 
The special functions are not required by the <acronym>CCSM</acronym> netCDF
convention, but experience has shown they do make life easier.

   <p>Currently, <acronym>NCO</acronym> determines whether a datafile is a
<acronym>CCSM</acronym> output datafile simply by checking whether value of the
global attribute <code>convention</code> (if it exists) equals
<span class="samp">NCAR-CSM</span>. 
Should <code>convention</code> equal <span class="samp">NCAR-CSM</span> in the (first)
<var>input-file</var>, <acronym>NCO</acronym> will attempt to treat certain variables
specially, because of their meaning in <acronym>CCSM</acronym> files. 
<acronym>NCO</acronym> will not average the following variables often found in
<acronym>CCSM</acronym> files:
<code>ntrm</code>, <code>ntrn</code>, <code>ntrk</code>, <code>ndbase</code>, <code>nsbase</code>,
<code>nbdate</code>, <code>nbsec</code>, <code>mdt</code>, <code>mhisf</code>. 
These variables contain scalar metadata such as the resolution of the
host <acronym>CCSM</acronym> model and it makes no sense to change their values. 
Furthermore, the <span class="command">ncbo</span> operator does not operate on (i.e., add,
subtract, etc.) the following variables:
<code>gw</code>, <code>ORO</code>, <code>date</code>, <code>datesec</code>, <code>hyam</code>,
<code>hybm</code>, <code>hyai</code>, <code>hybi</code>. 
These variables represent the Gaussian weights, the orography field,
time fields, and hybrid pressure coefficients. 
These are fields which you virtually always want to remain unaltered in
the output file. 
If you decide you would like any of the above <acronym>CCSM</acronym> fields
processed, you must spoof <acronym>NCO</acronym>. 
For example rename the variables first with <span class="command">ncrename</span>,
or alter the <code>convention</code> attribute.

   <p><a name="cnv_ARM"></a> <!-- http://nco.sf.net/nco.html#cnv_ARM --><div class="node">
<p><hr>
<a name="ARM-Conventions"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Operator-version">Operator version</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#NCAR-CCSM-Conventions">NCAR CCSM Conventions</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.24 <acronym>ARM</acronym> Conventions</h3>

<p><a name="index-_0040acronym_007bARM_007d-conventions-525"></a><a name="index-_0040code_007btime_005foffset_007d-526"></a><a name="index-_0040code_007bbase_005ftime_007d-527"></a><a name="index-_0040code_007btime_007d-528"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: <span class="command">ncrcat</span><br>
Short options: None<br>
</td></tr></table>
   <span class="command">ncrcat</span> has been programmed to recognize <acronym>ARM</acronym>
(Atmospheric Radiation Measurement Program) data files. 
If you do not work with <acronym>ARM</acronym> data then you may skip this
section. 
<acronym>ARM</acronym> data files store time information in two variables, a
scalar, <code>base_time</code>, and a record variable, <code>time_offset</code>. 
Subtle but serious problems can arise when these type of files are
just blindly concatenated. 
Therefore <span class="command">ncrcat</span> has been specially programmed to be able to
chain together consecutive <acronym>ARM</acronym> <var>input-files</var> and produce
and an <var>output-file</var> which contains the correct time information. 
Currently, <span class="command">ncrcat</span> determines whether a datafile is an
<acronym>ARM</acronym> datafile simply by testing for the existence of the
variables <code>base_time</code>, <code>time_offset</code>, and the dimension
<code>time</code>. 
If these are found in the <var>input-file</var> then <span class="command">ncrcat</span> will
automatically perform two non-standard, but hopefully useful,
procedures. 
First, <span class="command">ncrcat</span> will ensure that values of <code>time_offset</code>
appearing in the <var>output-file</var> are relative to the <code>base_time</code>
appearing in the first <var>input-file</var> (and presumably, though not
necessarily, also appearing in the <var>output-file</var>). 
Second, if a coordinate variable named <code>time</code> is not found in the
<var>input-files</var>, then <span class="command">ncrcat</span> automatically creates the
<code>time</code> coordinate in the <var>output-file</var>. 
The values of <code>time</code> are defined by the <acronym>ARM</acronym> convention
<var>time</var> = <var>base_time</var> + <var>time_offset</var>. 
Thus, if <var>output-file</var> contains the <code>time_offset</code>
variable, it will also contain the <code>time</code> coordinate. 
<a name="index-_0040code_007bhistory_007d-529"></a><a name="index-global-attributes-530"></a><a name="index-attributes_002c-global-531"></a>A&nbsp;short<!-- /@w --> message is added to the <code>history</code> global attribute
whenever these <acronym>ARM</acronym>-specific procedures are executed.

   <p><a name="vrs"></a> <!-- http://nco.sf.net/nco.html#vrs --><div class="node">
<p><hr>
<a name="Operator-version"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ARM-Conventions">ARM Conventions</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Common-features">Common features</a>
<br>
</div>

<h3 class="section">3.25 Operator version</h3>

<p><a name="index-version-532"></a><a name="index-_0040acronym_007bRCS_007d-533"></a><a name="index-_0040code_007b_002dr_007d-534"></a><a name="index-_0040code_007b_002d_002drevision_007d-535"></a><a name="index-_0040code_007b_002d_002dversion_007d-536"></a><a name="index-_0040code_007b_002d_002dvrs_007d-537"></a><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
Availability: All operators<br>
Short options: <span class="samp">-r</span><br>
Long options: <span class="samp">--revision</span>, <span class="samp">--version</span>, or <span class="samp">--vrs</span><br>
</td></tr></table>
   All operators can be told to print their internal version number and
copyright notice and then quit with the <span class="samp">-r</span> switch. 
The internal version number varies between operators, and indicates the
most recent change to a particular operator's source code. 
This is useful in making sure you are working with the most recent
operators. 
The version of <acronym>NCO</acronym> you are using might be, e.g., <code>1.2</code>. 
However using <span class="samp">-r</span> on, say, <span class="command">ncks</span>, will produce something
like <span class="samp">NCO netCDF Operators version 1.2
Copyright (C) 1995--2000 Charlie Zender
ncks version 1.30 (2000/07/31) "Bolivia"</span>. 
This tells you <span class="command">ncks</span> contains all patches up to version
<code>1.30</code>, which dates from July&nbsp;31<!-- /@w -->, 2000.

   <p><a name="rfr"></a> <!-- http://nco.sf.net/nco.html#rfr --><div class="node">
<p><hr>
<a name="Operator-Reference-Manual"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Contributing">Contributing</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Common-features">Common features</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
<br>
</div>

<h2 class="chapter">4 Reference manual for all operators</h2>

<p>This chapter presents reference pages for each of the operators
individually. 
The operators are presented in alphabetical order. 
<a name="index-command-line-switches-538"></a>All valid command line switches are included in the syntax statement. 
Recall that descriptions of many of these command line switches are
provided only in <a href="#Common-features">Common features</a>, to avoid redundancy. 
Only options specific to, or most useful with, a particular operator are
described in any detail in the sections below.

<ul class="menu">
<li><a accesskey="1" href="#ncap-netCDF-Arithmetic-Processor">ncap netCDF Arithmetic Processor</a>
<li><a accesskey="2" href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a>
<li><a accesskey="3" href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a>
<li><a accesskey="4" href="#ncea-netCDF-Ensemble-Averager">ncea netCDF Ensemble Averager</a>
<li><a accesskey="5" href="#ncecat-netCDF-Ensemble-Concatenator">ncecat netCDF Ensemble Concatenator</a>
<li><a accesskey="6" href="#ncflint-netCDF-File-Interpolator">ncflint netCDF File Interpolator</a>
<li><a accesskey="7" href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a>
<li><a accesskey="8" href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a>
<li><a accesskey="9" href="#ncra-netCDF-Record-Averager">ncra netCDF Record Averager</a>
<li><a href="#ncrcat-netCDF-Record-Concatenator">ncrcat netCDF Record Concatenator</a>
<li><a href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a>
<li><a href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a>
</ul>

   <p><a name="ncap"></a> <!-- http://nco.sf.net/nco.html#ncap --><div class="node">
<p><hr>
<a name="ncap-netCDF-Arithmetic-Processor"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Operator-Reference-Manual">Operator Reference Manual</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Operator-Reference-Manual">Operator Reference Manual</a>
<br>
</div>

<h3 class="section">4.1 <span class="command">ncap</span> netCDF Arithmetic Processor</h3>

<p><a name="index-parser-539"></a><a name="index-lexer-540"></a><a name="index-arithmetic-processor-541"></a><a name="index-ncap-542"></a>
SYNTAX
<pre class="example">     ncap [-A] [-C] [-c] [-D <var>dbg</var>]
     [-d <var>dim</var>,[<var>min</var>][,[<var>max</var>]][,[<var>stride</var>]]] [-F] [-f]
     [-l <var>path</var>] [-O] [-o <var>output-file</var>] [-p <var>path</var>] [-R] [-r]
     [-s <var>algebra</var>] [-S <var>fl.nco</var>] [-v]
     <var>input-file</var> [<var>output-file</var>]
</pre>
   <p class="noindent">DESCRIPTION

   <p><span class="command">ncap</span> arithmetically processes a netCDF file. 
<a name="index-script-file-543"></a><a name="index-_0040code_007b_002d_002dscript_002dfile_007d-544"></a><a name="index-_0040code_007b_002d_002dfl_005fspt_007d-545"></a><a name="index-_0040code_007b_002d_002dscript_007d-546"></a><a name="index-_0040code_007b_002d_002dspt_007d-547"></a>The processing instructions are contained either in the <acronym>NCO</acronym>
script file <span class="file">fl.nco</span> or in a sequence of command line arguments. 
The options <span class="samp">-s</span> (or long options <span class="samp">--spt</span> or <span class="samp">--script</span>)
are used for in-line scripts and <span class="samp">-S</span> (or long options
<span class="samp">--fl_spt</span> or <span class="samp">--script-file</span>) are used to provide the
filename where (usually multiple) scripting commands are pre-stored. 
<span class="command">ncap</span> was written to perform arbitrary albebraic
transformations of data and archive the results as easily as possible. 
<a name="index-derived-fields-548"></a>See <a href="#Missing-values">Missing values</a>, for treatment of missing values. 
The results of the algebraic manipulations are called
<dfn>derived fields</dfn>.

   <p>Unlike the other operators, <span class="command">ncap</span> does not accept a list of
variables to be operated on as an argument to <span class="samp">-v</span>
(see <a href="#Variable-subsetting">Variable subsetting</a>). 
Rather, the <span class="samp">-v</span> switch takes no arguments and indicates
that <span class="command">ncap</span> should output <em>only</em> user-defined variables. 
<span class="command">ncap</span> does not accept or understand the <var>-x</var> switch.

<!-- @subsection Scripting Mathematical Processing with @command{ncap} -->
<ul class="menu">
<li><a accesskey="1" href="#Left-hand-casting">Left hand casting</a>
<li><a accesskey="2" href="#Syntax-of-ncap-statements">Syntax of ncap statements</a>
<li><a accesskey="3" href="#Intrinsic-functions">Intrinsic functions</a>
<li><a accesskey="4" href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a>
</ul>

   <p><a name="lhc"></a> <!-- http://nco.sf.net/nco.html#lhc --><div class="node">
<p><hr>
<a name="Left-hand-casting"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Syntax-of-ncap-statements">Syntax of ncap statements</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ncap-netCDF-Arithmetic-Processor">ncap netCDF Arithmetic Processor</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ncap-netCDF-Arithmetic-Processor">ncap netCDF Arithmetic Processor</a>
<br>
</div>

<h4 class="subsection">4.1.1 Left hand casting</h4>

<p><a name="index-hybrid-coordinate-system-549"></a><a name="index-left-hand-casting-550"></a><a name="index-_0040acronym_007bLHS_007d-551"></a>The following examples demonstrate the utility of the
<dfn>left hand casting</dfn> ability of <span class="command">ncap</span>. 
Consider first this simple, artificial, example. 
If <var>lat</var> and <var>lon</var> are one dimensional coordinates of
dimensions <var>lat</var> and <var>lon</var>, respectively, then addition
of these two one-dimensional arrays is intrinsically ill-defined because
whether <var>lat_lon</var> should be dimensioned <var>lat</var> by <var>lon</var>
or <var>lon</var> by <var>lat</var> is ambiguous (assuming that addition is to
remain a <dfn>commutative</dfn> procedure, i.e., one that does not depend on
the order of its arguments). 
Differing dimensions are said to be <dfn>orthogonal</dfn> to one another,
and sets of dimensions which are mutually exclusive are orthogonal
as a set and any arithmetic operation between variables in orthogonal
dimensional spaces is ambiguous without further information.

   <p>The ambiguity may be resolved by enumerating the desired dimension
ordering of the output expression inside square brackets on the
left hand side (<acronym>LHS</acronym>) of the equals sign. 
This is called <dfn>left hand casting</dfn> because the user resolves the
dimensional ordering of the <acronym>RHS</acronym> of the expression by
specifying the desired ordering on the <acronym>LHS</acronym>.
<pre class="example">     ncap -O -s "lat_lon[lat,lon]=lat+lon" in.nc out.nc
     ncap -O -s "lon_lat[lon,lat]=lat+lon" in.nc out.nc
</pre>
   <p>The explicit list of dimensions on the <acronym>LHS</acronym>, <code>[lat,lon]</code>
resolves the otherwise ambiguous ordering of dimensions in
<var>lat_lon</var>. 
In effect, the <acronym>LHS</acronym> <dfn>casts</dfn> its rank properties onto the
<acronym>RHS</acronym>. 
Without <acronym>LHS</acronym> casting, the dimensional ordering of <var>lat_lon</var>
would be undefined and, hopefully, <span class="command">ncap</span> would print an error
message.

   <p>Consider now a slightly more complex example. 
In geophysical models, a coordinate system based on
a blend of terrain-following and density-following surfaces is
called a <dfn>hybrid coordinate system</dfn>. 
In this coordinate system, four variables must be manipulated to
obtain the pressure of the vertical coordinate:
<var>PO</var> is the domain-mean surface pressure offset (a scalar),
<var>PS</var> is the local (time-varying) surface pressure (usually two
horizontal spatial dimensions, i.e, latitude by longitude), <var>hyam</var>
is the weight given to surfaces of constant density (one spatial
dimension, pressure, which is orthogonal to the horizontal
dimensions), and <var>hybm</var> is the weight given to surfaces of
constant elevation (also one spatial dimension). 
This command constructs a four-dimensional pressure <code>prs_mdp</code>
from the four input variables of mixed rank and orthogonality:
<pre class="example">     ncap -O -s "prs_mdp[time,lat,lon,lev]=P0*hyam+PS*hybm" in.nc out.nc
</pre>
   <p>Manipulating the four fields which define the pressure in a hybrid
coordinate system is easy with left hand casting.

   <p><a name="syn"></a> <!-- http://nco.sf.net/nco.html#syn --><div class="node">
<p><hr>
<a name="Syntax-of-ncap-statements"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Intrinsic-functions">Intrinsic functions</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Left-hand-casting">Left hand casting</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ncap-netCDF-Arithmetic-Processor">ncap netCDF Arithmetic Processor</a>
<br>
</div>

<h4 class="subsection">4.1.2 Syntax of <span class="command">ncap</span> statements</h4>

<p><a name="index-statement-552"></a><a name="index-syntax-553"></a>Mastering <span class="command">ncap</span> is relatively simple. 
Each valid statement <var>statement</var> consists of standard forward
algebraic expression. 
The <span class="file">fl.nco</span>, if present, is simply a list of such statements,
whitespace, and comments. 
<a name="index-C-language-554"></a>The syntax of statements is most like the computer language&nbsp;C<!-- /@w -->. 
The following characteristics of&nbsp;C<!-- /@w --> are preserved:
     <dl>
<dt>Array syntax<dd><a name="index-array-syntax-555"></a><a name="index-_0040code_007b_005b_005d_007d-_0028array-delimiters_0029-556"></a>Arrays elements are placed within <code>[]</code> characters;
<br><dt>Array indexing<dd><a name="index-array-indexing-557"></a>Arrays are 0-based;
<br><dt>Array storage<dd><a name="index-array-storage-558"></a>Last dimension is most rapidly varying;
<br><dt>Assignment statements<dd><a name="index-assignment-statement-559"></a><a name="index-semi_002dcolon-560"></a><a name="index-_0040code_007b_003b_007d-_0028end-of-statement_0029-561"></a>A&nbsp;semi<!-- /@w -->-colon <span class="samp">;</span> indicates the end of an assignment statement. 
<br><dt>Comments<dd><a name="index-comments-562"></a><a name="index-_0040code_007b_002f_002a_002e_002e_002e_002a_002f_007d-_0028comment_0029-563"></a><a name="index-_0040code_007b_002f_002f_007d-_0028comment_0029-564"></a>Multi-line comments are enclosed within <code>/* */</code> characters. 
Single line comments are preceded by <code>//</code> characters. 
<br><dt>Nesting<dd><a name="index-including-files-565"></a><a name="index-nesting-566"></a><a name="index-_0040code_007b_0023include_007d-567"></a>Files may be nested in scripts using <code>#include </code><var>script</var>. 
Note that the <code>#include</code> command is not followed by a semi-colon
because it is a pre-processor directive, not an assignment statement. 
The filename <span class="file">script</span> is interpreted relative to the run directory. 
<br><dt>Attribute syntax<dd><a name="index-attribute-syntax-568"></a><a name="index-_0040code_007b_0040_0040_007d-_0028attribute_0029-569"></a>The at-sign <code>@</code> is used to delineate an attribute name from a
variable name. 
</dl>

   <p><a name="fnc"></a> <!-- http://nco.sf.net/nco.html#fnc --><div class="node">
<p><hr>
<a name="Intrinsic-functions"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Syntax-of-ncap-statements">Syntax of ncap statements</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ncap-netCDF-Arithmetic-Processor">ncap netCDF Arithmetic Processor</a>
<br>
</div>

<h4 class="subsection">4.1.3 Intrinsic functions</h4>

<p><span class="command">ncap</span> contains a small (and growing) library of intrinsic
functions. 
In addition to the standard mathematical functions
(see <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a>), <span class="command">ncap</span> currently
supports packing and unpacking.

<h4 class="unnumberedsubsec">Packing and Unpacking Algorithms</h4>

<p><a name="index-packing-570"></a><a name="index-unpacking-571"></a><a name="index-_0040code_007badd_005foffset_007d-572"></a><a name="index-_0040code_007bscale_005ffactor_007d-573"></a><a name="index-_0040code_007bmissing_005fvalue_007d-574"></a><a name="index-_0040command_007bpack_0028x_0029_007d-575"></a><a name="index-_0040command_007bunpack_0028x_0029_007d-576"></a>
     <dl>
<dt><code>pack(x)</code><dd><dfn>Packing</dfn>
The standard packing algorithm is applied to variable <var>x</var>. 
The packing algorithm is lossy, and produces data with the same dynamic
range as the original but which requires no more than half the space
to store. 
The packed variable is stored (usually) as type <code>NC_SHORT</code>
with the two attributes required to unpack the variable,
<code>scale_factor</code> and <code>add_offset</code>, stored at the original
(unpacked) precision of the variable
<a rel="footnote" href="#fn-27" name="fnd-27"><sup>27</sup></a>. 
Let <var>min</var> and <var>max</var> be the minimum and maximum values
of&nbsp;<var>x</var>.<!-- /@w -->
     <pre class="sp">
     
     </pre>
     <var>scale_factor</var> = (<var>max</var>-<var>min</var>)/<var>ndrv</var><br>
<var>add_offset</var> = 0.5*(<var>min</var>+<var>max</var>)<br>
<var>pck</var> = (<var>upk</var>-<var>add_offset</var>)/<var>scale_factor</var> = (<var>upk</var>-0.5*(<var>min</var>+<var>max</var>))*<var>ndrv</var>/(<var>max</var>-<var>min</var>)<br>
     <pre class="sp">
     
     </pre>
     where <var>ndrv</var> is the number of discrete representable values for
given type of packed variable. 
The theoretical maximum value for <var>ndrv</var> is two raised to the
number of bits used to store the packed variable. 
Thus if the variable is packed into type <code>NC_SHORT</code>, a two-byte
datatype, then there are at most 2^16 = 65536 distinct values
representible. 
In practice, the number of discretely representible values is taken
to be one less than the theoretical maximum. 
This leaves extra space and solves potential problems with rounding
which can occur during the unpacking of the variable. 
Thus for <code>NC_SHORT</code>, ndrv = 65536 - 1 = 65535. 
Less often, the variable may be packed into type <code>NC_CHAR</code>,
where ndrv = 256 - 1 = 255, or type <code>NC_INT</code> where
where ndrv = 4294967295 - 1 = 4294967294. 
<br><dt><code>unpack(x)</code><dd><dfn>Unpacking</dfn>
The standard unpacking algorithm is applied to variable <var>x</var>. 
The unpacking algorithm depends on the presence of two attributes,
<code>scale_factor</code> and <code>add_offset</code>. 
If <code>scale_factor</code> is present for a variable, the data are
multiplied by the value <var>scale_factor</var> after the data are read. 
If <code>add_offset</code> is present for a variable, then the
<var>add_offset</var> value is added to the data after the data are read. 
If both <code>scale_factor</code> and <code>add_offset</code> attributes are
present, the data are first scaled by <var>scale_factor</var> before the
offset <var>add_offset</var> is added.
     <pre class="sp">
     
     </pre>
     <var>upk</var> = <var>scale_factor</var>*<var>pck</var> + <var>add_offset</var> = (<var>max</var>-<var>min</var>)*<var>pck</var>/<var>ndrv</var> + 0.5*(<var>min</var>+<var>max</var>)<br>
     <pre class="sp">
     
     </pre>
     When <code>scale_factor</code> and <code>add_offset</code> are used for packing, the
associated variable (containing the packed data) is typically of type
<code>byte</code> or <code>short</code>, whereas the unpacked values are intended to
be of type <code>int</code>, <code>float</code>, or <code>double</code>. 
An attribute's <code>scale_factor</code> and <code>add_offset</code> and
<code>missing_value</code>, if any, should all be of the type intended for the
unpacked data, i.e., <code>int</code>, <code>float</code> or <code>double</code>. 
</dl>
   One useful feature of (lossy) netCDF packing algorithm is that
additional, loss-less packing algorithms perform well on top of it.

<h4 class="unnumberedsubsec">Type Conversion Functions</h4>

<p>These intrinsic functions allow <span class="command">ncap</span> to convert variables on
disk among the available types supported by netCDF. 
<a name="index-type-conversion-577"></a><a name="index-promotion-578"></a><a name="index-demotion-579"></a><a name="index-_0040code_007bbyte_0028x_0029_007d-580"></a><a name="index-_0040code_007bchar_0028x_0029_007d-581"></a><a name="index-_0040code_007bdouble_0028x_0029_007d-582"></a><a name="index-_0040code_007bfloat_0028x_0029_007d-583"></a><a name="index-_0040code_007bint_0028x_0029_007d-584"></a><a name="index-_0040code_007bshort_0028x_0029_007d-585"></a>
     <dl>
<dt><code>byte(x)</code><dd><dfn>Convert to </dfn><code>NC_BYTE</code>
Converts <var>x</var> to external type <code>NC_BYTE</code>, a C-type <code>signed char</code>. 
<br><dt><code>char(x)</code><dd><dfn>Convert to </dfn><code>NC_CHAR</code>
Converts <var>x</var> to external type <code>NC_CHAR</code>, a C-type <code>unsigned char</code>. 
<br><dt><code>double(x)</code><dd><dfn>Convert to </dfn><code>NC_DOUBLE</code>
Converts <var>x</var> to external type <code>NC_DOUBLE</code>, a C-type <code>double</code>. 
<br><dt><code>float(x)</code><dd><dfn>Convert to </dfn><code>NC_FLOAT</code>
Converts <var>x</var> to external type <code>NC_FLOAT</code>, a C-type <code>float</code>. 
<br><dt><code>int(x)</code><dd><dfn>Convert to </dfn><code>NC_INT</code>
Converts <var>x</var> to external type <code>NC_INT</code>, a C-type <code>int</code>. 
<br><dt><code>short(x)</code><dd><dfn>Convert to </dfn><code>NC_SHORT</code>
Converts <var>x</var> to external type <code>NC_SHORT</code>, a C-type <code>short</code>. 
</dl>
   See <a href="#Type-conversion">Type conversion</a>, for more details on automatic and manual type conversion.

   <p><a name="mth"></a> <!-- http://nco.sf.net/nco.html#mth --><div class="node">
<p><hr>
<a name="Intrinsic-mathematical-functions"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#Intrinsic-functions">Intrinsic functions</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ncap-netCDF-Arithmetic-Processor">ncap netCDF Arithmetic Processor</a>
<br>
</div>

<h4 class="subsection">4.1.4 Intrinsic mathematical functions</h4>

<p><span class="command">ncap</span> supports the standard mathematical functions supplied with
most operating systems. 
<a name="index-addition-586"></a><a name="index-subtraction-587"></a><a name="index-multiplication-588"></a><a name="index-division-589"></a><a name="index-exponentiation-590"></a><a name="index-power-591"></a><a name="index-modulus-592"></a><a name="index-_0040code_007b_002b_007d-_0028addition_0029-593"></a><a name="index-_0040code_007b_002d_007d-_0028subtraction_0029-594"></a><a name="index-_0040code_007b_002a_007d-_0028multiplication_0029-595"></a><a name="index-_0040code_007b_002f_007d-_0028division_0029-596"></a><a name="index-_0040code_007b_005e_007d-_0028power_0029-597"></a><a name="index-_0040code_007b_0025_007d-_0028modulus_0029-598"></a>Standard calculator notation is used for addition <kbd>+</kbd>, subtraction
<kbd>-</kbd>, multiplication <kbd>*</kbd>, division <kbd>/</kbd>, exponentiation
<kbd>^</kbd>, and modulus <kbd>%</kbd>. 
The available elementary mathematical functions are:
<a name="index-_0040var_007babs_007d-599"></a><a name="index-_0040var_007bacosh_007d-600"></a><a name="index-_0040var_007bacos_007d-601"></a><a name="index-_0040var_007basinh_007d-602"></a><a name="index-_0040var_007basin_007d-603"></a><a name="index-_0040var_007batanh_007d-604"></a><a name="index-_0040var_007batan_007d-605"></a><a name="index-_0040var_007bceil_007d-606"></a><a name="index-_0040var_007bcosh_007d-607"></a><a name="index-_0040var_007bcos_007d-608"></a><a name="index-_0040var_007berfc_007d-609"></a><a name="index-_0040var_007berf_007d-610"></a><a name="index-_0040var_007bexp_007d-611"></a><a name="index-_0040var_007bfloor_007d-612"></a><a name="index-_0040var_007bgamma_007d-613"></a><a name="index-_0040var_007bln_007d-614"></a><a name="index-_0040var_007blog10_007d-615"></a><a name="index-_0040var_007blog_007d-616"></a><a name="index-_0040var_007bnearbyint_007d-617"></a><a name="index-_0040var_007bpow_007d-618"></a><a name="index-_0040var_007brint_007d-619"></a><a name="index-_0040var_007bround_007d-620"></a><a name="index-_0040var_007bsinh_007d-621"></a><a name="index-_0040var_007bsin_007d-622"></a><a name="index-_0040var_007bsqrt_007d-623"></a><a name="index-_0040var_007btanh_007d-624"></a><a name="index-_0040var_007btan_007d-625"></a><a name="index-_0040var_007btrunc_007d-626"></a><a name="index-mathematical-functions-627"></a><a name="index-nearest-integer-function-_0028inexact_0029-628"></a><a name="index-nearest-integer-function-_0028exact_0029-629"></a><a name="index-rounding-functions-630"></a><a name="index-truncation-function-631"></a><a name="index-absolute-value-632"></a><a name="index-arccosine-function-633"></a><a name="index-arcsine-function-634"></a><a name="index-arctangent-function-635"></a><a name="index-ceiling-function-636"></a><a name="index-complementary-error-function-637"></a><a name="index-cosine-function-638"></a><a name="index-error-function-639"></a><a name="index-exponentiation-function-640"></a><a name="index-floor-function-641"></a><a name="index-gamma-function-642"></a><a name="index-hyperbolic-arccosine-function-643"></a><a name="index-hyperbolic-arcsine-function-644"></a><a name="index-hyperbolic-arctangent-function-645"></a><a name="index-hyperbolic-cosine-function-646"></a><a name="index-hyperbolic-sine-function-647"></a><a name="index-hyperbolic-tangent-648"></a><a name="index-logarithm_002c-base-10-649"></a><a name="index-logarithm_002c-natural-650"></a><a name="index-power-function-651"></a><a name="index-sine-function-652"></a><a name="index-square-root-function-653"></a>
     <dl>
<!-- fxm finish me -->
<dt><code>abs(x)</code><dd><dfn>Absolute value</dfn>
Example:
<br><dt><code>acos(x)</code><dd><dfn>Arc-cosine</dfn>
Arc-cosine of <var>x</var> where <var>x</var> is specified in radians. 
Example:
<br><dt><code>acosh(x)</code><dd><dfn>Hyperbolic arc-cosine</dfn>
Hyperbolic arc-cosine of <var>x</var> where <var>x</var> is specified in radians. 
Example: acosh(1.0) = 0.0
<br><dt><code>asin(x)</code><dd><dfn>Arc-sine</dfn>
Arc-sine of <var>x</var> where <var>x</var> is specified in radians. 
Example: asin(1.0) = 1.57079632679489661922
<br><dt><code>asinh(x)</code><dd><dfn>Hyperbolic arc-sine</dfn>
Hyperbolic arc-sine of <var>x</var> where <var>x</var> is specified in radians. 
Example: asinh(1.0) = 0.88137358702
<br><dt><code>atan(x)</code><dd><dfn>Arc-tangent</dfn>
Arc-tangent of <var>x</var> where <var>x</var> is specified in radians between
Example: atan(1.0) = 0.78539816339744830961
<br><dt><code>atanh(x)</code><dd><dfn>Hyperbolic arc-tangent</dfn>
Hyperbolic arc-tangent of <var>x</var> where <var>x</var> is specified in radians between
Example: atanh(3.14159265358979323844) = 1.0
<br><dt><code>ceil(x)</code><dd><dfn>Ceil</dfn>
Ceiling of <var>x</var>. Smallest integral value not less than argument. 
Example: ceil(0.1) = 1.0
<br><dt><code>cos(x)</code><dd><dfn>Cosine</dfn>
Cosine of <var>x</var> where <var>x</var> is specified in radians. 
Example: cos(0.0) = 1.0
<br><dt><code>cosh(x)</code><dd><dfn>Hyperbolic cosine</dfn>
Hyperbolic cosine of <var>x</var> where <var>x</var> is specified in radians. 
Example: cosh(0.0) = 1.0
<br><dt><code>erf(x)</code><dd><dfn>Error function</dfn>
Error function of <var>x</var> where <var>x</var> is specified between
Example: erf(1.0) = 0.842701
<br><dt><code>erfc(x)</code><dd><dfn>Complementary error function</dfn>
Complementary error function of <var>x</var> where <var>x</var> is specified between
Example: erfc(1.0) = 0.15729920705
<br><dt><code>exp(x)</code><dd><dfn>Exponential</dfn>
Exponential of <var>x</var>,
Example: exp(1.0) = 2.71828182845904523536
<br><dt><code>floor(x)</code><dd><dfn>Floor</dfn>
Floor of <var>x</var>. Largest integral value not greater than argument. 
Example: floor(1.9) = 1
<br><dt><code>gamma(x)</code><dd><dfn>Gamma function</dfn>
Gamma function of <var>x</var>,
The well-known and loved continuous factorial function. 
Example: gamma(0.5) = sqrt(pi)
<br><dt><code>ln(x)</code><dd><dfn>Natural Logarithm</dfn>
Natural logarithm of <var>x</var>,
Example: ln(2.71828182845904523536) = 1.0
<br><dt><code>log(x)</code><dd><dfn>Natural Logarithm</dfn>
Natural logarithm of <var>x</var>,
Example: log(2.71828182845904523536) = 1.0
<br><dt><code>log10(x)</code><dd><dfn>Base 10 Logarithm</dfn>
Base&nbsp;10<!-- /@w --> logarithm of <var>x</var>,
Example: log(10.0) = 1.0
<br><dt><code>nearbyint(x)</code><dd><dfn>Round inexactly</dfn>
Nearest integer to <var>x</var> is returned in floating point format. 
<a name="index-inexact-conversion-654"></a>No exceptions are raised for <dfn>inexact conversions</dfn>. 
Example: nearbyint(0.1) = 0.0
<br><dt><code>pow(x,y)</code><dd><dfn>Power</dfn>
<a name="index-promotion-655"></a><a name="index-automatic-type-conversion-656"></a>Value of <var>x</var> is raised to the power of <var>y</var>. 
Exceptions are raised for <dfn>domain errors</dfn>. 
Due to type-limitations in the C&nbsp;language<!-- /@w --> <code>pow</code> function,
integer arguments are promoted (see <a href="#Type-conversion">Type conversion</a>) to type
<code>NC_FLOAT</code> before evaluation. 
Example: pow(2,3) = 8
<br><dt><code>rint(x)</code><dd><dfn>Round exactly</dfn>
Nearest integer to <var>x</var> is returned in floating point format. 
Exceptions are raised for <dfn>inexact conversions</dfn>. 
Example: rint(0.1) = 0
<br><dt><code>round(x)</code><dd><dfn>Round</dfn>
Nearest integer to <var>x</var> is returned in floating point format. 
Round halfway cases away from zero, regardless of current IEEE rounding direction. 
Example: round(0.5) = 1.0
<br><dt><code>sin(x)</code><dd><dfn>Sine</dfn>
Sine of <var>x</var> where <var>x</var> is specified in radians. 
Example: sin(1.57079632679489661922) = 1.0
<br><dt><code>sinh(x)</code><dd><dfn>Hyperbolic sine</dfn>
Hyperbolic sine of <var>x</var> where <var>x</var> is specified in radians. 
Example: sinh(1.0) = 1.1752
<br><dt><code>sqrt(x)</code><dd><dfn>Square Root</dfn>
Square Root of <var>x</var>,
Example: sqrt(4.0) = 2.0
<br><dt><code>tan(x)</code><dd><dfn>Tangent</dfn>
Tangent of <var>x</var> where <var>x</var> is specified in radians. 
Example: tan(0.78539816339744830961) = 1.0
<br><dt><code>tanh(x)</code><dd><dfn>Hyperbolic tangent</dfn>
Hyperbolic tangent of <var>x</var> where <var>x</var> is specified in radians. 
Example: tanh(1.0) = 0.761594155956
<br><dt><code>trunc(x)</code><dd><dfn>Truncate</dfn>
Nearest integer to <var>x</var> is returned in floating point format. 
Round halfway cases toward zero, regardless of current IEEE rounding direction. 
Example: trunc(0.5) = 0.0
</dl>
   The complete list of mathematical functions supported is
platform-specific. 
Functions mandated by ANSI&nbsp;C<!-- /@w --> are <em>guaranteed</em> to be present
and are indicated with an asterisk
<!-- fxm No they're not, not yet -->
<a name="index-_0040code_007bANSI-C_007d-657"></a><a name="index-_0040code_007bfloat_007d-658"></a><a name="index-precision-659"></a><a name="index-quadruple-precision-660"></a><a name="index-single-precision-661"></a><a name="index-double-precision-662"></a><a name="index-_0040code_007blong-double_007d-663"></a><a name="index-_0040code_007bNC_005fDOUBLE_007d-664"></a><a rel="footnote" href="#fn-28" name="fnd-28"><sup>28</sup></a>. 
and are indicated with an asterisk. 
<a name="index-_0040code_007b_002df_007d-665"></a><a name="index-_0040code_007b_002d_002dprn_005ffnc_005ftbl_007d-666"></a><a name="index-_0040code_007b_002d_002dfnc_005ftbl_007d-667"></a>Use the <span class="samp">-f</span> (or <span class="samp">fnc_tbl</span> or <span class="samp">prn_fnc_tbl</span>) switch
to print a complete list of functions supported on your platform. 
This prints a list of functions and whether they are supported
for netCDF variables of intrinsic type <code>NC_FLOAT</code> and <code>NC_DOUBLE</code>. 
<a name="index-Linux-668"></a><a rel="footnote" href="#fn-29" name="fnd-29"><sup>29</sup></a>

<p class="noindent">EXAMPLES

   <p>Define new attribute <var>new</var> for existing variable <var>one</var>
as twice the existing attribute <var>double_att</var> of variable
<var>att_var</var>:
<pre class="example">     ncap -O -s "one@new=2*att_var@double_att" in.nc out.nc
</pre>
   <p>Average variables of mixed types (result is of type <code>double</code>):
<pre class="example">     ncap -O -s "average=(var_float+var_double+var_int)/3" in.nc out.nc
</pre>
   <p>Multiple commands may be given to <span class="command">ncap</span> in three ways. 
First, the commands may be placed in a script which is executed, e.g.,
<span class="file">tst.nco</span>. 
Second, the commands may be individually specified with multiple
<span class="samp">-s</span> arguments to the same <span class="command">ncap</span> invocation. 
Third, the commands may be chained together into a single <span class="samp">-s</span>
argument to <span class="command">ncap</span>. 
Assuming the file <span class="file">tst.nco</span> contains the commands
<code>a=3;b=4;c=sqrt(a^2+b^2);</code>, then the following <span class="command">ncap</span>
invocations produce identical results:
<pre class="example">     ncap -O -v -S tst.nco in.nc out.nc
     ncap -O -v -s "a=3" -s "b=4" -s "c=sqrt(a^2+b^2)" in.nc out.nc
     ncap -O -v -s "a=3;b=4;c=sqrt(a^2+b^2)" in.nc out.nc
</pre>
   <p>The second and third examples show that <span class="command">ncap</span> does not require
that a trailing semi-colon <span class="samp">;</span> be placed at the end of a <span class="samp">-s</span>
argument, although a trailing semi-colon <span class="samp">;</span> is always allowed. 
However, semi-colons are required to separate individual assignment
statements chained together as a single <span class="samp">-s</span> argument.

   <p><a name="flg"></a> <!-- http://nco.sf.net/nco.html#flg --><a name="index-flags-669"></a>Imagine you wish to create a binary flag based on the value of
an array. 
The flag should have value&nbsp;1.0<!-- /@w --> where the array exceeds&nbsp;1.0<!-- /@w -->,
and value&nbsp;0.0<!-- /@w --> elsewhere. 
Assume the array named <code>ORO</code> is in <span class="file">in.nc</span>. 
The variable <code>ORO_flg</code> in <span class="file">out.nc</span>
<a name="index-masked-average-670"></a><a name="index-ncecat-671"></a><a name="index-ncwa-672"></a><a name="index-degenerate-dimension-673"></a>
<pre class="example">     # Add degenerate "record" dimension to ORO for averaging
     ncecat -O -v ORO in.nc foo.nc
     # Average degenerate "record" dimension using ORO as mask
     ncwa -a record -O -m ORO -T gt -M 1.0 foo.nc foo.nc
     # ORO is either 0.0 or &gt; 1.0 everywhere
     # Create ORO_frc in [0.0,1.0) then add 0.99 and convert to int
     ncap -O -s "ORO_frc=ORO-int(ORO)" -s "ORO_flg=int(ORO_frc+0.99)" foo.nc out.nc
     # ORO_flg now equals 0 or 1
</pre>
   <p><a name="cvr"></a> <!-- http://nco.sf.net/nco.html#cvr -->This example uses <span class="command">ncap</span> to compute the covariance of two
variables. 
Let the variables <var>u</var> and <var>v</var> be the horizontal
wind components. 
<a name="index-covariance-674"></a><!-- fxm 20030423: texi2html 1.64 has problems with this legal syntax but makeinfo -html does not -->
The <dfn>covariance</dfn> of <var>u</var> and <var>v</var> is defined
as the time mean product of the deviations of <var>u</var> and
<var>v</var> from their respective time means. 
Symbolically, the covariance

<!-- texi2html does not like @math{} -->
<p>[<var>u'v'</var>] =
[<var>uv</var>]-[<var>u</var>][<var>v</var>] where
[x] denotes the time-average of <var>x</var> and <var>x'</var>

   <p>denotes the deviation from the time-mean. 
The covariance tells us how much of the correlation of two signals
arises from the signal fluctuations versus the mean signals. 
<a name="index-eddy-covariance-675"></a>Sometimes this is called the <dfn>eddy covariance</dfn>. 
We will store the covariance in the variable <code>uprmvprm</code>.
<pre class="example">     ncwa -O -a time -v u,v in.nc foo.nc # Compute time mean of u,v
     ncrename -O -v u,uavg -v v,vavg foo.nc # Rename to avoid conflict
     ncks -A -v uavg,vavg foo.nc in.nc # Place time means with originals
     ncap -O -s "uprmvprm=u*v-uavg*vavg" in.nc in.nc # Covariance
     ncra -O -v uprmvprm in.nc foo.nc # Time-mean covariance
</pre>
   <p>The mathmatically inclined will note that the same covariance would be
obtained by replacing the step involving <span class="command">ncap</span> with
<pre class="example">     ncap -O -s "uprmvprm=(u-uavg)*(v-vavg)" foo.nc foo.nc # Covariance
</pre>
   <p><a name="index-appending-data-676"></a><a name="index-time_002daveraging-677"></a><a name="index-ncks-678"></a><a name="index-ncwa-679"></a><a name="index-ncra-680"></a><a name="index-degenerate-dimension-681"></a>Whether a degenerate record dimension is a desirable or undesirable
feature depends on the application. 
Often a degenerate <var>time</var> dimension is useful, e.g., for
concatentating, but it may cause problems with arithmetic. 
Such is the case in the above example, where the first step employs
<span class="command">ncwa</span> rather than <span class="command">ncra</span> for the time-averaging. 
Of course the numerical results are the same with both operators. 
The difference is that <span class="command">ncwa</span> writes no <var>time</var> dimension to
the output file, while <span class="command">ncra</span> would write a degenerate
(size&nbsp;1<!-- /@w -->) dimension. 
Appending <code>u</code> and <code>v</code> to the output file would cause
<span class="command">ncks</span> to try to expand the degenerate time axis of <code>uavg</code>
and <code>vavg</code> to the size of the non-degenerate <var>time</var> dimension
in the input file. 
Thus the append (<span class="command">ncks -A</span>) command would be undefined (and
should fail) in this case. 
<a name="index-_0040code_007b_002dC_007d-682"></a>Equally important is the <span class="samp">-C</span> argument (see <a href="#Coordinate-variables">Coordinate variables</a>) to <span class="command">ncwa</span> to prevent any scalar <var>time</var> variable
from being written to the output file. 
Knowing when to use <span class="command">ncwa -a time</span> rather than the default
<span class="command">ncra</span> for time-averaging takes, well, time.

   <p><a name="ncatted"></a> <!-- http://nco.sf.net/nco.html#ncatted --><div class="node">
<p><hr>
<a name="ncatted-netCDF-Attribute-Editor"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ncap-netCDF-Arithmetic-Processor">ncap netCDF Arithmetic Processor</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Operator-Reference-Manual">Operator Reference Manual</a>
<br>
</div>

<h3 class="section">4.2 <span class="command">ncatted</span> netCDF Attribute Editor</h3>

<p><a name="index-attributes-683"></a><a name="index-attribute-names-684"></a><a name="index-editing-attributes-685"></a><a name="index-ncatted-686"></a>
SYNTAX
<pre class="example">     ncatted [-a <var>att_dsc</var>] [-a ...] [-D <var>dbg</var>] [-h]
     [-l <var>path</var>] [-O] [-o <var>output-file</var>] [-p <var>path</var>] [-R] [-r]
     <var>input-file</var> [[<var>output-file</var>]]
</pre>
   <p class="noindent">DESCRIPTION

   <p><span class="command">ncatted</span> edits attributes in a netCDF file. 
If you are editing attributes then you are spending too much time in the
world of metadata, and <span class="command">ncatted</span> was written to get you back out as
quickly and painlessly as possible. 
<span class="command">ncatted</span> can <dfn>append</dfn>, <dfn>create</dfn>, <dfn>delete</dfn>,
<dfn>modify</dfn>, and <dfn>overwrite</dfn> attributes (all explained below). 
Furthermore, <span class="command">ncatted</span> allows each editing operation to be applied
to every variable in a file. 
This saves time when changing attribute conventions throughout a file. 
Note that <span class="command">ncatted</span> interprets character attributes
(i.e., attributes of type <code>NC_CHAR</code>) as strings.

   <p><a name="index-_0040code_007bhistory_007d-687"></a><a name="index-_0040code_007b_002dh_007d-688"></a>Because repeated use of <span class="command">ncatted</span> can considerably increase the size
of the <code>history</code> global attribute (see <a href="#History-attribute">History attribute</a>), the
<span class="samp">-h</span> switch is provided to override automatically appending the
command to the <code>history</code> global attribute in the <var>output-file</var>.

   <p><a name="index-missing-values-689"></a><a name="index-data_002c-missing-690"></a><a name="index-_0040code_007bmissing_005fvalue_007d-691"></a>When <span class="command">ncatted</span> is used to change the <code>missing_value</code> attribute,
it changes the associated missing data self-consistently. 
If the internal floating point representation of a missing value,
e.g., 1.0e36, differs between two machines then netCDF files produced
on those machines will have incompatible missing values. 
This allows <span class="command">ncatted</span> to change the missing values in files from
different machines to a single value so that the files may then be
concatenated together, e.g., by <span class="command">ncrcat</span>, without losing any
information. 
See <a href="#Missing-values">Missing values</a>, for more information.

   <p>The key to mastering <span class="command">ncatted</span> is understanding the meaning of the
structure describing the attribute modification, <var>att_dsc</var> specified by the required option <span class="samp">-a</span> or <span class="samp">--attribute</span>. 
Each <var>att_dsc</var> contains five elements, which makes using
<span class="command">ncatted</span> somewhat complicated, but powerful. 
The <var>att_dsc</var> argument structure contains five arguments in the
following order:<br>

   <p><var>att_dsc</var> = <var>att_nm</var>, <var>var_nm</var>, <var>mode</var>, <var>att_type</var>,
<var>att_val</var><br>

     <dl>
<dt><var>att_nm</var><dd>Attribute name. 
Example: <code>units</code>
<br><dt><var>var_nm</var><dd>Variable name. 
Example: <code>pressure</code>
<br><dt><var>mode</var><dd>Edit mode abbreviation. 
Example: <code>a</code>. 
See below for complete listing of valid values of <var>mode</var>. 
<br><dt><var>att_type</var><dd>Attribute type abbreviation. 
Example: <code>c</code>. 
See below for complete listing of valid values of <var>att_type</var>. 
<br><dt><var>att_val</var><dd>Attribute value. 
Example: <code>pascal</code>. 
</dl>
   There should be no empty space between these five consecutive
arguments. 
The description of these arguments follows in their order of
appearance.

   <p>The value of <var>att_nm</var> is the name of the attribute you want to edit. 
This meaning of this should be clear to all users of the <span class="command">ncatted</span>
operator. 
If <var>att_nm</var> is omitted (i.e., left blank) and <dfn>Delete</dfn> mode is
selected, then all attributes associated with the specified variable
will be deleted.

   <p><a name="index-global-attributes-692"></a><a name="index-attributes_002c-global-693"></a>The value of <var>var_nm</var> is the name of the variable containing the
attribute (named <var>att_nm</var>) that you want to edit. 
There are two very important and useful exceptions to this rule. 
The value of <var>var_nm</var> can also be used to direct <span class="command">ncatted</span> to
edit global attributes, or to repeat the editing operation for every
variable in a file. 
A&nbsp;value<!-- /@w --> of <var>var_nm</var> of &ldquo;global&rdquo; indicates that <var>att_nm</var> refers
to a global attribute, rather than a particular variable's attribute. 
This is the method <span class="command">ncatted</span> supports for editing global
attributes. 
If <var>var_nm</var> is left blank, on the other hand, then <span class="command">ncatted</span>
attempts to perform the editing operation on every variable in the file. 
This option may be convenient to use if you decide to change the
conventions you use for describing the data.

   <p>The value of <var>mode</var> is a single character abbreviation (<code>a</code>,
<code>c</code>, <code>d</code>, <code>m</code>, or <code>o</code>) standing for one of
five editing modes:<br>
<a name="index-attributes_002c-appending-694"></a><a name="index-attributes_002c-creating-695"></a><a name="index-attributes_002c-deleting-696"></a><a name="index-attributes_002c-modifying-697"></a><a name="index-attributes_002c-editing-698"></a><a name="index-attributes_002c-overwriting-699"></a>
     <dl>
<dt><code>a</code><dd><dfn>Append</dfn>. 
Append value <var>att_val</var> to current <var>var_nm</var> attribute
<var>att_nm</var> value <var>att_val</var>, if any. 
If <var>var_nm</var> does not have an attribute <var>att_nm</var>, there is no
effect. 
<br><dt><code>c</code><dd><dfn>Create</dfn>. 
Create variable <var>var_nm</var> attribute <var>att_nm</var> with <var>att_val</var>
if <var>att_nm</var> does not yet exist. 
If <var>var_nm</var> already has an attribute <var>att_nm</var>, there is no
effect. 
<br><dt><code>d</code><dd><dfn>Delete</dfn>. 
Delete current <var>var_nm</var> attribute <var>att_nm</var>. 
If <var>var_nm</var> does not have an attribute <var>att_nm</var>, there is no
effect. 
If <var>att_nm</var> is omitted (left blank), then all attributes associated
with the specified variable are automatically deleted. 
When <dfn>Delete</dfn> mode is selected, the <var>att_type</var> and <var>att_val</var>
arguments are superfluous and may be left blank. 
<br><dt><code>m</code><dd><dfn>Modify</dfn>. 
Change value of current <var>var_nm</var> attribute <var>att_nm</var> to value
<var>att_val</var>. 
If <var>var_nm</var> does not have an attribute <var>att_nm</var>, there is no
effect. 
<br><dt><code>o</code><dd><dfn>Overwrite</dfn>. 
Write attribute <var>att_nm</var> with value <var>att_val</var> to variable
<var>var_nm</var>, overwriting existing attribute <var>att_nm</var>, if any. 
This is the default mode. 
</dl>

   <p>The value of <var>att_type</var> is a single character abbreviation (<code>f</code>,
<code>d</code>, <code>l</code>, <code>i</code>, <code>s</code>, <code>c</code>, or <code>b</code>) standing
for one of the seven primitive netCDF data types:<br>
     <dl>
<dt><code>f</code><dd><dfn>Float</dfn>. 
Value(s) specified in <var>att_val</var> will be stored as netCDF intrinsic
type <code>NC_FLOAT</code>. 
<br><dt><code>d</code><dd><dfn>Double</dfn>. 
Value(s) specified in <var>att_val</var> will be stored as netCDF intrinsic
type <code>NC_DOUBLE</code>. 
<br><dt><code>i</code><dd><dfn>Integer</dfn>. 
Value(s) specified in <var>att_val</var> will be stored as netCDF intrinsic
type <code>NC_INT</code>. 
<br><dt><code>l</code><dd><dfn>Long</dfn>. 
Value(s) specified in <var>att_val</var> will be stored as netCDF intrinsic
type <code>NC_LONG</code>. 
<br><dt><code>s</code><dd><dfn>Short</dfn>. 
Value(s) specified in <var>att_val</var> will be stored as netCDF intrinsic
type <code>NC_SHORT</code>. 
<br><dt><code>c</code><dd><dfn>Char.</dfn>
Value(s) specified in <var>att_val</var> will be stored as netCDF intrinsic
type <code>NC_CHAR</code>. 
<br><dt><code>b</code><dd><dfn>Byte</dfn>. 
Value(s) specified in <var>att_val</var> will be stored as netCDF intrinsic
type <code>NC_BYTE</code>. 
</dl>
   The specification of <var>att_type</var> is optional in <dfn>Delete</dfn> mode.

   <p>The value of <var>att_val</var> is what you want to change attribute
<var>att_nm</var> to contain. 
The specification of <var>att_val</var> is optional in <dfn>Delete</dfn> mode. 
Attribute values for all types besides <code>NC_CHAR</code> must have an attribute
length of at least one. 
Thus <var>att_val</var> may be a single value or one-dimensional array of
elements of type <code>att_type</code>. 
If the <var>att_val</var> is not set or is set to empty space,
and the <var>att_type</var> is <code>NC_CHAR</code>, e.g., <code>-a units,T,o,c,""</code> or
<code>-a units,T,o,c,</code>, then the corresponding attribute is set to
have zero length. 
When specifying an array of values, it is safest to enclose
<var>att_val</var> in single or double quotes, e.g.,
<code>-a levels,T,o,s,"1,2,3,4"</code> or
<code>-a levels,T,o,s,'1,2,3,4'</code>. 
The quotes are strictly unnecessary around <var>att_val</var> except
when <var>att_val</var> contains characters which would confuse the calling
shell, such as spaces, commas, and wildcard characters.

   <p><a name="index-Perl-700"></a><a name="index-_0040acronym_007bASCII_007d-701"></a><acronym>NCO</acronym> processing of <code>NC_CHAR</code> attributes is a bit like Perl in
that it attempts to do what you want by default (but this sometimes
causes unexpected results if you want unusual data storage). 
<a name="index-_0040code_007bprintf_0028_0029_007d-702"></a><a name="index-_0040code_007b_005cn_007d-_0028_0040acronym_007bASCII_007d-LF_002c-linefeed_0029-703"></a><a name="index-characters_002c-special-704"></a><a name="index-_0040code_007b_005ct_007d-_0028_0040acronym_007bASCII_007d-HT_002c-horizontal-tab_0029-705"></a>If the <var>att_type</var> is <code>NC_CHAR</code> then the argument is interpreted as a
string and it may contain C-language escape sequences, e.g., <code>\n</code>,
which <acronym>NCO</acronym> will interpret before writing anything to disk. 
<acronym>NCO</acronym> translates valid escape sequences and stores the
appropriate <acronym>ASCII</acronym> code instead. 
Since two byte escape sequences, e.g., <code>\n</code>, represent one-byte
<acronym>ASCII</acronym> codes, e.g., <acronym>ASCII</acronym> 10 (decimal), the stored
string attribute is one byte shorter than the input string length for
each embedded escape sequence. 
The most frequently used C-language escape sequences are <code>\n</code> (for
linefeed) and <code>\t</code> (for horizontal tab). 
These sequences in particular allow convenient editing of formatted text
attributes. 
<a name="index-_0040code_007b_005ca_007d-_0028_0040acronym_007bASCII_007d-BEL_002c-bell_0029-706"></a><a name="index-_0040code_007b_005cb_007d-_0028_0040acronym_007bASCII_007d-BS_002c-backspace_0029-707"></a><a name="index-_0040code_007b_005cf_007d-_0028_0040acronym_007bASCII_007d-FF_002c-formfeed_0029-708"></a><a name="index-_0040code_007b_005cr_007d-_0028_0040acronym_007bASCII_007d-CR_002c-carriage-return_0029-709"></a><a name="index-_0040code_007b_005cv_007d-_0028_0040acronym_007bASCII_007d-VT_002c-vertical-tab_0029-710"></a><a name="index-_0040code_007b_005c_005c_007d-_0028_0040acronym_007bASCII_007d-_005c_002c-backslash_0029-711"></a>The other valid <acronym>ASCII</acronym> codes are <code>\a</code>, <code>\b</code>, <code>\f</code>,
<code>\r</code>, <code>\v</code>, and <code>\\</code>. 
See <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a>, for more examples of string formatting
(with the <span class="command">ncks</span> <span class="samp">-s</span> option) with special characters.

   <p><a name="index-_0040code_007b_005c_0027_007d-_0028protected-end-quote_0029-712"></a><a name="index-_0040code_007b_005c_0022_007d-_0028protected-double-quote_0029-713"></a><a name="index-_0040code_007b_005c_003f_007d-_0028protected-question-mark_0029-714"></a><a name="index-_0040code_007b_005c_005c_007d-_0028protected-backslash_0029-715"></a><a name="index-_0040code_007b_0027_007d-_0028end-quote_0029-716"></a><a name="index-_0040code_007b_0022_007d-_0028double-quote_0029-717"></a><a name="index-_0040code_007b_003f_007d-_0028question-mark_0029-718"></a><a name="index-_0040code_007b_005c_007d-_0028backslash_0029-719"></a><a name="index-special-characters-720"></a><a name="index-_0040acronym_007bASCII_007d-721"></a>Analogous to <code>printf</code>, other special characters are also allowed by
<span class="command">ncatted</span> if they are "protected" by a backslash. 
The characters <code>"</code>, <code>'</code>, <code>?</code>, and <code>\</code> may be
input to the shell as <code>\"</code>, <code>\'</code>, <code>\?</code>, and <code>\\</code>. 
<acronym>NCO</acronym> simply strips away the leading backslash from these
characters before editing the attribute. 
No other characters require protection by a backslash. 
Backslashes which precede any other character (e.g., <code>3</code>, <code>m</code>,
<code>$</code>, <code>|</code>, <code>&amp;</code>, <code>@</code>, <code>%</code>, <code>{</code>, and
<code>}</code>) will not be filtered and will be included in the attribute.

   <p><a name="index-strings-722"></a><a name="index-NUL_002dtermination-723"></a><a name="index-NUL-724"></a><a name="index-C-language-725"></a><a name="index-_0040code_007b0_007d-_0028NUL_0029-726"></a>Note that the NUL character <code>\0</code> which terminates C&nbsp;language<!-- /@w -->
strings is assumed and need not be explicitly specified. 
If <code>\0</code> is input, it will not be translated (because it would
terminate the string in an additional location). 
Because of these context-sensitive rules, if wish to use an attribute of
type <code>NC_CHAR</code> to store data, rather than text strings, you should use
<span class="command">ncatted</span> with care.

<p class="noindent">EXAMPLES

   <p>Append the string "Data version 2.0.\n" to the global attribute
<code>history</code>:
<pre class="example">     ncatted -O -a history,global,a,c,"Data version 2.0\n" in.nc
</pre>
   <p>Note the use of embedded C&nbsp;language<!-- /@w --> <code>printf()</code>-style escape
sequences.

   <p>Change the value of the <code>long_name</code> attribute for variable <code>T</code>
from whatever it currently is to "temperature":
<pre class="example">     ncatted -O -a long_name,T,o,c,temperature in.nc
</pre>
   <p>Delete all existing <code>units</code> attributes:
<pre class="example">     ncatted -O -a units,,d,, in.nc
</pre>
   <p class="noindent">The value of <var>var_nm</var> was left blank in order to select all
variables in the file. 
The values of <var>att_type</var> and <var>att_val</var> were left blank because
they are superfluous in <dfn>Delete</dfn> mode.

   <p><a name="index-global-attributes-727"></a>Delete all attributes associated with the <code>tpt</code> variable:
<pre class="example">     ncatted -O -a ,tpt,d,, in.nc
</pre>
   <p class="noindent">The value of <var>att_nm</var> was left blank in order to select all
attributes associated with the variable. 
To delete all global attributes, simply replace <code>tpt</code> with
<code>global</code> in the above.

   <p><a name="index-_0040code_007bunits_007d-728"></a>Modify all existing <code>units</code> attributes to "meter second-1"
<pre class="example">     ncatted -O -a units,,m,c,"meter second-1" in.nc
</pre>
   <p>Overwrite the <code>quanta</code> attribute of variable
<code>energy</code> to an array of four integers.
<pre class="example">     ncatted -O -a quanta,energy,o,s,"010,101,111,121" in.nc
</pre>
   <p>Demonstrate input of C-language escape sequences (e.g., <code>\n</code>) and
other special characters (e.g., <code>\"</code>)
<pre class="example">     ncatted -h -a special,global,o,c,
     '\nDouble quote: \"\nTwo consecutive double quotes: \"\"\n
     Single quote: Beyond my shell abilities!\nBackslash: \\\n
     Two consecutive backslashes: \\\\\nQuestion mark: \?\n' in.nc
</pre>
   <p>Note that the entire attribute is protected from the shell by single
quotes. 
These outer single quotes are necessary for interactive use, but may be
omitted in batch scripts.

   <p><a name="ncbo"></a> <!-- http://nco.sf.net/nco.html#ncbo -->
<a name="ncdiff"></a> <!-- http://nco.sf.net/nco.html#ncdiff -->
<a name="ncadd"></a> <!-- http://nco.sf.net/nco.html#ncadd -->
<a name="ncsub"></a> <!-- http://nco.sf.net/nco.html#ncsub -->
<a name="ncsubtract"></a> <!-- http://nco.sf.net/nco.html#ncsubtract -->
<a name="ncmult"></a> <!-- http://nco.sf.net/nco.html#ncmult -->
<a name="ncmultiply"></a> <!-- http://nco.sf.net/nco.html#ncmultiply -->
<a name="ncdivide"></a> <!-- http://nco.sf.net/nco.html#ncdivide --><div class="node">
<p><hr>
<a name="ncbo-netCDF-Binary-Operator"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ncea-netCDF-Ensemble-Averager">ncea netCDF Ensemble Averager</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Operator-Reference-Manual">Operator Reference Manual</a>
<br>
</div>

<h3 class="section">4.3 <span class="command">ncbo</span> netCDF Binary Operator</h3>

<p><a name="index-ncbo-729"></a><a name="index-ncdiff-730"></a><a name="index-ncadd-731"></a><a name="index-ncsub-732"></a><a name="index-ncsubtract-733"></a><a name="index-ncmult-734"></a><a name="index-ncmultiply-735"></a><a name="index-ncdivide-736"></a><a name="index-binary-operations-737"></a><a name="index-addition-738"></a><a name="index-subtraction-739"></a><a name="index-multiplication-740"></a><a name="index-adding-data-741"></a><a name="index-subtracting-data-742"></a><a name="index-multiplying-data-743"></a><a name="index-dividing-data-744"></a>
SYNTAX
<pre class="example">     ncbo [-A] [-C] [-c] [-D <var>dbg</var>]
     [-d <var>dim</var>,[<var>min</var>][,[<var>max</var>]]] [-F] [-h]
     [-l <var>path</var>] [-O] [-o <var>file_3</var>] [-p <var>path</var>] [-R] [-r]
     [-t <var>thr_nbr</var>] [-v <var>var</var>[,...]] [-x] [-y <var>op_typ</var>]
     <var>file_1</var> <var>file_2</var> [<var>file_3</var>]
</pre>
   <p class="noindent">DESCRIPTION

   <p><span class="command">ncbo</span> performs binary operations on variables in <var>file_1</var>
and the corresponding variables (those with the same name) in
<var>file_2</var> and stores the results in <var>file_3</var>. 
The binary operation operates on the entire files (modulo any excluded
variables). 
See <a href="#Missing-values">Missing values</a>, for treatment of missing values. 
One of the four standard arithmetic binary operations currently
supported must be selected with the <span class="samp">-y </span><var>op_typ</var> switch (or
long options <span class="samp">--op_typ</span> or <span class="samp">--operation</span>). 
<a name="index-_0040code_007badd_007d-745"></a><a name="index-_0040code_007bsubtract_007d-746"></a><a name="index-_0040code_007bmultiply_007d-747"></a><a name="index-_0040code_007bdivide_007d-748"></a><a name="index-_0040code_007b_002b_007d-749"></a><a name="index-_0040code_007b_002d_007d-750"></a><a name="index-_0040code_007b_002a_007d-751"></a><a name="index-_0040code_007b_002f_007d-752"></a><a name="index-_0040code_007b_002dy-_0040var_007bop_005ftyp_007d_007d-753"></a><a name="index-_0040code_007b_002d_002doperation-_0040var_007bop_005ftyp_007d_007d-754"></a><a name="index-_0040code_007b_002d_002dop_005ftyp-_0040var_007bop_005ftyp_007d_007d-755"></a><a name="index-alternate-invocations-756"></a>The valid binary operations for <span class="command">ncbo</span>, their definitions,
corresponding values of the <var>op_typ</var> key, and alternate invocations
are:
     <dl>
<dt><dfn>Addition</dfn><dd><!-- Internal operation code: @{nco_op_add}@* -->
Definition: <var>file_3</var> = <var>file_1</var> + <var>file_2</var><br>
Alternate invocation: <span class="command">ncadd</span><br>
<var>op_typ</var> key values: <span class="samp">add</span>, <span class="samp">+</span>, <span class="samp">addition</span><br>
Examples: <span class="samp">ncbo --op_typ=add 1.nc 2.nc 3.nc</span>, <span class="samp">ncadd 1.nc 2.nc 3.nc</span><br>
<br><dt><dfn>Subtraction</dfn><dd>Definition: <var>file_3</var> = <var>file_1</var> - <var>file_2</var><br>
Alternate invocations: <span class="command">ncdiff</span>, <span class="command">ncsub</span>, <span class="command">ncsubtract</span><br>
<var>op_typ</var> key values: <span class="samp">sbt</span>, <span class="samp">-</span>, <span class="samp">dff</span>, <span class="samp">diff</span>, <span class="samp">sub</span>, <span class="samp">subtract</span>, <span class="samp">subtraction</span><br>
Examples: <span class="samp">ncbo --op_typ=- 1.nc 2.nc 3.nc</span>, <span class="samp">ncdiff 1.nc 2.nc 3.nc</span><br>
<br><dt><dfn>Multiplication</dfn><dd>Definition: <var>file_3</var> = <var>file_1</var> * <var>file_2</var><br>
Alternate invocations: <span class="command">ncmult</span>, <span class="command">ncmultiply</span><br>
<var>op_typ</var> key values: <span class="samp">mlt</span>, <span class="samp">*</span>, <span class="samp">mult</span>, <span class="samp">multiply</span>, <span class="samp">multiplication</span><br>
Examples: <span class="samp">ncbo --op_typ=mlt 1.nc 2.nc 3.nc</span>, <span class="samp">ncmult 1.nc 2.nc 3.nc</span><br>
<br><dt><dfn>Division</dfn><dd>Definition: <var>file_3</var> = <var>file_1</var> / <var>file_2</var><br>
Alternate invocation: <span class="command">ncdivide</span><br>
<var>op_typ</var> key values: <span class="samp">dvd</span>, <span class="samp">/</span>, <span class="samp">divide</span>, <span class="samp">division</span><br>
Examples: <span class="samp">ncbo --op_typ=/ 1.nc 2.nc 3.nc</span>, <span class="samp">ncdivide 1.nc 2.nc 3.nc</span><br>
</dl>
   Care should be taken when using the shortest form of key values,
i.e., <span class="samp">+</span>, <span class="samp">-</span>, <span class="samp">*</span>, and&nbsp;<span class="samp">/</span><!-- /@w -->. 
Some of these single characters may have special meanings to the shell
<a name="index-naked-characters-757"></a><a rel="footnote" href="#fn-30" name="fnd-30"><sup>30</sup></a>. 
<a name="index-Bash-shell-758"></a>Place these characters inside quotes to keep them from being interpreted
(globbed) by the shell
<a rel="footnote" href="#fn-31" name="fnd-31"><sup>31</sup></a>. 
<a name="index-globbing-759"></a><a name="index-shell-760"></a><a name="index-quotes-761"></a>For example, the following commands are equivalent
<pre class="example">     ncbo --op_typ=* 1.nc 2.nc 3.nc # Dangerous (shell may try to glob)
     ncbo --op_typ='*' 1.nc 2.nc 3.nc # Safe ('*' protected from shell)
     ncbo --op_typ="*" 1.nc 2.nc 3.nc # Safe ('*' protected from shell)
     ncbo --op_typ=mlt 1.nc 2.nc 3.nc
     ncbo --op_typ=mult 1.nc 2.nc 3.nc
     ncbo --op_typ=multiply 1.nc 2.nc 3.nc
     ncbo --op_typ=multiplication 1.nc 2.nc 3.nc
     ncmult 1.nc 2.nc 3.nc # First do 'ln -s ncbo ncmult'
     ncmultiply 1.nc 2.nc 3.nc # First do 'ln -s ncbo ncmultiply'
</pre>
   <p>No particular argument or invocation form is preferred. 
Users are encouraged to use the forms which are most intuitive to them.

   <p><a name="index-_0040command_007balias_007d-762"></a><a name="index-_0040command_007bln-_002ds_007d-763"></a><a name="index-symbolic-links-764"></a>Normally, <span class="command">ncbo</span> will fail unless an operation type is specified
with <span class="samp">-y</span> (equivalent to <span class="samp">--op_typ</span>). 
You may create exceptions to this rule to suit your particular tastes,
in conformance with your site's policy on <dfn>symbolic links</dfn> to
executables (files of a different name point to the actual executable). 
For many years, <span class="command">ncdiff</span> was the main binary file operator. 
As a result, many users prefer to continue invoking <span class="command">ncdiff</span>
rather than memorizing a new command (<span class="samp">ncbo -y </span><var>sbt</var>) which
behaves identically to the original <span class="command">ncdiff</span> command. 
However, from a software maintenance standpoint, maintaining a distinct
executable for each binary operation (e.g., <span class="command">ncadd</span>) is untenable,
and a single executable, <span class="command">ncbo</span>, is desirable. 
To maintain backward compatibility, therefore, <acronym>NCO</acronym>
automatically creates a symbolic link from <span class="command">ncbo</span> to
<span class="command">ncdiff</span>. 
Thus <span class="command">ncdiff</span> is called an <dfn>alternate invocation</dfn> of
<span class="command">ncbo</span>. 
<span class="command">ncbo</span> supports many additional alternate invocations which must
be manually activated. 
Should users or system adminitrators decide to activate them, the
procedure is simple. 
For example, to use <span class="samp">ncadd</span> instead of <span class="samp">ncbo --op_typ=add</span>,
simply create a symbolic link from <span class="command">ncbo</span> to <span class="command">ncadd</span>
<a rel="footnote" href="#fn-32" name="fnd-32"><sup>32</sup></a>. 
The alternatate invocations supported for each operation type are listed
above. 
Alternatively, users may always define <span class="samp">ncadd</span> as an <dfn>alias</dfn> to
<span class="samp">ncbo --op_typ=add</span>
<a rel="footnote" href="#fn-33" name="fnd-33"><sup>33</sup></a>.

   <p>It is important to maintain portability in <acronym>NCO</acronym> scripts. 
Therefore we recommend that site-specfic invocations (e.g.,
<span class="samp">ncadd</span>) be used only in interactive sessions from the
command-line. 
For scripts, we recommend using the full invocation (e.g.,
<span class="samp">ncbo --op_typ=add</span>). 
This ensures portability of scripts between users and sites.

   <p><span class="command">ncbo</span> operates (e.g., adds) variables in <var>file_2</var> with the
corresponding variables (those with the same name) in <var>file_1</var> and
stores the results in <var>file_3</var>. 
<a name="index-broadcasting-variables-765"></a>Variables in <var>file_2</var> are <dfn>broadcast</dfn> to conform to the
corresponding variable in <var>file_1</var> if necessary, but the reverse is
not true. 
Broadcasting a variable means creating data in non-existing dimensions
from the data in existing dimensions. 
For example, a two dimensional variable in <var>file_2</var> can be
subtracted from a four, three, or two (but not one or zero)
dimensional variable (of the same name) in <code>file_1</code>. 
<a name="index-anomalies-766"></a>This functionality allows the user to compute anomalies from the mean. 
Note that variables in <var>file_1</var> are <em>not</em> broadcast to conform
to the dimensions in <var>file_2</var>. 
In the future, we will broadcast variables in <var>file_1</var>, if necessary
to conform to their counterparts in <var>file_2</var>. 
<!-- TODO #268 -->
<a name="index-rank-767"></a>Thus, presently, the number of dimensions, or <dfn>rank</dfn>, of any
processed variable in <var>file_1</var> must be greater than or equal to the
rank of the same variable in <var>file_2</var>. 
Furthermore, the size of all dimensions common to both <var>file_1</var> and
<var>file_2</var> must be equal.

   <p>When computing anomalies from the mean it is often the case that
<var>file_2</var> was created by applying an averaging operator to a file
with initially the same dimensions as <var>file_1</var> (often <var>file_1</var>
itself). 
In these cases, creating <var>file_2</var> with <span class="command">ncra</span> rather than
<span class="command">ncwa</span> will cause the <span class="command">ncbo</span> operation to fail. 
For concreteness say the record dimension in <code>file_1</code> is
<code>time</code>. 
If <var>file_2</var> were created by averaging <var>file_1</var> over the
<code>time</code> dimension with the <span class="command">ncra</span> operator rather than with
the <span class="command">ncwa</span> operator, then <var>file_2</var> will have a <code>time</code>
dimension of size&nbsp;1<!-- /@w --> rather than having no <code>time</code> dimension at
all
<a name="index-degenerate-dimension-768"></a><a rel="footnote" href="#fn-34" name="fnd-34"><sup>34</sup></a>. 
In this case the input files to <span class="command">ncbo</span>, <var>file_1</var> and
<var>file_2</var>, will have unequally sized <code>time</code> dimensions which
causes <span class="command">ncbo</span> to fail. 
To prevent this from occuring, use <span class="command">ncwa</span> to remove the
<code>time</code> dimension from <var>file_2</var>. 
See the example below.

   <p><a name="index-coordinate-variable-769"></a><a name="index-_0040code_007bNC_005fBYTE_007d-770"></a><a name="index-_0040code_007bNC_005fCHAR_007d-771"></a><span class="command">ncbo</span> never operates on coordinate variables or variables
of type <code>NC_CHAR</code> or <code>NC_BYTE</code>. 
This ensures that coordinates like (e.g., latitude and longitude) are
physically meaningful in the output file, <var>file_3</var>. 
This behavior is hardcoded. 
<a name="index-_0040acronym_007bNCAR-CCSM_007d-conventions-772"></a><a name="index-_0040acronym_007bCCSM_007d-conventions-773"></a><span class="command">ncbo</span> applies special rules to some <acronym>NCAR CCSM</acronym> fields
(e.g., <code>ORO</code>). 
See <a href="#NCAR-CCSM-Conventions">NCAR CCSM Conventions</a> for a complete description. 
Finally, we note that <span class="command">ncflint</span> (see <a href="#ncflint-netCDF-File-Interpolator">ncflint netCDF File Interpolator</a>) is designed for file interpolation. 
As such, it also performs file subtraction, addition, multiplication,
albeit in a more convoluted way than <span class="command">ncbo</span>.

<p class="noindent">EXAMPLES

   <p>Say files <span class="file">85_0112.nc</span> and <span class="file">86_0112.nc</span> each contain 12 months
of data. 
Compute the change in the monthly averages from 1985 to 1986:
<pre class="example">     ncbo -op_typ=sub 86_0112.nc 85_0112.nc 86m85_0112.nc
     ncdiff 86_0112.nc 85_0112.nc 86m85_0112.nc
</pre>
   <p>The following examples demonstrate the broadcasting feature of
<span class="command">ncbo</span>. 
Say we wish to compute the monthly anomalies of <code>T</code> from the yearly
average of <code>T</code> for the year 1985. 
First we create the 1985 average from the monthly data, which is stored
with the record dimension <code>time</code>.
<pre class="example">     ncra 85_0112.nc 85.nc
     ncwa -O -a time 85.nc 85.nc
</pre>
   <p class="noindent">The second command, <span class="command">ncwa</span>, gets rid of the <code>time</code> dimension
of size&nbsp;1<!-- /@w --> that <span class="command">ncra</span> left in <span class="file">85.nc</span>. 
Now none of the variables in <span class="file">85.nc</span> has a <code>time</code> dimension. 
A&nbsp;quicker<!-- /@w --> way to accomplish this is to use <span class="command">ncwa</span> from the
beginning:
<pre class="example">     ncwa -a time 85_0112.nc 85.nc
</pre>
   <p class="noindent">We are now ready to use <span class="command">ncbo</span> to compute the anomalies for 1985:
<pre class="example">     ncdiff -v T 85_0112.nc 85.nc t_anm_85_0112.nc
</pre>
   <p class="noindent">Each of the 12 records in <span class="file">t_anm_85_0112.nc</span> now contains the
monthly deviation of <code>T</code> from the annual mean of <code>T</code> for each
gridpoint.

   <p>Say we wish to compute the monthly gridpoint anomalies from the zonal
annual mean. 
A&nbsp;<dfn>zonal&nbsp;mean</dfn><!-- /@w --> is a quantity that has been averaged over the
longitudinal (or <var>x</var>) direction. 
First we use <span class="command">ncwa</span> to average over longitudinal direction
<code>lon</code>, creating <span class="file">85_x.nc</span>, the zonal mean of <span class="file">85.nc</span>. 
Then we use <span class="command">ncbo</span> to subtract the zonal annual means from the
monthly gridpoint data:
<pre class="example">     ncwa -a lon 85.nc 85_x.nc
     ncdiff 85_0112.nc 85_x.nc tx_anm_85_0112.nc
</pre>
   <p class="noindent">This examples works assuming <span class="file">85_0112.nc</span> has dimensions
<code>time</code> and <code>lon</code>, and that <span class="file">85_x.nc</span> has no <code>time</code>
or <code>lon</code> dimension.

   <p>As a final example, say we have five years of monthly data (i.e., 60&nbsp;months<!-- /@w -->) stored in <span class="file">8501_8912.nc</span> and we wish to create a file
which contains the twelve month seasonal cycle of the average monthly
anomaly from the five-year mean of this data. 
The following method is just one permutation of many which will
accomplish the same result. 
First use <span class="command">ncwa</span> to create the five-year mean:
<pre class="example">     ncwa -a time 8501_8912.nc 8589.nc
</pre>
   <p class="noindent">Next use <span class="command">ncbo</span> to create a file containing the difference of
each month's data from the five-year mean:
<pre class="example">     ncbo 8501_8912.nc 8589.nc t_anm_8501_8912.nc
</pre>
   <p class="noindent">Now use <span class="command">ncks</span> to group the five January anomalies together in
one file, and use <span class="command">ncra</span> to create the average anomaly for all
five Januarys. 
These commands are embedded in a shell loop so they are repeated for all
twelve months:
<a name="index-Bash-Shell-774"></a><a name="index-Bourne-Shell-775"></a><a name="index-C-Shell-776"></a>
<pre class="example">     for idx in {01..12}; do # Bash Shell (version 3.0+, beware ordering!)
       ncks -F -d time,${idx},,12 t_anm_8501_8912.nc foo.${idx}
       ncra foo.${idx} t_anm_8589_${idx}.nc
     done
     for idx in 01 02 03 04 05 06 07 08 09 10 11 12; do # Bourne Shell
       ncks -F -d time,${idx},,12 t_anm_8501_8912.nc foo.${idx}
       ncra foo.${idx} t_anm_8589_${idx}.nc
     done
     foreach idx (01 02 03 04 05 06 07 08 09 10 11 12) # C Shell
       ncks -F -d time,${idx},,12 t_anm_8501_8912.nc foo.${idx}
       ncra foo.${idx} t_anm_8589_${idx}.nc
     end
</pre>
   <p class="noindent">Note that <span class="command">ncra</span> understands the <code>stride</code> argument so the
two commands inside the loop may be combined into the single command
<pre class="example">     ncra -F -d time,${idx},,12 t_anm_8501_8912.nc foo.${idx}
</pre>
   <p class="noindent">Finally, use <span class="command">ncrcat</span> to concatenate the 12 average monthly
anomaly files into one twelve-record file which contains the entire
seasonal cycle of the monthly anomalies:
<pre class="example">     ncrcat t_anm_8589_??.nc t_anm_8589_0112.nc
</pre>
   <p class="noindent">
<a name="ncea"></a> <!-- http://nco.sf.net/nco.html#ncea --><div class="node">
<p><hr>
<a name="ncea-netCDF-Ensemble-Averager"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ncecat-netCDF-Ensemble-Concatenator">ncecat netCDF Ensemble Concatenator</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Operator-Reference-Manual">Operator Reference Manual</a>
<br>
</div>

<h3 class="section">4.4 <span class="command">ncea</span> netCDF Ensemble Averager</h3>

<p><a name="index-averaging-data-777"></a><a name="index-ensemble-average-778"></a><a name="index-ncea-779"></a>
SYNTAX
<pre class="example">     ncea [-A] [-C] [-c] [-D <var>dbg</var>]
     [-d <var>dim</var>,[<var>min</var>][,[<var>max</var>]]] [-F] [-h] [-l <var>path</var>]
     [-n <var>loop</var>] [-O] [-o <var>output-file</var>] [-p <var>path</var>] [-R] [-r]
     [-t <var>thr_nbr</var>] [-v <var>var</var>[,...]] [-x] [-y <var>op_typ</var>]
     [<var>input-files</var>] [<var>output-file</var>]
</pre>
   <p class="noindent">DESCRIPTION

   <p><span class="command">ncea</span> performs gridpoint averages of variables across an
arbitrary number (an <dfn>ensemble</dfn>) of <var>input-files</var>, with each
file receiving an equal weight in the average. 
<a name="index-ensemble-780"></a>Each variable in the <var>output-file</var> will be the same size as the same
variable in any one of the in the <var>input-files</var>, and all
<var>input-files</var> must be the same size. 
<span class="command">ncea</span> averages entire files, and weights each file evenly. 
This is distinct from <span class="command">ncra</span>, which only averages over the
record dimension (e.g., time), and weights each record in the record
dimension evenly,
<a name="index-record-dimension-781"></a>All dimensions, including the record dimension, are treated identically
and preserved in the <var>output-file</var>. 
See <a href="#Averaging-vs_002e-Concatenating">Averaging vs. Concatenating</a>, for a description of the
distinctions between the various averagers and concatenators. 
<a name="index-multi_002dfile-operators-782"></a><a name="index-standard-input-783"></a><a name="index-_0040code_007bstdin_007d-784"></a>As a multi-file operator, <span class="command">ncea</span> will read the list of
<var>input-files</var> from <code>stdin</code> if they are not specified
as positional arguments on the command line
(see <a href="#Large-numbers-of-input-files">Large numbers of input files</a>).

   <p>The file is the logical unit of organization for the results of many
scientific studies. 
Often one wishes to generate a file which is the gridpoint average of
many separate files. 
This may be to reduce statistical noise by combining the results of a
large number of experiments, or it may simply be a step in a procedure
whose goal is to compute anomalies from a mean state. 
In any case, when one desires to generate a file whose properties are
the mean of all the input files, then <span class="command">ncea</span> is the operator to
use. 
<span class="command">ncea</span> assumes coordinate variable are properties common to all
of the experiments and so does not average them across files. 
Instead, <span class="command">ncea</span> copies the values of the coordinate variables
from the first input file to the output file.

<p class="noindent">EXAMPLES

   <p>Consider a model experiment which generated five realizations of one
year of data, say 1985. 
You can imagine that the experimenter slightly perturbs the
initial conditions of the problem before generating each new solution. 
Assume each file contains all twelve months (a seasonal cycle) of data
and we want to produce a single file containing the ensemble average
(mean) seasonal cycle. 
Here the numeric filename suffix denotes the experiment number
(<em>not</em> the month):
<pre class="example">     ncea 85_01.nc 85_02.nc 85_03.nc 85_04.nc 85_05.nc 85.nc
     ncea 85_0[1-5].nc 85.nc
     ncea -n 5,2,1 85_01.nc 85.nc
</pre>
   <p class="noindent">These three commands produce identical answers. 
See <a href="#Specifying-input-files">Specifying input files</a>, for an explanation of the distinctions
between these methods. 
The output file, <span class="file">85.nc</span>, is the same size as the inputs files. 
It contains 12 months of data (which might or might not be stored in the
record dimension, depending on the input files), but each value in the
output file is the average of the five values in the input files.

   <p>In the previous example, the user could have obtained the ensemble
average values in a particular spatio-temporal region by adding a
hyperslab argument to the command, e.g.,
<pre class="example">     ncea -d time,0,2 -d lat,-23.5,23.5 85_??.nc 85.nc
</pre>
   <p class="noindent">In this case the output file would contain only three slices of data in
the <var>time</var> dimension. 
These three slices are the average of the first three slices from the
input files. 
Additionally, only data inside the tropics is included.

   <p><a name="ncecat"></a> <!-- http://nco.sf.net/nco.html#ncecat --><div class="node">
<p><hr>
<a name="ncecat-netCDF-Ensemble-Concatenator"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ncflint-netCDF-File-Interpolator">ncflint netCDF File Interpolator</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ncea-netCDF-Ensemble-Averager">ncea netCDF Ensemble Averager</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Operator-Reference-Manual">Operator Reference Manual</a>
<br>
</div>

<h3 class="section">4.5 <span class="command">ncecat</span> netCDF Ensemble Concatenator</h3>

<p><a name="index-concatenation-785"></a><a name="index-ensemble-concatenation-786"></a><a name="index-ncecat-787"></a>
SYNTAX
<pre class="example">     ncecat [-A] [-C] [-c] [-D <var>dbg</var>]
     [-d <var>dim</var>,[<var>min</var>][,[<var>max</var>]]] [-F] [-h] [-l <var>path</var>]
     [-n <var>loop</var>] [-O] [-o <var>output-file</var>] [-p <var>path</var>] [-R] [-r]
     [-v <var>var</var>[,...]] [-x] [<var>input-files</var>] [<var>output-file</var>]
</pre>
   <p class="noindent">DESCRIPTION

   <p><span class="command">ncecat</span> concatenates an arbitrary number of input files into a
single output file. 
<a name="index-record-dimension-788"></a>A new record dimension acts as the glue to bind the input files data
together. 
Each variable in each input file becomes one record in the same variable
in the output file. 
All <var>input-files</var> must contain all extracted variables (or else
there would be "gaps" in the output file). 
Each extracted variable must be constant in size and rank across all
<var>input-files</var>. 
The <var>input-files</var> are stored consecutively as a single record in
<var>output file</var>. 
Thus, the <var>output file</var> size is the sum of the sizes of the
extracted variable in the input files. 
See <a href="#Averaging-vs_002e-Concatenating">Averaging vs. Concatenating</a>, for a description of the
distinctions between the various averagers and concatenators. 
<a name="index-multi_002dfile-operators-789"></a><a name="index-standard-input-790"></a><a name="index-_0040code_007bstdin_007d-791"></a>As a multi-file operator, <span class="command">ncecat</span> will read the list of
<var>input-files</var> from <code>stdin</code> if they are not specified
as positional arguments on the command line
(see <a href="#Large-numbers-of-input-files">Large numbers of input files</a>).

   <p><a name="index-climate-model-792"></a>Consider five realizations, <span class="file">85a.nc</span>, <span class="file">85b.nc</span>,
<small class="dots">...</small>&nbsp;<span class="file">85e.nc</span><!-- /@w --> of 1985 predictions from the same climate
model. 
Then <code>ncecat 85?.nc 85_ens.nc</code> glues the individual realizations
together into the single file, <span class="file">85_ens.nc</span>. 
If an input variable was dimensioned [<code>lat</code>,<code>lon</code>], it will
have dimensions [<code>record</code>,<code>lat</code>,<code>lon</code>] in the output
file. 
A&nbsp;restriction<!-- /@w --> of <span class="command">ncecat</span> is that the hyperslabs of the
processed variables must be the same from file to file. 
Normally this means all the input files are the same size, and contain
data on different realizations of the same variables.

<p class="noindent">EXAMPLES

   <p>Consider a model experiment which generated five realizations of one
year of data, say 1985. 
You can imagine that the experimenter slightly perturbs the
initial conditions of the problem before generating each new solution. 
Assume each file contains all twelve months (a seasonal cycle) of data
and we want to produce a single file containing all the seasonal
cycles. 
Here the numeric filename suffix denotes the experiment number
(<em>not</em> the month):
<pre class="example">     ncecat 85_01.nc 85_02.nc 85_03.nc 85_04.nc 85_05.nc 85.nc
     ncecat 85_0[1-5].nc 85.nc
     ncecat -n 5,2,1 85_01.nc 85.nc
</pre>
   <p class="noindent">These three commands produce identical answers. 
See <a href="#Specifying-input-files">Specifying input files</a>, for an explanation of the distinctions
between these methods. 
The output file, <span class="file">85.nc</span>, is five times the size as a single
<var>input-file</var>. 
It contains 60&nbsp;months<!-- /@w --> of data (which might or might not be stored in
the record dimension, depending on the input files).

   <p><a name="index-record-dimension-793"></a>Consider a file with an existing record dimension named <code>time</code>. 
and suppose the user wishes to convert <code>time</code> from a record
dimension to a non-record dimension. 
This may be useful, for example, when the user has another use for the
record variable. 
The procedure is to use <span class="command">ncecat</span> followed by <span class="command">ncwa</span>
<a name="index-degenerate-dimension-794"></a>
<pre class="example">     ncecat in.nc out.nc # Convert time to non-record dimension
     ncwa -a record in.nc out.nc # Remove new degenerate record dimension
</pre>
   <p class="noindent">The second step removes the degenerate record dimension. 
See <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a> for other methods
changing variable dimensionality, including the record dimension.

   <p><a name="ncflint"></a> <!-- http://nco.sf.net/nco.html#ncflint --><div class="node">
<p><hr>
<a name="ncflint-netCDF-File-Interpolator"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ncecat-netCDF-Ensemble-Concatenator">ncecat netCDF Ensemble Concatenator</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Operator-Reference-Manual">Operator Reference Manual</a>
<br>
</div>

<h3 class="section">4.6 <span class="command">ncflint</span> netCDF File Interpolator</h3>

<p><a name="index-interpolation-795"></a><a name="index-adding-data-796"></a><a name="index-multiplying-data-797"></a><a name="index-addition-798"></a><a name="index-ncflint-799"></a>
SYNTAX
<pre class="example">     ncflint [-A] [-C] [-c] [-D <var>dbg</var>]
     [-d <var>dim</var>,[<var>min</var>][,[<var>max</var>]]] [-F] [-h] [-i <var>var</var>,<var>val3</var>]
     [-l <var>path</var>] [-O] [-o <var>file_3</var>] [-p <var>path</var>] [-R] [-r]
     [-v <var>var</var>[,...]] [-w <var>wgt1</var>[,<var>wgt2</var>]] [-x]
     <var>file_1</var> <var>file_2</var> [<var>file_3</var>]
</pre>
   <p class="noindent">DESCRIPTION

   <p><span class="command">ncflint</span> creates an output file that is a linear combination of
the input files. 
This linear combination is a weighted average, a normalized weighted
average, or an interpolation of the input files. 
Coordinate variables are not acted upon in any case, they are simply
copied from <var>file_1</var>.

   <p>There are two conceptually distinct methods of using <span class="command">ncflint</span>. 
The first method is to specify the weight each input file contributes to
the output file. 
In this method, the value <var>val3</var> of a variable in the output file
<var>file_3</var> is determined from its values <var>val1</var> and <var>val2</var> in
the two input files according to

<!-- texi2html does not like @math{} -->
<p><var>val3</var> = <var>wgt1</var>*<var>val1</var> + <var>wgt2</var>*<var>val2</var>

   <p>. 
Here at least <var>wgt1</var>, and, optionally, <var>wgt2</var>, are specified on
the command line with the <span class="samp">-w</span> (or <span class="samp">--weight</span> or
<span class="samp">--wgt_var</span>) switch. 
<a name="index-_0040code_007b_002dw-_0040var_007bwgt1_007d_005b_002c_0040var_007bwgt2_007d_005d_007d-800"></a><a name="index-_0040code_007b_002d_002dweight-_0040var_007bwgt1_007d_005b_002c_0040var_007bwgt2_007d_005d_007d-801"></a><a name="index-_0040code_007b_002d_002dwgt_005fvar-_0040var_007bwgt1_007d_005b_002c_0040var_007bwgt2_007d_005d_007d-802"></a>If only <var>wgt1</var> is specified then <var>wgt2</var> is automatically
computed as <var>wgt2</var> = 1 &minus; <var>wgt1</var>. 
Note that weights larger than&nbsp;1<!-- /@w --> are allowed. 
Thus it is possible to specify <var>wgt1</var> = 2 and
<var>wgt2</var> = -3. 
One can use this functionality to multiply all the values in a given
file by a constant.

   <p>The second method of using <span class="command">ncflint</span> is to specify the
interpolation option with&nbsp;<span class="samp">-i</span><!-- /@w --> (or with the <span class="samp">--ntp</span> or
<span class="samp">--interpolate</span> long options). 
This is really the inverse of the first method in the following sense. 
When the user specifies the weights directly, <span class="command">ncflint</span> has no
work to do besides multiplying the input values by their respective
weights and adding the results together to produce the output values. 
It makes sense to use this when the weights are known
<em>a&nbsp;priori<!-- /@w --></em>.

   <p><a name="index-arrival-value-803"></a>Another class of problems has the <dfn>arrival value</dfn> (i.e., <var>val3</var>)
of a particular variable <var>var</var> known <em>a&nbsp;priori<!-- /@w --></em>. 
In this case, the implied weights can always be inferred by examining
the values of <var>var</var> in the input files. 
This results in one equation in two unknowns, <var>wgt1</var> and <var>wgt2</var>:

<!-- texi2html does not like @math{} -->
<p><var>val3</var> = <var>wgt1</var>*<var>val1</var> + <var>wgt2</var>*<var>val2</var>

   <p>. 
Unique determination of the weights requires imposing the additional
constraint of normalization on the weights:
<var>wgt1</var> + <var>wgt2</var> = 1. 
Thus, to use the interpolation option, the user specifies <var>var</var>
and <var>val3</var> with the <span class="samp">-i</span> option. 
<span class="command">ncflint</span> then computes <var>wgt1</var> and <var>wgt2</var>, and uses these
weights on all variables to generate the output file. 
Although <var>var</var> may have any number of dimensions in the input
files, it must represent a single, scalar value. 
<a name="index-degenerate-dimension-804"></a>Thus any dimensions associated with <var>var</var> must be <dfn>degenerate</dfn>,
i.e., of size one.

   <p>If neither <span class="samp">-i</span> nor <span class="samp">-w</span> is specified on the command line,
<span class="command">ncflint</span> defaults to weighting each input file equally in the
output file. 
This is equivalent to specifying <span class="samp">-w 0.5</span> or <span class="samp">-w 0.5,0.5</span>. 
Attempting to specify both <span class="samp">-i</span> and <span class="samp">-w</span> methods in the same
command is an error.

   <p><span class="command">ncflint</span> does not interpolate variables of type <code>NC_CHAR</code>
and <code>NC_BYTE</code>. 
This behavior is hardcoded.

   <p><a name="index-missing-values-805"></a><a name="index-_0040code_007bmissing_005fvalue_007d-806"></a>Depending on your intuition, <span class="command">ncflint</span> may treat missing values
unexpectedly. 
Consider a point where the value in one input file, say <var>val1</var>,
equals the missing value <var>mss_val_1</var> and, at the same point,
the corresponding value in the other input file <var>val2</var> is not
misssing (i.e., does not equal <var>mss_val_2</var>). 
There are three plausible answers, and this creates ambiguity.

   <p>Option&nbsp;one<!-- /@w --> is to set <var>val3</var> = <var>mss_val_1</var>. 
The rationale is that <span class="command">ncflint</span> is, at heart, an interpolator
and interpolation involving a missing value is intrinsically undefined. 
<span class="command">ncflint</span> currently implements this behavior since it is the
most conservative and least likely to lead to misinterpretation.

   <p>Option&nbsp;two<!-- /@w --> is to output the weighted valid data point, i.e.,

<!-- texi2html does not like @math{} -->
<p><var>val3</var> = <var>wgt2</var>*<var>val2</var>

   <p>. 
The rationale for this behavior is that interpolation is really a
weighted average of known points, so <span class="command">ncflint</span> should weight the
valid point.

   <p>Option&nbsp;three<!-- /@w --> is to return the <em>unweighted</em> valid point, i.e.,
<var>val3</var> = <var>val2</var>. 
This behavior would appeal to those who use <span class="command">ncflint</span> to
estimate data using the closest available data. 
When a point is not bracketed by valid data on both sides, it is better
to return the known datum than no datum at all.

   <p>The current implementation uses the first approach, Option&nbsp;one<!-- /@w -->. 
If you have strong opinions on this matter, let us know, since we are
willing to implement the other approaches as options if there is enough
interest.

<p class="noindent">EXAMPLES

   <p>Although it has other uses, the interpolation feature was designed
to interpolate <var>file_3</var> to a time between existing files. 
Consider input files <span class="file">85.nc</span> and <span class="file">87.nc</span> containing variables
describing the state of a physical system at times <code>time</code> =
85 and <code>time</code> = 87. 
Assume each file contains its timestamp in the scalar variable
<code>time</code>. 
Then, to linearly interpolate to a file <span class="file">86.nc</span> which describes
the state of the system at time at <code>time</code> = 86, we would use
<pre class="example">     ncflint -i time,86 85.nc 87.nc 86.nc
</pre>
   <p>Say you have observational data covering January and April 1985 in two
files named <span class="file">85_01.nc</span> and <span class="file">85_04.nc</span>, respectively. 
Then you can estimate the values for February and March by interpolating
the existing data as follows. 
Combine <span class="file">85_01.nc</span> and <span class="file">85_04.nc</span> in a 2:1 ratio to make
<span class="file">85_02.nc</span>:
<pre class="example">     ncflint -w 0.667 85_01.nc 85_04.nc 85_02.nc
     ncflint -w 0.667,0.333 85_01.nc 85_04.nc 85_02.nc
</pre>
   <p>Multiply <span class="file">85.nc</span> by&nbsp;3<!-- /@w --> and by&nbsp;&minus;2<!-- /@w --> and add them
together to make <span class="file">tst.nc</span>:
<pre class="example">     ncflint -w 3,-2 85.nc 85.nc tst.nc
</pre>
   <p class="noindent"><a name="index-null-operation-807"></a>This is an example of a null operation, so <span class="file">tst.nc</span> should be
identical (within machine precision) to <span class="file">85.nc</span>.

   <p>Add <span class="file">85.nc</span> to <span class="file">86.nc</span> to obtain <span class="file">85p86.nc</span>,
then subtract <span class="file">86.nc</span> from <span class="file">85.nc</span> to obtain <span class="file">85m86.nc</span>
<pre class="example">     ncflint -w 1,1 85.nc 86.nc 85p86.nc
     ncflint -w 1,-1 85.nc 86.nc 85m86.nc
     ncdiff 85.nc 86.nc 85m86.nc
</pre>
   <p class="noindent">Thus <span class="command">ncflint</span> can be used to mimic some <span class="command">ncbo</span>
operations. 
<a name="index-broadcasting-variables-808"></a>However this is not a good idea in practice because <span class="command">ncflint</span>
does not broadcast (see <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a>) conforming
variables during arithmetic. 
Thus the final two commands would produce identical results except that
<span class="command">ncflint</span> would fail if any variables needed to be broadcast.

   <p><a name="index-_0040code_007bunits_007d-809"></a>Rescale the dimensional units of the surface pressure <code>prs_sfc</code>
from Pascals to hectopascals (millibars)
<pre class="example">     ncflint -O -C -v prs_sfc -w 0.01,0.0 in.nc in.nc out.nc
     ncatted -O -a units,prs_sfc,o,c,millibar out.nc
</pre>
   <p class="noindent">
<a name="ncks"></a> <!-- http://nco.sf.net/nco.html#ncks --><div class="node">
<p><hr>
<a name="ncks-netCDF-Kitchen-Sink"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ncflint-netCDF-File-Interpolator">ncflint netCDF File Interpolator</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Operator-Reference-Manual">Operator Reference Manual</a>
<br>
</div>

<h3 class="section">4.7 <span class="command">ncks</span> netCDF Kitchen Sink</h3>

<p><a name="index-kitchen-sink-810"></a><a name="index-printing-files-contents-811"></a><a name="index-printing-variables-812"></a><a name="index-ncks-813"></a>
SYNTAX
<pre class="example">     ncks [-A] [-a] [-B] [-b <var>binary-file</var>] [-C] [-c] [-D <var>dbg</var>]
     [-d <var>dim</var>,[<var>min</var>][,[<var>max</var>]][,[<var>stride</var>]]]
     [-F] [-H] [-h] [-l <var>path</var>] [-M] [-m] [-O] [-o <var>output-file</var>]
     [-p <var>path</var>] [-q] [-R] [-r] [-s <var>format</var>] [-u]
     [-v <var>var</var>[,...]] [-x] <var>input-file</var> [[<var>output-file</var>]]
</pre>
   <p class="noindent">DESCRIPTION

   <p><a name="index-_0040command_007bncextr_007d-814"></a><span class="command">ncks</span> combines selected features of <span class="command">ncdump</span>,
<span class="command">ncextr</span>, and the nccut and ncpaste specifications into one
versatile utility. 
<span class="command">ncks</span> extracts a subset of the data from <var>input-file</var> and
prints it as <acronym>ASCII</acronym> text to <span class="file">stdout</span>, writes it in
flat binary format to <span class="file">binary-file</span>, and writes (or pastes) it in
netCDF format to <var>output-file</var>.

   <p><span class="command">ncks</span> will print netCDF data in <acronym>ASCII</acronym> format to
<code>stdout</code>, like <span class="command">ncdump</span>, but with these differences:
<span class="command">ncks</span> prints data in a tabular format intended to be easy to
search for the data you want, one datum per screen line, with all
dimension subscripts and coordinate values (if any) preceding the datum. 
Option <span class="samp">-s</span> (or lon options <span class="samp">--sng</span>, <span class="samp">--string</span>,
<span class="samp">--fmt</span>, or <span class="samp">--format</span>) allows the user the format the data
using C-style format strings.

   <p>Options <span class="samp">-a</span>, <span class="samp">-F</span> , <span class="samp">-H</span>, <span class="samp">-M</span>, <span class="samp">-m</span>,
<span class="samp">-q</span>, <span class="samp">-s</span>, and <span class="samp">-u</span> (and their long option counterparts)
control the formatted appearance of the data.

   <p><a name="index-global-attributes-815"></a><a name="index-attributes_002c-global-816"></a><span class="command">ncks</span> extracts (and optionally creates a new netCDF file
comprised of) only selected variables from the input file
(similar to the old <span class="command">ncextr</span> specification). 
Only variables and coordinates may be specifically included or
excluded&mdash;all global attributes and any attribute associated with an
extracted variable are copied to the screen and/or output netCDF file. 
Options <span class="samp">-c</span>, <span class="samp">-C</span>, <span class="samp">-v</span>, and <span class="samp">-x</span> (and their long
option synonyms) control which variables are extracted.

   <p><span class="command">ncks</span> extracts hyperslabs from the specified variables
(<span class="command">ncks</span> implements the original <span class="command">nccut</span> specification). 
Option <span class="samp">-d</span> controls the hyperslab specification. 
Input dimensions that are not associated with any output variable do
not appear in the output netCDF. 
This feature removes superfluous dimensions from netCDF files.

   <p><a name="index-appending-data-817"></a><a name="index-merging-files-818"></a><span class="command">ncks</span> will append variables and attributes from the
<var>input-file</var> to <var>output-file</var> if <var>output-file</var> is a
pre-existing netCDF file whose relevant dimensions conform to dimension
sizes of <var>input-file</var>. 
The append features of <span class="command">ncks</span> are intended to provide a
rudimentary means of adding data from one netCDF file to another,
conforming, netCDF file. 
If naming conflicts exist between the two files, data in
<var>output-file</var> is usually overwritten by the corresponding data from
<var>input-file</var>. 
Thus, when appending, the user should backup <var>output-file</var> in case
valuable data are inadvertantly overwritten.

   <p>If <var>output-file</var> exists, the user will be queried whether to
<dfn>overwrite</dfn>, <dfn>append</dfn>, or <dfn>exit</dfn> the <span class="command">ncks</span> call
completely. 
Choosing <dfn>overwrite</dfn> destroys the existing <var>output-file</var> and
create an entirely new one from the output of the <span class="command">ncks</span> call. 
Append has differing effects depending on the uniqueness of the
variables and attributes output by <span class="command">ncks</span>: If a variable or
attribute extracted from <var>input-file</var> does not have a name conflict
with the members of <var>output-file</var> then it will be added to
<var>output-file</var> without overwriting any of the existing contents of
<var>output-file</var>. 
In this case the relevant dimensions must agree (conform) between the
two files; new dimensions are created in <var>output-file</var> as required. 
<a name="index-global-attributes-819"></a><a name="index-attributes_002c-global-820"></a>When a name conflict occurs, a global attribute from <var>input-file</var>
will overwrite the corresponding global attribute from
<var>output-file</var>. 
If the name conflict occurs for a non-record variable, then the
dimensions and type of the variable (and of its coordinate dimensions,
if any) must agree (conform) in both files. 
Then the variable values (and any coordinate dimension values)
from <var>input-file</var> will overwrite the corresponding variable values
(and coordinate dimension values, if any) in <var>output-file</var>
<a rel="footnote" href="#fn-35" name="fnd-35"><sup>35</sup></a>.

   <p>Since there can only be one record dimension in a file, the record
dimension must have the same name (but not necessarily the same size) in
both files if a record dimension variable is to be appended. 
If the record dimensions are of differing sizes, the record dimension of
<var>output-file</var> will become the greater of the two record dimension
sizes, the record variable from <var>input-file</var> will overwrite any
counterpart in <var>output-file</var> and fill values will be written to any
gaps left in the rest of the record variables (I think). 
In all cases variable attributes in <var>output-file</var> are superseded by
attributes of the same name from <var>input-file</var>, and left alone if
there is no name conflict.

   <p>Some users may wish to avoid interactive <span class="command">ncks</span> queries about
whether to overwrite existing data. 
For example, batch scripts will fail if <span class="command">ncks</span> does not receive
responses to its queries. 
Options <span class="samp">-O</span> and <span class="samp">-A</span> are available to force overwriting
existing files and variables, respectively.

<h4 class="unnumberedsubsec">Options specific to <span class="command">ncks</span></h4>

<p>The following list provides a short summary of the features unique to
<span class="command">ncks</span>. 
Features common to many operators are described in
<a href="#Common-features">Common features</a>.

     
<a name="index-alphabetization-821"></a>
<a name="index-sort-alphabetically-822"></a>
<a name="index-_0040code_007b_002da_007d-823"></a>
<a name="index-_0040code_007b_002d_002dabc_007d-824"></a>
<a name="index-_0040code_007b_002d_002dalphabetize_007d-825"></a>
<dl><dt><span class="samp">-a</span><dd>Do not alphabetize extracted fields. 
By default, the specified output variables are extracted, printed, and
written to disk in alphabetical order. 
This tends to make long output lists easier to search for particular
variables. 
Specifying <code>-a</code> results in the variables being extracted, printed,
and written to disk in the order in which they were saved in the input
file. 
Thus <code>-a</code> retains the original ordering of the variables. 
Also <span class="samp">--abc</span> and <span class="samp">--alphabetize</span>.

     <p><a name="index-binary-format-826"></a><a name="index-_0040code_007b_002dB_007d-827"></a><a name="index-_0040code_007b_002d_002dbnr_007d-828"></a><a name="index-_0040code_007b_002d_002dbinary_007d-829"></a><br><dt><span class="samp">-B file</span><dd>Activate native machine binary output writing to the default binary
file, <span class="file">ncks.bnr</span>. 
The <code>-B</code> switch is redundant when the <code>-b</code>&nbsp;<span class="file">file</span><!-- /@w -->
option is specified, and native binary output will be directed to the
binary file <span class="file">file</span>. 
Also <span class="samp">--bnr</span> and <span class="samp">--binary</span>. 
Writing packed variables in binary format is not supported.

     <p><a name="index-_0040code_007b_002db_007d-830"></a><a name="index-_0040code_007b_002d_002dfl_005fbnr_007d-831"></a><br><dt><span class="samp">-b file</span><dd>Activate native machine binary output writing to binary file
<span class="file">file</span>. 
Also <span class="samp">--fl_bnr</span> and <span class="samp">--binary-file</span>. 
Writing packed variables in binary format is not supported.

     <p><a name="index-stride-832"></a><br><dt><span class="samp">-d </span><var>dim</var><span class="samp">,[</span><var>min</var><span class="samp">][,[</span><var>max</var><span class="samp">]][,[</span><var>stride</var><span class="samp">]]</span><dd>Add <dfn>stride</dfn> argument to hyperslabber. 
For a complete description of the <var>stride</var> argument, See <a href="#Stride">Stride</a>.

     <p><a name="index-_0040code_007b_002dH_007d-833"></a><a name="index-_0040code_007b_002d_002dprint_007d-834"></a><a name="index-_0040code_007b_002d_002dprn_007d-835"></a><br><dt><span class="samp">-H</span><dd>Print data to screen. 
Also activated using <span class="samp">--print</span> or <span class="samp">--prn</span>. 
The <span class="command">ncks</span> default behavior is to print data to screen if
no netCDF output file is specified. 
Use <span class="samp">-H</span> to print data to screen if a netCDF output is specified. 
Unless otherwise specified (with <code>-s</code>), each element of the data
hyperslab is printed on a separate line containing the names, indices,
and, values, if any, of all of the variables dimensions. 
The dimension and variable indices refer to the location of the
corresponding data element with respect to the variable as stored on
disk (i.e., not the hyperslab).
     <pre class="example">          % ncks -C -v three_dmn_var in.nc
          lat[0]=-90 lev[0]=100 lon[0]=0 three_dmn_var[0]=0
          lat[0]=-90 lev[0]=100 lon[1]=90 three_dmn_var[1]=1
          lat[0]=-90 lev[0]=100 lon[2]=180 three_dmn_var[2]=2
          ...
          lat[1]=90 lev[2]=1000 lon[1]=90 three_dmn_var[21]=21
          lat[1]=90 lev[2]=1000 lon[2]=180 three_dmn_var[22]=22
          lat[1]=90 lev[2]=1000 lon[3]=270 three_dmn_var[23]=23
     </pre>
     <p>Printing the same variable with the <span class="samp">-F</span> option shows the same
variable indexed with Fortran conventions
     <pre class="example">          % ncks -F -C -v three_dmn_var in.nc
          lon(1)=0 lev(1)=100 lat(1)=-90 three_dmn_var(1)=0
          lon(2)=90 lev(1)=100 lat(1)=-90 three_dmn_var(2)=1
          lon(3)=180 lev(1)=100 lat(1)=-90 three_dmn_var(3)=2
          ...
     </pre>
     <p>Printing a hyperslab does not affect the variable or dimension indices
since these indices are relative to the full variable (as stored in the
input file), and the input file has not changed. 
However, if the hypserslab is saved to an output file and those values
are printed, the indices will change:
<!-- fxm: replace with new MSA output style -->
     <pre class="example">          % ncks -O -H -d lat,90.0 -d lev,1000.0 -v three_dmn_var in.nc out.nc
          ...
          lat[1]=90 lev[2]=1000 lon[0]=0 three_dmn_var[20]=20
          lat[1]=90 lev[2]=1000 lon[1]=90 three_dmn_var[21]=21
          lat[1]=90 lev[2]=1000 lon[2]=180 three_dmn_var[22]=22
          lat[1]=90 lev[2]=1000 lon[3]=270 three_dmn_var[23]=23
          % ncks -C -v three_dmn_var out.nc
          lat[0]=90 lev[0]=1000 lon[0]=0 three_dmn_var[0]=20
          lat[0]=90 lev[0]=1000 lon[1]=90 three_dmn_var[1]=21
          lat[0]=90 lev[0]=1000 lon[2]=180 three_dmn_var[2]=22
          lat[0]=90 lev[0]=1000 lon[3]=270 three_dmn_var[3]=23
     </pre>
     <p><a name="index-_0040code_007b_002dM_007d-836"></a><a name="index-_0040code_007b_002d_002dMtd_007d-837"></a><a name="index-_0040code_007b_002d_002dMetadata_007d-838"></a><a name="index-metadata_002c-global-839"></a><br><dt><span class="samp">-M</span><dd>Print to screen the global metadata describing the file. 
This includes file summary information and global attributes. 
Also <span class="samp">--Mtd</span> and <span class="samp">--Metadata</span>. 
The default behavior is to global metadata to screen if no netCDF output
file and no variable extraction list is specified (with <span class="samp">-v</span>). 
Use <span class="samp">-M</span> to print global metadata to screen if a netCDF output is
specified, or if a variable extraction list is specified (with <span class="samp">-v</span>).

     <p><a name="index-_0040command_007bncdump_007d-840"></a><a name="index-_0040code_007b_002dm_007d-841"></a><a name="index-_0040code_007b_002d_002dmtd_007d-842"></a><a name="index-_0040code_007b_002d_002dmetadata_007d-843"></a><a name="index-metadata-844"></a><br><dt><span class="samp">-m</span><dd>Print variable metadata to screen (similar to <kbd>ncdump -h</kbd>). 
This displays all metadata pertaining to each variable, one variable
at a time. 
Also <span class="samp">--mtd</span> and <span class="samp">--metadata</span>. 
The <span class="command">ncks</span> default behavior is to print variable metadata to
screen if no netCDF output file is specified. 
Use <span class="samp">-m</span> to print variable metadata to screen if a netCDF output is
specified.

     <p><a name="index-_0040code_007b_002dq_007d-845"></a><a name="index-_0040code_007b_002d_002dquiet_007d-846"></a><a name="index-quiet-847"></a><br><dt><span class="samp">-q</span><dd>Toggle printing of dimension indices and coordinate values when printing
arrays. 
The name of each variable will appear flush left in the output. 
This is useful when trying to locate specific variables when displaying
many variables with different dimensions. 
Also <span class="samp">--quiet</span>.

     <p><a name="index-_0040code_007b_002ds_007d-848"></a><a name="index-_0040code_007b_002d_002dstring_007d-849"></a><a name="index-_0040code_007b_002d_002dfmt_007d-850"></a><a name="index-_0040code_007b_002d_002dformat_007d-851"></a><a name="index-_0040code_007bprintf_0028_0029_007d-852"></a><a name="index-C-language-853"></a><br><dt><span class="samp">-s </span><var>format</var><dd>String format for text output. 
Accepts C&nbsp;language<!-- /@w --> escape sequences and <code>printf()</code> formats. 
Also <span class="samp">--string</span>, <span class="samp">--format</span>, and <span class="samp">--fmt</span>.

     <p><a name="index-_0040code_007b_002du_007d-854"></a><a name="index-_0040code_007b_002d_002dunits_007d-855"></a><br><dt><span class="samp">-u</span><dd>Accompany the printing of a variable's values with its <code>units</code>
attribute, if any. 
Also <span class="samp">--units</span>.

   </dl>

<p class="noindent">EXAMPLES

   <p>View all data in netCDF <span class="file">in.nc</span>, printed with Fortran indexing
conventions:
<pre class="example">     ncks -F in.nc
</pre>
   <p>Copy the netCDF file <span class="file">in.nc</span> to file <span class="file">out.nc</span>.
<pre class="example">     ncks -O in.nc out.nc
</pre>
   <p>Now the file <span class="file">out.nc</span> contains all the data from <span class="file">in.nc</span>. 
There are, however, two differences between <span class="file">in.nc</span> and
<span class="file">out.nc</span>. 
<a name="index-_0040code_007bhistory_007d-856"></a>First, the <code>history</code> global attribute (see <a href="#History-attribute">History attribute</a>)
will contain the command used to create <span class="file">out.nc</span>. 
<a name="index-alphabetize-output-857"></a><a name="index-sort-alphabetically-858"></a><a name="index-_0040code_007b_002da_007d-859"></a>Second, the variables in <span class="file">out.nc</span> will be defined in alphabetical
order. 
Of course the internal storage of variable in a netCDF file should be
transparent to the user, but there are cases when alphabetizing a file
is useful (see description of <code>-a</code> switch).

   <p><a name="index-_0040code_007bprintf_0028_0029_007d-860"></a><a name="index-_0040code_007b_005cn_007d-_0028linefeed_0029-861"></a><a name="index-_0040code_007b_005ct_007d-_0028horizontal-tab_0029-862"></a>Print variable <code>three_dmn_var</code> from file <span class="file">in.nc</span> with
default notations. 
Next print <code>three_dmn_var</code> as an un-annotated text column. 
Then print <code>three_dmn_var</code> signed with very high precision. 
Finally, print <code>three_dmn_var</code> as a comma-separated list.
<pre class="example">     % ncks -C -v three_dmn_var in.nc
     lat[0]=-90 lev[0]=100 lon[0]=0 three_dmn_var[0]=0
     lat[0]=-90 lev[0]=100 lon[1]=90 three_dmn_var[1]=1
     ...
     lat[1]=90 lev[2]=1000 lon[3]=270 three_dmn_var[23]=23
     % ncks -s "%f\n" -C -v three_dmn_var in.nc
     0.000000
     1.000000
     ...
     23.000000
     % ncks -s "%+16.10f\n" -C -v three_dmn_var in.nc
        +0.0000000000
        +1.0000000000
     ...
       +23.0000000000
     % ncks -s "%f, " -C -v three_dmn_var in.nc
     0.000000, 1.000000, ..., 23.000000,
</pre>
   <p class="noindent">The second and third options are useful when pasting data into text
files like reports or papers. 
See <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a>, for more details on string
formatting and special characters.

   <p>One dimensional arrays of characters stored as netCDF variables are
automatically printed as strings, whether or not they are
NUL-terminated, e.g.,
<pre class="example">     ncks -v fl_nm in.nc
</pre>
   <p class="noindent">The <code>%c</code> formatting code is useful for printing
multidimensional arrays of characters representing fixed length strings
<pre class="example">     ncks -s "%c" -v fl_nm_arr in.nc
</pre>
   <p class="noindent"><a name="index-_0040code_007bcore-dump_007d-863"></a>Using the <code>%s</code> format code on strings which are not NUL-terminated
(and thus not technically strings) is likely to result in a core dump.

   <p>Create netCDF <span class="file">out.nc</span> containing all variables, and any associated
coordinates, except variable <code>time</code>, from netCDF <span class="file">in.nc</span>:
<pre class="example">     ncks -x -v time in.nc out.nc
</pre>
   <p>Extract variables <code>time</code> and <code>pressure</code> from netCDF
<span class="file">in.nc</span>. 
If <span class="file">out.nc</span> does not exist it will be created. 
Otherwise the you will be prompted whether to append to or to
overwrite <span class="file">out.nc</span>:
<pre class="example">     ncks -v time,pressure in.nc out.nc
     ncks -C -v time,pressure in.nc out.nc
</pre>
   <p class="noindent">The first version of the command creates an <span class="file">out.nc</span> which contains
<code>time</code>, <code>pressure</code>, and any coordinate variables associated
with <var>pressure</var>. 
The <span class="file">out.nc</span> from the second version is guaranteed to contain only
two variables <code>time</code> and <code>pressure</code>.

   <p>Create netCDF <span class="file">out.nc</span> containing all variables from file
<span class="file">in.nc</span>. 
Restrict the dimensions of these variables to a hyperslab. 
Print (with <code>-H</code>) the hyperslabs to the screen for good measure. 
The specified hyperslab is: the fifth value in dimension <code>time</code>;
the
half-open range <var>lat</var> &gt; 0. in coordinate <code>lat</code>; the
half-open range <var>lon</var> &lt; 330. in coordinate <code>lon</code>; the
closed interval 0.3 &lt; <var>band</var> &lt; 0.5 in coordinate <code>band</code>;
and cross-section closest to 1000. in coordinate <code>lev</code>. 
Note that limits applied to coordinate values are specified with a
decimal point, and limits applied to dimension indices do not have a
decimal point See <a href="#Hyperslabs">Hyperslabs</a>.
<pre class="example">     ncks -H -d time,5 -d lat,,0.0 -d lon,330.0, -d band,0.3,0.5
     -d lev,1000.0 in.nc out.nc
</pre>
   <p><a name="index-wrapped-coordinates-864"></a>Assume the domain of the monotonically increasing longitude coordinate
<code>lon</code> is 0 &lt; <var>lon</var> &lt; 360. 
Here, <code>lon</code> is an example of a wrapped coordinate. 
<span class="command">ncks</span> will extract a hyperslab which crosses the Greenwich
meridian simply by specifying the westernmost longitude as <var>min</var> and
the easternmost longitude as <var>max</var>, as follows:
<pre class="example">     ncks -d lon,260.0,45.0 in.nc out.nc
</pre>
   <p>For more details See <a href="#Wrapped-coordinates">Wrapped coordinates</a>.

   <p><a name="ncpdq"></a> <!-- http://nco.sf.net/nco.html#ncpdq -->
<a name="ncpack"></a> <!-- http://nco.sf.net/nco.html#ncpack -->
<a name="ncunpack"></a> <!-- http://nco.sf.net/nco.html#ncunpack --><div class="node">
<p><hr>
<a name="ncpdq-netCDF-Permute-Dimensions-Quickly"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ncra-netCDF-Record-Averager">ncra netCDF Record Averager</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Operator-Reference-Manual">Operator Reference Manual</a>
<br>
</div>

<h3 class="section">4.8 <span class="command">ncpdq</span> netCDF Permute Dimensions Quickly</h3>

<p><a name="index-ncpdq-865"></a><a name="index-ncpack-866"></a><a name="index-ncunpack-867"></a><a name="index-reshape-variables-868"></a><a name="index-permute-dimensions-869"></a><a name="index-reverse-dimensions-870"></a><a name="index-re_002dorder-dimensions-871"></a><a name="index-re_002ddimension-872"></a><a name="index-packing-873"></a><a name="index-unpacking-874"></a>
SYNTAX
<pre class="example">     ncpdq [-A] [-a [-]<var>dim</var>[,...]] [-C] [-c] [-D <var>dbg</var>]
     [-d <var>dim</var>,[<var>min</var>][,[<var>max</var>]]] [-F] [-h] [-l <var>path</var>]
     [-M <var>pck_map</var>] [-O] [-o <var>output-file</var>] [-P <var>pck_plc</var>] [-p <var>path</var>]
     [-R] [-r] [-t <var>thr_nbr</var>] [-U] [-v <var>var</var>[,...]] [-x]
     <var>input-file</var> [<var>output-file</var>]
</pre>
   <p class="noindent">DESCRIPTION

   <p><span class="command">ncpdq</span> performs one of two distinct functions, packing or
dimension permutation, but not both, when invoked. 
<span class="command">ncpdq</span> is optimized to perform these actions in a parallel
fashion with a minimum of time and memory. 
The <dfn>pdq</dfn> may stand for &ldquo;Permute Dimensions Quickly&rdquo;,
&ldquo;Pack Data Quietly&rdquo;, &ldquo;Pillory Dan Quayle&rdquo;, or other silly uses.

   <p><a name="index-_0040code_007badd_005foffset_007d-875"></a><a name="index-_0040code_007bscale_005ffactor_007d-876"></a><a name="index-_0040command_007bncap_007d-877"></a><a name="index-packing-policy-878"></a>

<h4 class="unnumberedsubsec">Packing and Unpacking Functions</h4>

<p>The <span class="command">ncpdq</span> packing (and unpacking) algorithms are described
in <a href="#Intrinsic-functions">Intrinsic functions</a>, and are also implemented in
<span class="command">ncap</span>. 
<span class="command">ncpdq</span> extends the functionality of these algorithms by
providing high level control of the <dfn>packing policy</dfn> so that
users can pack (and unpack) entire files consistently with one command. 
<a name="index-_0040var_007bpck_005fplc_007d-879"></a><a name="index-_0040code_007b_002dP-_0040var_007bpck_005fplc_007d_007d-880"></a><a name="index-_0040code_007b_002d_002dpck_005fplc-_0040var_007bpck_005fplc_007d_007d-881"></a><a name="index-_0040code_007b_002d_002dpack_005fpolicy-_0040var_007bpck_005fplc_007d_007d-882"></a>The user specifies the desired packing policy with the <span class="samp">-P</span> switch
(or its long option equivalents, <span class="samp">--pck_plc</span> and
<span class="samp">--pack_policy</span>) and its <var>pck_plc</var> argument. 
Four packing policies are currently implemented:<br>
     <dl>
<dt><dfn>Packing (and Re-Packing) Variables [</dfn><em>default</em><dfn>]</dfn><dd>Definition: Pack unpacked variables, re-pack packed variables<br>
Alternate invocation: <code>ncpack</code><br>
<var>pck_plc</var> key values: <span class="samp">all_new</span>, <span class="samp">pck_all_new_att</span><br>
<br><dt><dfn>Packing (and not Re-Packing) Variables</dfn><dd>Definition: Pack unpacked variables, copy packed variables<br>
Alternate invocation: none<br>
<var>pck_plc</var> key values: <span class="samp">all_xst</span>, <span class="samp">pck_all_xst_att</span><br>
<br><dt><dfn>Re-Packing Variables</dfn><dd>Definition: Re-pack packed variables, copy unpacked variables<br>
Alternate invocation: none<br>
<var>pck_plc</var> key values: <span class="samp">xst_new</span>, <span class="samp">pck_xst_new_att</span><br>
<br><dt><dfn>Unpacking</dfn><dd>Definition: Unpack packed variables, copy unpacked variables<br>
Alternate invocation: <code>ncunpack</code><br>
<var>pck_plc</var> key values: <span class="samp">upk</span>, <span class="samp">unpack</span>, <span class="samp">pck_upk</span><br>
</dl>
   Equivalent key values are fully interchangeable. 
Multiple equivalent options are provided to satisfy disparate needs
and tastes of <acronym>NCO</acronym> users working with scripts and from the
command line.

   <p>To reduce required memorization of these complex policy switches,
<span class="command">ncpdq</span> may also be invoked via a synonym or with switches
that imply a particular policy. 
<span class="command">ncpack</span> is a synonym for <span class="command">ncpdq</span> and behaves the same
in all respects. 
Both <span class="command">ncpdq</span> and <span class="command">ncpack</span> assume a default packing
policy request of <span class="samp">all_new</span>. 
Hence <span class="command">ncpack</span> may be invoked without any <span class="samp">-P</span> switch,
unlike <span class="command">ncpdq</span>. 
Similarly, <span class="command">ncunpack</span> is a synonym for <span class="command">ncpdq</span>
except that <span class="command">ncpack</span> implicitly assumes a request to unpack,
i.e., <span class="samp">-P pck_upk</span>. 
<a name="index-_0040code_007b_002dU_007d-883"></a><a name="index-_0040code_007b_002d_002dupk_007d-884"></a><a name="index-_0040code_007b_002d_002dunpack_007d-885"></a>Finally, the <span class="command">ncpdq</span> <span class="samp">-U</span> switch (or its long option
equivalents, <span class="samp">--upk</span> and <span class="samp">--unpack</span>) requires no argument. 
It simply requests unpacking.

   <p>Given the menagerie of synonyms, equivalent options, and implied
options, a short list of some equivalent commands is appropriate. 
The following commands are equivalent for packing:
<code>ncpdq -P all_new</code>, <code>ncpdq --pck_plc=all_new</code>, and
<code>ncpack</code>. 
The following commands are equivalent for unpacking:
<code>ncpdq -P upk</code>, <code>ncpdq -U</code>, <code>ncpdq --pck_plc=unpack</code>,
and <code>ncunpack</code>. 
Equivalent commands for other packing policies, e.g., <span class="samp">all_xst</span>,
follow by analogy. 
<a name="index-_0040command_007balias_007d-886"></a><a name="index-_0040command_007bln-_002ds_007d-887"></a><a name="index-symbolic-links-888"></a>Note that <span class="command">ncpdq</span> synonyms are subject to the same constraints
and recommendations discussed in the secion on <span class="command">ncbo</span> synonyms
(see <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a>). 
That is, symbolic links must exist from the synonym to <span class="command">ncpdq</span>,
or else the user must define an <span class="command">alias</span>.

   <p><a name="index-packing-map-889"></a><a name="index-_0040var_007bpck_005fmap_007d-890"></a><a name="index-_0040code_007b_002dM-_0040var_007bpck_005fmap_007d_007d-891"></a><a name="index-_0040code_007b_002d_002dpck_005fmap-_0040var_007bpck_005fmap_007d_007d-892"></a><a name="index-_0040code_007b_002d_002dmap-_0040var_007bpck_005fmap_007d_007d-893"></a>The <span class="command">ncpdq</span> packing algorithms must know to which type
particular types of input variables are to be packed. 
The correspondence between the input variable type and the output,
packed type, is called the <dfn>packing map</dfn>. 
The user specifies the desired packing map with the <span class="samp">-M</span> switch
(or its long option equivalents, <span class="samp">--pck_map</span> and
<span class="samp">--map</span>) and its <var>pck_map</var> argument. 
Five packing maps are currently implemented:<br>
<a name="index-_0040samp_007bhgh_005fsht_007d-894"></a><a name="index-_0040samp_007bhgh_005fbyt_007d-895"></a><a name="index-_0040samp_007bflt_005fsht_007d-896"></a><a name="index-_0040samp_007bflt_005fbyt_007d-897"></a><a name="index-_0040samp_007bnxt_005flsr_007d-898"></a><a name="index-_0040code_007bNC_005fDOUBLE_007d-899"></a><a name="index-_0040code_007bNC_005fFLOAT_007d-900"></a><a name="index-_0040code_007bNC_005fINT_007d-901"></a><a name="index-_0040code_007bNC_005fSHORT_007d-902"></a><a name="index-_0040code_007bNC_005fCHAR_007d-903"></a><a name="index-_0040code_007bNC_005fBYTE_007d-904"></a>
     <dl>
<dt><dfn>Pack Floating Precisions to </dfn><code>NC_SHORT</code><dfn> [</dfn><em>default</em><dfn>]</dfn><dd>Definition: Pack floating precision types to <code>NC_SHORT</code><br>
Map: Pack [<code>NC_DOUBLE</code>,<code>NC_FLOAT</code>] to <code>NC_SHORT</code><br>
Types copied instead of packed: [<code>NC_INT</code>,<code>NC_SHORT</code>,<code>NC_CHAR</code>,<code>NC_BYTE</code>]<br>
<var>pck_map</var> key values: <span class="samp">flt_sht</span>, <span class="samp">pck_map_flt_sht</span><br>
<br><dt><dfn>Pack Floating Precisions to </dfn><code>NC_BYTE</code><dd>Definition: Pack floating precision types to <code>NC_BYTE</code><br>
Map: Pack [<code>NC_DOUBLE</code>,<code>NC_FLOAT</code>] to <code>NC_BYTE</code><br>
Types copied instead of packed: [<code>NC_INT</code>,<code>NC_SHORT</code>,<code>NC_CHAR</code>,<code>NC_BYTE</code>]<br>
<var>pck_map</var> key values: <span class="samp">flt_byt</span>, <span class="samp">pck_map_flt_byt</span><br>
<br><dt><dfn>Pack Higher Precisions to </dfn><code>NC_SHORT</code><dd>Definition: Pack higher precision types to <code>NC_SHORT</code><br>
Map:
Pack [<code>NC_DOUBLE</code>,<code>NC_FLOAT</code>,<code>NC_INT</code>] to <code>NC_SHORT</code><br>
Types copied instead of packed: [<code>NC_SHORT</code>,<code>NC_CHAR</code>,<code>NC_BYTE</code>]<br>
<var>pck_map</var> key values: <span class="samp">hgh_sht</span>, <span class="samp">pck_map_hgh_sht</span><br>
<br><dt><dfn>Pack Higher Precisions to </dfn><code>NC_BYTE</code><dd>Definition: Pack higher precision types to <code>NC_BYTE</code><br>
Map:
Pack [<code>NC_DOUBLE</code>,<code>NC_FLOAT</code>,<code>NC_INT</code>,<code>NC_SHORT</code>] to <code>NC_BYTE</code><br>
Types copied instead of packed: [<code>NC_CHAR</code>,<code>NC_BYTE</code>]<br>
<var>pck_map</var> key values: <span class="samp">hgh_byt</span>, <span class="samp">pck_map_hgh_byt</span><br>
<br><dt><dfn>Pack to Next Lesser Precision</dfn><dd>Definition: Pack each type to type of next lesser size<br>
Map: Pack <code>NC_DOUBLE</code> to <code>NC_INT</code>. 
Pack [<code>NC_FLOAT</code>,<code>NC_INT</code>] to <code>NC_SHORT</code>. 
Pack <code>NC_SHORT</code> to <code>NC_BYTE</code>.<br>
Types copied instead of packed: [<code>NC_CHAR</code>,<code>NC_BYTE</code>]<br>
<var>pck_map</var> key values: <span class="samp">nxt_lsr</span>, <span class="samp">pck_map_nxt_lsr</span><br>
</dl>
   The default <span class="samp">all_new</span> packing policy with the default
<span class="samp">flt_sht</span> packing map reduces the typical <code>NC_FLOAT</code>-dominated
file size by about&nbsp;50%.<!-- /@w -->
<span class="samp">flt_byt</span> packing reduces an <code>NC_DOUBLE</code>-dominated file by
about&nbsp;87%.<!-- /@w -->

   <p><a name="index-_0040var_007bmissing_005fvalue_007d-905"></a><a name="index-_0040code_007bmissing_005fvalue_007d-906"></a><a name="index-_0040code_007bNUL_007d-907"></a>The netCDF packing algorithm (see <a href="#Intrinsic-functions">Intrinsic functions</a>) is
lossy&mdash;once packed, the exact original data cannot be recovered without
a full backup. 
Hence users should be aware of some packing caveats:
First, the interaction of packing and data equal to the
<var>missing_value</var> is complex. 
Test the <code>missing_value</code> behavior by performing a pack/unpack cycle
to ensure data that are missing <em>stay</em> missing and data that are
not misssing do not join the Air National Guard and go missing. 
This may lead you to elect a new <var>missing_value</var>. 
Second, <code>ncpdq</code> actually allows packing into <code>NC_CHAR</code> (with,
e.g., <span class="samp">flt_chr</span>). 
However, the intrinsic conversion of <code>signed char</code> to higher
precision types is tricky so for values equal to zero, i.e.,
<code>NUL</code>. 
Hence packing to <code>NC_CHAR</code> is not documented or advertised. 
Pack into <code>NC_BYTE</code> (with, e.g., <span class="samp">flt_byt</span>) instead.

<h4 class="unnumberedsubsec">Dimension Permutation</h4>

<p><span class="command">ncpdq</span> re-shapes variables in <var>input-file</var> by re-ordering
and/or reversing dimensions specified in the dimension list. 
The dimension list is a whitespace-free, comma separated list of
dimension names, optionally prefixed by negative signs, that follows the
<span class="samp">-a</span> (or long options <span class="samp">--arrange</span>, <span class="samp">--permute</span>,
<span class="samp">--re-order</span>, or <span class="samp">--rdr</span>) switch. 
To re-order variables by a subset of their dimensions, specify
these dimensions in a comma-separated list following <span class="samp">-a</span>, e.g.,
<span class="samp">-a lon,lat</span>. 
To reverse a dimension, prefix its name with a negative sign in the
dimension list, e.g., <span class="samp">-a -lat</span>. 
Re-ordering and reversal may be performed simultaneously, e.g.,
<span class="samp">-a lon,-lat,time,-lev</span>.

   <p><a name="index-record-dimension-908"></a>Users may specify any permutation of dimensions, including
permutations which change the record dimension identity. 
The record dimension is re-ordered like any other dimension. 
<a name="index-concatenation-909"></a><a name="index-record-dimension-910"></a>This unique <span class="command">ncpdq</span> capability makes it possible to concatenate
files along any dimension. 
See <a href="#Concatenation">Concatenation</a> for a detailed example. 
<a name="index-record-variable-911"></a>The record dimension is always the most slowly varying dimension in a
record variable (see <a href="#Fortran-indexing">Fortran indexing</a>). 
The specified re-ordering fails if it requires creating more than
one record dimension amongst all the output variables
<a rel="footnote" href="#fn-36" name="fnd-36"><sup>36</sup></a>.

   <p>Two special cases of dimension re-ordering and reversal deserve special
mention. 
First, it may be desirable to completely reverse the storage order of a
variable. 
To do this, include all the variable's dimensions in the dimension
re-order list in their original order, and prefix each dimension name
with the negative sign. 
<a name="index-transpose-912"></a>Second, it may useful to transpose a variable's storage order, e.g.,
from&nbsp;C<!-- /@w --> to Fortran data storage order (see <a href="#Fortran-indexing">Fortran indexing</a>). 
To do this, include all the variable's dimensions in the dimension
re-order list in reversed order. 
Explicit examples of these two techniques appear below.

<!-- fxm: discuss netCDF-imposed constraints here -->
<p class="noindent">EXAMPLES

   <p>Pack and unpack all variables in file <span class="file">in.nc</span> and store the results
in <span class="file">out.nc</span>:
<pre class="example">     ncpdq in.nc out.nc # Same as ncpack in.nc out.nc
     ncpdq -P all_new -M flt_sht in.nc out.nc # Defaults
     ncpdq -P all_xst in.nc out.nc
     ncpdq -P upk in.nc out.nc # Same as ncunpack in.nc out.nc
     ncpdq -U in.nc out.nc # Same as ncunpack in.nc out.nc
</pre>
   <p>The first two commands pack any unpacked variable in the input file. 
They also unpack and then re-pack every packed variable. 
The third command only packs unpacked variables in the input file. 
If a variable is already packed, the third command copies it unchanged
to the output file. 
The fourth and fifth commands unpack any packed variables. 
If a variable is not packed, the third command copies it unchanged.

   <p>The previous examples all utilized the default packing map. 
Suppose you wish to archive all data that are currently unpacked
into a form which only preserves 256 distinct values. 
Then you could specify the packing map <var>pck_map</var> as <span class="samp">hgh_byt</span>
and the packing policy <var>pck_plc</var> as <span class="samp">all_xst</span>:
<pre class="example">     ncpdq -P all_xst -M hgh_byt in.nc out.nc
</pre>
   <p><a name="index-appending-variables-913"></a><a name="index-_0040samp_007b_002dA_007d-914"></a><a name="index-_0040samp_007b_002dv_007d-915"></a>Many different packing maps may be used to construct a given file
by performing the packing on subsets of variables (e.g., with <span class="samp">-v</span>)
and using the append feature with <span class="samp">-A</span> (see <a href="#Appending">Appending</a>).

   <p>Re-order file <span class="file">in.nc</span> so that the dimension <code>lon</code> always
precedes the dimension <code>lat</code> and store the results in
<span class="file">out.nc</span>:
<pre class="example">     ncpdq -a lon,lat in.nc out.nc
     ncpdq -v three_dmn_var -a lon,lat in.nc out.nc
</pre>
   <p>The first command re-orders every variable in the input file. 
The second command extracts and re-orders only the variable
<code>three_dmn_var</code>.

   <p>Suppose the dimension <code>lat</code> represents latitude and monotonically
increases increases from south to north. 
Reversing the <code>lat</code> dimension means re-ordering the data so that
latitude values decrease monotonically from north to south. 
Accomplish this with
<pre class="example">     % ncpdq -a -lat in.nc out.nc
     % ncks -C -v lat in.nc
     lat[0]=-90
     lat[1]=90
     % ncks -C -v lat out.nc
     lat[0]=90
     lat[1]=-90
</pre>
   <p>This operation reversed the latitude dimension of all variables. 
Whitespace immediately preceding the negative sign that specifies
dimension reversal may be dangerous. 
<a name="index-long-options-916"></a><a name="index-quotes-917"></a>Quotes and long options can help protect negative signs that should
indicate dimension reversal from being interpreted by the shell as
dashes that indicate new command line switches.
<pre class="example">     ncpdq -a -lat in.nc out.nc # Dangerous? Whitespace before "-lat"
     ncpdq -a "-lat" in.nc out.nc # OK. Quotes protect "-" in "-lat"
     ncpdq -a lon,-lat in.nc out.nc # OK. No whitespace before "-"
     ncpdq --rdr=-lat in.nc out.nc # Preferred. Uses "=" not whitespace
</pre>
   <p>To create the mathematical transpose of a variable, place all its
dimensions in the dimension re-order list in reversed order. 
This example creates the transpose of <code>three_dmn_var</code>:
<pre class="example">     % ncpdq -a lon,lev,lat -v three_dmn_var in.nc out.nc
     % ncks -C -v three_dmn_var in.nc
     lat[0]=-90 lev[0]=100 lon[0]=0 three_dmn_var[0]=0
     lat[0]=-90 lev[0]=100 lon[1]=90 three_dmn_var[1]=1
     lat[0]=-90 lev[0]=100 lon[2]=180 three_dmn_var[2]=2
     ...
     lat[1]=90 lev[2]=1000 lon[1]=90 three_dmn_var[21]=21
     lat[1]=90 lev[2]=1000 lon[2]=180 three_dmn_var[22]=22
     lat[1]=90 lev[2]=1000 lon[3]=270 three_dmn_var[23]=23
     % ncks -C -v three_dmn_var out.nc
     lon[0]=0 lev[0]=100 lat[0]=-90 three_dmn_var[0]=0
     lon[0]=0 lev[0]=100 lat[1]=90 three_dmn_var[1]=12
     lon[0]=0 lev[1]=500 lat[0]=-90 three_dmn_var[2]=4
     ...
     lon[3]=270 lev[1]=500 lat[1]=90 three_dmn_var[21]=19
     lon[3]=270 lev[2]=1000 lat[0]=-90 three_dmn_var[22]=11
     lon[3]=270 lev[2]=1000 lat[1]=90 three_dmn_var[23]=23
</pre>
   <p>To completely reverse the storage order of a variable, include
all its dimensions in the re-order list, each prefixed by a negative
sign. 
This example reverses the storage order of <code>three_dmn_var</code>:
<pre class="example">     % ncpdq -a -lat,-lev,-lon -v three_dmn_var in.nc out.nc
     % ncks -C -v three_dmn_var in.nc
     lat[0]=-90 lev[0]=100 lon[0]=0 three_dmn_var[0]=0
     lat[0]=-90 lev[0]=100 lon[1]=90 three_dmn_var[1]=1
     lat[0]=-90 lev[0]=100 lon[2]=180 three_dmn_var[2]=2
     ...
     lat[1]=90 lev[2]=1000 lon[1]=90 three_dmn_var[21]=21
     lat[1]=90 lev[2]=1000 lon[2]=180 three_dmn_var[22]=22
     lat[1]=90 lev[2]=1000 lon[3]=270 three_dmn_var[23]=23
     % ncks -C -v three_dmn_var out.nc
     lat[0]=90 lev[0]=1000 lon[0]=270 three_dmn_var[0]=23
     lat[0]=90 lev[0]=1000 lon[1]=180 three_dmn_var[1]=22
     lat[0]=90 lev[0]=1000 lon[2]=90 three_dmn_var[2]=21
     ...
     lat[1]=-90 lev[2]=100 lon[1]=180 three_dmn_var[21]=2
     lat[1]=-90 lev[2]=100 lon[2]=90 three_dmn_var[22]=1
     lat[1]=-90 lev[2]=100 lon[3]=0 three_dmn_var[23]=0
</pre>
   <p><a name="ncra"></a> <!-- http://nco.sf.net/nco.html#ncra --><div class="node">
<p><hr>
<a name="ncra-netCDF-Record-Averager"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ncrcat-netCDF-Record-Concatenator">ncrcat netCDF Record Concatenator</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Operator-Reference-Manual">Operator Reference Manual</a>
<br>
</div>

<h3 class="section">4.9 <span class="command">ncra</span> netCDF Record Averager</h3>

<p><a name="index-averaging-data-918"></a><a name="index-record-average-919"></a><a name="index-record-dimension-920"></a><a name="index-running-average-921"></a><a name="index-ncra-922"></a>
SYNTAX
<pre class="example">     ncra [-A] [-C] [-c] [-D <var>dbg</var>]
     [-d <var>dim</var>,[<var>min</var>][,[<var>max</var>]][,[<var>stride</var>]]] [-F] [-h] [-l <var>path</var>]
     [-n <var>loop</var>] [-O] [-o <var>output-file</var>] [-p <var>path</var>] [-R] [-r]
     [-t <var>thr_nbr</var>] [-v <var>var</var>[,...]] [-x] [-y <var>op_typ</var>]
     [<var>input-files</var>] [<var>output-file</var>]
</pre>
   <p class="noindent">DESCRIPTION

   <p><span class="command">ncra</span> averages record variables across an arbitrary number of
<var>input-files</var>. 
<a name="index-degenerate-dimension-923"></a><a name="index-record-dimension-924"></a>The record dimension is retained as a degenerate (size&nbsp;1)<!-- /@w --> dimension in
the output variables. 
See <a href="#Averaging-vs_002e-Concatenating">Averaging vs. Concatenating</a>, for a description of the
distinctions between the various averagers and concatenators. 
<a name="index-multi_002dfile-operators-925"></a><a name="index-standard-input-926"></a><a name="index-_0040code_007bstdin_007d-927"></a>As a multi-file operator, <span class="command">ncra</span> will read the list of
<var>input-files</var> from <code>stdin</code> if they are not specified
as positional arguments on the command line
(see <a href="#Large-numbers-of-input-files">Large numbers of input files</a>).

   <p>Input files may vary in size, but each must have a record dimension. 
The record coordinate, if any, should be monotonic for (or else
non-fatal warnings may be generated). 
<a name="index-hyperslab-928"></a>Hyperslabs of the record dimension which include more than one file are
handled correctly. 
<a name="index-stride-929"></a><span class="command">ncra</span> supports the <var>stride</var> argument to the <span class="samp">-d</span>
hyperslab option for the record dimension only, <var>stride</var> is not
supported for non-record dimensions.

   <p><span class="command">ncra</span> weights each record (e.g., time slice) in the
<var>input-files</var> equally. 
<span class="command">ncra</span> does not attempt to see if, say, the <code>time</code>
coordinate is irregularly spaced and thus would require a weighted
average in order to be a true time average.

<p class="noindent">EXAMPLES

   <p>Average files <span class="file">85.nc</span>, <span class="file">86.nc</span>, <small class="dots">...</small>&nbsp;<span class="file">89.nc</span><!-- /@w -->
along the record dimension, and store the results in <span class="file">8589.nc</span>:
<a name="index-globbing-930"></a><a name="index-_0040code_007bNINTAP_007d-931"></a><a name="index-Processor-932"></a><a name="index-_0040acronym_007bCCM_007d-Processor-933"></a>
<pre class="example">     ncra 85.nc 86.nc 87.nc 88.nc 89.nc 8589.nc
     ncra 8[56789].nc 8589.nc
     ncra -n 5,2,1 85.nc 8589.nc
</pre>
   <p>These three methods produce identical answers. 
See <a href="#Specifying-input-files">Specifying input files</a>, for an explanation of the distinctions
between these methods.

   <p><a name="index-Fortran-934"></a>Assume the files <span class="file">85.nc</span>, <span class="file">86.nc</span>, <small class="dots">...</small>&nbsp;<span class="file">89.nc</span><!-- /@w -->
each contain a record coordinate <var>time</var> of length 12 defined such
that the third record in <span class="file">86.nc</span> contains data from March 1986,
etc. 
<acronym>NCO</acronym> knows how to hyperslab the record dimension across files. 
Thus, to average data from December, 1985 through February, 1986:
<pre class="example">     ncra -d time,11,13 85.nc 86.nc 87.nc 8512_8602.nc
     ncra -F -d time,12,14 85.nc 86.nc 87.nc 8512_8602.nc
</pre>
   <p class="noindent">The file <span class="file">87.nc</span> is superfluous, but does not cause an error. 
The <span class="samp">-F</span> turns on the Fortran (1-based) indexing convention. 
<a name="index-stride-935"></a>The following uses the <var>stride</var> option to average all the March
temperature data from multiple input files into a single output file
<pre class="example">     ncra -F -d time,3,,12 -v temperature 85.nc 86.nc 87.nc 858687_03.nc
</pre>
   <p>See <a href="#Stride">Stride</a>, for a description of the <var>stride</var> argument.

   <p>Assume the <var>time</var> coordinate is incrementally numbered such that
January, 1985&nbsp;=&nbsp;1<!-- /@w --> and December, 1989&nbsp;=&nbsp;60<!-- /@w -->. 
Assuming <span class="samp">??</span> only expands to the five desired files, the following
averages June, 1985&ndash;June, 1989:
<pre class="example">     ncra -d time,6.,54. ??.nc 8506_8906.nc
</pre>
   <p><a name="ncrcat"></a> <!-- http://nco.sf.net/nco.html#ncrcat --><div class="node">
<p><hr>
<a name="ncrcat-netCDF-Record-Concatenator"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ncra-netCDF-Record-Averager">ncra netCDF Record Averager</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Operator-Reference-Manual">Operator Reference Manual</a>
<br>
</div>

<h3 class="section">4.10 <span class="command">ncrcat</span> netCDF Record Concatenator</h3>

<p><a name="index-concatenation-936"></a><a name="index-record-concatenation-937"></a><a name="index-ncrcat-938"></a>
SYNTAX
<pre class="example">     ncrcat [-A] [-C] [-c] [-D <var>dbg</var>]
     [-d <var>dim</var>,[<var>min</var>][,[<var>max</var>]][,[<var>stride</var>]]] [-F] [-h] [-l <var>path</var>]
     [-n <var>loop</var>] [-O] [-o <var>output-file</var>] [-p <var>path</var>] [-R] [-r]
     [-v <var>var</var>[,...]] [-x] [<var>input-files</var>] [<var>output-file</var>]
</pre>
   <p class="noindent">DESCRIPTION

   <p><span class="command">ncrcat</span> concatenates record variables across an arbitrary
number of <var>input-files</var>. 
<a name="index-record-dimension-939"></a>The final record dimension is by default the sum of the lengths of the
record dimensions in the input files. 
See <a href="#Averaging-vs_002e-Concatenating">Averaging vs. Concatenating</a>, for a description of the
distinctions between the various averagers and concatenators. 
<a name="index-multi_002dfile-operators-940"></a><a name="index-standard-input-941"></a><a name="index-_0040code_007bstdin_007d-942"></a>As a multi-file operator, <span class="command">ncrcat</span> will read the list of
<var>input-files</var> from <code>stdin</code> if they are not specified
as positional arguments on the command line
(see <a href="#Large-numbers-of-input-files">Large numbers of input files</a>).

   <p>Input files may vary in size, but each must have a record dimension. 
The record coordinate, if any, should be monotonic (or else non-fatal
warnings may be generated). 
<a name="index-hyperslab-943"></a>Hyperslabs of the record dimension which include more than one file are
handled correctly. 
<a name="index-stride-944"></a><span class="command">ncra</span> supports the <var>stride</var> argument to the <span class="samp">-d</span>
hyperslab option for the record dimension only, <var>stride</var> is not
supported for non-record dimensions.

   <p><a name="index-ARM-conventions-945"></a><span class="command">ncrcat</span> applies special rules to <acronym>ARM</acronym> convention time
fields (e.g., <code>time_offset</code>). 
See <a href="#ARM-Conventions">ARM Conventions</a> for a complete description.

<p class="noindent">EXAMPLES

   <p>Concatenate files <span class="file">85.nc</span>, <span class="file">86.nc</span>, <small class="dots">...</small>&nbsp;<span class="file">89.nc</span><!-- /@w -->
along the record dimension, and store the results in <span class="file">8589.nc</span>:
<a name="index-globbing-946"></a><a name="index-_0040code_007bNINTAP_007d-947"></a><a name="index-Processor-948"></a><a name="index-_0040acronym_007bCCM_007d-Processor-949"></a>
<pre class="example">     ncrcat 85.nc 86.nc 87.nc 88.nc 89.nc 8589.nc
     ncrcat 8[56789].nc 8589.nc
     ncrcat -n 5,2,1 85.nc 8589.nc
</pre>
   <p class="noindent">These three methods produce identical answers. 
See <a href="#Specifying-input-files">Specifying input files</a>, for an explanation of the distinctions
between these methods.

   <p><a name="index-Fortran-950"></a>Assume the files <span class="file">85.nc</span>, <span class="file">86.nc</span>, <small class="dots">...</small>&nbsp;<span class="file">89.nc</span><!-- /@w -->
each contain a record coordinate <var>time</var> of length&nbsp;12<!-- /@w --> defined
such that the third record in <span class="file">86.nc</span> contains data from March
1986, etc. 
<acronym>NCO</acronym> knows how to hyperslab the record dimension across files. 
Thus, to concatenate data from December, 1985&ndash;February, 1986:
<pre class="example">     ncrcat -d time,11,13 85.nc 86.nc 87.nc 8512_8602.nc
     ncrcat -F -d time,12,14 85.nc 86.nc 87.nc 8512_8602.nc
</pre>
   <p class="noindent">The file <span class="file">87.nc</span> is superfluous, but does not cause an error. 
When <span class="command">ncra</span> and <span class="command">ncrcat</span> encounter a file which does
contain any records that meet the specified hyperslab criteria, they
disregard the file and proceed to the next file without failing. 
The <span class="samp">-F</span> turns on the Fortran (1-based) indexing convention. 
<a name="index-stride-951"></a>
The following uses the <var>stride</var> option to concatenate all the March
temperature data from multiple input files into a single output file
<pre class="example">     ncrcat -F -d time,3,,12 -v temperature 85.nc 86.nc 87.nc 858687_03.nc
</pre>
   <p>See <a href="#Stride">Stride</a>, for a description of the <var>stride</var> argument.

   <p>Assume the <var>time</var> coordinate is incrementally numbered such that
January, 1985&nbsp;=&nbsp;1<!-- /@w --> and December, 1989&nbsp;=&nbsp;60.<!-- /@w -->
Assuming <code>??</code> only expands to the five desired files, the following
concatenates June, 1985&ndash;June, 1989:
<pre class="example">     ncrcat -d time,6.,54. ??.nc 8506_8906.nc
</pre>
   <p><a name="ncrename"></a> <!-- http://nco.sf.net/nco.html#ncrename --><div class="node">
<p><hr>
<a name="ncrename-netCDF-Renamer"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ncrcat-netCDF-Record-Concatenator">ncrcat netCDF Record Concatenator</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Operator-Reference-Manual">Operator Reference Manual</a>
<br>
</div>

<h3 class="section">4.11 <span class="command">ncrename</span> netCDF Renamer</h3>

<p><a name="index-renaming-variables-952"></a><a name="index-renaming-dimensions-953"></a><a name="index-renaming-attributes-954"></a><a name="index-variable-names-955"></a><a name="index-dimension-names-956"></a><a name="index-attribute-names-957"></a><a name="index-ncrename-958"></a>
SYNTAX
<pre class="example">     ncrename [-a <var>old_name</var>,<var>new_name</var>] [-a ...] [-D <var>dbg</var>]
     [-d <var>old_name</var>,<var>new_name</var>] [-d ...] [-h] [-l <var>path</var>]
     [-O] [-o <var>output-file</var>] [-p <var>path</var>] [-R] [-r]
     [-v <var>old_name</var>,<var>new_name</var>] [-v ...]
     <var>input-file</var> [[<var>output-file</var>]]
</pre>
   <p class="noindent">DESCRIPTION

   <p><span class="command">ncrename</span> renames dimensions, variables, and attributes in a
netCDF file. 
Each object that has a name in the list of old names is renamed using
the corresponding name in the list of new names. 
All the new names must be unique. 
Every old name must exist in the input file, unless the old name is
preceded by the character <span class="samp">.</span>. 
The validity of <var>old_name</var> is not checked prior to the renaming. 
Thus, if <var>old_name</var> is specified without the the <span class="samp">.</span> prefix and
is not present in <var>input-file</var>, <span class="command">ncrename</span> will abort. 
The <var>new_name</var> should never be prefixed by a <span class="samp">.</span> (the period
will be included as part of the new name). 
The OPTIONS and EXAMPLES show how to select specific variables
whose attributes are to be renamed.

   <p><a name="index-data-safety-959"></a><a name="index-safeguards-960"></a><a name="index-temporary-output-files-961"></a><span class="command">ncrename</span> is the exception to the normal rules that the user will
be interactively prompted before an existing file is changed, and that a
temporary copy of an output file is constructed during the operation. 
If only <var>input-file</var> is specified, then <span class="command">ncrename</span> will change
the names of the <var>input-file</var> in place without prompting and without
creating a temporary copy of <code>input-file</code>. 
This is because the renaming operation is considered reversible if the
user makes a mistake. 
The <var>new_name</var> can easily be changed back to <var>old_name</var> by using
<span class="command">ncrename</span> one more time.

   <p>Note that renaming a dimension to the name of a dependent variable can
be used to invert the relationship between an independent coordinate
variable and a dependent variable. 
In this case, the named dependent variable must be one-dimensional and
should have no missing values. 
Such a variable will become a coordinate variable.

   <p><a name="index-performance-962"></a><a name="index-operator-speed-963"></a><a name="index-speed-964"></a><a name="index-execution-time-965"></a>According to the <cite>netCDF User's Guide</cite>, renaming properties in
netCDF files does not incur the penalty of recopying the entire file
when the <var>new_name</var> is shorter than the <var>old_name</var>.

<p class="noindent">OPTIONS

     <dl>
<dt><span class="samp">-a </span><var>old_name</var><span class="samp">,</span><var>new_name</var><dd>Attribute renaming. 
The old and new names of the attribute are specified with <span class="samp">-a</span>
(or <span class="samp">--attribute</span>) by the associated <var>old_name</var> and
<var>new_name</var> values. 
<a name="index-global-attributes-966"></a><a name="index-attributes_002c-global-967"></a>Global attributes are treated no differently than variable attributes. 
This option may be specified more than once. 
As mentioned above, all occurrences of the attribute of a given name
will be renamed unless the <span class="samp">.</span> form is used, with one exception. 
To change the attribute name for a particular variable, specify
the <var>old_name</var> in the format <var>old_var_name@old_att_name</var>. 
The <span class="samp">@</span> symbol serves to delimit the variable name from the
attribute name. 
If the attribute is uniquely named (no other variables contain the
attribute) then the <var>old_var_name@old_att_name</var> syntax is
redundant. 
The <var>var_name@att_name</var> syntax is accepted, but not required,
for the <var>new_name</var>.

     <br><dt><span class="samp">-d </span><var>old_name</var><span class="samp">,</span><var>new_name</var><dd>Dimension renaming. 
The old and new names of the dimension are specified with <span class="samp">-d</span>
(or <span class="samp">--dmn</span>, <span class="samp">--dimension</span>) by the associated <var>old_name</var>
and <var>new_name</var> values. 
This option may be specified more than once.

     <br><dt><span class="samp">-v </span><var>old_name</var><span class="samp">,</span><var>new_name</var><dd>Variable renaming. 
The old and new names of the variable are specified with <span class="samp">-v</span>
(or <span class="samp">--variable</span>) by the associated <var>old_name</var> and
<var>new_name</var> values. 
This option may be specified more than once. 
</dl>

<p class="noindent">EXAMPLES

   <p>Rename the variable <code>p</code> to <code>pressure</code> and <code>t</code> to
<code>temperature</code> in netCDF <span class="file">in.nc</span>. 
In this case <code>p</code> must exist in the input file (or
<span class="command">ncrename</span> will abort), but the presence of <code>t</code> is optional:
<pre class="example">     ncrename -v p,pressure -v .t,temperature in.nc
</pre>
   <p><a name="index-coordinate-variables-968"></a><span class="command">ncrename</span> does not automatically attach dimensions to variables of
the same name. 
If you want to rename a coordinate variable so that it remains a
coordinate variable, you must separately rename both the dimension and
the variable:
<pre class="example">     ncrename -d lon,longitude -v lon,longitude in.nc
</pre>
   <p><a name="index-global-attributes-969"></a><a name="index-attributes_002c-global-970"></a><a name="index-_0040code_007b_005fFillValue_007d-971"></a><a name="index-_0040code_007bmissing_005fvalue_007d-972"></a>Create netCDF <span class="file">out.nc</span> identical to <span class="file">in.nc</span> except the
attribute <code>_FillValue</code> is changed to <code>missing_value</code>
which possess it), the attribute <code>units</code> is renamed to
<code>CGS_units</code> (but only in those variables which possess it)
 and the global attribute <code>Zaire</code> is renamed to <code>Congo</code>:
<pre class="example">     ncrename -a _FillValue,missing_value -a .units,CGS_units \
     -a tpt@hieght,height -a prs_sfc@.hieght,height in.nc out.nc
</pre>
   <p>The presence and absence of the <span class="samp">.</span> and <span class="samp">@</span> features
cause this command to execute successfully only if a number of
conditions are met. 
All variables <em>must</em> have a <code>_FillValue</code> attribute <em>and</em>
<code>_FillValue</code> must also be a global attribute. 
The <code>units</code> attribute, on the other hand, will be renamed to
<code>CGS_units</code> wherever it is found but need not be present in
the file at all (either as a global or a variable attribute). 
The variable <code>tpt</code> must contain the <code>hieght</code> attribute. 
The variable <code>prs_sfc</code> need not exist, and need not contain the
<code>hieght</code> attribute.

   <p><a name="ncwa"></a> <!-- http://nco.sf.net/nco.html#ncwa --><div class="node">
<p><hr>
<a name="ncwa-netCDF-Weighted-Averager"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Operator-Reference-Manual">Operator Reference Manual</a>
<br>
</div>

<h3 class="section">4.12 <span class="command">ncwa</span> netCDF Weighted Averager</h3>

<p><a name="index-averaging-data-973"></a><a name="index-weighted-average-974"></a><a name="index-masked-average-975"></a><a name="index-broadcasting-variables-976"></a><a name="index-ncwa-977"></a>
SYNTAX
<pre class="example">     ncwa [-A] [-a <var>dim</var>[,...]] [-C] [-c] [-D <var>dbg</var>]
     [-d <var>dim</var>,[<var>min</var>][,[<var>max</var>]]] [-F] [-h] [-I] [-l <var>path</var>]
     [-M <var>mask_val</var>] [-m <var>mask_var</var>] [-N] [-n] [-O]
     [-o <var>output-file</var>] [-p <var>path</var>] [-R] [-r] [-T <var>condition</var>]
     [-t <var>thr_nbr</var>] [-v <var>var</var>[,...]] [-W] [-w <var>weight</var>] [-x] [-y <var>op_typ</var>]
     <var>input-file</var> [<var>output-file</var>]
</pre>
   <p class="noindent">DESCRIPTION

   <p><span class="command">ncwa</span> averages variables in a single file over arbitrary
dimensions, with options to specify weights, masks, and normalization. 
See <a href="#Averaging-vs_002e-Concatenating">Averaging vs. Concatenating</a>, for a description of the
distinctions between the various averagers and concatenators. 
The default behavior of <span class="command">ncwa</span> is to arithmetically average
every numerical variable over all dimensions and produce a scalar
result. 
To average variables over only a subset of their dimensions, specify
these dimensions in a comma-separated list following <span class="samp">-a</span>, e.g.,
<span class="samp">-a time,lat,lon</span>. 
<a name="index-arithmetic-operators-978"></a><a name="index-hyperslab-979"></a><a name="index-_0040code_007b_002dd-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-980"></a>As with all arithmetic operators, the operation may be restricted to
an arbitrary hypserslab by employing the <span class="samp">-d</span> option
(see <a href="#Hyperslabs">Hyperslabs</a>). 
<span class="command">ncwa</span> also handles values matching the variable's
<code>missing_value</code> attribute correctly. 
Moreover, <span class="command">ncwa</span> understands how to manipulate user-specified
weights, masks, and normalization options. 
With these options, <span class="command">ncwa</span> can compute sophisticated averages
(and integrals) from the command line.

   <p><a name="index-_0040code_007b_002dw-_0040var_007bweight_007d_007d-981"></a><a name="index-_0040code_007b_002d_002dweight-_0040var_007bweight_007d_007d-982"></a><a name="index-_0040code_007b_002d_002dwgt_005fvar-_0040var_007bweight_007d_007d-983"></a><a name="index-_0040code_007b_002dm-_0040var_007bmask_005fvar_007d_007d-984"></a><a name="index-_0040code_007b_002d_002dmask_002dvariable-_0040var_007bmask_005fvar_007d_007d-985"></a><a name="index-_0040code_007b_002d_002dmask_005fvariable-_0040var_007bmask_005fvar_007d_007d-986"></a><a name="index-_0040code_007b_002d_002dmsk_005fnm-_0040var_007bmask_005fvar_007d_007d-987"></a><a name="index-_0040code_007b_002d_002dmsk_005fvar-_0040var_007bmask_005fvar_007d_007d-988"></a><var>mask_var</var> and <var>weight</var>, if specified, are broadcast to conform
to the variables being averaged. 
<a name="index-rank-989"></a>The rank of variables is reduced by the number of dimensions which they
are averaged over. 
Thus arrays which are one dimensional in the <var>input-file</var> and are
averaged by <span class="command">ncwa</span> appear in the <var>output-file</var> as scalars. 
This allows the user to infer which dimensions may have been averaged. 
Note that that it is impossible for <span class="command">ncwa</span> to make make a
<var>weight</var> or <var>mask_var</var> of rank <var>W</var> conform to a <var>var</var> of
rank <var>V</var> if <var>W &gt; V</var>. 
This situation often arises when coordinate variables (which, by
definition, are one dimensional) are weighted and averaged. 
<span class="command">ncwa</span> assumes you know this is impossible and so <span class="command">ncwa</span>
does not attempt to broadcast <var>weight</var> or <var>mask_var</var> to conform
to <var>var</var> in this case, nor does <span class="command">ncwa</span> print a warning
message telling you this, because it is so common. 
Specifying <var>dbg &gt; 2</var> does cause <span class="command">ncwa</span> to emit warnings in
these situations, however.

   <p>Non-coordinate variables are always masked and weighted if specified. 
Coordinate variables, however, may be treated specially. 
By default, an averaged coordinate variable, e.g., <code>latitude</code>,
appears in <var>output-file</var> averaged the same way as any other variable
containing an averaged dimension. 
In other words, by default <span class="command">ncwa</span> weights and masks
coordinate variables like all other variables. 
This design decision was intended to be helpful but for some
applications it may be preferable not to weight or mask coordinate
variables just like all other variables. 
Consider the following arguments to <span class="command">ncwa</span>:
<code>-a latitude -w lat_wgt -d latitude,0.,90.</code> where <code>lat_wgt</code> is
a weight in the <code>latitude</code> dimension. 
Since, by default <span class="command">ncwa</span> weights coordinate variables, the
value of <code>latitude</code> in the <var>output-file</var> depends on the weights
in <var>lat_wgt</var> and is not likely to be&nbsp;45.0<!-- /@w -->, the midpoint latitude
of the hyperslab. 
<a name="index-coordinate-variable-990"></a><a name="index-_0040code_007b_002dI_007d-991"></a>Option <span class="samp">-I</span> overrides this default behavior and causes
<span class="command">ncwa</span> not to weight or mask coordinate variables
<a rel="footnote" href="#fn-37" name="fnd-37"><sup>37</sup></a>. 
In the above case, this causes the value of <code>latitude</code> in the
<var>output-file</var> to be&nbsp;45.0<!-- /@w -->, an appealing result. 
Thus, <span class="samp">-I</span> specifies simple arithmetic averages for the coordinate
variables. 
In the case of latitude, <span class="samp">-I</span> specifies that you prefer to archive
the central latitude of the hyperslab over which variables were averaged
rather than the area weighted centroid of the hyperslab
<a rel="footnote" href="#fn-38" name="fnd-38"><sup>38</sup></a>. 
The mathematical definition of operations involving rank reduction
is given above (see <a href="#Operation-Types">Operation Types</a>).

<ul class="menu">
<li><a accesskey="1" href="#Mask-condition">Mask condition</a>
<li><a accesskey="2" href="#Normalization">Normalization</a>
</ul>

   <p><a name="msk"></a> <!-- http://nco.sf.net/nco.html#msk --><div class="node">
<p><hr>
<a name="Mask-condition"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Normalization">Normalization</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a>
<br>
</div>

<h4 class="subsection">4.12.1 Mask condition</h4>

<p><a name="index-mask-condition-992"></a><a name="index-truth-condition-993"></a>
<a name="index-_0040code_007b_002d_002dop_005frlt-_0040var_007bcondition_007d_007d-994"></a><a name="index-_0040code_007b_002d_002dtruth_005fcondition-_0040var_007bcondition_007d_007d-995"></a><a name="index-_0040code_007b_002d_002dmsk_005fcmp_005ftyp-_0040var_007bcondition_007d_007d-996"></a>The mask condition has the syntax <var>mask_var</var>
<var>condition</var> <var>mask_val</var>. 
Here <var>mask_var</var> is the name of the masking variable (specified with
<span class="samp">-m</span>, <span class="samp">--mask-variable</span>, <span class="samp">--mask_variable</span>,
<span class="samp">--msk_nm</span>, or <span class="samp">--msk_var</span>). 
The truth <var>condition</var> argument (specified with <span class="samp">-T</span>,
<span class="samp">--truth_condition</span>, <span class="samp">--msk_cmp_typ</span>, or <span class="samp">--op_rlt</span> may
be any one of the six arithmetic comparatives: <kbd>eq</kbd>, <kbd>ne</kbd>,
<kbd>gt</kbd>, <kbd>lt</kbd>, <kbd>ge</kbd>, <kbd>le</kbd>.

<!-- texi2html does not like @math{} -->
<p>These are the Fortran-style character abbreviations for the logical
operations <kbd>==</kbd>, <kbd>!=</kbd>, <kbd>&gt;</kbd>, <kbd>&lt;</kbd>, <kbd>&gt;=</kbd>,

   <p>The mask condition defaults to <kbd>eq</kbd> (equality). 
<a name="index-_0040code_007b_002d_002dmask_002dvalue-_0040var_007bmask_005fval_007d_007d-997"></a><a name="index-_0040code_007b_002d_002dmask_005fvalue-_0040var_007bmask_005fval_007d_007d-998"></a><a name="index-_0040code_007b_002d_002dmsk_005fval-_0040var_007bmask_005fval_007d_007d-999"></a>The <var>mask_val</var> argument to <span class="samp">-M</span> (or <span class="samp">--mask-value</span>, or
<span class="samp">--msk_val</span>) is the right hand side of the
<dfn>mask condition</dfn>. 
Thus for the <var>i</var>'th element of the hyperslab to be averaged,
the mask condition is

<!-- texi2html does not like @math{} -->
<p><var>mask</var>(<var>i</var>) <var>condition</var> <var>mask_val</var>.

   <p><a name="nrm"></a> <!-- http://nco.sf.net/nco.html#nrm --><div class="node">
<p><hr>
<a name="Normalization"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#Mask-condition">Mask condition</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a>
<br>
</div>

<h4 class="subsection">4.12.2 Normalization</h4>

<p><a name="index-normalization-1000"></a><a name="index-_0040code_007b_002dN_007d-1001"></a><a name="index-_0040code_007bnumerator_007d-1002"></a><span class="command">ncwa</span> has one switch which controls the normalization of the
averages appearing in the <var>output-file</var>. 
Short option <span class="samp">-N</span> (or long options <span class="samp">--nmr</span> or
<span class="samp">--numerator</span>) prevents <span class="command">ncwa</span> from dividing the weighted
sum of the variable (the numerator in the averaging expression) by the
weighted sum of the weights (the denominator in the averaging
expression). 
Thus <span class="samp">-N</span> tells <span class="command">ncwa</span> to return just the numerator of the
arithmetic expression defining the operation (see <a href="#Operation-Types">Operation Types</a>).

<p class="noindent">EXAMPLES

   <p>Given file <span class="file">85_0112.nc</span>:
<pre class="example">     netcdf 85_0112 {
     dimensions:
             lat = 64 ;
             lev = 18 ;
             lon = 128 ;
             time = UNLIMITED ; // (12 currently)
     variables:
             float lat(lat) ;
             float lev(lev) ;
             float lon(lon) ;
             float time(time) ;
             float scalar_var ;
             float three_dmn_var(lat, lev, lon) ;
             float two_dmn_var(lat, lev) ;
             float mask(lat, lon) ;
             float gw(lat) ;
     }
</pre>
   <p>Average all variables in <span class="file">in.nc</span> over all dimensions and store
results in <span class="file">out.nc</span>:
<pre class="example">     ncwa in.nc out.nc
</pre>
   <p class="noindent">Every variable in <span class="file">in.nc</span> is reduced to a scalar in <span class="file">out.nc</span>
because, by default, averaging is performed over all dimensions.

   <p>Store the zonal (longitudinal) mean of <span class="file">in.nc</span> in <span class="file">out.nc</span>:
<pre class="example">     ncwa -a lon in.nc out.nc
</pre>
   <p class="noindent">Here the tally is simply the size of <code>lon</code>, or 128.

   <p><a name="index-_0040code_007bgw_007d-1003"></a><a name="index-Gaussian-weights-1004"></a><a name="index-climate-model-1005"></a>Compute the meridional (latitudinal) mean, with values weighted by
the corresponding element of <var>gw</var>
<a rel="footnote" href="#fn-39" name="fnd-39"><sup>39</sup></a>:
<pre class="example">     ncwa -w gw -a lat in.nc out.nc
</pre>
   <p class="noindent">Here the tally is simply the size of <code>lat</code>, or&nbsp;64.<!-- /@w -->
The sum of the Gaussian weights is&nbsp;2.0.<!-- /@w -->

   <p>Compute the area mean over the tropical Pacific:
<pre class="example">     ncwa -w gw -a lat,lon -d lat,-20.,20. -d lon,120.,270.
     in.nc out.nc
</pre>
   <p class="noindent">Here the tally is

   <p>64 times 128 = 8192.

   <p><a name="index-_0040code_007bORO_007d-1006"></a><a name="index-climate-model-1007"></a>Compute the area mean over the globe, but include only points for
which

   <p><var>ORO</var> &lt; 0.5

   <p><a rel="footnote" href="#fn-40" name="fnd-40"><sup>40</sup></a>:
<pre class="example">     ncwa -m ORO -M 0.5 -T lt -w gw -a lat,lon in.nc out.nc
</pre>
   <p class="noindent">Assuming 70% of the gridpoints are maritime, then here the tally is

   <p>0.70 times 8192 = 5734.

   <p>Compute the global annual mean over the maritime tropical Pacific:
<pre class="example">     ncwa -m ORO -M 0.5 -T lt -w gw -a lat,lon,time
     -d lat,-20.0,20.0 -d lon,120.0,270.0 in.nc out.nc
</pre>
   <p>Determine the total area of the maritime tropical Pacific, assuming
the variable <var>area</var> contains the area of each gridcell
<pre class="example">     ncwa -N -v area -m ORO -M 0.5 -T lt -a lat,lon
     -d lat,-20.0,20.0 -d lon,120.0,270.0 in.nc out.nc
</pre>
   <p>Weighting <var>area</var> (e.g., by <var>gw</var>) is not appropriate because
<var>area</var> is <em>already</em> area-weighted by definition. 
Thus the <span class="samp">-N</span> switch, or, equivalently, the <span class="samp">-y ttl</span> switch,
correctly integrate the cell areas into a total regional area.

   <p><a name="index-mask-condition-1008"></a><a name="index-truth-condition-1009"></a>Mask a file to contain <var>missing_value</var> everywhere except where
<var>thr_min</var> &lt;= <var>msk_var</var> &lt;= <var>thr_max</var>:
<pre class="example">     # Set masking variable and its scalar thresholds
     export msk_var='three_dmn_var_dbl' # Masking variable
     export thr_max='20' # Maximum allowed value
     export thr_min='10' # Minimum allowed value
     ncecat -O in.nc out.nc # Wrap out.nc in degenerate "record" dimension
     ncwa -O -a record -m ${msk_var} -T le -M ${thr_max} out.nc out.nc
     ncecat -O out.nc out.nc # Wrap out.nc in degenerate "record" dimension
     ncwa -O -a record -m ${msk_var} -T ge -M ${thr_min} out.nc out.nc
</pre>
   <p>After the first use of <span class="command">ncwa</span>, <span class="file">out.nc</span> contains
<var>missing_value</var> where <code>${msk_var} &gt;= ${thr_max}</code>. 
The process is then repeated on the remaining data to filter out
points where <code>${msk_var} &lt;= ${thr_min}</code>. 
The resulting <span class="file">out.nc</span> contains valid data only
where <var>thr_min</var> &lt;= <var>msk_var</var> &lt;= <var>thr_max</var>.

   <p><a name="ctr"></a> <!-- http://nco.sf.net/nco.html#ctr --><div class="node">
<p><hr>
<a name="Contributing"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#General-Index">General Index</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Operator-Reference-Manual">Operator Reference Manual</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
<br>
</div>

<h2 class="chapter">5 Contributing</h2>

<p><a name="index-contributing-1010"></a>We welcome contributions from anyone. 
The <acronym>NCO</acronym> project homepage at
<a href="https://sf.net/projects/nco">https://sf.net/projects/nco</a>
contains more information on how to contribute.

   <p><a name="index-PayPal-1011"></a>Financial contributions to <acronym>NCO</acronym> development may be made through
<a href="https://www.paypal.com/xclick/business=zender%40uci.edu&amp;item_name=NCO+development&amp;item_number=nco_dnt_dvl&amp;no_note=1&amp;tax=0&amp;currency_code=USD">PayPal</a>. 
<acronym>NCO</acronym> has been shared for almost 10&nbsp;years<!-- /@w --> yet no one has
ever contributed any money to the developers
<a rel="footnote" href="#fn-41" name="fnd-41"><sup>41</sup></a>. 
So you could be the first!

   <p><a name="dvl"></a> <!-- http://nco.sf.net/nco.html#dvl -->

<ul class="menu">
<li><a accesskey="1" href="#Contributors">Contributors</a>
<li><a accesskey="2" href="#Proposals-for-Institutional-Funding">Proposals for Institutional Funding</a>
</ul>

<div class="node">
<p><hr>
<a name="Contributors"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Proposals-for-Institutional-Funding">Proposals for Institutional Funding</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Contributing">Contributing</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Contributing">Contributing</a>
<br>
</div>

<h3 class="section">5.1 Contributors</h3>

<p><a name="index-contributors-1012"></a>The primary contributors to <acronym>NCO</acronym> development are:
     
<a name="index-Charlie-Zender-1013"></a>
<dl><dt>Charlie Zender<dd>Concept, design and implementation of <acronym>NCO</acronym> from 1995-2000. 
Since then mainly autotools, bug-squashing, documentation, packing,
<acronym>NCO</acronym> library redesign, <span class="command">ncap</span> features, <span class="command">ncbo</span>,
project coordination, and releases. 
<a name="index-Henry-Butowsky-1014"></a><br><dt>Henry Butowsky<dd>Non-linear operations and <code>min()</code>, <code>max()</code>, <code>total()</code>
support in <span class="command">ncra</span> and <span class="command">ncwa</span>. 
Type conversion for arithmetic. 
Migration to netCDF3 API. 
<a name="index-I_002fO-1015"></a><span class="command">ncap</span> parser, lexer, and&nbsp;I/O<!-- /@w -->. 
Multislabbing algorithm. 
Variable wildcarding. 
Various hacks. 
<a name="index-Rorik-Peterson-1016"></a><br><dt>Rorik Peterson<dd>Autotool build support. 
Long command-line options. 
UDUnits support. 
Debianization. 
Numerous bug-fixes. 
<a name="index-Brian-Mays-1017"></a><br><dt>Brian Mays<dd>Packaging for Debian GNU/Linux, <span class="command">nroff</span> man pages. 
<a name="index-George-Shapovalov-1018"></a><br><dt>George Shapovalov<dd>Packaging for Gentoo GNU/Linux. 
<a name="index-Bill-Kocik-1019"></a><br><dt>Bill Kocik<dd>Memory management. 
<a name="index-Len-Makin-1020"></a><br><dt>Len Makin<dd>NEC SX architecture support. 
<a name="index-Jim-Edwards-1021"></a><br><dt>Jim Edwards<dd>AIX architecture support. 
<a name="index-Juliana-Rew-1022"></a><br><dt>Juliana Rew<dd>Compatibility with large PIDs. 
<a name="index-Keith-Lindsay-1023"></a><a name="index-Martin-Dix-1024"></a><a name="index-Mike-Page-1025"></a><br><dt>Martin Dix, Keith Lindsay, Mike Page<dd>Excellent bug reports. 
</dl>

   <p><a name="prp"></a> <!-- http://nco.sf.net/nco.html#prp -->
<a name="prp_sei"></a> <!-- http://nco.sf.net/nco.html#prp_sei -->
<a name="fnd"></a> <!-- http://nco.sf.net/nco.html#fnd -->

<ul class="menu">
<li><a accesskey="1" href="#Proposals-for-Institutional-Funding">Proposals for Institutional Funding</a>
</ul>

<div class="node">
<p><hr>
<a name="Proposals-for-Institutional-Funding"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#Contributors">Contributors</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Contributing">Contributing</a>
<br>
</div>

<h3 class="section">5.2 Proposals for Institutional Funding</h3>

<p><a name="index-funding-1026"></a><a name="index-proposals-1027"></a><a name="index-_0040acronym_007bNSF_007d-1028"></a><a name="index-server_002dside-processing-1029"></a><a name="index-Distributed-Data-Reduction-_0026-Analysis-1030"></a><a name="index-Scientific-Data-Operators-1031"></a><a name="index-_0040acronym_007bDDRA_007d-1032"></a><a name="index-Server_002dSide-Distributed-Data-Reduction-_0026-Analysis-1033"></a><a name="index-_0040acronym_007bSSDDRA_007d-1034"></a><a name="index-_0040acronym_007bCCSM_007d-1035"></a><a name="index-_0040acronym_007bIPCC_007d-1036"></a><a name="index-_0040acronym_007bNSF_007d-1037"></a><a name="index-_0040acronym_007bSDO_007d-1038"></a><a name="index-_0040acronym_007bSEIII_007d-1039"></a><a name="index-OptIPuter-1040"></a><acronym>NSF</acronym> has funded a
<a href="http://nco.sf.net#prp_sei">project</a>
to improve Distributed Data Reduction &amp; Analysis (<acronym>DDRA</acronym>) by
evolving <acronym>NCO</acronym> into a suite of Scientific Data Operators called
<acronym>SDO</acronym>. 
<a name="index-parallelism-1041"></a>The two main components of this project are <acronym>NCO</acronym> parallelism
(OpenMP, <acronym>MPI</acronym>) and Server-Side <acronym>DDRA</acronym>
(<acronym>SSDDRA</acronym>) implemented through extensions to <acronym>OPeNDAP</acronym>
and netCDF4. 
This project will dramatically reduce bandwidth usage for <acronym>NCO</acronym>
<acronym>DDRA</acronym>.

   <p><a name="index-_0040acronym_007bNASA_007d-1042"></a><a name="index-_0040acronym_007bNRA_007d-1043"></a><a name="index-_0040acronym_007bHDF_007d-1044"></a>With this first <acronym>NCO</acronym> proposal funded, the content of the
next <acronym>NCO</acronym> proposal is clear. 
We are interested in obtaining <acronym>NASA</acronym> support for
<acronym>HDF</acronym>-specific enhancements to <acronym>NCO</acronym>. 
We plan to submit a proposal to the next suitable <acronym>NASA</acronym>
<acronym>NRA</acronym> or <acronym>NSF</acronym> opportunity.

   <p>We are considering a lot of interesting ideas for still more proposals. 
Please contact us if you wish to be involved with any future
<acronym>NCO</acronym>-related proposals. 
Comments on the proposals and letters of support are also very welcome.

<!-- @ignore -->
<!-- @node CCSM Example, General Index, Operators, Top -->
<!-- @chapter Example: Analyzing a @acronym{CCSM} run -->
<!-- This chapter presents an in depth example of using @acronym{NCO} to -->
<!-- analyze the results of a @acronym{CCSM} run. -->
<!-- @end ignore -->
<!-- @node Name Index, General Index, Operators, Top -->
<!-- @unnumbered Function and Variable Index -->
<!-- @printindex fn -->
<p><a name="index"></a> <!-- http://nco.sf.net/nco.html#index -->
<a name="idx"></a> <!-- http://nco.sf.net/nco.html#idx --><div class="node">
<p><hr>
<a name="General-Index"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#Contributing">Contributing</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
<br>
</div>

<h2 class="unnumbered">General Index</h2>

<ul class="index-cp" compact>
<li><a href="#index-_0040code_007b_0022_007d-_0028double-quote_0029-717"><code>&quot;</code> (double quote)</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040code_007b_0023include_007d-567"><code>#include</code></a>: <a href="#Syntax-of-ncap-statements">Syntax of ncap statements</a></li>
<li><a href="#index-_0040code_007b_0024_007d-_0028wildcard-character_0029-371"><code>$</code> (wildcard character)</a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-_0040code_007b_0025_007d-_0028modulus_0029-598"><code>%</code> (modulus)</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007b_0027_007d-_0028end-quote_0029-716"><code>'</code> (end quote)</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040code_007b_002a_007d-751"><code>*</code></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-_0040code_007b_002a_007d-_0028filename-expansion_0029-374"><code>*</code> (filename expansion)</a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-_0040code_007b_002a_007d-_0028multiplication_0029-595"><code>*</code> (multiplication)</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007b_002a_007d-_0028wildcard-character_0029-376"><code>*</code> (wildcard character)</a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-_0040code_007b_002b_007d-749"><code>+</code></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-_0040code_007b_002b_007d-_0028addition_0029-593"><code>+</code> (addition)</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007b_002b_007d-_0028wildcard-character_0029-377"><code>+</code> (wildcard character)</a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-_0040code_007b_002d_007d-750"><code>-</code></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-_0040code_007b_002d_007d-_0028subtraction_0029-594"><code>-</code> (subtraction)</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007b_002d_002dabc_007d-824"><code>--abc</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002d_002dalphabetize_007d-825"><code>--alphabetize</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002d_002dapn_007d-499"><code>--apn</code></a>: <a href="#Suppressing-interactive-prompts">Suppressing interactive prompts</a></li>
<li><a href="#index-_0040code_007b_002d_002dapn_007d-148"><code>--apn</code></a>: <a href="#Output-files">Output files</a></li>
<li><a href="#index-_0040code_007b_002d_002dappend_007d-500"><code>--append</code></a>: <a href="#Suppressing-interactive-prompts">Suppressing interactive prompts</a></li>
<li><a href="#index-_0040code_007b_002d_002dappend_007d-149"><code>--append</code></a>: <a href="#Output-files">Output files</a></li>
<li><a href="#index-_0040code_007b_002d_002dbinary_007d-829"><code>--binary</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002d_002dbnr_007d-828"><code>--bnr</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002d_002dcoords_007d-388"><code>--coords</code></a>: <a href="#Coordinate-variables">Coordinate variables</a></li>
<li><a href="#index-_0040code_007b_002d_002dcrd_007d-389"><code>--crd</code></a>: <a href="#Coordinate-variables">Coordinate variables</a></li>
<li><a href="#index-_0040code_007b_002d_002ddbg_005flvl-_0040var_007bdebug_002dlevel_007d_007d-275"><code>--dbg_lvl </code><var>debug-level</var></a>: <a href="#Command-line-options">Command line options</a></li>
<li><a href="#index-_0040code_007b_002d_002ddbg_005flvl-_0040var_007bdebug_002dlevel_007d_007d-208"><code>--dbg_lvl </code><var>debug-level</var></a>: <a href="#Large-Datasets-and-Memory">Large Datasets and Memory</a></li>
<li><a href="#index-_0040code_007b_002d_002ddbg_005flvl-_0040var_007bdebug_002dlevel_007d_007d-117"><code>--dbg_lvl </code><var>debug-level</var></a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-_0040code_007b_002d_002ddebug_002dlevel-_0040var_007bdebug_002dlevel_007d_007d-207"><code>--debug-level </code><var>debug-level</var></a>: <a href="#Large-Datasets-and-Memory">Large Datasets and Memory</a></li>
<li><a href="#index-_0040code_007b_002d_002ddebug_002dlevel-_0040var_007bdebug_002dlevel_007d_007d-116"><code>--debug-level </code><var>debug-level</var></a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-_0040code_007b_002d_002ddimension-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_002c_005b_0040var_007bmax_007d_005d_002c_0040var_007bstride_007d_007d-439"><code>--dimension </code><var>dim</var><code>,[</code><var>min</var><code>],[</code><var>max</var><code>],</code><var>stride</var></a>: <a href="#Stride">Stride</a></li>
<li><a href="#index-_0040code_007b_002d_002ddimension-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-435"><code>--dimension </code><var>dim</var><code>,[</code><var>min</var><code>][,[</code><var>max</var><code>]]</code></a>: <a href="#Wrapped-coordinates">Wrapped coordinates</a></li>
<li><a href="#index-_0040code_007b_002d_002ddimension-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-418"><code>--dimension </code><var>dim</var><code>,[</code><var>min</var><code>][,[</code><var>max</var><code>]]</code></a>: <a href="#UDUnits-Support">UDUnits Support</a></li>
<li><a href="#index-_0040code_007b_002d_002ddimension-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-410"><code>--dimension </code><var>dim</var><code>,[</code><var>min</var><code>][,[</code><var>max</var><code>]]</code></a>: <a href="#Multislabs">Multislabs</a></li>
<li><a href="#index-_0040code_007b_002d_002ddimension-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-403"><code>--dimension </code><var>dim</var><code>,[</code><var>min</var><code>][,[</code><var>max</var><code>]]</code></a>: <a href="#Hyperslabs">Hyperslabs</a></li>
<li><a href="#index-_0040code_007b_002d_002ddmn-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_002c_005b_0040var_007bmax_007d_005d_002c_0040var_007bstride_007d_007d-440"><code>--dmn </code><var>dim</var><code>,[</code><var>min</var><code>],[</code><var>max</var><code>],</code><var>stride</var></a>: <a href="#Stride">Stride</a></li>
<li><a href="#index-_0040code_007b_002d_002ddmn-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-436"><code>--dmn </code><var>dim</var><code>,[</code><var>min</var><code>][,[</code><var>max</var><code>]]</code></a>: <a href="#Wrapped-coordinates">Wrapped coordinates</a></li>
<li><a href="#index-_0040code_007b_002d_002ddmn-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-419"><code>--dmn </code><var>dim</var><code>,[</code><var>min</var><code>][,[</code><var>max</var><code>]]</code></a>: <a href="#UDUnits-Support">UDUnits Support</a></li>
<li><a href="#index-_0040code_007b_002d_002ddmn-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-411"><code>--dmn </code><var>dim</var><code>,[</code><var>min</var><code>][,[</code><var>max</var><code>]]</code></a>: <a href="#Multislabs">Multislabs</a></li>
<li><a href="#index-_0040code_007b_002d_002ddmn-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-404"><code>--dmn </code><var>dim</var><code>,[</code><var>min</var><code>][,[</code><var>max</var><code>]]</code></a>: <a href="#Hyperslabs">Hyperslabs</a></li>
<li><a href="#index-_0040code_007b_002d_002dexclude_007d-359"><code>--exclude</code></a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-_0040code_007b_002d_002dfile_005flist_007d-516"><code>--file_list</code></a>: <a href="#Input-file-list-attributes">Input file list attributes</a></li>
<li><a href="#index-_0040code_007b_002d_002dfl_005fbnr_007d-831"><code>--fl_bnr</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002d_002dfl_005flst_005fin_007d-515"><code>--fl_lst_in</code></a>: <a href="#Input-file-list-attributes">Input file list attributes</a></li>
<li><a href="#index-_0040code_007b_002d_002dfl_005fout-_0040var_007bfl_005fout_007d_007d-300"><code>--fl_out </code><var>fl_out</var></a>: <a href="#Specifying-output-files">Specifying output files</a></li>
<li><a href="#index-_0040code_007b_002d_002dfl_005fspt_007d-545"><code>--fl_spt</code></a>: <a href="#ncap-netCDF-Arithmetic-Processor">ncap netCDF Arithmetic Processor</a></li>
<li><a href="#index-_0040code_007b_002d_002dfmt_007d-850"><code>--fmt</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002d_002dfnc_005ftbl_007d-667"><code>--fnc_tbl</code></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007b_002d_002dformat_007d-851"><code>--format</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002d_002dfortran_007d-394"><code>--fortran</code></a>: <a href="#Fortran-indexing">Fortran indexing</a></li>
<li><a href="#index-_0040code_007b_002d_002dhistory_007d-507"><code>--history</code></a>: <a href="#History-attribute">History attribute</a></li>
<li><a href="#index-_0040code_007b_002d_002dhst_007d-506"><code>--hst</code></a>: <a href="#History-attribute">History attribute</a></li>
<li><a href="#index-_0040code_007b_002d_002dlcl-_0040var_007boutput_002dpath_007d_007d-319"><code>--lcl </code><var>output-path</var></a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-_0040code_007b_002d_002dlocal-_0040var_007boutput_002dpath_007d_007d-320"><code>--local </code><var>output-path</var></a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-_0040code_007b_002d_002dmap-_0040var_007bpck_005fmap_007d_007d-893"><code>--map </code><var>pck_map</var></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040code_007b_002d_002dmask_002dvalue-_0040var_007bmask_005fval_007d_007d-997"><code>--mask-value </code><var>mask_val</var></a>: <a href="#Mask-condition">Mask condition</a></li>
<li><a href="#index-_0040code_007b_002d_002dmask_002dvariable-_0040var_007bmask_005fvar_007d_007d-985"><code>--mask-variable </code><var>mask_var</var></a>: <a href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a></li>
<li><a href="#index-_0040code_007b_002d_002dmask_005fvalue-_0040var_007bmask_005fval_007d_007d-998"><code>--mask_value </code><var>mask_val</var></a>: <a href="#Mask-condition">Mask condition</a></li>
<li><a href="#index-_0040code_007b_002d_002dmask_005fvariable-_0040var_007bmask_005fvar_007d_007d-986"><code>--mask_variable </code><var>mask_var</var></a>: <a href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a></li>
<li><a href="#index-_0040code_007b_002d_002dmetadata_007d-843"><code>--metadata</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002d_002dMetadata_007d-838"><code>--Metadata</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002d_002dmsk_005fcmp_005ftyp-_0040var_007bcondition_007d_007d-996"><code>--msk_cmp_typ </code><var>condition</var></a>: <a href="#Mask-condition">Mask condition</a></li>
<li><a href="#index-_0040code_007b_002d_002dmsk_005fnm-_0040var_007bmask_005fvar_007d_007d-987"><code>--msk_nm </code><var>mask_var</var></a>: <a href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a></li>
<li><a href="#index-_0040code_007b_002d_002dmsk_005fval-_0040var_007bmask_005fval_007d_007d-999"><code>--msk_val </code><var>mask_val</var></a>: <a href="#Mask-condition">Mask condition</a></li>
<li><a href="#index-_0040code_007b_002d_002dmsk_005fvar-_0040var_007bmask_005fvar_007d_007d-988"><code>--msk_var </code><var>mask_var</var></a>: <a href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a></li>
<li><a href="#index-_0040code_007b_002d_002dmtd_007d-842"><code>--mtd</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002d_002dMtd_007d-837"><code>--Mtd</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002d_002dnintap-_0040var_007bloop_007d_007d-284"><code>--nintap </code><var>loop</var></a>: <a href="#Specifying-input-files">Specifying input files</a></li>
<li><a href="#index-_0040code_007b_002d_002dno_002dcoords_007d-386"><code>--no-coords</code></a>: <a href="#Coordinate-variables">Coordinate variables</a></li>
<li><a href="#index-_0040code_007b_002d_002dno_002dcrd_007d-387"><code>--no-crd</code></a>: <a href="#Coordinate-variables">Coordinate variables</a></li>
<li><a href="#index-_0040code_007b_002d_002domp_005fnum_005fthreads-_0040var_007bthr_005fnbr_007d_007d-251"><code>--omp_num_threads </code><var>thr_nbr</var></a>: <a href="#OpenMP-threading">OpenMP threading</a></li>
<li><a href="#index-_0040code_007b_002d_002dop_005frlt-_0040var_007bcondition_007d_007d-994"><code>--op_rlt </code><var>condition</var></a>: <a href="#Mask-condition">Mask condition</a></li>
<li><a href="#index-_0040code_007b_002d_002dop_005ftyp-_0040var_007bop_005ftyp_007d_007d-755"><code>--op_typ </code><var>op_typ</var></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-_0040code_007b_002d_002dop_005ftyp-_0040var_007bop_005ftyp_007d_007d-480"><code>--op_typ </code><var>op_typ</var></a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-_0040code_007b_002d_002doperation-_0040var_007bop_005ftyp_007d_007d-754"><code>--operation </code><var>op_typ</var></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-_0040code_007b_002d_002doperation-_0040var_007bop_005ftyp_007d_007d-479"><code>--operation </code><var>op_typ</var></a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-_0040code_007b_002d_002doutput-_0040var_007bfl_005fout_007d_007d-299"><code>--output </code><var>fl_out</var></a>: <a href="#Specifying-output-files">Specifying output files</a></li>
<li><a href="#index-_0040code_007b_002d_002doverwrite_007d-497"><code>--overwrite</code></a>: <a href="#Suppressing-interactive-prompts">Suppressing interactive prompts</a></li>
<li><a href="#index-_0040code_007b_002d_002doverwrite_007d-151"><code>--overwrite</code></a>: <a href="#Output-files">Output files</a></li>
<li><a href="#index-_0040code_007b_002d_002dovr_007d-498"><code>--ovr</code></a>: <a href="#Suppressing-interactive-prompts">Suppressing interactive prompts</a></li>
<li><a href="#index-_0040code_007b_002d_002dovr_007d-150"><code>--ovr</code></a>: <a href="#Output-files">Output files</a></li>
<li><a href="#index-_0040code_007b_002d_002dpack_005fpolicy-_0040var_007bpck_005fplc_007d_007d-882"><code>--pack_policy </code><var>pck_plc</var></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040code_007b_002d_002dpath-_0040var_007binput_002dpath_007d_007d-318"><code>--path </code><var>input-path</var></a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-_0040code_007b_002d_002dpath-_0040var_007binput_002dpath_007d_007d-287"><code>--path </code><var>input-path</var></a>: <a href="#Specifying-input-files">Specifying input files</a></li>
<li><a href="#index-_0040code_007b_002d_002dpck_005fmap-_0040var_007bpck_005fmap_007d_007d-892"><code>--pck_map </code><var>pck_map</var></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040code_007b_002d_002dpck_005fplc-_0040var_007bpck_005fplc_007d_007d-881"><code>--pck_plc </code><var>pck_plc</var></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040code_007b_002d_002dprint_007d-834"><code>--print</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002d_002dprn_007d-835"><code>--prn</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002d_002dprn_005ffnc_005ftbl_007d-666"><code>--prn_fnc_tbl</code></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007b_002d_002dpth-_0040var_007binput_002dpath_007d_007d-317"><code>--pth </code><var>input-path</var></a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-_0040code_007b_002d_002dpth-_0040var_007binput_002dpath_007d_007d-286"><code>--pth </code><var>input-path</var></a>: <a href="#Specifying-input-files">Specifying input files</a></li>
<li><a href="#index-_0040code_007b_002d_002dquiet_007d-846"><code>--quiet</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002d_002dretain_007d-349"><code>--retain</code></a>: <a href="#File-retention">File retention</a></li>
<li><a href="#index-_0040code_007b_002d_002drevision_007d-535"><code>--revision</code></a>: <a href="#Operator-version">Operator version</a></li>
<li><a href="#index-_0040code_007b_002d_002drevision_007d-112"><code>--revision</code></a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-_0040code_007b_002d_002drtn_007d-348"><code>--rtn</code></a>: <a href="#File-retention">File retention</a></li>
<li><a href="#index-_0040code_007b_002d_002dscript_007d-546"><code>--script</code></a>: <a href="#ncap-netCDF-Arithmetic-Processor">ncap netCDF Arithmetic Processor</a></li>
<li><a href="#index-_0040code_007b_002d_002dscript_002dfile_007d-544"><code>--script-file</code></a>: <a href="#ncap-netCDF-Arithmetic-Processor">ncap netCDF Arithmetic Processor</a></li>
<li><a href="#index-_0040code_007b_002d_002dspt_007d-547"><code>--spt</code></a>: <a href="#ncap-netCDF-Arithmetic-Processor">ncap netCDF Arithmetic Processor</a></li>
<li><a href="#index-_0040code_007b_002d_002dstring_007d-849"><code>--string</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002d_002dthr_005fnbr-_0040var_007bthr_005fnbr_007d_007d-249"><code>--thr_nbr </code><var>thr_nbr</var></a>: <a href="#OpenMP-threading">OpenMP threading</a></li>
<li><a href="#index-_0040code_007b_002d_002dthreads-_0040var_007bthr_005fnbr_007d_007d-250"><code>--threads </code><var>thr_nbr</var></a>: <a href="#OpenMP-threading">OpenMP threading</a></li>
<li><a href="#index-_0040code_007b_002d_002dtruth_005fcondition-_0040var_007bcondition_007d_007d-995"><code>--truth_condition </code><var>condition</var></a>: <a href="#Mask-condition">Mask condition</a></li>
<li><a href="#index-_0040code_007b_002d_002dunits_007d-855"><code>--units</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002d_002dunpack_007d-885"><code>--unpack</code></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040code_007b_002d_002dupk_007d-884"><code>--upk</code></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040code_007b_002d_002dvariable-_0040var_007bvar_007d_007d-357"><code>--variable </code><var>var</var></a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-_0040code_007b_002d_002dversion_007d-536"><code>--version</code></a>: <a href="#Operator-version">Operator version</a></li>
<li><a href="#index-_0040code_007b_002d_002dversion_007d-113"><code>--version</code></a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-_0040code_007b_002d_002dvrs_007d-537"><code>--vrs</code></a>: <a href="#Operator-version">Operator version</a></li>
<li><a href="#index-_0040code_007b_002d_002dvrs_007d-114"><code>--vrs</code></a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-_0040code_007b_002d_002dweight-_0040var_007bweight_007d_007d-982"><code>--weight </code><var>weight</var></a>: <a href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a></li>
<li><a href="#index-_0040code_007b_002d_002dweight-_0040var_007bwgt1_007d_005b_002c_0040var_007bwgt2_007d_005d_007d-801"><code>--weight </code><var>wgt1</var><code>[,</code><var>wgt2</var><code>]</code></a>: <a href="#ncflint-netCDF-File-Interpolator">ncflint netCDF File Interpolator</a></li>
<li><a href="#index-_0040code_007b_002d_002dwgt_005fvar-_0040var_007bweight_007d_007d-983"><code>--wgt_var </code><var>weight</var></a>: <a href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a></li>
<li><a href="#index-_0040code_007b_002d_002dwgt_005fvar-_0040var_007bwgt1_007d_005b_002c_0040var_007bwgt2_007d_005d_007d-802"><code>--wgt_var </code><var>wgt1</var><code>[,</code><var>wgt2</var><code>]</code></a>: <a href="#ncflint-netCDF-File-Interpolator">ncflint netCDF File Interpolator</a></li>
<li><a href="#index-_0040code_007b_002d_002dxcl_007d-360"><code>--xcl</code></a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-_0040samp_007b_002dA_007d-914"><span class="samp">-A</span></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040code_007b_002da_007d-823"><code>-a</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002dA_007d-496"><code>-A</code></a>: <a href="#Suppressing-interactive-prompts">Suppressing interactive prompts</a></li>
<li><a href="#index-_0040code_007b_002dA_007d-146"><code>-A</code></a>: <a href="#Output-files">Output files</a></li>
<li><a href="#index-_0040code_007b_002db_007d-830"><code>-b</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002dB_007d-827"><code>-B</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002dC_007d-682"><code>-C</code></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007b_002dc_007d-385"><code>-c</code></a>: <a href="#Coordinate-variables">Coordinate variables</a></li>
<li><a href="#index-_0040code_007b_002dC_007d-384"><code>-C</code></a>: <a href="#Coordinate-variables">Coordinate variables</a></li>
<li><a href="#index-_0040code_007b_002dD_007d-110"><code>-D</code></a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-_0040code_007b_002dD-_0040var_007bdebug_002dlevel_007d_007d-274"><code>-D </code><var>debug-level</var></a>: <a href="#Command-line-options">Command line options</a></li>
<li><a href="#index-_0040code_007b_002dD-_0040var_007bdebug_002dlevel_007d_007d-206"><code>-D </code><var>debug-level</var></a>: <a href="#Large-Datasets-and-Memory">Large Datasets and Memory</a></li>
<li><a href="#index-_0040code_007b_002dD-_0040var_007bdebug_002dlevel_007d_007d-115"><code>-D </code><var>debug-level</var></a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-_0040code_007b_002dd-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_002c_005b_0040var_007bmax_007d_005d_002c_0040var_007bstride_007d_007d-438"><code>-d </code><var>dim</var><code>,[</code><var>min</var><code>],[</code><var>max</var><code>],</code><var>stride</var></a>: <a href="#Stride">Stride</a></li>
<li><a href="#index-_0040code_007b_002dd-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-980"><code>-d </code><var>dim</var><code>,[</code><var>min</var><code>][,[</code><var>max</var><code>]]</code></a>: <a href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a></li>
<li><a href="#index-_0040code_007b_002dd-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-434"><code>-d </code><var>dim</var><code>,[</code><var>min</var><code>][,[</code><var>max</var><code>]]</code></a>: <a href="#Wrapped-coordinates">Wrapped coordinates</a></li>
<li><a href="#index-_0040code_007b_002dd-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-417"><code>-d </code><var>dim</var><code>,[</code><var>min</var><code>][,[</code><var>max</var><code>]]</code></a>: <a href="#UDUnits-Support">UDUnits Support</a></li>
<li><a href="#index-_0040code_007b_002dd-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-409"><code>-d </code><var>dim</var><code>,[</code><var>min</var><code>][,[</code><var>max</var><code>]]</code></a>: <a href="#Multislabs">Multislabs</a></li>
<li><a href="#index-_0040code_007b_002dd-_0040var_007bdim_007d_002c_005b_0040var_007bmin_007d_005d_005b_002c_005b_0040var_007bmax_007d_005d_005d_007d-402"><code>-d </code><var>dim</var><code>,[</code><var>min</var><code>][,[</code><var>max</var><code>]]</code></a>: <a href="#Hyperslabs">Hyperslabs</a></li>
<li><a href="#index-_0040code_007b_002df_007d-665"><code>-f</code></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007b_002dF_007d-393"><code>-F</code></a>: <a href="#Fortran-indexing">Fortran indexing</a></li>
<li><a href="#index-_0040code_007b_002dH_007d-833"><code>-H</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002dh_007d-688"><code>-h</code></a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040code_007b_002dH_007d-514"><code>-H</code></a>: <a href="#Input-file-list-attributes">Input file list attributes</a></li>
<li><a href="#index-_0040code_007b_002dh_007d-505"><code>-h</code></a>: <a href="#History-attribute">History attribute</a></li>
<li><a href="#index-_0040code_007b_002dI_007d-991"><code>-I</code></a>: <a href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a></li>
<li><a href="#index-_0040code_007b_002dl-_0040var_007boutput_002dpath_007d_007d-321"><code>-l </code><var>output-path</var></a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-_0040code_007b_002dm_007d-841"><code>-m</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002dM_007d-836"><code>-M</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002dm-_0040var_007bmask_005fvar_007d_007d-984"><code>-m </code><var>mask_var</var></a>: <a href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a></li>
<li><a href="#index-_0040code_007b_002dM-_0040var_007bpck_005fmap_007d_007d-891"><code>-M </code><var>pck_map</var></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040code_007b_002dN_007d-1001"><code>-N</code></a>: <a href="#Normalization">Normalization</a></li>
<li><a href="#index-_0040code_007b_002dn-_0040var_007bloop_007d_007d-283"><code>-n </code><var>loop</var></a>: <a href="#Specifying-input-files">Specifying input files</a></li>
<li><a href="#index-_0040code_007b_002dn-_0040var_007bloop_007d_007d-171"><code>-n </code><var>loop</var></a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-_0040code_007b_002dO_007d-495"><code>-O</code></a>: <a href="#Suppressing-interactive-prompts">Suppressing interactive prompts</a></li>
<li><a href="#index-_0040code_007b_002dO_007d-147"><code>-O</code></a>: <a href="#Output-files">Output files</a></li>
<li><a href="#index-_0040code_007b_002do-_0040var_007bfl_005fout_007d_007d-298"><code>-o </code><var>fl_out</var></a>: <a href="#Specifying-output-files">Specifying output files</a></li>
<li><a href="#index-_0040code_007b_002do-_0040var_007bfl_005fout_007d_007d-189"><code>-o </code><var>fl_out</var></a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-_0040code_007b_002dp-_0040var_007binput_002dpath_007d_007d-325"><code>-p </code><var>input-path</var></a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-_0040code_007b_002dp-_0040var_007binput_002dpath_007d_007d-285"><code>-p </code><var>input-path</var></a>: <a href="#Specifying-input-files">Specifying input files</a></li>
<li><a href="#index-_0040code_007b_002dP-_0040var_007bpck_005fplc_007d_007d-880"><code>-P </code><var>pck_plc</var></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040code_007b_002dq_007d-845"><code>-q</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002dr_007d-534"><code>-r</code></a>: <a href="#Operator-version">Operator version</a></li>
<li><a href="#index-_0040code_007b_002dR_007d-347"><code>-R</code></a>: <a href="#File-retention">File retention</a></li>
<li><a href="#index-_0040code_007b_002dr_007d-109"><code>-r</code></a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-_0040code_007b_002ds_007d-848"><code>-s</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_002dt-_0040var_007bthr_005fnbr_007d_007d-252"><code>-t </code><var>thr_nbr</var></a>: <a href="#OpenMP-threading">OpenMP threading</a></li>
<li><a href="#index-_0040code_007b_002dU_007d-883"><code>-U</code></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040code_007b_002du_007d-854"><code>-u</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040samp_007b_002dv_007d-915"><span class="samp">-v</span></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040code_007b_002dv-_0040var_007bvar_007d_007d-356"><code>-v </code><var>var</var></a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-_0040code_007b_002dw-_0040var_007bweight_007d_007d-981"><code>-w </code><var>weight</var></a>: <a href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a></li>
<li><a href="#index-_0040code_007b_002dw-_0040var_007bwgt1_007d_005b_002c_0040var_007bwgt2_007d_005d_007d-800"><code>-w </code><var>wgt1</var><code>[,</code><var>wgt2</var><code>]</code></a>: <a href="#ncflint-netCDF-File-Interpolator">ncflint netCDF File Interpolator</a></li>
<li><a href="#index-_0040code_007b_002dx_007d-358"><code>-x</code></a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-_0040code_007b_002dy-_0040var_007bop_005ftyp_007d_007d-753"><code>-y </code><var>op_typ</var></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-_0040code_007b_002dy-_0040var_007bop_005ftyp_007d_007d-478"><code>-y </code><var>op_typ</var></a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-_0040code_007b_002e_007d-_0028wildcard-character_0029-370"><code>.</code> (wildcard character)</a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-_0040file_007b_002erhosts_007d-308"><span class="file">.rhosts</span></a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-_0040code_007b_002f_007d-752"><code>/</code></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-_0040code_007b_002f_007d-_0028division_0029-596"><code>/</code> (division)</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007b_002f_002a_002e_002e_002e_002a_002f_007d-_0028comment_0029-563"><code>/*...*/</code> (comment)</a>: <a href="#Syntax-of-ncap-statements">Syntax of ncap statements</a></li>
<li><a href="#index-_0040code_007b_002f_002f_007d-_0028comment_0029-564"><code>//</code> (comment)</a>: <a href="#Syntax-of-ncap-statements">Syntax of ncap statements</a></li>
<li><a href="#index-_0040code_007b0_007d-_0028NUL_0029-726"><code>0</code> (NUL)</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040code_007b_003b_007d-_0028end-of-statement_0029-561"><code>;</code> (end of statement)</a>: <a href="#Syntax-of-ncap-statements">Syntax of ncap statements</a></li>
<li><a href="#index-_0040file_007b_003carpa_002fnameser_002eh_003e_007d-78"><span class="file">&lt;arpa/nameser.h&gt;</span></a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-_0040file_007b_003cresolv_002eh_003e_007d-79"><span class="file">&lt;resolv.h&gt;</span></a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-_0040code_007b_003f_007d-_0028filename-expansion_0029-373"><code>?</code> (filename expansion)</a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-_0040code_007b_003f_007d-_0028question-mark_0029-718"><code>?</code> (question mark)</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040code_007b_003f_007d-_0028wildcard-character_0029-375"><code>?</code> (wildcard character)</a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-_0040code_007b_0040_0040_007d-_0028attribute_0029-569"><code>@</code> (attribute)</a>: <a href="#Syntax-of-ncap-statements">Syntax of ncap statements</a></li>
<li><a href="#index-_0040code_007b_005b_005d_007d-_0028array-delimiters_0029-556"><code>[]</code> (array delimiters)</a>: <a href="#Syntax-of-ncap-statements">Syntax of ncap statements</a></li>
<li><a href="#index-_0040code_007b_005c_007d-_0028backslash_0029-719"><code>\</code> (backslash)</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040code_007b_005c_0022_007d-_0028protected-double-quote_0029-713"><code>\&quot;</code> (protected double quote)</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040code_007b_005c_0027_007d-_0028protected-end-quote_0029-712"><code>\'</code> (protected end quote)</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040code_007b_005c_003f_007d-_0028protected-question-mark_0029-714"><code>\?</code> (protected question mark)</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040code_007b_005c_005c_007d-_0028_0040acronym_007bASCII_007d-_005c_002c-backslash_0029-711"><code>\\</code> (<acronym>ASCII</acronym> \, backslash)</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040code_007b_005c_005c_007d-_0028protected-backslash_0029-715"><code>\\</code> (protected backslash)</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040code_007b_005ca_007d-_0028_0040acronym_007bASCII_007d-BEL_002c-bell_0029-706"><code>\a</code> (<acronym>ASCII</acronym> BEL, bell)</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040code_007b_005cb_007d-_0028_0040acronym_007bASCII_007d-BS_002c-backspace_0029-707"><code>\b</code> (<acronym>ASCII</acronym> BS, backspace)</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040code_007b_005cf_007d-_0028_0040acronym_007bASCII_007d-FF_002c-formfeed_0029-708"><code>\f</code> (<acronym>ASCII</acronym> FF, formfeed)</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040code_007b_005cn_007d-_0028_0040acronym_007bASCII_007d-LF_002c-linefeed_0029-703"><code>\n</code> (<acronym>ASCII</acronym> LF, linefeed)</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040code_007b_005cn_007d-_0028linefeed_0029-861"><code>\n</code> (linefeed)</a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_005cr_007d-_0028_0040acronym_007bASCII_007d-CR_002c-carriage-return_0029-709"><code>\r</code> (<acronym>ASCII</acronym> CR, carriage return)</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040code_007b_005ct_007d-_0028_0040acronym_007bASCII_007d-HT_002c-horizontal-tab_0029-705"><code>\t</code> (<acronym>ASCII</acronym> HT, horizontal tab)</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040code_007b_005ct_007d-_0028horizontal-tab_0029-862"><code>\t</code> (horizontal tab)</a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007b_005cv_007d-_0028_0040acronym_007bASCII_007d-VT_002c-vertical-tab_0029-710"><code>\v</code> (<acronym>ASCII</acronym> VT, vertical tab)</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040code_007b_005e_007d-_0028power_0029-597"><code>^</code> (power)</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007b_005e_007d-_0028wildcard-character_0029-372"><code>^</code> (wildcard character)</a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-_0040code_007b_005fFillValue_007d-971"><code>_FillValue</code></a>: <a href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a></li>
<li><a href="#index-_0040cite_007bNCO-User_0027s-Guide_007d-16"><cite>NCO User's Guide</cite></a>: <a href="#Availability">Availability</a></li>
<li><a href="#index-_0040cite_007bUser_0027s-Guide_007d-15"><cite>User's Guide</cite></a>: <a href="#Availability">Availability</a></li>
<li><a href="#index-_0040var_007babs_007d-599"><var>abs</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-absolute-value-632">absolute value</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040var_007bacos_007d-601"><var>acos</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040var_007bacosh_007d-600"><var>acosh</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007badd_007d-745"><code>add</code></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-_0040code_007badd_005foffset_007d-875"><code>add_offset</code></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040code_007badd_005foffset_007d-572"><code>add_offset</code></a>: <a href="#Intrinsic-functions">Intrinsic functions</a></li>
<li><a href="#index-_0040var_007badd_005foffset_007d-237"><var>add_offset</var></a>: <a href="#Operator-limitations">Operator limitations</a></li>
<li><a href="#index-adding-data-796">adding data</a>: <a href="#ncflint-netCDF-File-Interpolator">ncflint netCDF File Interpolator</a></li>
<li><a href="#index-adding-data-741">adding data</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-addition-798">addition</a>: <a href="#ncflint-netCDF-File-Interpolator">ncflint netCDF File Interpolator</a></li>
<li><a href="#index-addition-738">addition</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-addition-586">addition</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040command_007balias_007d-886"><span class="command">alias</span></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040command_007balias_007d-762"><span class="command">alias</span></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-alphabetization-821">alphabetization</a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-alphabetize-output-857">alphabetize output</a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-alternate-invocations-756">alternate invocations</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-anomalies-766">anomalies</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-_0040acronym_007bANSI_007d-53"><acronym>ANSI</acronym></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-_0040code_007bANSI-C_007d-657"><code>ANSI C</code></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-appending-data-817">appending data</a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-appending-data-676">appending data</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-appending-to-files-492">appending to files</a>: <a href="#Suppressing-interactive-prompts">Suppressing interactive prompts</a></li>
<li><a href="#index-appending-to-files-153">appending to files</a>: <a href="#Output-files">Output files</a></li>
<li><a href="#index-appending-variables-913">appending variables</a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-appending-variables-155">appending variables</a>: <a href="#Appending">Appending</a></li>
<li><a href="#index-arccosine-function-633">arccosine function</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-arcsine-function-634">arcsine function</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-arctangent-function-635">arctangent function</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-arithmetic-operators-978">arithmetic operators</a>: <a href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a></li>
<li><a href="#index-arithmetic-operators-447">arithmetic operators</a>: <a href="#Missing-values">Missing values</a></li>
<li><a href="#index-arithmetic-processor-541">arithmetic processor</a>: <a href="#ncap-netCDF-Arithmetic-Processor">ncap netCDF Arithmetic Processor</a></li>
<li><a href="#index-ARM-conventions-945">ARM conventions</a>: <a href="#ncrcat-netCDF-Record-Concatenator">ncrcat netCDF Record Concatenator</a></li>
<li><a href="#index-_0040acronym_007bARM_007d-conventions-525"><acronym>ARM</acronym> conventions</a>: <a href="#ARM-Conventions">ARM Conventions</a></li>
<li><a href="#index-array-indexing-557">array indexing</a>: <a href="#Syntax-of-ncap-statements">Syntax of ncap statements</a></li>
<li><a href="#index-array-storage-558">array storage</a>: <a href="#Syntax-of-ncap-statements">Syntax of ncap statements</a></li>
<li><a href="#index-array-syntax-555">array syntax</a>: <a href="#Syntax-of-ncap-statements">Syntax of ncap statements</a></li>
<li><a href="#index-arrival-value-803">arrival value</a>: <a href="#ncflint-netCDF-File-Interpolator">ncflint netCDF File Interpolator</a></li>
<li><a href="#index-_0040acronym_007bASCII_007d-701"><acronym>ASCII</acronym></a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040var_007basin_007d-603"><var>asin</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040var_007basinh_007d-602"><var>asinh</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-assignment-statement-559">assignment statement</a>: <a href="#Syntax-of-ncap-statements">Syntax of ncap statements</a></li>
<li><a href="#index-asynchronous-file-access-316">asynchronous file access</a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-_0040var_007batan_007d-605"><var>atan</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040var_007batanh_007d-604"><var>atanh</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-attribute-names-957">attribute names</a>: <a href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a></li>
<li><a href="#index-attribute-names-684">attribute names</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-attribute-syntax-568">attribute syntax</a>: <a href="#Syntax-of-ncap-statements">Syntax of ncap statements</a></li>
<li><a href="#index-attribute_002c-_0040code_007bunits_007d-416">attribute, <code>units</code></a>: <a href="#UDUnits-Support">UDUnits Support</a></li>
<li><a href="#index-attributes-683">attributes</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-attributes_002c-appending-694">attributes, appending</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-attributes_002c-creating-695">attributes, creating</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-attributes_002c-deleting-696">attributes, deleting</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-attributes_002c-editing-698">attributes, editing</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-attributes_002c-global-967">attributes, global</a>: <a href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a></li>
<li><a href="#index-attributes_002c-global-816">attributes, global</a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-attributes_002c-global-693">attributes, global</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-attributes_002c-global-531">attributes, global</a>: <a href="#ARM-Conventions">ARM Conventions</a></li>
<li><a href="#index-attributes_002c-global-513">attributes, global</a>: <a href="#Input-file-list-attributes">Input file list attributes</a></li>
<li><a href="#index-attributes_002c-global-504">attributes, global</a>: <a href="#History-attribute">History attribute</a></li>
<li><a href="#index-attributes_002c-modifying-697">attributes, modifying</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-attributes_002c-overwriting-699">attributes, overwriting</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040command_007bautoconf_007d-121"><span class="command">autoconf</span></a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-automagic-172">automagic</a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-automagic-61">automagic</a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-automatic-type-conversion-656">automatic type conversion</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-automatic-type-conversion-485">automatic type conversion</a>: <a href="#Type-conversion">Type conversion</a></li>
<li><a href="#index-average-470">average</a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-averaging-data-973">averaging data</a>: <a href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a></li>
<li><a href="#index-averaging-data-918">averaging data</a>: <a href="#ncra-netCDF-Record-Averager">ncra netCDF Record Averager</a></li>
<li><a href="#index-averaging-data-777">averaging data</a>: <a href="#ncea-netCDF-Ensemble-Averager">ncea netCDF Ensemble Averager</a></li>
<li><a href="#index-averaging-data-445">averaging data</a>: <a href="#Missing-values">Missing values</a></li>
<li><a href="#index-_0040code_007bavg_007d-461"><code>avg</code></a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-_0040code_007bavgsqr_007d-463"><code>avgsqr</code></a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-_0040code_007bbase_005ftime_007d-527"><code>base_time</code></a>: <a href="#ARM-Conventions">ARM Conventions</a></li>
<li><a href="#index-_0040command_007bbash_007d-381"><span class="command">bash</span></a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-Bash-Shell-774">Bash Shell</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-Bash-shell-758">Bash shell</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-benchmarks-261">benchmarks</a>: <a href="#OpenMP-threading">OpenMP threading</a></li>
<li><a href="#index-Bill-Kocik-1019">Bill Kocik</a>: <a href="#Contributors">Contributors</a></li>
<li><a href="#index-binary-format-826">binary format</a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-binary-operations-737">binary operations</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-binary-operations-222">binary operations</a>: <a href="#Memory-Usage-of-ncap">Memory Usage of ncap</a></li>
<li><a href="#index-Bourne-Shell-775">Bourne Shell</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-Bourne-Shell-441">Bourne Shell</a>: <a href="#Stride">Stride</a></li>
<li><a href="#index-Brian-Mays-1017">Brian Mays</a>: <a href="#Contributors">Contributors</a></li>
<li><a href="#index-broadcasting-variables-976">broadcasting variables</a>: <a href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a></li>
<li><a href="#index-broadcasting-variables-808">broadcasting variables</a>: <a href="#ncflint-netCDF-File-Interpolator">ncflint netCDF File Interpolator</a></li>
<li><a href="#index-broadcasting-variables-765">broadcasting variables</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-_0040code_007bBSD_007d-270"><code>BSD</code></a>: <a href="#Command-line-options">Command line options</a></li>
<li><a href="#index-buffering-227">buffering</a>: <a href="#Operator-limitations">Operator limitations</a></li>
<li><a href="#index-bugs_002c-reporting-104">bugs, reporting</a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-_0040code_007bbyte_0028x_0029_007d-580"><code>byte(x)</code></a>: <a href="#Intrinsic-functions">Intrinsic functions</a></li>
<li><a href="#index-C-index-convention-392">C index convention</a>: <a href="#Fortran-indexing">Fortran indexing</a></li>
<li><a href="#index-C-language-1053">C language</a>: <a href="#Footnotes">Footnotes</a></li>
<li><a href="#index-C-language-853">C language</a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-C-language-725">C language</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-C-language-554">C language</a>: <a href="#Syntax-of-ncap-statements">Syntax of ncap statements</a></li>
<li><a href="#index-C-language-487">C language</a>: <a href="#Automatic-type-conversion">Automatic type conversion</a></li>
<li><a href="#index-C-language-448">C language</a>: <a href="#Missing-values">Missing values</a></li>
<li><a href="#index-C-language-57">C language</a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-C-Shell-776">C Shell</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-C-Shell-442">C Shell</a>: <a href="#Stride">Stride</a></li>
<li><a href="#index-C_002b_002b-49">C++</a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-_0040command_007bc_002b_002b_007d-41"><span class="command">c++</span></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-C89-54">C89</a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-C99-56">C99</a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-_0040var_007bC_005fformat_007d-233"><var>C_format</var></a>: <a href="#Operator-limitations">Operator limitations</a></li>
<li><a href="#index-_0040command_007bcc_007d-42"><span class="command">cc</span></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-_0040command_007bCC_007d-40"><span class="command">CC</span></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-_0040acronym_007bCCM_007d-Processor-949"><acronym>CCM</acronym> Processor</a>: <a href="#ncrcat-netCDF-Record-Concatenator">ncrcat netCDF Record Concatenator</a></li>
<li><a href="#index-_0040acronym_007bCCM_007d-Processor-933"><acronym>CCM</acronym> Processor</a>: <a href="#ncra-netCDF-Record-Averager">ncra netCDF Record Averager</a></li>
<li><a href="#index-_0040acronym_007bCCM_007d-Processor-282"><acronym>CCM</acronym> Processor</a>: <a href="#Specifying-input-files">Specifying input files</a></li>
<li><a href="#index-_0040acronym_007bCCSM_007d-1035"><acronym>CCSM</acronym></a>: <a href="#Proposals-for-Institutional-Funding">Proposals for Institutional Funding</a></li>
<li><a href="#index-_0040acronym_007bCCSM_007d-conventions-773"><acronym>CCSM</acronym> conventions</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-_0040acronym_007bCCSM_007d-conventions-518"><acronym>CCSM</acronym> conventions</a>: <a href="#NCAR-CCSM-Conventions">NCAR CCSM Conventions</a></li>
<li><a href="#index-_0040var_007bceil_007d-606"><var>ceil</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-ceiling-function-636">ceiling function</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-CF-convention-429">CF convention</a>: <a href="#UDUnits-Support">UDUnits Support</a></li>
<li><a href="#index-_0040code_007bchar_0028x_0029_007d-581"><code>char(x)</code></a>: <a href="#Intrinsic-functions">Intrinsic functions</a></li>
<li><a href="#index-characters_002c-special-704">characters, special</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-Charlie-Zender-1013">Charlie Zender</a>: <a href="#Contributors">Contributors</a></li>
<li><a href="#index-Charlie-Zender-2">Charlie Zender</a>: <a href="#Foreword">Foreword</a></li>
<li><a href="#index-chocolate-1054">chocolate</a>: <a href="#Footnotes">Footnotes</a></li>
<li><a href="#index-client_002dserver-339">client-server</a>: <a href="#DODS_002fOPeNDAP">DODS/OPeNDAP</a></li>
<li><a href="#index-Climate-and-Forecast-Metadata-Convention-428">Climate and Forecast Metadata Convention</a>: <a href="#UDUnits-Support">UDUnits Support</a></li>
<li><a href="#index-climate-model-1005">climate model</a>: <a href="#Normalization">Normalization</a></li>
<li><a href="#index-climate-model-792">climate model</a>: <a href="#ncecat-netCDF-Ensemble-Concatenator">ncecat netCDF Ensemble Concatenator</a></li>
<li><a href="#index-climate-model-293">climate model</a>: <a href="#Specifying-input-files">Specifying input files</a></li>
<li><a href="#index-climate-model-164">climate model</a>: <a href="#Concatenation">Concatenation</a></li>
<li><a href="#index-climate-model-135">climate model</a>: <a href="#Climate-model-paradigm">Climate model paradigm</a></li>
<li><a href="#index-climate-model-129">climate model</a>: <a href="#Philosophy">Philosophy</a></li>
<li><a href="#index-Comeau-29">Comeau</a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-command-line-options-264">command line options</a>: <a href="#Command-line-options">Command line options</a></li>
<li><a href="#index-command-line-switches-538">command line switches</a>: <a href="#Operator-Reference-Manual">Operator Reference Manual</a></li>
<li><a href="#index-command-line-switches-297">command line switches</a>: <a href="#Specifying-output-files">Specifying output files</a></li>
<li><a href="#index-command-line-switches-239">command line switches</a>: <a href="#Common-features">Common features</a></li>
<li><a href="#index-command-line-switches-134">command line switches</a>: <a href="#Philosophy">Philosophy</a></li>
<li><a href="#index-comments-562">comments</a>: <a href="#Syntax-of-ncap-statements">Syntax of ncap statements</a></li>
<li><a href="#index-_0040command_007bcomo_007d-43"><span class="command">como</span></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-Compaq-30">Compaq</a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-compatability-34">compatability</a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-compilers-304">compilers</a>: <a href="#Specifying-output-files">Specifying output files</a></li>
<li><a href="#index-complementary-error-function-637">complementary error function</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-concatenation-936">concatenation</a>: <a href="#ncrcat-netCDF-Record-Concatenator">ncrcat netCDF Record Concatenator</a></li>
<li><a href="#index-concatenation-909">concatenation</a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-concatenation-785">concatenation</a>: <a href="#ncecat-netCDF-Ensemble-Concatenator">ncecat netCDF Ensemble Concatenator</a></li>
<li><a href="#index-concatenation-154">concatenation</a>: <a href="#Appending">Appending</a></li>
<li><a href="#index-_0040file_007bconfig_002eguess_007d-125"><span class="file">config.guess</span></a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-_0040file_007bconfigure_002eeg_007d-126"><span class="file">configure.eg</span></a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-constraint-expressions-1051">constraint expressions</a>: <a href="#Footnotes">Footnotes</a></li>
<li><a href="#index-contributing-1010">contributing</a>: <a href="#Contributing">Contributing</a></li>
<li><a href="#index-contributors-1012">contributors</a>: <a href="#Contributors">Contributors</a></li>
<li><a href="#index-coordinate-limits-401">coordinate limits</a>: <a href="#Hyperslabs">Hyperslabs</a></li>
<li><a href="#index-coordinate-variable-990">coordinate variable</a>: <a href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a></li>
<li><a href="#index-coordinate-variable-769">coordinate variable</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-coordinate-variable-422">coordinate variable</a>: <a href="#UDUnits-Support">UDUnits Support</a></li>
<li><a href="#index-coordinate-variables-968">coordinate variables</a>: <a href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a></li>
<li><a href="#index-_0040code_007bcore-dump_007d-863"><code>core dump</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007bcore-dump_007d-204"><code>core dump</code></a>: <a href="#Large-Datasets-and-Memory">Large Datasets and Memory</a></li>
<li><a href="#index-core-dump-105">core dump</a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-_0040var_007bcos_007d-608"><var>cos</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040var_007bcosh_007d-607"><var>cosh</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-cosine-function-638">cosine function</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-covariance-674">covariance</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-Cray-200">Cray</a>: <a href="#Large-Datasets-and-Memory">Large Datasets and Memory</a></li>
<li><a href="#index-Cray-25">Cray</a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-_0040command_007bcsh_007d-382"><span class="command">csh</span></a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-_0040command_007bcxx_007d-44"><span class="command">cxx</span></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-Cygwin-69">Cygwin</a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-data-access-protocol-335">data access protocol</a>: <a href="#DODS_002fOPeNDAP">DODS/OPeNDAP</a></li>
<li><a href="#index-data-safety-959">data safety</a>: <a href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a></li>
<li><a href="#index-data-safety-138">data safety</a>: <a href="#Output-files">Output files</a></li>
<li><a href="#index-data_002c-missing-690">data, missing</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-data_002c-missing-444">data, missing</a>: <a href="#Missing-values">Missing values</a></li>
<li><a href="#index-_0040code_007bdate_007d-522"><code>date</code></a>: <a href="#NCAR-CCSM-Conventions">NCAR CCSM Conventions</a></li>
<li><a href="#index-_0040code_007bdatesec_007d-523"><code>datesec</code></a>: <a href="#NCAR-CCSM-Conventions">NCAR CCSM Conventions</a></li>
<li><a href="#index-_0040var_007bdbg_005flvl_007d-260"><var>dbg_lvl</var></a>: <a href="#OpenMP-threading">OpenMP threading</a></li>
<li><a href="#index-_0040var_007bdbg_005flvl_007d-210"><var>dbg_lvl</var></a>: <a href="#Large-Datasets-and-Memory">Large Datasets and Memory</a></li>
<li><a href="#index-_0040var_007bdbg_005flvl_007d-119"><var>dbg_lvl</var></a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-_0040acronym_007bDDRA_007d-1032"><acronym>DDRA</acronym></a>: <a href="#Proposals-for-Institutional-Funding">Proposals for Institutional Funding</a></li>
<li><a href="#index-_0040var_007bdebug_002dlevel_007d-209"><var>debug-level</var></a>: <a href="#Large-Datasets-and-Memory">Large Datasets and Memory</a></li>
<li><a href="#index-_0040var_007bdebug_002dlevel_007d-118"><var>debug-level</var></a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-debugging-259">debugging</a>: <a href="#OpenMP-threading">OpenMP threading</a></li>
<li><a href="#index-debugging-211">debugging</a>: <a href="#Large-Datasets-and-Memory">Large Datasets and Memory</a></li>
<li><a href="#index-debugging-108">debugging</a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-_0040acronym_007bDEC_007d-24"><acronym>DEC</acronym></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-degenerate-dimension-923">degenerate dimension</a>: <a href="#ncra-netCDF-Record-Averager">ncra netCDF Record Averager</a></li>
<li><a href="#index-degenerate-dimension-804">degenerate dimension</a>: <a href="#ncflint-netCDF-File-Interpolator">ncflint netCDF File Interpolator</a></li>
<li><a href="#index-degenerate-dimension-794">degenerate dimension</a>: <a href="#ncecat-netCDF-Ensemble-Concatenator">ncecat netCDF Ensemble Concatenator</a></li>
<li><a href="#index-degenerate-dimension-768">degenerate dimension</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-degenerate-dimension-673">degenerate dimension</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-degenerate-dimension-481">degenerate dimension</a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-demotion-579">demotion</a>: <a href="#Intrinsic-functions">Intrinsic functions</a></li>
<li><a href="#index-demotion-484">demotion</a>: <a href="#Type-conversion">Type conversion</a></li>
<li><a href="#index-derived-fields-548">derived fields</a>: <a href="#ncap-netCDF-Arithmetic-Processor">ncap netCDF Arithmetic Processor</a></li>
<li><a href="#index-Digital-26">Digital</a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-dimension-limits-400">dimension limits</a>: <a href="#Hyperslabs">Hyperslabs</a></li>
<li><a href="#index-dimension-names-956">dimension names</a>: <a href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a></li>
<li><a href="#index-disjoint-files-159">disjoint files</a>: <a href="#Appending">Appending</a></li>
<li><a href="#index-Distributed-Data-Reduction-_0026-Analysis-1030">Distributed Data Reduction &amp; Analysis</a>: <a href="#Proposals-for-Institutional-Funding">Proposals for Institutional Funding</a></li>
<li><a href="#index-Distributed-Oceanographic-Data-System-333">Distributed Oceanographic Data System</a>: <a href="#DODS_002fOPeNDAP">DODS/OPeNDAP</a></li>
<li><a href="#index-_0040code_007bdivide_007d-748"><code>divide</code></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-dividing-data-744">dividing data</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-division-589">division</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-documentation-9">documentation</a>: <a href="#Availability">Availability</a></li>
<li><a href="#index-_0040acronym_007bDODS_007d-354"><acronym>DODS</acronym></a>: <a href="#File-retention">File retention</a></li>
<li><a href="#index-_0040acronym_007bDODS_007d-330"><acronym>DODS</acronym></a>: <a href="#DODS_002fOPeNDAP">DODS/OPeNDAP</a></li>
<li><a href="#index-_0040env_007bDODS_005fROOT_007d-332"><span class="env">DODS_ROOT</span></a>: <a href="#DODS_002fOPeNDAP">DODS/OPeNDAP</a></li>
<li><a href="#index-double-precision-662">double precision</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007bdouble_0028x_0029_007d-582"><code>double(x)</code></a>: <a href="#Intrinsic-functions">Intrinsic functions</a></li>
<li><a href="#index-dynamic-linking-87">dynamic linking</a>: <a href="#Libraries">Libraries</a></li>
<li><a href="#index-eddy-covariance-675">eddy covariance</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-editing-attributes-685">editing attributes</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040command_007begrep_007d-366"><span class="command">egrep</span></a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-ensemble-780">ensemble</a>: <a href="#ncea-netCDF-Ensemble-Averager">ncea netCDF Ensemble Averager</a></li>
<li><a href="#index-ensemble-163">ensemble</a>: <a href="#Concatenation">Concatenation</a></li>
<li><a href="#index-ensemble-average-778">ensemble average</a>: <a href="#ncea-netCDF-Ensemble-Averager">ncea netCDF Ensemble Averager</a></li>
<li><a href="#index-ensemble-concatenation-786">ensemble concatenation</a>: <a href="#ncecat-netCDF-Ensemble-Concatenator">ncecat netCDF Ensemble Concatenator</a></li>
<li><a href="#index-_0040var_007berf_007d-610"><var>erf</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040var_007berfc_007d-609"><var>erfc</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-error-function-639">error function</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-error-tolerance-139">error tolerance</a>: <a href="#Output-files">Output files</a></li>
<li><a href="#index-execution-time-965">execution time</a>: <a href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a></li>
<li><a href="#index-execution-time-453">execution time</a>: <a href="#Missing-values">Missing values</a></li>
<li><a href="#index-execution-time-231">execution time</a>: <a href="#Operator-limitations">Operator limitations</a></li>
<li><a href="#index-execution-time-145">execution time</a>: <a href="#Output-files">Output files</a></li>
<li><a href="#index-execution-time-92">execution time</a>: <a href="#Libraries">Libraries</a></li>
<li><a href="#index-_0040var_007bexp_007d-611"><var>exp</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-exponentiation-590">exponentiation</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-exponentiation-function-640">exponentiation function</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-extended-regular-expressions-362">extended regular expressions</a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-extended-regular-expressions-181">extended regular expressions</a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-_0040code_007bf90_007d-74"><code>f90</code></a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-features_002c-requesting-107">features, requesting</a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-file-deletion-344">file deletion</a>: <a href="#File-retention">File retention</a></li>
<li><a href="#index-file-removal-345">file removal</a>: <a href="#File-retention">File retention</a></li>
<li><a href="#index-file-retention-346">file retention</a>: <a href="#File-retention">File retention</a></li>
<li><a href="#index-files_002c-multiple-291">files, multiple</a>: <a href="#Specifying-input-files">Specifying input files</a></li>
<li><a href="#index-files_002c-numerous-input-170">files, numerous input</a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-flags-669">flags</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007bfloat_007d-658"><code>float</code></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007bfloat_0028x_0029_007d-583"><code>float(x)</code></a>: <a href="#Intrinsic-functions">Intrinsic functions</a></li>
<li><a href="#index-_0040var_007bfloor_007d-612"><var>floor</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007bfloor_007d-489"><code>floor</code></a>: <a href="#Automatic-type-conversion">Automatic type conversion</a></li>
<li><a href="#index-floor-function-641">floor function</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040samp_007bflt_005fbyt_007d-897"><span class="samp">flt_byt</span></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040samp_007bflt_005fsht_007d-896"><span class="samp">flt_sht</span></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-force-append-494">force append</a>: <a href="#Suppressing-interactive-prompts">Suppressing interactive prompts</a></li>
<li><a href="#index-force-overwrite-493">force overwrite</a>: <a href="#Suppressing-interactive-prompts">Suppressing interactive prompts</a></li>
<li><a href="#index-foreword-1">foreword</a>: <a href="#Foreword">Foreword</a></li>
<li><a href="#index-Fortran-950">Fortran</a>: <a href="#ncrcat-netCDF-Record-Concatenator">ncrcat netCDF Record Concatenator</a></li>
<li><a href="#index-Fortran-934">Fortran</a>: <a href="#ncra-netCDF-Record-Averager">ncra netCDF Record Averager</a></li>
<li><a href="#index-Fortran-488">Fortran</a>: <a href="#Automatic-type-conversion">Automatic type conversion</a></li>
<li><a href="#index-Fortran-index-convention-391">Fortran index convention</a>: <a href="#Fortran-indexing">Fortran indexing</a></li>
<li><a href="#index-_0040var_007bFORTRAN_005fformat_007d-234"><var>FORTRAN_format</var></a>: <a href="#Operator-limitations">Operator limitations</a></li>
<li><a href="#index-_0040acronym_007bFTP_007d-350"><acronym>FTP</acronym></a>: <a href="#File-retention">File retention</a></li>
<li><a href="#index-_0040code_007bftp_007d-313"><code>ftp</code></a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-_0040code_007bftp_007d-80"><code>ftp</code></a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-funding-1026">funding</a>: <a href="#Proposals-for-Institutional-Funding">Proposals for Institutional Funding</a></li>
<li><a href="#index-_0040code_007bg_002b_002b_007d-1046"><code>g++</code></a>: <a href="#Footnotes">Footnotes</a></li>
<li><a href="#index-_0040code_007bg77_007d-1047"><code>g77</code></a>: <a href="#Footnotes">Footnotes</a></li>
<li><a href="#index-_0040var_007bgamma_007d-613"><var>gamma</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-gamma-function-642">gamma function</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-Gaussian-weights-1004">Gaussian weights</a>: <a href="#Normalization">Normalization</a></li>
<li><a href="#index-_0040code_007bgcc_007d-1045"><code>gcc</code></a>: <a href="#Footnotes">Footnotes</a></li>
<li><a href="#index-_0040command_007bgcc_007d-45"><span class="command">gcc</span></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-_0040acronym_007bGCM_007d-137"><acronym>GCM</acronym></a>: <a href="#Climate-model-paradigm">Climate model paradigm</a></li>
<li><a href="#index-George-Shapovalov-1018">George Shapovalov</a>: <a href="#Contributors">Contributors</a></li>
<li><a href="#index-_0040code_007bgethostname_007d-77"><code>gethostname</code></a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-_0040code_007bgetopt_007d-271"><code>getopt</code></a>: <a href="#Command-line-options">Command line options</a></li>
<li><a href="#index-_0040file_007bgetopt_002eh_007d-273"><span class="file">getopt.h</span></a>: <a href="#Command-line-options">Command line options</a></li>
<li><a href="#index-_0040code_007bgetopt_005flong_007d-272"><code>getopt_long</code></a>: <a href="#Command-line-options">Command line options</a></li>
<li><a href="#index-_0040code_007bgetuid_007d-76"><code>getuid</code></a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-global-attributes-966">global attributes</a>: <a href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a></li>
<li><a href="#index-global-attributes-815">global attributes</a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-global-attributes-692">global attributes</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-global-attributes-530">global attributes</a>: <a href="#ARM-Conventions">ARM Conventions</a></li>
<li><a href="#index-global-attributes-512">global attributes</a>: <a href="#Input-file-list-attributes">Input file list attributes</a></li>
<li><a href="#index-global-attributes-503">global attributes</a>: <a href="#History-attribute">History attribute</a></li>
<li><a href="#index-global-attributes-178">global attributes</a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-globbing-946">globbing</a>: <a href="#ncrcat-netCDF-Record-Concatenator">ncrcat netCDF Record Concatenator</a></li>
<li><a href="#index-globbing-930">globbing</a>: <a href="#ncra-netCDF-Record-Averager">ncra netCDF Record Averager</a></li>
<li><a href="#index-globbing-759">globbing</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-globbing-379">globbing</a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-globbing-277">globbing</a>: <a href="#Specifying-input-files">Specifying input files</a></li>
<li><a href="#index-globbing-179">globbing</a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-_0040acronym_007bGNU_007d-367"><acronym>GNU</acronym></a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-_0040acronym_007bGNU_007d-267"><acronym>GNU</acronym></a>: <a href="#Command-line-options">Command line options</a></li>
<li><a href="#index-_0040code_007bgnu_002dwin32_007d-70"><code>gnu-win32</code></a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-_0040acronym_007bGNU_007d_002fLinux-202"><acronym>GNU</acronym>/Linux</a>: <a href="#Large-Datasets-and-Memory">Large Datasets and Memory</a></li>
<li><a href="#index-_0040file_007bGNUmakefile_007d-72"><span class="file">GNUmakefile</span></a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-God-431">God</a>: <a href="#UDUnits-Support">UDUnits Support</a></li>
<li><a href="#index-_0040code_007bgw_007d-1003"><code>gw</code></a>: <a href="#Normalization">Normalization</a></li>
<li><a href="#index-_0040code_007bgw_007d-520"><code>gw</code></a>: <a href="#NCAR-CCSM-Conventions">NCAR CCSM Conventions</a></li>
<li><a href="#index-_0040acronym_007bHDF_007d-1044"><acronym>HDF</acronym></a>: <a href="#Proposals-for-Institutional-Funding">Proposals for Institutional Funding</a></li>
<li><a href="#index-_0040acronym_007bHDF_007d-96"><acronym>HDF</acronym></a>: <a href="#netCDF-2_002ex-vs_002e-3_002ex">netCDF 2.x vs. 3.x</a></li>
<li><a href="#index-help-106">help</a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-Henry-Butowsky-1014">Henry Butowsky</a>: <a href="#Contributors">Contributors</a></li>
<li><a href="#index-_0040samp_007bhgh_005fbyt_007d-895"><span class="samp">hgh_byt</span></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040samp_007bhgh_005fsht_007d-894"><span class="samp">hgh_sht</span></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-Hierarchical-Data-Format-97">Hierarchical Data Format</a>: <a href="#netCDF-2_002ex-vs_002e-3_002ex">netCDF 2.x vs. 3.x</a></li>
<li><a href="#index-_0040code_007bhistory_007d-856"><code>history</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007bhistory_007d-687"><code>history</code></a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040code_007bhistory_007d-529"><code>history</code></a>: <a href="#ARM-Conventions">ARM Conventions</a></li>
<li><a href="#index-_0040code_007bhistory_007d-501"><code>history</code></a>: <a href="#History-attribute">History attribute</a></li>
<li><a href="#index-_0040code_007bhistory_007d-193"><code>history</code></a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-_0040acronym_007bHP_007d-23"><acronym>HP</acronym></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-_0040acronym_007bHTML_007d-12"><acronym>HTML</acronym></a>: <a href="#Availability">Availability</a></li>
<li><a href="#index-_0040acronym_007bHTTP_007d-protocol-331"><acronym>HTTP</acronym> protocol</a>: <a href="#DODS_002fOPeNDAP">DODS/OPeNDAP</a></li>
<li><a href="#index-hybrid-coordinate-system-549">hybrid coordinate system</a>: <a href="#Left-hand-casting">Left hand casting</a></li>
<li><a href="#index-hyperbolic-arccosine-function-643">hyperbolic arccosine function</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-hyperbolic-arcsine-function-644">hyperbolic arcsine function</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-hyperbolic-arctangent-function-645">hyperbolic arctangent function</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-hyperbolic-cosine-function-646">hyperbolic cosine function</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-hyperbolic-sine-function-647">hyperbolic sine function</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-hyperbolic-tangent-648">hyperbolic tangent</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-hyperslab-979">hyperslab</a>: <a href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a></li>
<li><a href="#index-hyperslab-943">hyperslab</a>: <a href="#ncrcat-netCDF-Record-Concatenator">ncrcat netCDF Record Concatenator</a></li>
<li><a href="#index-hyperslab-928">hyperslab</a>: <a href="#ncra-netCDF-Record-Averager">ncra netCDF Record Averager</a></li>
<li><a href="#index-hyperslab-399">hyperslab</a>: <a href="#Hyperslabs">Hyperslabs</a></li>
<li><a href="#index-I_002fO-1015">I/O</a>: <a href="#Contributors">Contributors</a></li>
<li><a href="#index-I_002fO-412">I/O</a>: <a href="#Multislabs">Multislabs</a></li>
<li><a href="#index-I_002fO-395">I/O</a>: <a href="#Fortran-indexing">Fortran indexing</a></li>
<li><a href="#index-I_002fO-343">I/O</a>: <a href="#DODS_002fOPeNDAP">DODS/OPeNDAP</a></li>
<li><a href="#index-I18N-241">I18N</a>: <a href="#Internationalization">Internationalization</a></li>
<li><a href="#index-_0040acronym_007bIBM_007d-20"><acronym>IBM</acronym></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-_0040command_007bicc_007d-46"><span class="command">icc</span></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-_0040acronym_007bIDL_007d-131"><acronym>IDL</acronym></a>: <a href="#Philosophy">Philosophy</a></li>
<li><a href="#index-_0040code_007bilimit_007d-201"><code>ilimit</code></a>: <a href="#Large-Datasets-and-Memory">Large Datasets and Memory</a></li>
<li><a href="#index-including-files-565">including files</a>: <a href="#Syntax-of-ncap-statements">Syntax of ncap statements</a></li>
<li><a href="#index-index-conventions-390">index conventions</a>: <a href="#Fortran-indexing">Fortran indexing</a></li>
<li><a href="#index-inexact-conversion-654">inexact conversion</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-Info-14">Info</a>: <a href="#Availability">Availability</a></li>
<li><a href="#index-input-files-295">input files</a>: <a href="#Specifying-output-files">Specifying output files</a></li>
<li><a href="#index-input-files-276">input files</a>: <a href="#Specifying-input-files">Specifying input files</a></li>
<li><a href="#index-input-files-188">input files</a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-_0040var_007binput_002dpath_007d-326"><var>input-path</var></a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-_0040var_007binput_002dpath_007d-288"><var>input-path</var></a>: <a href="#Specifying-input-files">Specifying input files</a></li>
<li><a href="#index-installation-120">installation</a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-installation-36">installation</a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-_0040code_007bint_0028x_0029_007d-584"><code>int(x)</code></a>: <a href="#Intrinsic-functions">Intrinsic functions</a></li>
<li><a href="#index-Intel-28">Intel</a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-Internationalization-240">Internationalization</a>: <a href="#Internationalization">Internationalization</a></li>
<li><a href="#index-interpolation-795">interpolation</a>: <a href="#ncflint-netCDF-File-Interpolator">ncflint netCDF File Interpolator</a></li>
<li><a href="#index-introduction-6">introduction</a>: <a href="#Introduction">Introduction</a></li>
<li><a href="#index-_0040acronym_007bIPCC_007d-1036"><acronym>IPCC</acronym></a>: <a href="#Proposals-for-Institutional-Funding">Proposals for Institutional Funding</a></li>
<li><a href="#index-_0040acronym_007bISO_007d-50"><acronym>ISO</acronym></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-Jim-Edwards-1021">Jim Edwards</a>: <a href="#Contributors">Contributors</a></li>
<li><a href="#index-Juliana-Rew-1022">Juliana Rew</a>: <a href="#Contributors">Contributors</a></li>
<li><a href="#index-Keith-Lindsay-1023">Keith Lindsay</a>: <a href="#Contributors">Contributors</a></li>
<li><a href="#index-kitchen-sink-810">kitchen sink</a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-L10N-242">L10N</a>: <a href="#Internationalization">Internationalization</a></li>
<li><a href="#index-large-datasets-258">large datasets</a>: <a href="#OpenMP-threading">OpenMP threading</a></li>
<li><a href="#index-large-datasets-194">large datasets</a>: <a href="#Large-Datasets-and-Memory">Large Datasets and Memory</a></li>
<li><a href="#index-Large-File-Support-263">Large File Support</a>: <a href="#Large-File-Support">Large File Support</a></li>
<li><a href="#index-Large-File-Support-196">Large File Support</a>: <a href="#Large-Datasets-and-Memory">Large Datasets and Memory</a></li>
<li><a href="#index-_0040code_007bLD_005fLIBRARY_005fPATH_007d-86"><code>LD_LIBRARY_PATH</code></a>: <a href="#Libraries">Libraries</a></li>
<li><a href="#index-left-hand-casting-550">left hand casting</a>: <a href="#Left-hand-casting">Left hand casting</a></li>
<li><a href="#index-left-hand-casting-225">left hand casting</a>: <a href="#Memory-Usage-of-ncap">Memory Usage of ncap</a></li>
<li><a href="#index-Len-Makin-1020">Len Makin</a>: <a href="#Contributors">Contributors</a></li>
<li><a href="#index-lexer-540">lexer</a>: <a href="#ncap-netCDF-Arithmetic-Processor">ncap netCDF Arithmetic Processor</a></li>
<li><a href="#index-LFS-262">LFS</a>: <a href="#Large-File-Support">Large File Support</a></li>
<li><a href="#index-LFS-195">LFS</a>: <a href="#Large-Datasets-and-Memory">Large Datasets and Memory</a></li>
<li><a href="#index-_0040acronym_007bLHS_007d-551"><acronym>LHS</acronym></a>: <a href="#Left-hand-casting">Left hand casting</a></li>
<li><a href="#index-_0040command_007blibnco_007d-51"><span class="command">libnco</span></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-libraries-85">libraries</a>: <a href="#Libraries">Libraries</a></li>
<li><a href="#index-linkers-305">linkers</a>: <a href="#Specifying-output-files">Specifying output files</a></li>
<li><a href="#index-Linux-668">Linux</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040var_007bln_007d-614"><var>ln</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040command_007bln-_002ds_007d-887"><span class="command">ln -s</span></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040command_007bln-_002ds_007d-763"><span class="command">ln -s</span></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-_0040var_007blog_007d-616"><var>log</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040var_007blog10_007d-615"><var>log10</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-logarithm_002c-base-10-649">logarithm, base 10</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-logarithm_002c-natural-650">logarithm, natural</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007blong-double_007d-663"><code>long double</code></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-long-options-916">long options</a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-long-options-269">long options</a>: <a href="#Command-line-options">Command line options</a></li>
<li><a href="#index-longitude-433">longitude</a>: <a href="#Wrapped-coordinates">Wrapped coordinates</a></li>
<li><a href="#index-Macintosh-31">Macintosh</a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-_0040file_007bMakefile_007d-340"><span class="file">Makefile</span></a>: <a href="#DODS_002fOPeNDAP">DODS/OPeNDAP</a></li>
<li><a href="#index-_0040file_007bMakefile_007d-100"><span class="file">Makefile</span></a>: <a href="#netCDF-2_002ex-vs_002e-3_002ex">netCDF 2.x vs. 3.x</a></li>
<li><a href="#index-_0040file_007bMakefile_007d-73"><span class="file">Makefile</span></a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-_0040file_007bMakefile_007d-52"><span class="file">Makefile</span></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-malloc_0028_0029-226"><code>malloc()</code></a>: <a href="#Memory-Usage-of-ncap">Memory Usage of ncap</a></li>
<li><a href="#index-manual-type-conversion-486">manual type conversion</a>: <a href="#Type-conversion">Type conversion</a></li>
<li><a href="#index-Martin-Dix-1024">Martin Dix</a>: <a href="#Contributors">Contributors</a></li>
<li><a href="#index-mask-condition-1008">mask condition</a>: <a href="#Normalization">Normalization</a></li>
<li><a href="#index-mask-condition-992">mask condition</a>: <a href="#Mask-condition">Mask condition</a></li>
<li><a href="#index-masked-average-975">masked average</a>: <a href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a></li>
<li><a href="#index-masked-average-670">masked average</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-Mass-Store-System-311">Mass Store System</a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-mathematical-functions-627">mathematical functions</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007bmax_007d-465"><code>max</code></a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-maximum-474">maximum</a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-mean-471">mean</a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-memory-available-213">memory available</a>: <a href="#Memory-usage">Memory usage</a></li>
<li><a href="#index-memory-leaks-224">memory leaks</a>: <a href="#Memory-Usage-of-ncap">Memory Usage of ncap</a></li>
<li><a href="#index-memory-requirements-361">memory requirements</a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-memory-requirements-212">memory requirements</a>: <a href="#Memory-usage">Memory usage</a></li>
<li><a href="#index-merging-files-818">merging files</a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-merging-files-156">merging files</a>: <a href="#Appending">Appending</a></li>
<li><a href="#index-metadata-844">metadata</a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-metadata_002c-global-839">metadata, global</a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-Microsoft-63">Microsoft</a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-Microsoft-32">Microsoft</a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-Mike-Folk-98">Mike Folk</a>: <a href="#netCDF-2_002ex-vs_002e-3_002ex">netCDF 2.x vs. 3.x</a></li>
<li><a href="#index-Mike-Page-1025">Mike Page</a>: <a href="#Contributors">Contributors</a></li>
<li><a href="#index-_0040code_007bmin_007d-464"><code>min</code></a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-minimum-473">minimum</a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-missing-values-805">missing values</a>: <a href="#ncflint-netCDF-File-Interpolator">ncflint netCDF File Interpolator</a></li>
<li><a href="#index-missing-values-689">missing values</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-missing-values-443">missing values</a>: <a href="#Missing-values">Missing values</a></li>
<li><a href="#index-_0040code_007bmissing_005fvalue_007d-972"><code>missing_value</code></a>: <a href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a></li>
<li><a href="#index-_0040code_007bmissing_005fvalue_007d-906"><code>missing_value</code></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040var_007bmissing_005fvalue_007d-905"><var>missing_value</var></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040code_007bmissing_005fvalue_007d-806"><code>missing_value</code></a>: <a href="#ncflint-netCDF-File-Interpolator">ncflint netCDF File Interpolator</a></li>
<li><a href="#index-_0040code_007bmissing_005fvalue_007d-691"><code>missing_value</code></a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040code_007bmissing_005fvalue_007d-574"><code>missing_value</code></a>: <a href="#Intrinsic-functions">Intrinsic functions</a></li>
<li><a href="#index-_0040code_007bmissing_005fvalue_007d-446"><code>missing_value</code></a>: <a href="#Missing-values">Missing values</a></li>
<li><a href="#index-MKS-units-420">MKS units</a>: <a href="#UDUnits-Support">UDUnits Support</a></li>
<li><a href="#index-modulus-592">modulus</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-monotonic-coordinates-232">monotonic coordinates</a>: <a href="#Operator-limitations">Operator limitations</a></li>
<li><a href="#index-_0040acronym_007bmsrcp_007d-352"><acronym>msrcp</acronym></a>: <a href="#File-retention">File retention</a></li>
<li><a href="#index-_0040command_007bmsrcp_007d-322"><span class="command">msrcp</span></a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-_0040command_007bmsread_007d-323"><span class="command">msread</span></a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-_0040acronym_007bMSS_007d-310"><acronym>MSS</acronym></a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-multi_002dfile-operators-940">multi-file operators</a>: <a href="#ncrcat-netCDF-Record-Concatenator">ncrcat netCDF Record Concatenator</a></li>
<li><a href="#index-multi_002dfile-operators-925">multi-file operators</a>: <a href="#ncra-netCDF-Record-Averager">ncra netCDF Record Averager</a></li>
<li><a href="#index-multi_002dfile-operators-789">multi-file operators</a>: <a href="#ncecat-netCDF-Ensemble-Concatenator">ncecat netCDF Ensemble Concatenator</a></li>
<li><a href="#index-multi_002dfile-operators-782">multi-file operators</a>: <a href="#ncea-netCDF-Ensemble-Averager">ncea netCDF Ensemble Averager</a></li>
<li><a href="#index-multi_002dfile-operators-301">multi-file operators</a>: <a href="#Specifying-output-files">Specifying output files</a></li>
<li><a href="#index-multi_002dfile-operators-290">multi-file operators</a>: <a href="#Specifying-input-files">Specifying input files</a></li>
<li><a href="#index-multi_002dfile-operators-220">multi-file operators</a>: <a href="#Memory-Usage-of-Single-and-Multi_002dfile-Operators">Memory Usage of Single and Multi-file Operators</a></li>
<li><a href="#index-multiplication-740">multiplication</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-multiplication-588">multiplication</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007bmultiply_007d-747"><code>multiply</code></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-multiplying-data-797">multiplying data</a>: <a href="#ncflint-netCDF-File-Interpolator">ncflint netCDF File Interpolator</a></li>
<li><a href="#index-multiplying-data-743">multiplying data</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-multislab-408">multislab</a>: <a href="#Multislabs">Multislabs</a></li>
<li><a href="#index-naked-characters-757">naked characters</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-_0040acronym_007bNASA_007d-1042"><acronym>NASA</acronym></a>: <a href="#Proposals-for-Institutional-Funding">Proposals for Institutional Funding</a></li>
<li><a href="#index-_0040acronym_007bNASA-EOSDIS_007d-173"><acronym>NASA EOSDIS</acronym></a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-National-Virtual-Ocean-Data-System-1049">National Virtual Ocean Data System</a>: <a href="#Footnotes">Footnotes</a></li>
<li><a href="#index-_0040code_007bNC_005fBYTE_007d-904"><code>NC_BYTE</code></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040code_007bNC_005fBYTE_007d-770"><code>NC_BYTE</code></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-_0040code_007bNC_005fBYTE_007d-405"><code>NC_BYTE</code></a>: <a href="#Hyperslabs">Hyperslabs</a></li>
<li><a href="#index-_0040code_007bNC_005fCHAR_007d-903"><code>NC_CHAR</code></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040code_007bNC_005fCHAR_007d-771"><code>NC_CHAR</code></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-_0040code_007bNC_005fCHAR_007d-406"><code>NC_CHAR</code></a>: <a href="#Hyperslabs">Hyperslabs</a></li>
<li><a href="#index-_0040code_007bNC_005fDOUBLE_007d-899"><code>NC_DOUBLE</code></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040code_007bNC_005fDOUBLE_007d-664"><code>NC_DOUBLE</code></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007bNC_005fFLOAT_007d-900"><code>NC_FLOAT</code></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040code_007bNC_005fINT_007d-901"><code>NC_INT</code></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040code_007bNC_005fSHORT_007d-902"><code>NC_SHORT</code></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-ncadd-731"><code>ncadd</code></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-_0040command_007bncap_007d-877"><span class="command">ncap</span></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-ncap-542"><code>ncap</code></a>: <a href="#ncap-netCDF-Arithmetic-Processor">ncap netCDF Arithmetic Processor</a></li>
<li><a href="#index-_0040command_007bncap_007d-490"><span class="command">ncap</span></a>: <a href="#Manual-type-conversion">Manual type conversion</a></li>
<li><a href="#index-_0040command_007bncap_007d-221"><span class="command">ncap</span></a>: <a href="#Memory-Usage-of-ncap">Memory Usage of ncap</a></li>
<li><a href="#index-_0040acronym_007bNCAR_007d-136"><acronym>NCAR</acronym></a>: <a href="#Climate-model-paradigm">Climate model paradigm</a></li>
<li><a href="#index-_0040acronym_007bNCAR-CCSM_007d-conventions-772"><acronym>NCAR CCSM</acronym> conventions</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-_0040acronym_007bNCAR-CCSM_007d-conventions-517"><acronym>NCAR CCSM</acronym> conventions</a>: <a href="#NCAR-CCSM-Conventions">NCAR CCSM Conventions</a></li>
<li><a href="#index-_0040acronym_007bNCAR-MSS_007d-309"><acronym>NCAR MSS</acronym></a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-ncatted-686"><code>ncatted</code></a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040command_007bncatted_007d-508"><span class="command">ncatted</span></a>: <a href="#History-attribute">History attribute</a></li>
<li><a href="#index-_0040command_007bncatted_007d-449"><span class="command">ncatted</span></a>: <a href="#Missing-values">Missing values</a></li>
<li><a href="#index-ncbo-729"><code>ncbo</code></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-_0040command_007bncbo_007d-458"><span class="command">ncbo</span></a>: <a href="#Missing-values">Missing values</a></li>
<li><a href="#index-ncdiff-730"><code>ncdiff</code></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-ncdivide-736"><code>ncdivide</code></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-_0040command_007bncdump_007d-840"><span class="command">ncdump</span></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-ncea-779"><code>ncea</code></a>: <a href="#ncea-netCDF-Ensemble-Averager">ncea netCDF Ensemble Averager</a></li>
<li><a href="#index-_0040command_007bncea_007d-455"><span class="command">ncea</span></a>: <a href="#Missing-values">Missing values</a></li>
<li><a href="#index-_0040command_007bncea_007d-166"><span class="command">ncea</span></a>: <a href="#Averaging">Averaging</a></li>
<li><a href="#index-ncecat-787"><code>ncecat</code></a>: <a href="#ncecat-netCDF-Ensemble-Concatenator">ncecat netCDF Ensemble Concatenator</a></li>
<li><a href="#index-ncecat-671"><code>ncecat</code></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040command_007bncecat_007d-161"><span class="command">ncecat</span></a>: <a href="#Concatenation">Concatenation</a></li>
<li><a href="#index-_0040command_007bncextr_007d-814"><span class="command">ncextr</span></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-ncflint-799"><code>ncflint</code></a>: <a href="#ncflint-netCDF-File-Interpolator">ncflint netCDF File Interpolator</a></li>
<li><a href="#index-_0040command_007bncflint_007d-459"><span class="command">ncflint</span></a>: <a href="#Missing-values">Missing values</a></li>
<li><a href="#index-_0040command_007bncflint_007d-169"><span class="command">ncflint</span></a>: <a href="#Interpolating">Interpolating</a></li>
<li><a href="#index-ncks-813"><code>ncks</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-ncks-678"><code>ncks</code></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040acronym_007bNCL_007d-130"><acronym>NCL</acronym></a>: <a href="#Philosophy">Philosophy</a></li>
<li><a href="#index-ncmult-734"><code>ncmult</code></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-ncmultiply-735"><code>ncmultiply</code></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-_0040acronym_007bNCO_007d-availability-7"><acronym>NCO</acronym> availability</a>: <a href="#Availability">Availability</a></li>
<li><a href="#index-_0040acronym_007bNCO_007d-homepage-17"><acronym>NCO</acronym> homepage</a>: <a href="#Availability">Availability</a></li>
<li><a href="#index-_0040file_007bnco_002econfig_002elog_002e_0024_0040_007bGNU_005fTRP_0040_007d_002efoo_007d-123"><span class="file">nco.config.log.${GNU_TRP}.foo</span></a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-_0040file_007bnco_002econfigure_002e_0024_0040_007bGNU_005fTRP_0040_007d_002efoo_007d-122"><span class="file">nco.configure.${GNU_TRP}.foo</span></a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-_0040file_007bnco_002emake_002e_0024_0040_007bGNU_005fTRP_0040_007d_002efoo_007d-124"><span class="file">nco.make.${GNU_TRP}.foo</span></a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-_0040code_007bnco_005finput_005ffile_005flist_007d-509"><code>nco_input_file_list</code></a>: <a href="#Input-file-list-attributes">Input file list attributes</a></li>
<li><a href="#index-_0040code_007bnco_005finput_005ffile_005flist_007d-177"><code>nco_input_file_list</code></a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-_0040code_007bnco_005finput_005ffile_005fnumber_007d-510"><code>nco_input_file_number</code></a>: <a href="#Input-file-list-attributes">Input file list attributes</a></li>
<li><a href="#index-_0040code_007bnco_005finput_005ffile_005fnumber_007d-176"><code>nco_input_file_number</code></a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-_0040code_007bnco_005fopenmp_005fthread_005fnumber_007d-248"><code>nco_openmp_thread_number</code></a>: <a href="#OpenMP-threading">OpenMP threading</a></li>
<li><a href="#index-ncpack-866"><code>ncpack</code></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-ncpdq-865"><code>ncpdq</code></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040command_007bncpdq_007d-257"><span class="command">ncpdq</span></a>: <a href="#OpenMP-threading">OpenMP threading</a></li>
<li><a href="#index-_0040command_007bncpdq_007d-165"><span class="command">ncpdq</span></a>: <a href="#Concatenation">Concatenation</a></li>
<li><a href="#index-ncra-922"><code>ncra</code></a>: <a href="#ncra-netCDF-Record-Averager">ncra netCDF Record Averager</a></li>
<li><a href="#index-ncra-680"><code>ncra</code></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040command_007bncra_007d-456"><span class="command">ncra</span></a>: <a href="#Missing-values">Missing values</a></li>
<li><a href="#index-_0040command_007bncra_007d-167"><span class="command">ncra</span></a>: <a href="#Averaging">Averaging</a></li>
<li><a href="#index-ncrcat-938"><code>ncrcat</code></a>: <a href="#ncrcat-netCDF-Record-Concatenator">ncrcat netCDF Record Concatenator</a></li>
<li><a href="#index-_0040command_007bncrcat_007d-255"><span class="command">ncrcat</span></a>: <a href="#OpenMP-threading">OpenMP threading</a></li>
<li><a href="#index-_0040command_007bncrcat_007d-162"><span class="command">ncrcat</span></a>: <a href="#Concatenation">Concatenation</a></li>
<li><a href="#index-ncrename-958"><code>ncrename</code></a>: <a href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a></li>
<li><a href="#index-_0040acronym_007bNCSA_007d-102"><acronym>NCSA</acronym></a>: <a href="#netCDF-2_002ex-vs_002e-3_002ex">netCDF 2.x vs. 3.x</a></li>
<li><a href="#index-ncsub-732"><code>ncsub</code></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-ncsubtract-733"><code>ncsubtract</code></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-ncunpack-867"><code>ncunpack</code></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-ncwa-977"><code>ncwa</code></a>: <a href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a></li>
<li><a href="#index-ncwa-672"><code>ncwa</code></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040command_007bncwa_007d-457"><span class="command">ncwa</span></a>: <a href="#Missing-values">Missing values</a></li>
<li><a href="#index-_0040command_007bncwa_007d-256"><span class="command">ncwa</span></a>: <a href="#OpenMP-threading">OpenMP threading</a></li>
<li><a href="#index-_0040command_007bncwa_007d-168"><span class="command">ncwa</span></a>: <a href="#Averaging">Averaging</a></li>
<li><a href="#index-_0040var_007bnearbyint_007d-617"><var>nearbyint</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-nearest-integer-function-_0028exact_0029-629">nearest integer function (exact)</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-nearest-integer-function-_0028inexact_0029-628">nearest integer function (inexact)</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040acronym_007bNEC_007d-21"><acronym>NEC</acronym></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-nesting-566">nesting</a>: <a href="#Syntax-of-ncap-statements">Syntax of ncap statements</a></li>
<li><a href="#index-netCDF-18">netCDF</a>: <a href="#Availability">Availability</a></li>
<li><a href="#index-netCDF-2_002ex-93">netCDF 2.x</a>: <a href="#netCDF-2_002ex-vs_002e-3_002ex">netCDF 2.x vs. 3.x</a></li>
<li><a href="#index-netCDF-3_002ex-94">netCDF 3.x</a>: <a href="#netCDF-2_002ex-vs_002e-3_002ex">netCDF 2.x vs. 3.x</a></li>
<li><a href="#index-_0040code_007bNETCDF2_005fONLY_007d-99"><code>NETCDF2_ONLY</code></a>: <a href="#netCDF-2_002ex-vs_002e-3_002ex">netCDF 2.x vs. 3.x</a></li>
<li><a href="#index-_0040code_007bNINTAP_007d-947"><code>NINTAP</code></a>: <a href="#ncrcat-netCDF-Record-Concatenator">ncrcat netCDF Record Concatenator</a></li>
<li><a href="#index-_0040code_007bNINTAP_007d-931"><code>NINTAP</code></a>: <a href="#ncra-netCDF-Record-Averager">ncra netCDF Record Averager</a></li>
<li><a href="#index-_0040code_007bNINTAP_007d-280"><code>NINTAP</code></a>: <a href="#Specifying-input-files">Specifying input files</a></li>
<li><a href="#index-_0040code_007bNO_005fNETCDF_005f2_007d-95"><code>NO_NETCDF_2</code></a>: <a href="#netCDF-2_002ex-vs_002e-3_002ex">netCDF 2.x vs. 3.x</a></li>
<li><a href="#index-normalization-1000">normalization</a>: <a href="#Normalization">Normalization</a></li>
<li><a href="#index-_0040acronym_007bNRA_007d-1043"><acronym>NRA</acronym></a>: <a href="#Proposals-for-Institutional-Funding">Proposals for Institutional Funding</a></li>
<li><a href="#index-_0040command_007bnrnet_007d-324"><span class="command">nrnet</span></a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-_0040acronym_007bNSF_007d-1028"><acronym>NSF</acronym></a>: <a href="#Proposals-for-Institutional-Funding">Proposals for Institutional Funding</a></li>
<li><a href="#index-NT-_0028Microsoft-operating-system_0029-65">NT (Microsoft operating system)</a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-_0040code_007bNUL_007d-907"><code>NUL</code></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-NUL-724">NUL</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-NUL_002dtermination-723">NUL-termination</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-null-operation-807">null operation</a>: <a href="#ncflint-netCDF-File-Interpolator">ncflint netCDF File Interpolator</a></li>
<li><a href="#index-_0040code_007bnumerator_007d-1002"><code>numerator</code></a>: <a href="#Normalization">Normalization</a></li>
<li><a href="#index-_0040acronym_007bNVODS_007d-1048"><acronym>NVODS</acronym></a>: <a href="#Footnotes">Footnotes</a></li>
<li><a href="#index-_0040samp_007bnxt_005flsr_007d-898"><span class="samp">nxt_lsr</span></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-oceanography-334">oceanography</a>: <a href="#DODS_002fOPeNDAP">DODS/OPeNDAP</a></li>
<li><a href="#index-_0040code_007bOMP_005fNUM_005fTHREADS_007d-254"><code>OMP_NUM_THREADS</code></a>: <a href="#OpenMP-threading">OpenMP threading</a></li>
<li><a href="#index-on_002dline-documentation-11">on-line documentation</a>: <a href="#Availability">Availability</a></li>
<li><a href="#index-open-source-1050">open source</a>: <a href="#Footnotes">Footnotes</a></li>
<li><a href="#index-open-source-3">open source</a>: <a href="#Foreword">Foreword</a></li>
<li><a href="#index-Open_002dsource-Project-for-a-Network-Data-Access-Protocol-336">Open-source Project for a Network Data Access Protocol</a>: <a href="#DODS_002fOPeNDAP">DODS/OPeNDAP</a></li>
<li><a href="#index-_0040acronym_007bOPeNDAP_007d_002e-337"><acronym>OPeNDAP</acronym>.</a>: <a href="#DODS_002fOPeNDAP">DODS/OPeNDAP</a></li>
<li><a href="#index-OpenMP-243">OpenMP</a>: <a href="#OpenMP-threading">OpenMP threading</a></li>
<li><a href="#index-OpenMP-218">OpenMP</a>: <a href="#Memory-usage">Memory usage</a></li>
<li><a href="#index-operation-types-460">operation types</a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-operator-speed-963">operator speed</a>: <a href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a></li>
<li><a href="#index-operator-speed-451">operator speed</a>: <a href="#Missing-values">Missing values</a></li>
<li><a href="#index-operator-speed-229">operator speed</a>: <a href="#Operator-limitations">Operator limitations</a></li>
<li><a href="#index-operator-speed-143">operator speed</a>: <a href="#Output-files">Output files</a></li>
<li><a href="#index-operator-speed-90">operator speed</a>: <a href="#Libraries">Libraries</a></li>
<li><a href="#index-operators-4">operators</a>: <a href="#Summary">Summary</a></li>
<li><a href="#index-OptIPuter-1040">OptIPuter</a>: <a href="#Proposals-for-Institutional-Funding">Proposals for Institutional Funding</a></li>
<li><a href="#index-_0040code_007bORO_007d-1006"><code>ORO</code></a>: <a href="#Normalization">Normalization</a></li>
<li><a href="#index-_0040code_007bORO_007d-521"><code>ORO</code></a>: <a href="#NCAR-CCSM-Conventions">NCAR CCSM Conventions</a></li>
<li><a href="#index-_0040acronym_007bOS_007d-19"><acronym>OS</acronym></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-output-file-294">output file</a>: <a href="#Specifying-output-files">Specifying output files</a></li>
<li><a href="#index-output-file-187">output file</a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-_0040var_007boutput_002dpath_007d-328"><var>output-path</var></a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-overwriting-files-491">overwriting files</a>: <a href="#Suppressing-interactive-prompts">Suppressing interactive prompts</a></li>
<li><a href="#index-overwriting-files-152">overwriting files</a>: <a href="#Output-files">Output files</a></li>
<li><a href="#index-_0040command_007bpack_0028x_0029_007d-575"><span class="command">pack(x)</span></a>: <a href="#Intrinsic-functions">Intrinsic functions</a></li>
<li><a href="#index-packing-873">packing</a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-packing-570">packing</a>: <a href="#Intrinsic-functions">Intrinsic functions</a></li>
<li><a href="#index-packing-341">packing</a>: <a href="#DODS_002fOPeNDAP">DODS/OPeNDAP</a></li>
<li><a href="#index-packing-map-889">packing map</a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-packing-policy-878">packing policy</a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-parallelism-1041">parallelism</a>: <a href="#Proposals-for-Institutional-Funding">Proposals for Institutional Funding</a></li>
<li><a href="#index-parallelism-247">parallelism</a>: <a href="#OpenMP-threading">OpenMP threading</a></li>
<li><a href="#index-parser-539">parser</a>: <a href="#ncap-netCDF-Arithmetic-Processor">ncap netCDF Arithmetic Processor</a></li>
<li><a href="#index-pasting-variables-157">pasting variables</a>: <a href="#Appending">Appending</a></li>
<li><a href="#index-pattern-matching-364">pattern matching</a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-pattern-matching-183">pattern matching</a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-PayPal-1011">PayPal</a>: <a href="#Contributing">Contributing</a></li>
<li><a href="#index-_0040var_007bpck_005fmap_007d-890"><var>pck_map</var></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040var_007bpck_005fplc_007d-879"><var>pck_plc</var></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-peak-memory-usage-216">peak memory usage</a>: <a href="#Memory-usage">Memory usage</a></li>
<li><a href="#index-performance-962">performance</a>: <a href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a></li>
<li><a href="#index-performance-450">performance</a>: <a href="#Missing-values">Missing values</a></li>
<li><a href="#index-performance-228">performance</a>: <a href="#Operator-limitations">Operator limitations</a></li>
<li><a href="#index-performance-142">performance</a>: <a href="#Output-files">Output files</a></li>
<li><a href="#index-performance-89">performance</a>: <a href="#Libraries">Libraries</a></li>
<li><a href="#index-Perl-700">Perl</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-Perl-191">Perl</a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-Perl-132">Perl</a>: <a href="#Philosophy">Philosophy</a></li>
<li><a href="#index-permute-dimensions-869">permute dimensions</a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-philosophy-128">philosophy</a>: <a href="#Philosophy">Philosophy</a></li>
<li><a href="#index-pipes-186">pipes</a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-portability-35">portability</a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-positional-arguments-296">positional arguments</a>: <a href="#Specifying-output-files">Specifying output files</a></li>
<li><a href="#index-_0040acronym_007bPOSIX_007d-368"><acronym>POSIX</acronym></a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-_0040acronym_007bPOSIX_007d-265"><acronym>POSIX</acronym></a>: <a href="#Command-line-options">Command line options</a></li>
<li><a href="#index-_0040var_007bpow_007d-618"><var>pow</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-power-591">power</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-power-function-651">power function</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-precision-659">precision</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-preprocessor-tokens-67">preprocessor tokens</a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-_0040code_007bprintf_007d-55"><code>printf</code></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-_0040code_007bprintf_0028_0029_007d-852"><code>printf()</code></a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-_0040code_007bprintf_0028_0029_007d-702"><code>printf()</code></a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-printing-files-contents-811">printing files contents</a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-printing-variables-812">printing variables</a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-Processor-948">Processor</a>: <a href="#ncrcat-netCDF-Record-Concatenator">ncrcat netCDF Record Concatenator</a></li>
<li><a href="#index-Processor-932">Processor</a>: <a href="#ncra-netCDF-Record-Averager">ncra netCDF Record Averager</a></li>
<li><a href="#index-Processor_002c-_0040acronym_007bCCM_007d-281">Processor, <acronym>CCM</acronym></a>: <a href="#Specifying-input-files">Specifying input files</a></li>
<li><a href="#index-promotion-655">promotion</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-promotion-578">promotion</a>: <a href="#Intrinsic-functions">Intrinsic functions</a></li>
<li><a href="#index-promotion-483">promotion</a>: <a href="#Type-conversion">Type conversion</a></li>
<li><a href="#index-proposals-1027">proposals</a>: <a href="#Proposals-for-Institutional-Funding">Proposals for Institutional Funding</a></li>
<li><a href="#index-quadruple-precision-660">quadruple precision</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-quiet-847">quiet</a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-quotes-917">quotes</a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-quotes-761">quotes</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-quotes-383">quotes</a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-RAM-214">RAM</a>: <a href="#Memory-usage">Memory usage</a></li>
<li><a href="#index-rank-989">rank</a>: <a href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a></li>
<li><a href="#index-rank-767">rank</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-_0040code_007brcp_007d-306"><code>rcp</code></a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-_0040code_007brcp_007d-81"><code>rcp</code></a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-_0040acronym_007bRCS_007d-533"><acronym>RCS</acronym></a>: <a href="#Operator-version">Operator version</a></li>
<li><a href="#index-re_002ddimension-872">re-dimension</a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-re_002dorder-dimensions-871">re-order dimensions</a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-record-average-919">record average</a>: <a href="#ncra-netCDF-Record-Averager">ncra netCDF Record Averager</a></li>
<li><a href="#index-record-concatenation-937">record concatenation</a>: <a href="#ncrcat-netCDF-Record-Concatenator">ncrcat netCDF Record Concatenator</a></li>
<li><a href="#index-record-dimension-939">record dimension</a>: <a href="#ncrcat-netCDF-Record-Concatenator">ncrcat netCDF Record Concatenator</a></li>
<li><a href="#index-record-dimension-920">record dimension</a>: <a href="#ncra-netCDF-Record-Averager">ncra netCDF Record Averager</a></li>
<li><a href="#index-record-dimension-908">record dimension</a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-record-dimension-788">record dimension</a>: <a href="#ncecat-netCDF-Ensemble-Concatenator">ncecat netCDF Ensemble Concatenator</a></li>
<li><a href="#index-record-dimension-781">record dimension</a>: <a href="#ncea-netCDF-Ensemble-Averager">ncea netCDF Ensemble Averager</a></li>
<li><a href="#index-record-dimension-398">record dimension</a>: <a href="#Fortran-indexing">Fortran indexing</a></li>
<li><a href="#index-record-variable-911">record variable</a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-record-variable-397">record variable</a>: <a href="#Fortran-indexing">Fortran indexing</a></li>
<li><a href="#index-_0040code_007bregex_007d-369"><code>regex</code></a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-regressions-archive-127">regressions archive</a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-regular-expressions-363">regular expressions</a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-regular-expressions-278">regular expressions</a>: <a href="#Specifying-input-files">Specifying input files</a></li>
<li><a href="#index-regular-expressions-182">regular expressions</a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-remote-files-314">remote files</a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-remote-files-84">remote files</a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-renaming-attributes-954">renaming attributes</a>: <a href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a></li>
<li><a href="#index-renaming-dimensions-953">renaming dimensions</a>: <a href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a></li>
<li><a href="#index-renaming-variables-952">renaming variables</a>: <a href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a></li>
<li><a href="#index-reporting-bugs-103">reporting bugs</a>: <a href="#Help-and-Bug-reports">Help and Bug reports</a></li>
<li><a href="#index-reshape-variables-868">reshape variables</a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040code_007brestrict_007d-60"><code>restrict</code></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-reverse-dimensions-870">reverse dimensions</a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040var_007brint_007d-619"><var>rint</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007brms_007d-467"><code>rms</code></a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-_0040code_007brmssdn_007d-466"><code>rmssdn</code></a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-root_002dmean_002dsquare-475">root-mean-square</a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-Rorik-Peterson-1016">Rorik Peterson</a>: <a href="#Contributors">Contributors</a></li>
<li><a href="#index-_0040var_007bround_007d-620"><var>round</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-rounding-functions-630">rounding functions</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-running-average-921">running average</a>: <a href="#ncra-netCDF-Record-Averager">ncra netCDF Record Averager</a></li>
<li><a href="#index-safeguards-960">safeguards</a>: <a href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a></li>
<li><a href="#index-safeguards-140">safeguards</a>: <a href="#Output-files">Output files</a></li>
<li><a href="#index-_0040code_007bscale_005ffactor_007d-876"><code>scale_factor</code></a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-_0040code_007bscale_005ffactor_007d-573"><code>scale_factor</code></a>: <a href="#Intrinsic-functions">Intrinsic functions</a></li>
<li><a href="#index-_0040var_007bscale_005fformat_007d-236"><var>scale_format</var></a>: <a href="#Operator-limitations">Operator limitations</a></li>
<li><a href="#index-Scientific-Data-Operators-1031">Scientific Data Operators</a>: <a href="#Proposals-for-Institutional-Funding">Proposals for Institutional Funding</a></li>
<li><a href="#index-_0040code_007bscp_007d-307"><code>scp</code></a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-_0040code_007bscp_007d-82"><code>scp</code></a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-script-file-543">script file</a>: <a href="#ncap-netCDF-Arithmetic-Processor">ncap netCDF Arithmetic Processor</a></li>
<li><a href="#index-_0040acronym_007bSDO_007d-1038"><acronym>SDO</acronym></a>: <a href="#Proposals-for-Institutional-Funding">Proposals for Institutional Funding</a></li>
<li><a href="#index-_0040acronym_007bSEIII_007d-1039"><acronym>SEIII</acronym></a>: <a href="#Proposals-for-Institutional-Funding">Proposals for Institutional Funding</a></li>
<li><a href="#index-semi_002dcolon-560">semi-colon</a>: <a href="#Syntax-of-ncap-statements">Syntax of ncap statements</a></li>
<li><a href="#index-server-353">server</a>: <a href="#File-retention">File retention</a></li>
<li><a href="#index-server-338">server</a>: <a href="#DODS_002fOPeNDAP">DODS/OPeNDAP</a></li>
<li><a href="#index-server-198">server</a>: <a href="#Large-Datasets-and-Memory">Large Datasets and Memory</a></li>
<li><a href="#index-Server_002dSide-Distributed-Data-Reduction-_0026-Analysis-1033">Server-Side Distributed Data Reduction &amp; Analysis</a>: <a href="#Proposals-for-Institutional-Funding">Proposals for Institutional Funding</a></li>
<li><a href="#index-server_002dside-processing-1052">server-side processing</a>: <a href="#Footnotes">Footnotes</a></li>
<li><a href="#index-server_002dside-processing-1029">server-side processing</a>: <a href="#Proposals-for-Institutional-Funding">Proposals for Institutional Funding</a></li>
<li><a href="#index-_0040acronym_007bSGI_007d-22"><acronym>SGI</acronym></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-shared-memory-machines-219">shared memory machines</a>: <a href="#Memory-usage">Memory usage</a></li>
<li><a href="#index-shared-memory-parallelism-246">shared memory parallelism</a>: <a href="#OpenMP-threading">OpenMP threading</a></li>
<li><a href="#index-shell-760">shell</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-shell-427">shell</a>: <a href="#UDUnits-Support">UDUnits Support</a></li>
<li><a href="#index-shell-380">shell</a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-shell-180">shell</a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-_0040code_007bshort_0028x_0029_007d-585"><code>short(x)</code></a>: <a href="#Intrinsic-functions">Intrinsic functions</a></li>
<li><a href="#index-_0040var_007bsignedness_007d-235"><var>signedness</var></a>: <a href="#Operator-limitations">Operator limitations</a></li>
<li><a href="#index-_0040var_007bsin_007d-622"><var>sin</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-sine-function-652">sine function</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-single-precision-661">single precision</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040var_007bsinh_007d-621"><var>sinh</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040acronym_007bSMP_007d-245"><acronym>SMP</acronym></a>: <a href="#OpenMP-threading">OpenMP threading</a></li>
<li><a href="#index-sort-alphabetically-822">sort alphabetically</a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-source-code-8">source code</a>: <a href="#Availability">Availability</a></li>
<li><a href="#index-special-characters-720">special characters</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-speed-964">speed</a>: <a href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a></li>
<li><a href="#index-speed-452">speed</a>: <a href="#Missing-values">Missing values</a></li>
<li><a href="#index-speed-230">speed</a>: <a href="#Operator-limitations">Operator limitations</a></li>
<li><a href="#index-speed-205">speed</a>: <a href="#Large-Datasets-and-Memory">Large Datasets and Memory</a></li>
<li><a href="#index-speed-144">speed</a>: <a href="#Output-files">Output files</a></li>
<li><a href="#index-speed-91">speed</a>: <a href="#Libraries">Libraries</a></li>
<li><a href="#index-_0040code_007bsqravg_007d-462"><code>sqravg</code></a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-_0040var_007bsqrt_007d-623"><var>sqrt</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007bsqrt_007d-469"><code>sqrt</code></a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-square-root-function-653">square root function</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040acronym_007bSSDDRA_007d-1034"><acronym>SSDDRA</acronym></a>: <a href="#Proposals-for-Institutional-Funding">Proposals for Institutional Funding</a></li>
<li><a href="#index-_0040acronym_007bSSH_007d-351"><acronym>SSH</acronym></a>: <a href="#File-retention">File retention</a></li>
<li><a href="#index-_0040acronym_007bSSH_007d-83"><acronym>SSH</acronym></a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-standard-deviation-476">standard deviation</a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-standard-input-941">standard input</a>: <a href="#ncrcat-netCDF-Record-Concatenator">ncrcat netCDF Record Concatenator</a></li>
<li><a href="#index-standard-input-926">standard input</a>: <a href="#ncra-netCDF-Record-Averager">ncra netCDF Record Averager</a></li>
<li><a href="#index-standard-input-790">standard input</a>: <a href="#ncecat-netCDF-Ensemble-Concatenator">ncecat netCDF Ensemble Concatenator</a></li>
<li><a href="#index-standard-input-783">standard input</a>: <a href="#ncea-netCDF-Ensemble-Averager">ncea netCDF Ensemble Averager</a></li>
<li><a href="#index-standard-input-174">standard input</a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-statement-552">statement</a>: <a href="#Syntax-of-ncap-statements">Syntax of ncap statements</a></li>
<li><a href="#index-static-linking-88">static linking</a>: <a href="#Libraries">Libraries</a></li>
<li><a href="#index-_0040code_007bstdin_007d-942"><code>stdin</code></a>: <a href="#ncrcat-netCDF-Record-Concatenator">ncrcat netCDF Record Concatenator</a></li>
<li><a href="#index-_0040code_007bstdin_007d-927"><code>stdin</code></a>: <a href="#ncra-netCDF-Record-Averager">ncra netCDF Record Averager</a></li>
<li><a href="#index-_0040code_007bstdin_007d-791"><code>stdin</code></a>: <a href="#ncecat-netCDF-Ensemble-Concatenator">ncecat netCDF Ensemble Concatenator</a></li>
<li><a href="#index-_0040code_007bstdin_007d-784"><code>stdin</code></a>: <a href="#ncea-netCDF-Ensemble-Averager">ncea netCDF Ensemble Averager</a></li>
<li><a href="#index-_0040code_007bstdin_007d-511"><code>stdin</code></a>: <a href="#Input-file-list-attributes">Input file list attributes</a></li>
<li><a href="#index-_0040code_007bstdin_007d-175"><code>stdin</code></a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-stride-944">stride</a>: <a href="#ncrcat-netCDF-Record-Concatenator">ncrcat netCDF Record Concatenator</a></li>
<li><a href="#index-stride-929">stride</a>: <a href="#ncra-netCDF-Record-Averager">ncra netCDF Record Averager</a></li>
<li><a href="#index-stride-832">stride</a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-stride-437">stride</a>: <a href="#Stride">Stride</a></li>
<li><a href="#index-stride-425">stride</a>: <a href="#UDUnits-Support">UDUnits Support</a></li>
<li><a href="#index-strings-722">strings</a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-stub-329">stub</a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-_0040code_007bsubtract_007d-746"><code>subtract</code></a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-subtracting-data-742">subtracting data</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-subtraction-739">subtraction</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-subtraction-587">subtraction</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-summary-5">summary</a>: <a href="#Summary">Summary</a></li>
<li><a href="#index-Sun-27">Sun</a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-swap-space-215">swap space</a>: <a href="#Memory-usage">Memory usage</a></li>
<li><a href="#index-swap-space-197">swap space</a>: <a href="#Large-Datasets-and-Memory">Large Datasets and Memory</a></li>
<li><a href="#index-switches-268">switches</a>: <a href="#Command-line-options">Command line options</a></li>
<li><a href="#index-symbolic-links-888">symbolic links</a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-symbolic-links-764">symbolic links</a>: <a href="#ncbo-netCDF-Binary-Operator">ncbo netCDF Binary Operator</a></li>
<li><a href="#index-symbolic-links-190">symbolic links</a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-symbolic-links-160">symbolic links</a>: <a href="#Averaging-vs_002e-Concatenating">Averaging vs. Concatenating</a></li>
<li><a href="#index-synchronous-file-access-315">synchronous file access</a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-syntax-553">syntax</a>: <a href="#Syntax-of-ncap-statements">Syntax of ncap statements</a></li>
<li><a href="#index-_0040var_007btan_007d-625"><var>tan</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040var_007btanh_007d-624"><var>tanh</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-temporary-output-files-961">temporary output files</a>: <a href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a></li>
<li><a href="#index-temporary-output-files-141">temporary output files</a>: <a href="#Output-files">Output files</a></li>
<li><a href="#index-_0040TeX_007b_007dinfo-13">TeXinfo</a>: <a href="#Availability">Availability</a></li>
<li><a href="#index-_0040var_007bthr_005fnbr_007d-253"><var>thr_nbr</var></a>: <a href="#OpenMP-threading">OpenMP threading</a></li>
<li><a href="#index-threads-244">threads</a>: <a href="#OpenMP-threading">OpenMP threading</a></li>
<li><a href="#index-threads-217">threads</a>: <a href="#Memory-usage">Memory usage</a></li>
<li><a href="#index-_0040code_007btime_007d-528"><code>time</code></a>: <a href="#ARM-Conventions">ARM Conventions</a></li>
<li><a href="#index-_0040code_007btime_007d-524"><code>time</code></a>: <a href="#NCAR-CCSM-Conventions">NCAR CCSM Conventions</a></li>
<li><a href="#index-_0040code_007btime_007d-424"><code>time</code></a>: <a href="#UDUnits-Support">UDUnits Support</a></li>
<li><a href="#index-time_002daveraging-677">time-averaging</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-_0040code_007btime_005foffset_007d-526"><code>time_offset</code></a>: <a href="#ARM-Conventions">ARM Conventions</a></li>
<li><a href="#index-timestamp-502">timestamp</a>: <a href="#History-attribute">History attribute</a></li>
<li><a href="#index-total-472">total</a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-transpose-912">transpose</a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-transpose-396">transpose</a>: <a href="#Fortran-indexing">Fortran indexing</a></li>
<li><a href="#index-_0040var_007btrunc_007d-626"><var>trunc</var></a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-truncation-function-631">truncation function</a>: <a href="#Intrinsic-mathematical-functions">Intrinsic mathematical functions</a></li>
<li><a href="#index-truth-condition-1009">truth condition</a>: <a href="#Normalization">Normalization</a></li>
<li><a href="#index-truth-condition-993">truth condition</a>: <a href="#Mask-condition">Mask condition</a></li>
<li><a href="#index-_0040code_007bttl_007d-468"><code>ttl</code></a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-type-conversion-577">type conversion</a>: <a href="#Intrinsic-functions">Intrinsic functions</a></li>
<li><a href="#index-type-conversion-482">type conversion</a>: <a href="#Type-conversion">Type conversion</a></li>
<li><a href="#index-UDUnits-519">UDUnits</a>: <a href="#NCAR-CCSM-Conventions">NCAR CCSM Conventions</a></li>
<li><a href="#index-UDUnits-413">UDUnits</a>: <a href="#UDUnits-Support">UDUnits Support</a></li>
<li><a href="#index-UDUnits-39">UDUnits</a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-_0040code_007bulimit_007d-203"><code>ulimit</code></a>: <a href="#Large-Datasets-and-Memory">Large Datasets and Memory</a></li>
<li><a href="#index-unary-operations-223">unary operations</a>: <a href="#Memory-Usage-of-ncap">Memory Usage of ncap</a></li>
<li><a href="#index-_0040acronym_007bUNICOS_007d-199"><acronym>UNICOS</acronym></a>: <a href="#Large-Datasets-and-Memory">Large Datasets and Memory</a></li>
<li><a href="#index-Unidata-414">Unidata</a>: <a href="#UDUnits-Support">UDUnits Support</a></li>
<li><a href="#index-Unidata-101">Unidata</a>: <a href="#netCDF-2_002ex-vs_002e-3_002ex">netCDF 2.x vs. 3.x</a></li>
<li><a href="#index-Unidata-38">Unidata</a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-union-of-two-files-158">union of two files</a>: <a href="#Appending">Appending</a></li>
<li><a href="#index-_0040code_007bunits_007d-809"><code>units</code></a>: <a href="#ncflint-netCDF-File-Interpolator">ncflint netCDF File Interpolator</a></li>
<li><a href="#index-_0040code_007bunits_007d-728"><code>units</code></a>: <a href="#ncatted-netCDF-Attribute-Editor">ncatted netCDF Attribute Editor</a></li>
<li><a href="#index-_0040code_007bunits_007d-415"><code>units</code></a>: <a href="#UDUnits-Support">UDUnits Support</a></li>
<li><a href="#index-_0040acronym_007bUNIX_007d-289"><acronym>UNIX</acronym></a>: <a href="#Specifying-input-files">Specifying input files</a></li>
<li><a href="#index-_0040acronym_007bUNIX_007d-266"><acronym>UNIX</acronym></a>: <a href="#Command-line-options">Command line options</a></li>
<li><a href="#index-_0040acronym_007bUNIX_007d-185"><acronym>UNIX</acronym></a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-_0040acronym_007bUNIX_007d-75"><acronym>UNIX</acronym></a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-_0040acronym_007bUNIX_007d-37"><acronym>UNIX</acronym></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-_0040command_007bunpack_0028x_0029_007d-576"><span class="command">unpack(x)</span></a>: <a href="#Intrinsic-functions">Intrinsic functions</a></li>
<li><a href="#index-unpacking-874">unpacking</a>: <a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">ncpdq netCDF Permute Dimensions Quickly</a></li>
<li><a href="#index-unpacking-571">unpacking</a>: <a href="#Intrinsic-functions">Intrinsic functions</a></li>
<li><a href="#index-unpacking-342">unpacking</a>: <a href="#DODS_002fOPeNDAP">DODS/OPeNDAP</a></li>
<li><a href="#index-_0040acronym_007bURL_007d-312"><acronym>URL</acronym></a>: <a href="#Remote-storage">Remote storage</a></li>
<li><a href="#index-_0040code_007bUSE_005fFORTRAN_005fARITHMETIC_007d-66"><code>USE_FORTRAN_ARITHMETIC</code></a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-variable-names-955">variable names</a>: <a href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a></li>
<li><a href="#index-variance-477">variance</a>: <a href="#Operation-Types">Operation Types</a></li>
<li><a href="#index-version-532">version</a>: <a href="#Operator-version">Operator version</a></li>
<li><a href="#index-weighted-average-974">weighted average</a>: <a href="#ncwa-netCDF-Weighted-Averager">ncwa netCDF Weighted Averager</a></li>
<li><a href="#index-whitespace-426">whitespace</a>: <a href="#UDUnits-Support">UDUnits Support</a></li>
<li><a href="#index-wildcards-365">wildcards</a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
<li><a href="#index-wildcards-279">wildcards</a>: <a href="#Specifying-input-files">Specifying input files</a></li>
<li><a href="#index-_0040code_007bWIN32_007d-71"><code>WIN32</code></a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-Windows-62">Windows</a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-Windows-33">Windows</a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-wrapped-coordinates-864">wrapped coordinates</a>: <a href="#ncks-netCDF-Kitchen-Sink">ncks netCDF Kitchen Sink</a></li>
<li><a href="#index-wrapped-coordinates-432">wrapped coordinates</a>: <a href="#Wrapped-coordinates">Wrapped coordinates</a></li>
<li><a href="#index-wrapped-coordinates-407">wrapped coordinates</a>: <a href="#Hyperslabs">Hyperslabs</a></li>
<li><a href="#index-wrapped-filenames-292">wrapped filenames</a>: <a href="#Specifying-input-files">Specifying input files</a></li>
<li><a href="#index-WWW-documentation-10">WWW documentation</a>: <a href="#Availability">Availability</a></li>
<li><a href="#index-_0040command_007bxargs_007d-302"><span class="command">xargs</span></a>: <a href="#Specifying-output-files">Specifying output files</a></li>
<li><a href="#index-_0040command_007bxargs_007d-184"><span class="command">xargs</span></a>: <a href="#Large-numbers-of-input-files">Large numbers of input files</a></li>
<li><a href="#index-_0040command_007bxlc_007d-48"><span class="command">xlc</span></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-_0040command_007bxlC_007d-47"><span class="command">xlC</span></a>: <a href="#Compatability">Compatability</a></li>
<li><a href="#index-XP-_0028Microsoft-operating-system_0029-64">XP (Microsoft operating system)</a>: <a href="#Windows-Operating-System">Windows Operating System</a></li>
<li><a href="#index-Yorick-238">Yorick</a>: <a href="#Operator-limitations">Operator limitations</a></li>
<li><a href="#index-Yorick-133">Yorick</a>: <a href="#Philosophy">Philosophy</a></li>
<li><a href="#index-_0040code_007b_007c_007d-_0028wildcard-character_0029-378"><code>|</code> (wildcard character)</a>: <a href="#Variable-subsetting">Variable subsetting</a></li>
   </ul><!-- Print table of contents -->

<div class="contents">
<h2>Table of Contents</h2>
<ul>
<li><a name="toc_Foreword" href="#Foreword">Foreword</a>
<li><a name="toc_Summary" href="#Summary">Summary</a>
<li><a name="toc_Introduction" href="#Introduction">1 Introduction</a>
<ul>
<li><a href="#Availability">1.1 Availability</a>
<li><a href="#Compatability">1.2 Operating systems compatible with <acronym>NCO</acronym></a>
<ul>
<li><a href="#Windows-Operating-System">1.2.1 Compiling <acronym>NCO</acronym> for Microsoft Windows <acronym>OS</acronym></a>
</li></ul>
<li><a href="#Libraries">1.3 Libraries</a>
<li><a href="#netCDF-2_002ex-vs_002e-3_002ex">1.4 netCDF 2.x vs. 3.x</a>
<li><a href="#Help-and-Bug-reports">1.5 Help and Bug reports</a>
</li></ul>
<li><a name="toc_Strategies" href="#Strategies">2 Operator Strategies</a>
<ul>
<li><a href="#Philosophy">2.1 <acronym>NCO</acronym> operator philosophy</a>
<li><a href="#Climate-model-paradigm">2.2 Climate model paradigm</a>
<li><a href="#Output-files">2.3 Temporary output files</a>
<li><a href="#Appending">2.4 Appending variables to a file</a>
<li><a href="#Addition-Subtraction-Division-Multiplication-and-Interpolation">2.5 Addition Subtraction Division Multiplication and Interpolation</a>
<li><a href="#Averaging-vs_002e-Concatenating">2.6 Averagers vs. Concatenators</a>
<ul>
<li><a href="#Concatenation">2.6.1 Concatenators <span class="command">ncrcat</span> and <span class="command">ncecat</span></a>
<li><a href="#Averaging">2.6.2 Averagers <span class="command">ncea</span>, <span class="command">ncra</span>, and <span class="command">ncwa</span></a>
<li><a href="#Interpolating">2.6.3 Interpolator <span class="command">ncflint</span></a>
</li></ul>
<li><a href="#Large-numbers-of-input-files">2.7 Working with large numbers of input files</a>
<li><a href="#Large-Datasets-and-Memory">2.8 Working with large datasets</a>
<li><a href="#Memory-usage">2.9 Approximate <acronym>NCO</acronym> memory requirements</a>
<ul>
<li><a href="#Memory-Usage-of-Single-and-Multi_002dfile-Operators">2.9.1 Memory Usage of Single and Multi-file Operators</a>
<li><a href="#Memory-Usage-of-ncap">2.9.2 Memory Usage of <span class="command">ncap</span></a>
</li></ul>
<li><a href="#Operator-limitations">2.10 Performance limitations of the operators</a>
</li></ul>
<li><a name="toc_Common-features" href="#Common-features">3 Features common to most operators</a>
<ul>
<li><a href="#Internationalization">3.1 Internationalization</a>
<li><a href="#OpenMP-threading">3.2 OpenMP threading</a>
<li><a href="#Large-File-Support">3.3 Large File Support</a>
<li><a href="#Command-line-options">3.4 Command line options</a>
<li><a href="#Specifying-input-files">3.5 Specifying input files</a>
<li><a href="#Specifying-output-files">3.6 Specifying output files</a>
<li><a href="#Remote-storage">3.7 Accessing files stored remotely</a>
<ul>
<li><a href="#DODS_002fOPeNDAP">3.7.1 <acronym>DODS</acronym>/<acronym>OPeNDAP</acronym></a>
</li></ul>
<li><a href="#File-retention">3.8 Retention of remotely retrieved files</a>
<li><a href="#Variable-subsetting">3.9 Including/Excluding specific variables</a>
<li><a href="#Coordinate-variables">3.10 Including/Excluding coordinate variables</a>
<li><a href="#Fortran-indexing">3.11 C &amp; Fortran index conventions</a>
<li><a href="#Hyperslabs">3.12 Hyperslabs</a>
<li><a href="#Multislabs">3.13 Multislabs</a>
<li><a href="#UDUnits-Support">3.14 UDUnits Support</a>
<li><a href="#Wrapped-coordinates">3.15 Wrapped coordinates</a>
<li><a href="#Stride">3.16 Stride</a>
<li><a href="#Missing-values">3.17 Missing values</a>
<li><a href="#Operation-Types">3.18 Operation Types</a>
<li><a href="#Type-conversion">3.19 Type conversion</a>
<ul>
<li><a href="#Automatic-type-conversion">3.19.1 Automatic type conversion</a>
<li><a href="#Manual-type-conversion">3.19.2 Manual type conversion</a>
</li></ul>
<li><a href="#Suppressing-interactive-prompts">3.20 Suppressing interactive prompts</a>
<li><a href="#History-attribute">3.21 History attribute</a>
<li><a href="#Input-file-list-attributes">3.22 Input file list attributes</a>
<li><a href="#NCAR-CCSM-Conventions">3.23 <acronym>NCAR CCSM</acronym> Conventions</a>
<li><a href="#ARM-Conventions">3.24 <acronym>ARM</acronym> Conventions</a>
<li><a href="#Operator-version">3.25 Operator version</a>
</li></ul>
<li><a name="toc_Operator-Reference-Manual" href="#Operator-Reference-Manual">4 Reference manual for all operators</a>
<ul>
<li><a href="#ncap-netCDF-Arithmetic-Processor">4.1 <span class="command">ncap</span> netCDF Arithmetic Processor</a>
<ul>
<li><a href="#Left-hand-casting">4.1.1 Left hand casting</a>
<li><a href="#Syntax-of-ncap-statements">4.1.2 Syntax of <span class="command">ncap</span> statements</a>
<li><a href="#Intrinsic-functions">4.1.3 Intrinsic functions</a>
<li><a href="#Intrinsic-functions">Packing and Unpacking Algorithms</a>
<li><a href="#Intrinsic-functions">Type Conversion Functions</a>
<li><a href="#Intrinsic-mathematical-functions">4.1.4 Intrinsic mathematical functions</a>
</li></ul>
<li><a href="#ncatted-netCDF-Attribute-Editor">4.2 <span class="command">ncatted</span> netCDF Attribute Editor</a>
<li><a href="#ncbo-netCDF-Binary-Operator">4.3 <span class="command">ncbo</span> netCDF Binary Operator</a>
<li><a href="#ncea-netCDF-Ensemble-Averager">4.4 <span class="command">ncea</span> netCDF Ensemble Averager</a>
<li><a href="#ncecat-netCDF-Ensemble-Concatenator">4.5 <span class="command">ncecat</span> netCDF Ensemble Concatenator</a>
<li><a href="#ncflint-netCDF-File-Interpolator">4.6 <span class="command">ncflint</span> netCDF File Interpolator</a>
<li><a href="#ncks-netCDF-Kitchen-Sink">4.7 <span class="command">ncks</span> netCDF Kitchen Sink</a>
<ul>
<li><a href="#ncks-netCDF-Kitchen-Sink">Options specific to <span class="command">ncks</span></a>
</li></ul>
<li><a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">4.8 <span class="command">ncpdq</span> netCDF Permute Dimensions Quickly</a>
<ul>
<li><a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">Packing and Unpacking Functions</a>
<li><a href="#ncpdq-netCDF-Permute-Dimensions-Quickly">Dimension Permutation</a>
</li></ul>
<li><a href="#ncra-netCDF-Record-Averager">4.9 <span class="command">ncra</span> netCDF Record Averager</a>
<li><a href="#ncrcat-netCDF-Record-Concatenator">4.10 <span class="command">ncrcat</span> netCDF Record Concatenator</a>
<li><a href="#ncrename-netCDF-Renamer">4.11 <span class="command">ncrename</span> netCDF Renamer</a>
<li><a href="#ncwa-netCDF-Weighted-Averager">4.12 <span class="command">ncwa</span> netCDF Weighted Averager</a>
<ul>
<li><a href="#Mask-condition">4.12.1 Mask condition</a>
<li><a href="#Normalization">4.12.2 Normalization</a>
</li></ul>
</li></ul>
<li><a name="toc_Contributing" href="#Contributing">5 Contributing</a>
<ul>
<li><a href="#Contributors">5.1 Contributors</a>
<li><a href="#Proposals-for-Institutional-Funding">5.2 Proposals for Institutional Funding</a>
</li></ul>
<li><a name="toc_General-Index" href="#General-Index">General Index</a>
</li></ul>
</div>

<!-- TTFN (Ta ta for now) -->
<div class="footnote">
<hr>
<a name="texinfo-footnotes-in-document"></a><h4>Footnotes</h4><p class="footnote"><small>[<a name="fn-1" href="#fnd-1">1</a>]</small> 
To produce these formats, <span class="file">nco.texi</span> was simply run through the
freely available programs <code>texi2dvi</code>, <code>dvips</code>,
<code>texi2html</code>, and <code>makeinfo</code>. 
Due to a bug in TeX, the resulting Postscript file, <span class="file">nco.ps</span>,
contains the Table of Contents as the final pages. 
Thus if you print <span class="file">nco.ps</span>, remember to insert the Table of
Contents after the cover sheet before you staple the manual. 
</p>

   <p class="footnote"><small>[<a name="fn-2" href="#fnd-2">2</a>]</small> 
The <span class="samp">_BSD_SOURCE</span> token is required on some Linux platforms where
<span class="command">gcc</span> dislikes the network header files like
<span class="file">netinet/in.h</span>).</p>

   <p class="footnote"><small>[<a name="fn-3" href="#fnd-3">3</a>]</small> <acronym>NCO</acronym> may still build with an
<acronym>ANSI</acronym> or <acronym>ISO</acronym> C89 or C94/95-compliant compiler if the
C&nbsp;pre-processor<!-- /@w --> undefines the <code>restrict</code> type qualifier, e.g.,
by invoking the compiler with <span class="samp">-Drestrict=''</span>.</p>

   <p class="footnote"><small>[<a name="fn-4" href="#fnd-4">4</a>]</small> The Cygwin package is available from<br>
<code>http://sourceware.redhat.com/cygwin</code><br>
<a name="index-_0040code_007bgcc_007d-1045"></a><a name="index-_0040code_007bg_002b_002b_007d-1046"></a><a name="index-_0040code_007bg77_007d-1047"></a>Currently, Cygwin&nbsp;20.x<!-- /@w --> comes with the <acronym>GNU</acronym> C/C++/Fortran
compilers (<span class="command">gcc</span>, <span class="command">g++</span>, <span class="command">g77</span>). 
These <acronym>GNU</acronym> compilers may be used to build the netCDF
distribution itself.</p>

   <p class="footnote"><small>[<a name="fn-5" href="#fnd-5">5</a>]</small> The <span class="command">ldd</span> command, if it is available on your system,
will tell you where the executable is looking for each dynamically
loaded library. Use, e.g., <code>ldd `which ncea`</code>.</p>

   <p class="footnote"><small>[<a name="fn-6" href="#fnd-6">6</a>]</small> The Hierarchical Data Format, or <acronym>HDF</acronym>, is another
self-describing data format similar to, but more elaborate than,
netCDF.</p>

   <p class="footnote"><small>[<a name="fn-7" href="#fnd-7">7</a>]</small> One must link the <acronym>NCO</acronym> code to the <acronym>HDF4</acronym>
<acronym>MFHDF</acronym> library instead of the usual netCDF library. 
Does <span class="samp">MF</span> stands for Mike Folk? 
Perhaps. 
In any case, the <acronym>MFHDF</acronym> library only supports netCDF&nbsp;2.x<!-- /@w -->
calls. 
Thus I will try to keep this capability in <acronym>NCO</acronym> as long as it
is not too much trouble.</p>

   <p class="footnote"><small>[<a name="fn-8" href="#fnd-8">8</a>]</small> The <span class="command">ncrename</span> operator is an exception to this rule. 
See <a href="#ncrename-netCDF-Renamer">ncrename netCDF Renamer</a>.</p>

   <p class="footnote"><small>[<a name="fn-9" href="#fnd-9">9</a>]</small> The terminology <dfn>merging</dfn> is
reserved for an (unwritten) operator which replaces hyperslabs of a
variable in one file with hyperslabs of the same variable from another
file</p>

   <p class="footnote"><small>[<a name="fn-10" href="#fnd-10">10</a>]</small> Yes, the terminology is confusing. 
By all means mail me if you think of a better nomenclature. 
Should <acronym>NCO</acronym> use <dfn>paste</dfn> instead of <dfn>append</dfn>? 
</p>

   <p class="footnote"><small>[<a name="fn-11" href="#fnd-11">11</a>]</small> Currently
<span class="command">ncea</span> and <span class="command">ncrcat</span> are symbolically linked to the
<span class="command">ncra</span> executable, which behaves slightly differently based on
its invocation name (i.e., <span class="samp">argv[0]</span>). 
These three operators share the same source code, but merely have
different inner loops.</p>

   <p class="footnote"><small>[<a name="fn-12" href="#fnd-12">12</a>]</small> The third averaging operator, <span class="command">ncwa</span>, is the most
sophisticated averager in <acronym>NCO</acronym>. 
However, <span class="command">ncwa</span> is in a different class than <span class="command">ncra</span> and
<span class="command">ncea</span> because it can only operate on a single file per
invocation (as opposed to multiple files). 
On that single file, however, <span class="command">ncwa</span> provides a richer set of
averaging options&mdash;including weighting, masking, and broadcasting.</p>

   <p class="footnote"><small>[<a name="fn-13" href="#fnd-13">13</a>]</small> The exact length which exceeds the operating system internal
limit for command line lengths varies from <acronym>OS</acronym> to <acronym>OS</acronym>
and from shell to shell. 
<acronym>GNU</acronym> <code>bash</code> may not have any arbitrary fixed limits to the
size of command line arguments. 
Many <acronym>OS</acronym>s cannot handle command line arguments (including
results of file globbing) exceeding 4096 characters.</p>

   <p class="footnote"><small>[<a name="fn-14" href="#fnd-14">14</a>]</small> 
If a <span class="command">getopt_long</span> function cannot be found on the system,
<acronym>NCO</acronym> will use the <span class="command">getopt_long</span> from the
<span class="command">my_getopt</span> package by Benjamin Sittler
<a href="mailto:bsittler@iname.com">bsittler@iname.com</a>. 
This is <acronym>BSD</acronym>-licensed software available from
<a href="http://www.geocities.com/ResearchTriangle/Node/9405/#my_getopt">http://www.geocities.com/ResearchTriangle/Node/9405/#my_getopt</a>.</p>

   <p class="footnote"><small>[<a name="fn-15" href="#fnd-15">15</a>]</small> The <span class="samp">-n</span> option is a backward compatible superset of the
<code>NINTAP</code> option from the <acronym>NCAR</acronym> <acronym>CCM</acronym> Processor.</p>

   <p class="footnote"><small>[<a name="fn-16" href="#fnd-16">16</a>]</small> The <span class="command">msrcp</span> command must be in the user's path and
located in one of the following directories: <code>/usr/local/bin</code>,
<code>/usr/bin</code>, <code>/opt/local/bin</code>, or <code>/usr/local/dcs/bin</code>. 
</p>

   <p class="footnote"><small>[<a name="fn-17" href="#fnd-17">17</a>]</small> 
<a name="index-_0040acronym_007bNVODS_007d-1048"></a><a name="index-National-Virtual-Ocean-Data-System-1049"></a><a name="index-open-source-1050"></a><acronym>DODS</acronym> is being deprecated because it is ambiguous, referring
both to a protocol and to a collection of (oceanography) data. 
It is superceded by two terms. 
<acronym>DAP</acronym> is the discipline-neutral Data Access Protocol at the
heart of <acronym>DODS</acronym>. 
The National Virtual Ocean Data System (<acronym>NVODS</acronym>) refers to the
collection of oceanography data and oceanographic extensions to
<acronym>DAP</acronym>. 
In other words, <acronym>NVODS</acronym> is implemented with <acronym>OPeNDAP</acronym>. 
<acronym>OPeNDAP</acronym> is <em>also</em> the open source project which
maintains, develops, and promulgates the <acronym>DAP</acronym> standard. 
<acronym>OPeNDAP</acronym> and <acronym>DAP</acronym> really are interchangeable. 
Got it yet?</p>

   <p class="footnote"><small>[<a name="fn-18" href="#fnd-18">18</a>]</small> 
Automagic support for <acronym>DODS/OPeNDAP</acronym> version 3.2.x was deprecated in
December, 2003 with <acronym>NCO</acronym> 2.8.4. 
<acronym>NCO</acronym> now supports <acronym>DODS/OPeNDAP</acronym> version 3.4.x.</p>

   <p class="footnote"><small>[<a name="fn-19" href="#fnd-19">19</a>]</small> 
The minimal set of libraries required to build <acronym>NCO</acronym> as
<acronym>DODS/OPeNDAP</acronym> clients are
<span class="file">DODS-dap-3.4.x</span>, <span class="file">DODS-nc3-dods-3.4.5</span>, and
<span class="file">DODS-packages-3.4.x</span>.</p>

   <p class="footnote"><small>[<a name="fn-20" href="#fnd-20">20</a>]</small> 
We are most familiar with the <acronym>DODS/OPeNDAP</acronym> ability to enable
network-transparent data access. 
<a name="index-constraint-expressions-1051"></a><a name="index-server_002dside-processing-1052"></a><acronym>DODS/OPeNDAP</acronym> has many other features, including sophisticated
hyperslabbing and server-side processing via <dfn>constraint expressions</dfn>. 
If you know more about this, please consider writing a section
on "<acronym>DODS/OPeNDAP</acronym> Capabilities of Interest to <acronym>NCO</acronym> Users"
for incorporation in the <cite>NCO User's Guide</cite>.</p>

   <p class="footnote"><small>[<a name="fn-21" href="#fnd-21">21</a>]</small> For example, the <acronym>DOE</acronym> <acronym>ARM</acronym> program often
uses <var>att_type</var> = <code>NC_CHAR</code> and <var>missing_value</var> =
<span class="samp">-99999.</span>. 
</p>

   <p class="footnote"><small>[<a name="fn-22" href="#fnd-22">22</a>]</small>

<!-- texi2html does not like @math{} -->
<p>32767 = 2^15&minus;1

   <p></p>

   <p class="footnote"><small>[<a name="fn-23" href="#fnd-23">23</a>]</small> Operators began performing type conversions before arithmetic
in <acronym>NCO</acronym> version&nbsp;1.2<!-- /@w -->, August, 2000. 
Previous versions never performed unnecessary type conversion for
arithmetic.</p>

   <p class="footnote"><small>[<a name="fn-24" href="#fnd-24">24</a>]</small> 
<a name="index-C-language-1053"></a>The actual type conversions are handled by intrinsic C-language type
conversion, so the <code>floor()</code> function is not explicitly called,
though the results would be the same if it were.</p>

   <p class="footnote"><small>[<a name="fn-25" href="#fnd-25">25</a>]</small> 
The exception is appending/altering the attributes <code>x_op</code>,
<code>y_op</code>, <code>z_op</code>, and <code>t_op</code> for variables which have been
averaged across space and time dimensions. 
This feature is scheduled for future inclusion in <acronym>NCO</acronym>. 
</p>

   <p class="footnote"><small>[<a name="fn-26" href="#fnd-26">26</a>]</small> 
The <acronym>CCSM</acronym> convention recommends <code>time</code> be stored in the format
<var>time</var> since <var>base_time</var>, e.g., the <code>units</code> attribute of
<code>time</code> might be <span class="samp">days since 1992-10-8 15:15:42.5 -6:00</span>. 
A&nbsp;problem<!-- /@w --> with this format occurs when using <span class="command">ncrcat</span> to
concatenate multiple files together, each with a different
<var>base_time</var>. 
That is, any <code>time</code> values from files following the first file to
be concatenated should be corrected to the <var>base_time</var> offset
specified in the <code>units</code> attribute of <code>time</code> from the first
file. 
The analogous problem has been fixed in <acronym>ARM</acronym> files
(see <a href="#ARM-Conventions">ARM Conventions</a>) and could be fixed for <acronym>CCSM</acronym> files if
there is sufficient lobbying. 
</p>

   <p class="footnote"><small>[<a name="fn-27" href="#fnd-27">27</a>]</small> Although not a part of the standard, <acronym>NCO</acronym> enforces
the policy that the <code>missing_value</code> attribute, if any, of a packed
variable is also stored at the original precision.</p>

   <p class="footnote"><small>[<a name="fn-28" href="#fnd-28">28</a>]</small> 
ANSI&nbsp;C<!-- /@w --> compilers are guaranteed to support double precision versions
of these functions. 
These functions normally operate on netCDF variables of type <code>NC_DOUBLE</code>
without having to perform intrinsic conversions. 
For example, <acronym>ANSI</acronym> compilers provide <code>sin</code> for the sine of C-type
<code>double</code> variables. 
The <acronym>ANSI</acronym> standard does not require, but many compilers provide,
an extended set of mathematical functions that apply to single
(<code>float</code>) and quadruple (<code>long double</code>) precision variables. 
Using these functions (e.g., <code>sinf</code> for <code>float</code>,
<code>sinl</code> for <code>long double</code>), when available, is more efficient
than casting variables to type <code>double</code>, performing the operation,
and then recasting. 
<acronym>NCO</acronym> uses the faster intrinsic functions when they are
available, and uses the casting method when they are not. 
</p>

   <p class="footnote"><small>[<a name="fn-29" href="#fnd-29">29</a>]</small> Linux supports more of these intrinsic functions than
other OSs.</p>

   <p class="footnote"><small>[<a name="fn-30" href="#fnd-30">30</a>]</small> A&nbsp;naked<!-- /@w --> (i.e., unprotected or unquoted) <span class="samp">*</span> is a
wildcard character. 
A&nbsp;naked<!-- /@w --> <span class="samp">-</span> may confuse the command line parser. 
A&nbsp;naked<!-- /@w --> <span class="samp">+</span> and <span class="samp">/</span> are relatively harmless.</p>

   <p class="footnote"><small>[<a name="fn-31" href="#fnd-31">31</a>]</small> The widely used shell Bash correctly interprets all these
special characters even when they are not quoted. 
That is, Bash does not prevent <acronym>NCO</acronym> from correctly interpreting
the intended arithmetic operation when the following arguments are given
(without quotes) to <span class="command">ncbo</span>:
<span class="samp">--op_typ=+</span>, <span class="samp">--op_typ=-</span>, <span class="samp">--op_typ=*</span>,
and <span class="samp">--op_typ=/</span></p>

   <p class="footnote"><small>[<a name="fn-32" href="#fnd-32">32</a>]</small> The command to do this is <span class="samp">ln -s -f ncbo ncadd</span></p>

   <p class="footnote"><small>[<a name="fn-33" href="#fnd-33">33</a>]</small> The command to do this is <span class="samp">alias ncadd='ncbo --op_typ=add'</span></p>

   <p class="footnote"><small>[<a name="fn-34" href="#fnd-34">34</a>]</small> This is because <span class="command">ncra</span> collapses the record dimension
to a size of&nbsp;1<!-- /@w --> (making it a <dfn>degenerate</dfn> dimension), but does
not remove it, while <span class="command">ncwa</span> removes all dimensions it averages
over. 
In other words, <span class="command">ncra</span> changes the size but not the rank of
variables, while <span class="command">ncwa</span> changes both the size and the rank of
variables.</p>

   <p class="footnote"><small>[<a name="fn-35" href="#fnd-35">35</a>]</small> 
Those familiar with netCDF mechanics might wish to know what is
happening here: <span class="command">ncks</span> does not attempt to redefine the variable
in <var>output-file</var> to match its definition in <var>input-file</var>,
<span class="command">ncks</span> merely copies the values of the variable and its
coordinate dimensions, if any, from <var>input-file</var> to
<var>output-file</var>. 
</p>

   <p class="footnote"><small>[<a name="fn-36" href="#fnd-36">36</a>]</small> This limitation, imposed by the netCDF storage layer,
may be relaxed in the future with netCDF4.</p>

   <p class="footnote"><small>[<a name="fn-37" href="#fnd-37">37</a>]</small> The default behavior of (<span class="samp">-I</span>) changed on
1998/12/01&mdash;before this date the default was not to weight or mask
coordinate variables.</p>

   <p class="footnote"><small>[<a name="fn-38" href="#fnd-38">38</a>]</small> If <code>lat_wgt</code> contains Gaussian weights then the value of
<code>latitude</code> in the <var>output-file</var> will be the area-weighted
centroid of the hyperslab. 
For the example given, this is about 30&nbsp;degrees.<!-- /@w --></p>

   <p class="footnote"><small>[<a name="fn-39" href="#fnd-39">39</a>]</small> <code>gw</code> stands for <dfn>Gaussian weight</dfn> in the
<acronym>NCAR</acronym> climate model.</p>

   <p class="footnote"><small>[<a name="fn-40" href="#fnd-40">40</a>]</small> <code>ORO</code> stands for <dfn>Orography</dfn> in the <acronym>NCAR</acronym>
climate model. 
<var>ORO</var> &lt; 0.5 selects the gridpoints which are covered by
ocean.</p>

   <p class="footnote"><small>[<a name="fn-41" href="#fnd-41">41</a>]</small> 
<a name="index-chocolate-1054"></a>Happy users have sent me a few gifts, though. 
This includes a box of imported chocolate. 
Mmm. 
Appreciation and gifts are definitely better than money. 
Naturally, I'm too lazy to split and send gifts to the other developers. 
However, unlike some <acronym>NCO</acronym> developers, I have a high-paying "real job". 
My intention is to split monetary donations among the active developers
and to send them their shares via PayPal.</p>

   <p><hr></div>

</body></html>