This file is indexed.

/usr/share/cgnstools/cgns.tcl is in cgns-convert 3.3.0-5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   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
array set CGNSnodes {
  AdditionalExponents          {1 AdditionalExponents_t R4 3 0}
  AdditionalFamilyName         {0 AdditionalFamilyName_t C1 {} 1}
  AdditionalUnits              {1 AdditionalUnits_t C1 {32 3} 0}
  ArbitraryGridMotion          {0 ArbitraryGridMotion_t C1 {} 1}
  ArbitraryGridMotionPointers  {1 DataArray_t C1 32 0}
  Area                         {1 Area_t MT {} 0}
  AreaType                     {1 AreaType_t C1 {} 0}
  AverageInterface             {1 AverageInterface_t MT {} 0}
  AverageInterfaceType         {1 AverageInterfaceType_t C1 {} 0}
  Axisymmetry                  {1 Axisymmetry_t MT {} 0}
  AxisymmetryAngle             {1 DataArray_t R4 1 0}
  AxisymmetryAxisVector        {1 DataArray_t R4 2 0}
  AxisymmetryReferencePoint    {1 DataArray_t R4 2 0}
  BaseIterativeData            {0 BaseIterativeData_t I4 1 0}
  BC                           {0 BC_t C1 {} 1}
  BCData                       {0 BCData_t MT {} 0}
  BCDataSet                    {0 BCDataSet_t C1 {} 1}
  BCProperty                   {1 BCProperty_t MT {} 0}
  BCRegionName                 {1 Descriptor_t C1 {} 1}
  CellListDonor                {1 IndexArray_t I4 {} 0}
  CGNSBase                     {0 CGNSBase_t I4 2 1}
  CGNSLibraryVersion           {1 CGNSLibraryVersion_t R4 1 0}
  ChemicalKineticsModel        {1 ChemicalKineticsModel_t C1 {} 0}
  ConvergenceDataArray         {1 DataArray_t R4 {} 1}
  CoordinateNames              {1 DataArray_t C1 {32 2} 0}
  CoordinateData               {0 DataArray_t R4 {} 1}
  DataArray                    {0 DataArray_t {} {} 1}
  DataClass                    {1 DataClass_t C1 {} 0}
  DataConversion               {1 DataConversion_t R4 2 0}
  Descriptor                   {0 Descriptor_t C1 {} 1}
  DiffusionModel               {1 \"int[1+...+IndexDimension]\" I4 {} 0}
  DimensionalExponents         {1 DimensionalExponents_t R4 5 0}
  DimensionalUnits             {1 DimensionalUnits_t C1 {32 5} 0}
  DirichletData                {1 BCData_t MT {} 0}
  DiscreteData                 {0 DiscreteData_t MT {} 1}
  DiscreteDataArray            {0 DataArray_t R4 {} 1}
  ElementConnectivity          {1 DataArray_t I4 {} 0}
  ElementList                  {1 IndexArray_t I4 {} 0}
  ElementRange                 {1 IndexRange_t I4 {} 0}
  Elements                     {0 Elements_t I4 2 1}
  EMConductivityModel          {1 EMConductivityModel_t C1 {} 0}
  EMElectricFieldModel         {1 EMElectricFieldModel_t C1 {} 0}
  EMMagneticFieldModel         {1 EMMagneticFieldModel_t C1 {} 0}
  EquationDimension            {1 \"int\" I4 1 0}
  Family                       {0 Family_t MT {} 1}
  FamilyBC                     {1 FamilyBC_t C1 {} 0}
  FamilyBCDataSet              {0 FamilyBCDataSet_t C1 {} 1}
  FamilyName                   {1 FamilyName_t C1 {} 0}
  FamilyNameReference          {0 FamilyName_t C1 {} 0}
  FamilyPointers               {1 DataArray_t C1 32 0}
  FlowEquationSet              {1 FlowEquationSet_t MT {} 0}
  FlowSolution                 {0 FlowSolution_t MT {} 1}
  FlowSolutionPointers         {1 DataArray_t C1 32 0}
  GasModel                     {1 GasModel_t C1 {} 0}
  GeometryEntity               {0 GeometryEntity_t MT {} 1}
  GeometryFile                 {1 GeometryFile_t C1 {} 0}
  GeometryFormat               {1 GeometryFormat_t C1 {} 0}
  GeometryReference            {0 GeometryReference_t MT {} 1}
  GlobalConvergenceHistory     {1 ConvergenceHistory_t I4 1 0}
  GoverningEquations           {1 GoverningEquations_t C1 {} 0}
  Gravity                      {1 Gravity_t MT {} 0}
  GravityVector                {1 DataArray_t R4 3 0}
  GridConnectivity             {0 GridConnectivity_t C1 {} 1}
  GridConnectivity1to1         {0 GridConnectivity1to1_t C1 {} 1}
  GridConnectivityProperty     {1 GridConnectivityProperty_t MT {} 0}
  GridConnectivityRegionName   {1 Descriptor_t C1 {} 1}
  GridConnectivityType         {1 GridConnectivityType_t C1 {} 0}
  GridCoordinates              {0 GridCoordinates_t MT {} 1}
  GridCoordinatesPointers      {1 DataArray_t C1 32 0}
  GridLocation                 {1 GridLocation_t C1 {} 0}
  GridVelocity                 {0 DataArray_t R4 {} 1}
  IndexArray                   {0 IndexArray_t I4 {} 0}
  IndexRange                   {0 IndexRange_t I4 {} 0}
  IntegralData                 {0 IntegralData_t MT {} 1}
  IntegralDataValue            {0 DataArray_t R4 1 1}
  InterpolantsDonor            {1 DataArray_t R4 {} 0}
  InwardNormalIndex            {1 \"int[IndexDimension]\" I4 {} 0}
  InwardNormalList             {1 IndexArray_t R4 {} 0}
  IterationValues              {1 DataArray_t I4 {} 0}
  NeumannData                  {1 BCData_t MT {} 0}
  NormDefinitions              {1 Descriptor_t C1 {} 0}
  NumberOfFamilies             {1 DataArray_t I4 {} 0}
  NumberOfZones                {1 DataArray_t I4 {} 0}
  Ordinal                      {1 Ordinal_t I4 1 0}
  OriginLocation               {1 DataArray_t R4 {3 2} 0}
  OversetHoles                 {0 OversetHoles_t MT {} 1}
  ParentData                   {1 DataArray_t I4 {} 0}
  ParentElements               {1 DataArray_t I4 {} 0}
  ParentElementsPosition       {1 DataArray_t I4 {} 0}
  Periodic                     {1 Periodic_t MT {} 0}
  PointList                    {1 IndexArray_t I4 {} 0}
  PointListDonor               {1 IndexArray_t I4 {} 0}
  PointRange                   {1 IndexRange_t I4 {} 0}
  PointRangeDonor              {1 IndexRange_t I4 {} 0}
  ReferenceState               {1 ReferenceState_t MT {} 0}
  ReferenceStateDescription    {1 Descriptor_t C1 {} 0}
  ReferenceStateValue          {0 DataArray_t R4 1 1}
  RegionName                   {1 DataArray_t C1 32 0}
  RigidGridMotion              {0 RigidGridMotion_t C1 {} 1}
  RigidGridMotionPointers      {1 DataArray_t C1 32 0}
  RigidRotationAngle           {1 DataArray_t R4 3 0}
  RigidRotationRate            {1 DataArray_t R4 3 0}
  RigidVelocity                {1 DataArray_t R4 3 0}
  Rind                         {1 Rind_t I4 {} 0}
  RotatingCoordinates          {1 RotatingCoordinates_t MT {} 0}
  RotationAngle                {1 DataArray_t R4 3 0}
  RotationCenter               {1 DataArray_t R4 3 0}
  RotationRateVector           {1 DataArray_t R4 3 0}
  SimulationType               {1 SimulationType_t C1 {} 0}
  SolutionData                 {0 DataArray_t R4 {} 1}
  SurfaceArea                  {1 DataArray_t R4 1 0}
  ThermalConductivityModel     {1 ThermalConductivityModel_t C1 {} 0}
  ThermalRelaxationModel       {1 ThermalRelaxationModel_t C1 {} 0}
  TimeValues                   {1 DataArray_t R4 {} 0}
  Transform                    {1 \"int[IndexDimension]\" I4 {} 0}
  Translation                  {1 DataArray_t R4 3 0}
  TurbulenceClosure            {1 TurbulenceClosure_t C1 {} 0}
  TurbulenceModel              {1 TurbulenceModel_t C1 {} 0}
  UserDefinedData              {0 UserDefinedData_t MT {} 1}
  ViscosityModel               {1 ViscosityModel_t C1 {} 0}
  WallFunction                 {1 WallFunction_t MT {} 0}
  WallFunctionType             {1 WallFunctionType_t C1 {} 0}
  Zone                         {0 Zone_t I4 {} 1}
  ZoneBC                       {1 ZoneBC_t MT {} 0}
  ZoneConvergenceHistory       {1 ConvergenceHistory_t I4 1 0}
  ZoneGridConnectivity         {1 ZoneGridConnectivity_t MT {} 0}
  ZoneGridConnectivityPointers {1 DataArray_t C1 32 0}
  ZoneIterativeData            {0 ZoneIterativeData_t MT {} 0}
  ZonePointers                 {1 DataArray_t C1 32 0}
  ZoneSubRegion                {0 ZoneSubRegion_t I4 {} 1}
  ZoneSubRegionPointers        {1 DataArray_t C1 32 0}
  ZoneType                     {1 ZoneType_t C1 {} 0}
}

array set CGNSnodeChildren {
  / {CGNSBase CGNSLibraryVersion}
  ArbitraryGridMotion_t {DataClass Descriptor DimensionalUnits \
      GridLocation GridVelocity Rind UserDefinedData}
  Area_t {AreaType Descriptor RegionName SurfaceArea UserDefinedData}
  AverageInterface_t {AverageInterfaceType Descriptor UserDefinedData}
  Axisymmetry_t {AxisymmetryAngle AxisymmetryAxisVector \
      AxisymmetryReferencePoint CoordinateNames DataClass \
      Descriptor DimensionalUnits UserDefinedData}
  BaseIterativeData_t {DataArray DataClass Descriptor DimensionalUnits \
      FamilyPointers IterationValues NumberOfFamilies NumberOfZones \
      TimeValues UserDefinedData ZonePointers}
  BC_t {BCDataSet BCProperty DataClass Descriptor DimensionalUnits \
      ElementList ElementRange FamilyName GridLocation InwardNormalIndex \
      InwardNormalList Ordinal PointList PointRange \
      ReferenceState UserDefinedData}
  BCData_t {DataArray DataClass Descriptor DimensionalUnits UserDefinedData}
  BCDataSet_t {DataClass Descriptor DimensionalUnits DirichletData \
      NeumannData ReferenceState UserDefinedData}
  BCProperty_t {Area Descriptor UserDefinedData WallFunction}
  CGNSBase_t {Axisymmetry BaseIterativeData DataClass Descriptor \
      DimensionalUnits Family FlowEquationSet GlobalConvergenceHistory \
      Gravity IntegralData ReferenceState RotatingCoordinates \
      SimulationType UserDefinedData Zone}
  ChemicalKineticsModel_t {DataArray DataClass Descriptor \
      DimensionalUnits UserDefinedData}
  ConvergenceHistory_t {ConvergenceDataArray DataClass Descriptor \
      DimensionalUnits NormDefinitions UserDefinedData}
  DataArray_t {DataConversion DataClass Descriptor \
      DimensionalExponents DimensionalUnits}
  DiscreteData_t {DataClass Descriptor DimensionalUnits \
      DiscreteDataArray GridLocation Rind UserDefinedData}
  Elements_t {Descriptor ElementConnectivity ElementRange \
      ParentData Rind UserDefinedData}
  Family_t {Descriptor FamilyBC GeometryReference Ordinal UserDefinedData}
  FamilyBCDataSet_t {DataClass Descriptor DimensionalUnits DirichletData \
      NeumannData ReferenceState UserDefinedData}
  FlowEquationSet_t {ChemicalKineticsModel DataClass Descriptor \
      DimensionalUnits EquationDimension GasModel GoverningEquations \
      ThermalConductivityModel ThermalRelaxationModel TurbulenceClosure \
      TurbulenceModel UserDefinedData ViscosityModel}
  FlowSolution_t {DataClass Descriptor DimensionalUnits \
      GridLocation Rind SolutionData UserDefinedData}
  GasModel_t {DataArray DataClass Descriptor DimensionalUnits \
      UserDefinedData}
  GeometryReference_t {Descriptor GeometryEntity GeometryFile \
      GeometryFormat UserDefinedData}
  GoverningEquations_t {Descriptor DiffusionModel UserDefinedData}
  Gravity_t {DataClass Descriptor DimensionalUnits \
      GravityVector UserDefinedData}
  GridConnectivity_t {CellListDonor Descriptor GridConnectivityProperty \
      GridConnectivityType GridLocation InterpolantsDonor Ordinal \
      PointList PointListDonor PointRange UserDefinedData}
  GridConnectivity1to1_t {Descriptor Ordinal PointRange PointRangeDonor \
      Transform UserDefinedData}
  GridConnectivityProperty_t {AverageInterface Descriptor Periodic \
      UserDefinedData}
  GridCoordinates_t {CoordinateData DataClass Descriptor DimensionalUnits \
      Rind UserDefinedData}
  IntegralData_t {DataClass Descriptor DimensionalUnits \
      IntegralDataValue UserDefinedData}
  OversetHoles_t {Descriptor GridLocation PointList PointRange \
      UserDefinedData}
  Periodic_t {DataClass Descriptor DimensionalUnits RotationAngle \
      RotationCenter Translation UserDefinedData}
  ReferenceState_t {DataClass Descriptor DimensionalUnits \
      ReferenceStateDescription ReferenceStateValue UserDefinedData}
  RigidGridMotion_t {DataArray DataClass Descriptor DimensionalUnits \
      OriginLocation RigidRotationAngle RigidRotationRate \
      RigidVelocity UserDefinedData}
  RotatingCoordinates_t {DataClass Descriptor DimensionalUnits \
      RotationCenter RotationRateVector UserDefinedData}
  ThermalConductivityModel_t {DataArray DataClass Descriptor \
      DimensionalUnits UserDefinedData}
  ThermalRelaxationModel_t {DataArray DataClass Descriptor \
      DimensionalUnits UserDefinedData}
  TurbulenceClosure_t {DataArray DataClass Descriptor \
      DimensionalUnits UserDefinedData}
  TurbulenceModel_t {DataArray DataClass Descriptor DiffusionModel \
      DimensionalUnits UserDefinedData}
  UserDefinedData_t {DataArray DataClass Descriptor DimensionalUnits}
  ViscosityModel_t {DataArray DataClass Descriptor DimensionalUnits \
      UserDefinedData}
  WallFunction_t {Descriptor UserDefinedData WallFunctionType}
  Zone_t {ArbitraryGridMotion DataClass Descriptor DiscreteData \
      DimensionalUnits Elements FamilyName FlowEquationSet FlowSolution \
      GridCoordinates IntegralData Ordinal ReferenceState RigidGridMotion \
      RotatingCoordinates UserDefinedData ZoneBC ZoneConvergenceHistory \
      ZoneGridConnectivity ZoneIterativeData ZoneType}
  ZoneBC_t {BC DataClass Descriptor DimensionalUnits ReferenceState \
      UserDefinedData}
  ZoneGridConnectivity_t {Descriptor GridConnectivity \
      GridConnectivity1to1 OversetHoles UserDefinedData}
  ZoneIterativeData_t {ArbitraryGridMotionPointers DataArray DataClass \
      Descriptor DimensionalUnits FlowSolutionPointers \
      GridCoordinatesPointers RigidGridMotionPointers UserDefinedData}
  ZoneSubRegion_t {BCRegionName DataArray DataClass DimensionalUnits \
      Descriptor FamilyName GridConnectivityRegionName GridLocation \
      PointList PointRange Rind UserDefinedData}
}

array set CGNSdataValues {
  AdditionalUnits_t {\
      {Null UserDefined Ampere Abampere Statampere Edison auCurrent} \
      {Null UserDefined Mole Entities StandardCubicFoot StandardCubicMeter} \
      {Null UserDefined Candela Candle Carcel Hefner Violle}}
  AngleUnits_t {Null UserDefined Degree Radian}
  ArbitraryGridMotion_t {Null UserDefined NonDeformingGrid DeformingGrid}
  AreaType_t {Null UserDefined BleedArea CaptureArea}
  AverageInterfaceType_t {Null UserDefined AverageAll AverageCircumferential \
      AverageRadial AverageI AverageJ AverageK}
  BC_t {Null UserDefined BCAxisymmetricWedge BCDegenerateLine \
      BCDegeneratePoint BCDirichlet BCExtrapolate BCFarfield BCGeneral \
      BCInflow BCInflowSubsonic BCInflowSupersonic BCNeumann BCOutflow \
      BCOutflowSubsonic BCOutflowSupersonic BCSymmetryPlane BCSymmetryPolar \
      BCTunnelInflow BCTunnelOutflow BCWall BCWallInviscid BCWallViscous \
      BCWallViscousHeatFlux BCWallViscousIsothermal FamilySpecified}
  BCData_t {Null UserDefined Dirichlet Neumann}
  BCDataSet_t {Null UserDefined BCAxisymmetricWedge BCDegenerateLine \
      BCDegeneratePoint BCDirichlet BCExtrapolate BCGeneral \
      BCInflowSubsonic BCInflowSupersonic BCNeumann \
      BCOutflowSubsonic BCOutflowSupersonic BCSymmetryPlane BCSymmetryPolar \
      BCTunnelInflow BCTunnelOutflow BCWall BCWallInviscid BCWallViscous \
      BCWallViscousHeatFlux BCWallViscousIsothermal FamilySpecified}
  ChemicalKineticsModel_t {Null UserDefined Frozen ChemicalEquilibCurveFit \
      ChemicalEquilibMinimization ChemicalNonequilib}
  DataClass_t {Null UserDefined Dimensional NormalizedByDimensional \
      NormalizedByUnknownDimensional NondimensionalParameter \
      DimensionlessConstant}
  DimensionalUnits_t {\
      {Null UserDefined Kilogram Gram Slug PoundMass} \
      {Null UserDefined Meter Centimeter Millimeter Foot Inch} \
      {Null UserDefined Second} \
      {Null UserDefined Kelvin Celcius Rankine Fahrenheit} \
      {Null UserDefined Radian Degree}}
  EMConductivityModel_t {Null UserDefined Constant Frozen \
      Equilibrium_LinRessler Chemistry_LinRessler}
  EMElectricFieldModel_t {Null UserDefined Voltage Interpolated \
      Constant Frozen}
  EMMagneticFieldModel_t {Null UserDefined Interpolated \
      Constant Frozen}
  FamilyBC_t {Null UserDefined BCAxisymmetricWedge BCDegenerateLine \
      BCDegeneratePoint BCDirichlet BCExtrapolate BCFarfield BCGeneral \
      BCInflow BCInflowSubsonic BCInflowSupersonic BCNeumann BCOutflow \
      BCOutflowSubsonic BCOutflowSupersonic BCSymmetryPlane BCSymmetryPolar \
      BCTunnelInflow BCTunnelOutflow BCWall BCWallInviscid BCWallViscous \
      BCWallViscousHeatFlux BCWallViscousIsothermal FamilySpecified}
  FamilyBCDataSet_t {Null UserDefined BCAxisymmetricWedge BCDegenerateLine \
      BCDegeneratePoint BCDirichlet BCExtrapolate BCGeneral \
      BCInflowSubsonic BCInflowSupersonic BCNeumann \
      BCOutflowSubsonic BCOutflowSupersonic BCSymmetryPlane BCSymmetryPolar \
      BCTunnelInflow BCTunnelOutflow BCWall BCWallInviscid BCWallViscous \
      BCWallViscousHeatFlux BCWallViscousIsothermal}
  GasModel_t {Null UserDefined Ideal VanderWaals CaloricallyPerfect \
      ThermallyPerfect ConstantDensity RedlichKwong}
  GoverningEquations_t {Null UserDefined FullPotential Euler NSLaminar \
      NSTurbulent NSLaminarIncompressible NSTurbulentIncompressible}
  GridConnectivityType_t {Null UserDefined Overset Abutting Abutting1to1}
  GridLocation_t {Null UserDefined Vertex CellCenter FaceCenter \
      IFaceCenter JFaceCenter KFaceCenter EdgeCenter}
  LengthUnits_t {Null UserDefined Meter Centimeter Millimeter Foot Inch}
  MassUnits_t {Null UserDefined Kilogram Gram Slug PoundMass}
  RigidGridMotion_t {Null UserDefined ConstantRate VariableRate}
  SimulationType_t {Null UserDefined TimeAccurate NonTimeAccurate}
  TemperatureUnits_t {Null UserDefined Kelvin Celcius Rankine Fahrenheit}
  ThermalConductivityModel_t {Null UserDefined PowerLaw SutherlandLaw \
      ConstantPrandtl}
  ThermalRelaxationModel_t {Null UserDefined Frozen ThermalEquilib \
      ThermalNonequilib}
  TimeUnits_t {Null UserDefined Second}
  TurbulenceClosure_t {Null UserDefined EddyViscosity ReynoldsStress \
      ReynoldsStressAlgebraic}
  TurbulenceModel_t {Null UserDefined \
      Algebraic_BaldwinLomax Algebraic_CebeciSmith \
      HalfEquation_JohnsonKing OneEquation_BaldwinBarth \
      OneEquation_SpalartAllmaras TwoEquation_JonesLaunder \
      TwoEquation_MenterSST TwoEquation_Wilcox}
  ViscosityModel_t {Null UserDefined Constant PowerLaw SutherlandLaw}
  WallFunctionType_t {Null UserDefined Generic}
  ZoneType_t {Null UserDefined Structured Unstructured}
  DataType_t {Null UserDefined Integer RealSingle RealDouble Character}
  ElementType_t {Null UserDefined NODE BAR_2 BAR_3 TRI_3 TRI_6 QUAD_4 \
      QUAD_8 QUAD_9 TETRA_4 TETRA_10 PYRA_5 PYRA_14 PENTA_6 PENTA_15 \
      PENTA_18 HEXA_8 HEXA_20 HEXA_27 MIXED NGON_n}
  PointSet_t {Null UserDefined PointList PointListDonor PointRange \
      PointRangeDonor ElementRange ElementList CellListDonor}
}

array set CGNSnodeDesc {
  AdditionalExponents_t {AdditionalExponents AdditionalExponents_t {0,1} \
      {R4 or R8} 1 3 {ElectricCurrentExponent, SubstanceAmountExponent,\
      LuminousIntensityExponent}}
  AdditionalFamilyName_t {{user defined} AdditionalFamilyName_t {0,N} \
      C1 1 {length of string} {name of family}}
  AdditionalUnits_t {AdditionalUnits AdditionalUnits_t {0,1} C1 2 {32,3} \
      {For ElectricCurrent, one of: Null, UserDefined, Ampere, Abampere,\
Statampere, Edison, auCurrent

For SubstanceAmount, one of: Null, UserDefined, Mole, Entities,\
StandardCubicFoot, StandardCubicMeter

For LuminousIntensity, one of: Null, UserDefined, Candela, Candle,\
Carcel, Hefner, Violle}}
  ArbitraryGridMotion_t {{user defined} ArbitraryGridMotion_t {0,N} C1 1 \
      {length of string} {one of: Null, UserDefined, NonDeformingGrid,\
      or DeformingGrid}}
  ArbitraryGridMotionPointers {ArbitraryGridMotionPointers DataArray_t {0,1} \
      C1 2 {32,NumberOfSteps} {pointers to ArbitraryGridMotion_t nodes}}
  Area_t {Area Area_t {0,1} MT {} {} {}}
  AreaType_t {AreaType AreaType_t 1 C1 1 {length of string} {one of:\
      Null, UserDefined, BleedArea, or CaptureArea}}
  AverageInterface_t {AverageInterface AverageInterface_t {0,1} MT {} {} {}}
  AverageInterfaceType_t {AverageInterfaceType AverageInterfaceType_t 1 \
      C1 1 {length of string} {one of: Null, UserDefined, AverageAll,\
      AverageCircumferential, AverageRadial, AverageI, AverageJ or AverageK}}
  Axisymmetry_t {Axisymmetry Axisymmetry_t {0,1} MT {} {} {}}
  AxisymmetryAngle {AxisymmetryAngle DataArray_t {0,1} R4 1 1 \
      {circumferential extent}}
  AxisymmetryAxisVector {AxisymmetryAxisVector DataArray_t 1 R4 1 2 \
      {direction cosines of rotation axis}}
  AxisymmetryReferencePoint {AxisymmetryReferencePoint DataArray_t 1 R4 1 2 \
      {origin for defining rotation axis}}
  BaseIterativeData_t {{user defined} BaseIterativeData_t {0,1} I4 1 1 \
      {NumberOfSteps}}
  BC_t {{user defined} BC_t {0,N} C1 1 {length of string} \
      {one of: Null, UserDefined, BCAxisymmetricWedge, BCDegenerateLine,\
      BCDegeneratePoint, BCDirichlet, BCExtrapolate, BCFarfield, BCGeneral,\
      BCInflow, BCInflowSubsonic, BCInflowSupersonic, BCNeumann,\
      BCOutflow, BCOutflowSubsonic, BCOutflowSupersonic,\
      BCSymmetryPlane, BCSymmetryPolar, BCTunnelInflow,\
      BCTunnelOutflow, BCWall, BCWallInviscid, BCWallViscous,\
      BCWallViscousHeatFlux, BCWallViscousIsothermal or FamilySpecified}}
  BCData_t {{user defined} BCData_t {0,1} MT {} {} {}}
  BCDataSet_t {{user defined} BCDataSet_t {0,N} C1 1 {length of string} \
      {BCTypeSimple value, one of: Null, UserDefined, BCAxisymmetricWedge,\
      BCDegenerateLine, BCDegeneratePoint, BCDirichlet, BCExtrapolate,\
      BCGeneral, BCInflowSubsonic, BCInflowSupersonic, BCNeumann,\
      BCOutflowSubsonic, BCOutflowSupersonic, BCSymmetryPlane,\
      BCSymmetryPolar, BCTunnelInflow, BCTunnelOutflow, BCWall,\
      BCWallInviscid, BCWallViscous, BCWallViscousHeatFlux,\
      BCWallViscousIsothermal or FamilySpecified}}
  BCProperty_t {BCProperty BCProperty_t {0,1} MT {} {} {}}
  BCRegionName {BCRegionName Descriptor_t {0,1} C1 1 \
      {length of string} {name of a ZoneBC node}}
  CellListDonor {CellListDonor IndexArray_t {0,1} I4 2 \
      {IndexDimension of donor,ListLength} \
      {list of indices for cells on adjoining patch}}
  CGNSBase_t {{user defined} CGNSBase_t {0,N} I4 1 2 \
      {CellDimension, PhysicalDimension}}
  CGNSLibraryVersion_t {CGNSLibraryVersion CGNSLibraryVersion_t 1 R4 1 1 \
      {CGNS Mid-Level Library version number}}
  ChemicalKineticsModel_t {ChemicalKineticsModel ChemicalKineticsModel_t \
      {0,1} C1 1 {length of string} {one of: Null, UserDefined, Frozen,\
      ChemicalEquilibCurveFit, ChemicalEquilibMinimization,\
      or ChemicalNonequilib}}
  ConvergenceDataArray {{user defined} DataArray_t {0,N} {C1,I4,R4 or R8} \
      1 NumIterations {convergence data}}
  ConvergenceHistory_t {{user defined} ConvergenceHistory_t {0,1} I4 1 1 \
      {number of iterations}}
  CoordinateNames {CoordinateNames DataArray_t {0,1} C1 2 {32,2} \
      {dataname identifiers for coordinates}}
  CoordinateData {{user defined} DataArray_t {0,N} {R4 or R8} 1 \
      NumberOfVertices {coordinate component array. Data-name identifiers\
      for coordinates are: CoordinateX, CoordinateY, CoordinateZ,\
      CoordinateR, CoordinateTheta, CoordinatePhi, CoordinateXi,\
      CoordinateEta, CoordinateZeta, CoordinateNormal and\
      CoordinateTangential}}
  DataArray_t {{user defined} DataArray_t {0,N} {C1,I4,R4 or R8} \
      {context dependent} {context dependent} {data values}}
  DataClass_t {DataClass DataClass_t {0,1} C1 1 {length of string} \
      {one of: Null, UserDefined, Dimensional, NormalizedByDimensional,\
      NormalizedByUnknownDimensional, NondimensionalParameter or\
      DimensionlessConstant}}
  DataConversion_t {DataConversion DataConversion_t {0,1} {R4 or R8} 1 2 \
      {ConversionScale, ConversionOffset}}
  Descriptor_t {{user defined} Descriptor_t {0,N} C1 1 {length of string} \
      {description string}}
  DimensionalExponents_t {DimensionalExponents DimensionalExponents_t {0,1} \
      {R4 or R8} 1 5 {MassExponent, LengthExponent, TimeExponent,\
      TemperatureExponent, AngleExponent}}
  DimensionalUnits_t {DimensionalUnits DimensionalUnits_t {0,1} C1 2 {32,5} \
      {For mass, one of: Null, UserDefined, Kilogram, Gram, Slug, PoundMass

For length, one of: Null, UserDefined, Meter, Centimeter, Millimeter, Foot, Inch

For time, one of: Null, UserDefined, Second

For temperature, one of: Null, UserDefined, Kelvin, Celsius, Rankine, Fahrenheit

For angles, one of: Null, UserDefined, Degree, Radian}}
  DirichletData {DirichletData BCData_t {0,1} MT {} {} {}}
  DiscreteData_t {{user defined} DiscreteData_t {0,N} MT {} {} {}}
  DiscreteDataArray {{user defined} DataArray_t {0,N} {C1,I4,R4 or R8} \
      IndexDimension {number of vertices or cells} {additional solution data\
      not normally part of the flow solution}}
  ElementConnectivity {ElementConnectivity DataArray_t 1 I4 1 \
      {ElementDataSize} {element connectivity table}}
  ElementList {ElementList IndexArray_t {0,1} I4 2 \
      {IndexDimension,ListLength} {list of indices for cells}}
  ElementRange {ElementRange IndexRange_t 1 I4 1 2 {begin and end indices}}
  Elements_t {{user defined} Elements_t {0,N} I4 1 2 \
      {ElementType, ElementSizeBoundary

element types are: 0:Null, 1:UserDefined, 2:NODE, 3:BAR_2, 4:BAR_3,\
5:TRI_3, 6:TRI_6, 7:QUAD_4, 8:QUAD_8, 9:QUAD_9, 10:TETRA_4, 11:TETRA_10,\
12:PYRA_5, 13:PYRA_14, 14:PENTA_6, 15:PENTA_15, 16:PENTA_18, 17:HEXA_8,\
18:HEXA_20, 19:HEXA_27, 20:MIXED, 21+:NGON_n}}
  EMConductivityModel_t {EMConductivityModel EMConductivityModel_t \
      {0,1} C1 1 {length of string} {one of: Null, UserDefined, Constant,\
Frozen, Equilibrium_LinRessler or Chemistry_LinRessler}}
  EMElectricFieldModel_t {EMElectricFieldModel EMElectricFieldModel_t \
      {0,1} C1 1 {length of string} {one of: Null, UserDefined, Voltage,\
Interpolated, Constant or Frozen}}
  EMMagneticFieldModel_t {EMMagneticFieldModel EMMagneticFieldModel_t \
      {0,1} C1 1 {length of string} {one of: Null, UserDefined, Interpolated,\
Constant or Frozen}}
  EquationDimension {EquationDimension \"int\" {0,1} I4 1 1 \
      {EquationDimension value}}
  Family_t {{user defined} Family_t {0,N} MT {} {} {}}
  FamilyBC_t {FamilyBC FamilyBC_t {0,1} C1 1 {length of string} \
      {one of: Null, UserDefined, BCAxisymmetricWedge, BCDegenerateLine,\
      BCDegeneratePoint, BCDirichlet, BCExtrapolate, BCFarfield, BCGeneral,\
      BCInflow, BCInflowSubsonic, BCInflowSupersonic, BCNeumann,\
      BCOutflow, BCOutflowSubsonic, BCOutflowSupersonic,\
      BCSymmetryPlane, BCSymmetryPolar, BCTunnelInflow,\
      BCTunnelOutflow, BCWall, BCWallInviscid, BCWallViscous,\
      BCWallViscousHeatFlux, BCWallViscousIsothermal or FamilySpecified}}
  FamilyBCDataSet_t {{user defined} FamilyBCDataSet_t {0,N} C1 1 {length of string} \
      {BCTypeSimple value, one of: Null, UserDefined, BCAxisymmetricWedge,\
      BCDegenerateLine, BCDegeneratePoint, BCDirichlet, BCExtrapolate,\
      BCGeneral, BCInflowSubsonic, BCInflowSupersonic, BCNeumann,\
      BCOutflowSubsonic, BCOutflowSupersonic, BCSymmetryPlane,\
      BCSymmetryPolar, BCTunnelInflow, BCTunnelOutflow, BCWall,\
      BCWallInviscid, BCWallViscous, BCWallViscousHeatFlux,\
      BCWallViscousIsothermal}}
  FamilyName_t {FamilyName FamilyName_t {0,1} C1 1 {length of string} \
      {name of CFD family}}
  FamilyNameReference {{FamilyParent or user defined} FamilyName_t {0,N} \
      C1 1 {length of string} {name of family}}
  FamilyPointers {FamilyPointers DataArray_t {0,1} C1 3 \
      {32,MaxNumberOfZones,NumberOfSteps} {pointers to Family_t nodes}}
  FlowEquationSet_t {FlowEquationSet FlowEquationSet_t {0,1} MT {} {} {}}
  FlowSolution_t {{user defined} FlowSolution_t {0,N} MT {} {} {}}
  FlowSolutionPointers {FlowSolutionPointers DataArray_t {0,1} C1 2 \
      {32,NumberOfSteps} {pointers to FlowSolution_t nodes}}
  GasModel_t {GasModel GasModel_t {0,1} C1 1 {length of string} \
      {one of: Null, UserDefined, Ideal, VanderWaals, CaloricallyPerfect,\
       ThermallyPerfect, ConstantDensity, or RedlichKwong}}
  GeometryEntity_t {{user defined} GeometryEntity_t {0,N} MT {} {} {}}
  GeometryFile_t {GeometryFile GeometryFile_t 1 C1 1 {length of string} \
      {name of the geometry file}}
  GeometryFormat_t {GeometryFormat GeometryFormat_t 1 C1 1 {length of string} \
      {name of the geometry format}}
  GeometryReference_t {{user defined} GeometryReference_t {0,N} MT {} {} {}}
  GlobalConvergenceHistory {GlobalConvergenceHistory ConvergenceHistory_t \
      {0,1} I4 1 1 {number of iterations}}
  GoverningEquations_t {GoverningEquations GoverningEquations_t {0,1} \
      C1 1 {length of string} {one of: Null, UserDefined, FullPotential,\
      Euler, NSLaminar, NSTurbulent, NSLaminarIncompressible\
      or NSTurbulentIncompressible}}
  Gravity_t {Gravity Gravity_t {0,1} MT {} {} {}}
  GravityVector {GravityVector DataArray_t 1 {R4 or R8} 1 PhysicalDimension \
      {components of the gravity vector}}
  GridConnectivity_t {{user defined} GridConnectivity_t {0,N} C1 1 \
      {length of string} {ZoneDonorName}}
  GridConnectivity1to1_t {{user defined} GridConnectivity1to1_t {0,N} C1 1 \
      {length of string} {ZoneDonorName}}
  GridConnectivityProperty_t {GridConnectivityProperty \
      GridConnectivityProperty_t {0,1} MT {} {} {}}
  GridConnectivityRegionName {GridConnectivityRegionName Descriptor_t {0,1} \
      C1 1 {length of string} {name of a ZoneGridConnectivity node}}
  GridConnectivityType_t {GridConnectivityType GridConnectivityType_t {0,1} \
      C1 1 {length of string} {one of: Null, UserDefined, Overset,\
      Abutting, or Abutting1to1}}
  GridCoordinates_t {{user defined} GridCoordinates_t {0,N} MT {} {} {}}
  GridCoordinatesPointers {GridCoordinatesPointers DataArray_t {0,1} \
      C1 2 {32,NumberOfSteps} {pointers to GridCoordinates_t nodes}}
  GridLocation_t {GridLocation GridLocation_t {0,1} C1 1 {length of string} \
      {one of: Null, UserDefined, Vertex, CellCenter, FaceCenter,\
      IFaceCenter, JFaceCenter, KFaceCenter or EdgeCenter}}
  GridVelocity {{user defined} DataArray_t {0,N} {R4 or R8} 1 \
      NumberOfVertices {component of grid velocity. Data-name identifiers\
      are: GridVelocityX, GridVelocityY, GridVelocityZ, GridVelocityR,\
      GridVelocityTheta, GridVelocityPhi, GridVelocityXi,\
      GridVelocityEta and GridVelocityZeta}}
  IndexArray_t {{user defined} IndexArray_t {0,1} I4 2 \
      {IndexDimension,number of items in the list} {Index coordinates of\
      each point or element in the list}}
  IndexRange_t {{user defined} IndexRange_t {0,1} I4 2 {IndexDimension,2} \
      {first indices, last indices}}
  \"int\" {{user defined} \"int\" {0,1} I4 1 1 {an integer value}}
  \"int[IndexDimension]\" {{user defined} \"int[IndexDimension]\" \
      {0,1} I4 1 IndexDimension {array of integer values}}
  \"int[2*IndexDimension]\" {{user defined} \"int[2*IndexDimension]\" \
      {0,1} I4 1 {2*IndexDimension} {array of integer values}}
  \"int[1+...+IndexDimension]\" {{user defined} \"int[1+...+IndexDimension]\" \
      {0,1} I4 1 {1 + ... + IndexDimension} {array of integer values}}
  IntegralData_t {{user defined} IntegralData_t {0,N} MT {} {} {}}
  IntegralDataValue {{user defined} DataArray_t {0,N} {C1,I4,R4 or R8} \
      1 1 {integral data value}}
  InterpolantsDonor {InterpolantsDonor DataArray_t {0,1} {R4 or R8} 2 \
      {CellDimension,PointListSize} {interpolants for each node}}
  InwardNormalIndex {InwardNormalIndex \"int[IndexDimension]\" {0,1} I4 \
      1 IndexDimension {index of inward normal}}
  InwardNormalList {InwardNormalList IndexArray_t {0,1} {R4 or R8} 2 \
      {PhysicalDimension,number of items in the list} {physical-space\
      normal vectors at each point or element in the list}}
  IterationValues {IterationValues DataArray_t {0,1} I4 1 NumberOfSteps \
      {array of interation values}}
  NeumannData {NeumannData BCData_t {0,1} MT {} {} {}}
  NormDefinitions {NormDefinitions Descriptor_t {0,1} C1 1 \
      {length of string} {description of convergence information}}
  NumberOfFamilies {NumberOfFamilies DataArray_t {0,1} I4 1 NumberOfSteps \
      {array of number of families involved in each time step}}
  NumberOfZones {NumberOfZones DataArray_t {0,1} I4 1 NumberOfSteps \
      {array of number of zones involved in each time step}}
  Ordinal_t {Ordinal Ordinal_t {0,1} I4 1 1 \
      {user-defined ordinal number (an integer)}}
  OriginLocation {OriginLocation DataArray_t 1 R4 2 {PhysicalDimension,2} \
      {coordinates of origin before and after motion}}
  OversetHoles_t {{user defined} OversetHoles_t {0,N} MT {} {} {}}
  ParentData {ParentData DataArray_t {0,1} I4 2 {ElementSize,4} \
      {Parent1[ElementSize], Parent2[ElementSize], SideOfParent1[ElementSize],\
      SideOfParent2[ElementSize]}}
  ParentElements {ParentElements DataArray_t {0,1} I4 2 {ElementSize,2} \
      {Parent1[ElementSize], Parent2[ElementSize]}}
  ParentElementsPosition {ParentElementsPosition DataArray_t {0,1} I4 2 \
      {ElementSize,2} {SideOfParent1[ElementSize], SideOfParent2[ElementSize]}}
  Periodic_t {Periodic Periodic_t {0,1} MT {} {} {}}
  PointList {PointList IndexArray_t {0,1} I4 2 {IndexDimension,ListLength} \
      {list of indices for vertices or cells}}
  PointListDonor {PointListDonor IndexArray_t {0,1} I4 2 \
      {IndexDimension of donor,ListLength} \
      {list of indices for vertices or cells on adjoining patch}}
  PointRange {PointRange IndexRange_t {0,1} I4 2 {IndexDimension,2} \
      {begin[IndexDimension], end[IndexDimension]}}
  PointRangeDonor {PointRangeDonor IndexRange_t {0,1} I4 2 \
      {IndexDimension of donor,2} \
      {begin[IndexDimension], end[IndexDimension] for adjoining patch}}
  ReferenceState_t {ReferenceState ReferenceState_t {0,1} MT {} {} {}}
  ReferenceStateDescription {ReferenceStateDescription Descriptor_t {0,1} \
      C1 1 {length of string} {reference state description}}
  ReferenceStateValue {{user defined} DataArray_t {0,N} {C1,I4,R4 or R8} \
      1 1 {reference state quantity}}
  RegionName {RegionName DataArray_t 1 C1 1 32 {name of region}}
  RigidGridMotion_t {{user defined} RigidGridMotion_t {0,N} C1 1 \
      {length of string} {one of: Null, UserDefined, ConstantRate\
      or VariableRate}}
  RigidGridMotionPointers {RigidGridMotionPointers DataArray_t {0,1} C1 2 \
      {32,NumberOfSteps} {pointers to RigidGridMotion_t nodes}}
  RigidRotationAngle {RigidRotationAngle DataArray_t {0,1} {R4 or R8} \
      1 PhysicalDimension {rotation angles about each axis of the\
      translated coordinate system}}
  RigidRotationRate {RigidRotationRate DataArray_t {0,1} {R4 or R8} \
      1 PhysicalDimension {rotation rate vector about each axis of the\
      translated coordinate system}}
  RigidVelocity {RigidVelocity DataArray_t {0,1} {R4 or R8} \
      1 PhysicalDimension {grid velocity vector of the origin translation}}
  Rind_t {Rind Rind_t {0,1} I4 1 {2*IndexDimension} \
      {number of planes of extra data in low i, high i, low j, high j, etc.}}
  RotatingCoordinates_t {RotatingCoordinates RotatingCoordinates_t {0,1} \
      MT {} {} {}}
  RotationAngle {RotationAngle DataArray_t 1 {R4 or R8} 1 \
      PhysicalDimension {defines angle from current interface to\
      the connecting interface}}
  RotationCenter {RotationCenter DataArray_t 1 {R4 or R8} 1 \
      PhysicalDimension {coordinates of center of rotation}}
  RotationRateVector {RotationRateVector DataArray_t 1 R4 1 PhysicalDimension \
      {components of the angular velocity about the center of rotation}}
  SimulationType_t {SimulationType SimulationType_t {0,1} C1 1 \
      {length of string} {one of: Null, UserDefined, TimeAccurate\
      or NonTimeAccurate}}
  SolutionData {{user defined} DataArray_t {0,N} {C1,I4,R4 or R8} \
      IndexDimension {number of vertices or cells} {solution data.\
      See the documentation for a list of data-name identifiers}}
  SurfaceArea {SurfaceArea DataArray_t 1 R4 1 1 {size of area}}
  ThermalConductivityModel_t {ThermalConductivityModel \
      ThermalConductivityModel_t {0,1} C1 1 {length of string} \
      {one of: Null, UserDefined, PowerLaw, SutherlandLaw or ConstantPrandtl}}
  ThermalRelaxationModel_t {ThermalRelaxationModel \
      ThermalRelaxationModel_t {0,1} C1 1 {length of string} \
      {one of: Null, UserDefined, Frozen, ThermalEquilib or ThermalNonequilib}}
  TimeValues {TimeValues DataArray_t {0,1} {R4 or R8} 1 NumberOfSteps \
      {array of iteration time values}}
  Transform {Transform \"int[IndexDimension]\" {0,1} I4 1 IndexDimension \
      {shorthand for the connectivity transformation matrix}}
  Translation {Translation DataArray_t 1 {R4 or R8} 1 \
      PhysicalDimension {defines translation from current interface to\
      the connecting interface}}
  TurbulenceClosure_t {TurbulenceClosure TurbulenceClosure_t {0,1} C1 1 \
      {length of string} {one of: Null, UserDefined, EddyViscosity,\
      ReynoldsStress or ReynoldsStressAlgebraic}}
  TurbulenceModel_t {TurbulenceModel TurbulenceModel_t {0,1} C1 1 \
      {length of string} {one of: Null, UserDefined,\
      Algebraic_BaldwinLomax, Algebraic_CebeciSmith,\
      HalfEquation_JohnsonKing, OneEquation_BaldwinBarth,\
      OneEquation_SpalartAllmaras, TwoEquation_JonesLaunder,\
      TwoEquation_MenterSST or TwoEquation_Wilcox}}
  UserDefinedData_t {{user defined} UserDefinedData_t {0,N} MT {} {} {}}
  ViscosityModel_t {ViscosityModel ViscosityModel_t {0,1} C1 1 \
      {length of string} {one of: Null, UserDefined, Constant,\
      PowerLaw or SutherlandLaw}}
  WallFunction_t {WallFunction WallFunction_t {0,1} MT {} {} {}}
  WallFunctionType_t {WallFunctionType WallFunctionType_t 1 C1 1 \
      {length of string} {one of: Null, UserDefined, or Generic}}
  Zone_t {{user defined} Zone_t {0,N} I4 2 {IndexDimension,3} \
      {VertexSize[IndexDimension], CellSize[IndexDimension],\
       VertexSizeBoundary[IndexDimension]}}
  ZoneBC_t {ZoneBC ZoneBC_t {0,1} MT {} {} {}}
  ZoneConvergenceHistory {ZoneConvergenceHistory ConvergenceHistory_t \
      {0,1} I4 1 1 {number of iterations}}
  ZoneGridConnectivity_t {ZoneGridConnectivity ZoneGridConnectivity_t \
      {0,1} MT {} {} {}}
  ZoneGridConnectivityPointers {ZoneGridConnectivityPointers DataArray_t \
      {0,1} C1 2 {32,NumberOfSteps} \
      {pointers to ZoneGridConnectivity_t nodes}}
  ZoneIterativeData_t {{user defined} ZoneIterativeData_t {0,1} MT {} {} {}}
  ZonePointers {ZonePointers DataArray_t {0,1} C1 3 \
      {32,MaxNumberOfZones,NumberOfSteps} {pointers to Zone_t nodes}}
  ZoneSubRegion_t {{user defined} ZoneSubRegion_t {0,N} I4 1 \
      RegionCellDimension {region dimension}}
  ZoneSubRegionPointers {ZoneSubRegionPointers DataArray_t \
      {0,1} C1 2 {32,NumberOfSteps} \
      {pointers to ZoneSubRegion_t nodes}}
  ZoneType_t {ZoneType ZoneType_t 1 C1 1 {length of string} \
      {one of: Null, UserDefined, Structured or Unstructured}}
  DataType_t {{} DataType_t {} C1 1 {length of string} \
      {one of: Null, UserDefined, Integer, RealSingle, RealDouble\
      or Character}}
  ElementType_t {{} ElementType_t {} C1 1 {length of string} \
      {one of: Null, UserDefined, NODE, BAR_2, BAR_3, TRI_3, TRI_6, QUAD_4,\
      QUAD_8, QUAD_9, TETRA_4, TETRA_10, PYRA_5, PYRA_14, PENTA_6, PENTA_15,\
      PENTA_18, HEXA_8, HEXA_20, HEXA_27, MIXED, or NGON_n}}
  PointSet_t {{} PointSet_t {} C1 1 {length of string} \
      {one of: Null, UserDefined, PointList, PointListDonor, PointRange,\
      PointRangeDonor, ElementRange, ElementList, or CellListDonor}}
}

array set CGNSnodeRef {
  AdditionalExponents_t {{build DimensionalExponents} \
      {physical dimensionalexponents}}
  AdditionalFamilyName_t {{} {families familyname}}
  AdditionalUnits_t {{build DimensionalUnits} {physical dimensionalunits}}
  ArbitraryGridMotion_t {{timedep ArbitraryGridMotion} {timedep arbitrary}}
  ArbitraryGridMotionPointers {}
  Area_t {{bc Area} {bc bcproperty}}
  AreaType_t {}
  AverageInterface_t {{cnct AverageInterface} {connectivity connproperty}}
  AverageInterfaceType_t {}
  Axisymmetry_t {{gridflow Axisymmetry} {grid axisymmetry}}
  AxisymmetryAngle {{} {physical dataarray}}
  AxisymmetryAxisVector {}
  AxisymmetryReferencePoint {}
  BaseIterativeData_t {{timedep BaseIterativeData} {timedep biter}}
  BC_t {{bc BC} {bc bc}}
  BCData_t {{bc BCData} {bc bcdata}}
  BCDataSet_t {{bc BCDataSet} {bc bcdataset}}
  BCProperty_t {{bc BCProperty} {bc bcproperty}}
  BCType_t {{bc BCType} {}}
  CellListDonor {}
  CGNSBase_t {{cgnsbase CGNSBase} {structural base}}
  CGNSLibraryVersion_t {{cgnsbase CGNSLibraryVersion} {open}}
  ChemicalKineticsModel_t {{floweqn ChemicalKineticsModel} \
      {equation auxiliary}}
  ConvergenceHistory_t {{misc ConvergenceHistory} {auxiliary convergence}}
  CoordinateNames {{} {physical dataarray}}
  CoordinateData {{dataname dataname_grid} {grid gridcoordinates}}
  DataArray_t {{data DataArray} {physical dataarray}}
  DataClass_t {{build DataClass} {physical dataclass}}
  DataConversion_t {{data DataConversion} {physical dataconversion}}
  Descriptor_t {{build Descriptor} {descriptor descriptor}}
  DiffusionModel {{floweqn DiffusionModel} {equation governingequations}}
  DimensionalExponents_t {{build DimensionalExponents} \
      {physical dimensionalexponents}}
  DimensionalUnits_t {{build DimensionalUnits} {physical dimensionalunits}}
  DiscreteData_t {{misc DiscreteData} {solution discretedata}}
  ElementConnectivity {{gridflow ElementConnectivity} {}}
  ElementList {}
  ElementRange {}
  Elements_t {{gridflow Elements} {grid elements}}
  EMConductivityModel_t {{floweqn EMConductivityModel} \
      {equation auxiliary}}
  EMElectricFieldModel_t {{floweqn EMElectricFieldModel} \
      {equation auxiliary}}
  EMMagneticFieldModel_t {{floweqn EMMagneticFieldModel} \
      {equation auxiliary}}
  EquationDimension {}
  Family_t {{misc Family} {families family}}
  FamilyBC_t {{misc FamilyBC} {families familybc}}
  FamilyBCDataSet_t {{bc BCDataSet} {bc bcdataset}}
  FamilyName_t {{} {families familyname}}
  FamilyNameReference {{} {families familyname}}
  FamilyPointers {{} {physical dataarray}}
  FlowEquationSet_t {{floweqn FlowEquationSet} {equation flowequationset}}
  FlowSolution_t {{gridflow FlowSolution} {solution flowsolution}}
  FlowSolutionPointers {}
  GasModel_t {{floweqn GasModel} {equation auxiliary}}
  GeometryEntity_t {{} {families geometry}}
  GeometryFile_t {}
  GeometryFormat_t {}
  GeometryReference_t {{misc GeometryReference} {families geometry}}
  GoverningEquations_t {{floweqn GoverningEquations} \
      {equation governingequations}}
  Gravity_t {{misc Gravity} {auxiliary gravity}}
  GravityVector {}
  GridConnectivity_t {{cnct GridConnectivity} {connectivity general}}
  GridConnectivity1to1_t {{cnct GridConnectivity1to1} {connectivity 1to1}}
  GridConnectivityProperty_t {{cnct GridConnectivityProperty} \
      {connectivity connproperty}}
  GridConnectivityType_t {}
  GridCoordinates_t {{gridflow GridCoordinates} {grid gridcoordinates}}
  GridCoordinatesPointers {}
  GridLocation_t {{build GridLocation} {location gridlocation}}
  GridVelocity {}
  IndexArray_t {{build IndexArray} {}}
  IndexRange_t {{build IndexRange} {}}
  IntegralData_t {{misc IntegralData} {auxiliary integral}}
  InterpolantsDonor {}
  InwardNormalIndex {}
  InwardNormalList {}
  IterationValues {{} {physical dataarray}}
  NeumannData {}
  NormDefinitions {}
  NumberOfFamilies {{} {physical dataarray}}
  NumberOfZones {{} {physical dataarray}}
  Ordinal_t {{} {descriptor ordinal}}
  OriginLocation {}
  OversetHoles_t {{cnct OversetHoles} {connectivity overset}}
  ParentData {{} {grid elements}}
  ParentElements {{} {grid elements}}
  ParentElementsPosition {{} {grid elements}}
  Periodic_t {{cnct Periodic} {connectivity connproperty}}
  PointList {}
  PointListDonor {}
  PointRange {}
  PointRangeDonor {}
  ReferenceState_t {{misc ReferenceState} {auxiliary refstate}}
  ReferenceStateDescription {}
  RegionName {}
  RigidGridMotion_t {{timedep RigidGridMotion} {timedep rigid}}
  RigidGridMotionPointers {}
  RigidRotationAngle {}
  RigidRotationRate {}
  RigidVelocity {}
  Rind_t {{build Rind} {location rind}}
  RotatingCoordinates_t {{gridflow RotatingCoordinates} \
      {grid rotatingcoordinates}}
  RotationAngle {}
  RotationCenter {}
  RotationRateVector {}
  SimulationType_t {{cgnsbase SimulationType} {structural simulationtype}}
  SolutionData {{dataname dataname_flow} {solution flowsolution}}
  SurfaceArea {}
  ThermalConductivityModel_t {{floweqn ThermalConductivityModel} \
      {equation auxiliary}}
  ThermalRelaxationModel_t {{floweqn ThermalRelaxationModel} \
      {equation auxiliary}}
  TimeValues {{} {physical dataarray}}
  Transform {}
  Translation {}
  TurbulenceClosure_t {{floweqn TurbulenceClosure} {equation auxiliary}}
  TurbulenceModel_t {{floweqn TurbulenceModel} {equation auxiliary}}
  UserDefinedData_t {{misc UserDefinedData} {auxiliary userdefined}}
  ViscosityModel_t {{floweqn ViscosityModel} {equation auxiliary}}
  WallFunction_t {{bc WallFunction} {bc bcproperty}}
  WallFunctionType_t {}
  Zone_t {{cgnsbase Zone} {structural zone}}
  ZoneBC_t {{bc ZoneBC} {bc}}
  ZoneGridConnectivity_t {{cnct ZoneGridConnectivity} {connectivity}}
  ZoneIterativeData_t {{timedep ZoneIterativeData} {timedep ziter}}
  ZonePointers {{} {physical dataarray}}
  ZoneType_t {}
}

set CGNSlibraryVersion 3.2

#----- initialize CGNS nodes

proc cgns_init {{version ""}} {
  global CGNSlibraryVersion CGNSnodeChildren
  global CGNSnodeDesc CGNSdataValues

  if {$version == "" && [catch CGNSversion version]} {
    set CGNSlibraryVersion 3.2
  } else {
    set CGNSlibraryVersion $version
  }
  set version [expr int(1000.0 * $CGNSlibraryVersion + 0.5)]

  if {$version < 2100} {
    array set CGNSnodeChildren {
      ArbitraryGridMotion_t {DataClass Descriptor DimensionalUnits \
        GridLocation GridVelocity Rind}
      BaseIterativeData_t {DataArray DataClass Descriptor DimensionalUnits \
        FamilyPointers IterationValues NumberOfFamilies NumberOfZones \
        TimeValues ZonePointers}
      BCData_t {DataArray DataClass Descriptor DimensionalUnits}
      BCDataSet_t {DataClass Descriptor DimensionalUnits DirichletData \
        NeumannData ReferenceState}
      ConvergenceHistory_t {ConvergenceDataArray DataClass Descriptor \
        DimensionalUnits NormDefinitions}
      DiscreteData_t {DataClass Descriptor DimensionalUnits \
        DiscreteDataArray GridLocation Rind}
      Elements_t {Descriptor ElementConnectivity ElementRange ParentData}
      Family_t {Descriptor FamilyBC GeometryReference Ordinal}
      FlowEquationSet_t {DataClass Descriptor \
        DimensionalUnits EquationDimension GasModel GoverningEquations \
        ThermalConductivityModel ThermalRelaxationModel TurbulenceClosure \
        TurbulenceModel ViscosityModel}
      FlowSolution_t {DataClass Descriptor DimensionalUnits \
        GridLocation Rind SolutionData}
      GasModel_t {DataArray DataClass Descriptor DimensionalUnits}
      GeometryReference_t {Descriptor GeometryEntity GeometryFile \
        GeometryFormat}
      GridConnectivity1to1_t {Descriptor Ordinal PointRange PointRangeDonor \
        Transform}
      GridCoordinates_t {CoordinateData DataClass Descriptor DimensionalUnits \
        Rind}
      GoverningEquations_t {Descriptor DiffusionModel}
      IntegralData_t {DataClass Descriptor DimensionalUnits \
        IntegralDataValue}
      OversetHoles_t {Descriptor GridLocation PointList PointRange}
      ReferenceState_t {DataClass Descriptor DimensionalUnits \
        ReferenceStateDescription ReferenceStateValue}
      RigidGridMotion_t {DataArray DataClass Descriptor DimensionalUnits \
        OriginLocation RigidRotationAngle RigidRotationRate \
        RigidVelocity}
      ThermalConductivityModel_t {DataArray DataClass Descriptor \
        DimensionalUnits}
      ThermalRelaxationModel_t {DataArray DataClass Descriptor \
        DimensionalUnits}
      TurbulenceClosure_t {DataArray DataClass Descriptor \
        DimensionalUnits}
      TurbulenceModel_t {DataArray DataClass Descriptor DiffusionModel \
        DimensionalUnits}
      ViscosityModel_t {DataArray DataClass Descriptor DimensionalUnits}
      ZoneBC_t {BC DataClass Descriptor DimensionalUnits ReferenceState}
      ZoneGridConnectivity_t {Descriptor GridConnectivity \
        GridConnectivity1to1 OversetHoles}
      ZoneIterativeData_t {ArbitraryGridMotionPointers DataArray DataClass \
        Descriptor DimensionalUnits FlowSolutionPointers \
        GridCoordinatesPointers RigidGridMotionPointers}
    }
  } else {
    array set CGNSnodeChildren {
      ArbitraryGridMotion_t {DataClass Descriptor DimensionalUnits \
        GridLocation GridVelocity Rind UserDefinedData}
      BaseIterativeData_t {DataArray DataClass Descriptor DimensionalUnits \
        FamilyPointers IterationValues NumberOfFamilies NumberOfZones \
        TimeValues UserDefinedData ZonePointers}
      BCData_t {DataArray DataClass Descriptor DimensionalUnits UserDefinedData}
      BCDataSet_t {DataClass Descriptor DimensionalUnits DirichletData \
        NeumannData ReferenceState UserDefinedData}
      ConvergenceHistory_t {ConvergenceDataArray DataClass Descriptor \
        DimensionalUnits NormDefinitions}
      DiscreteData_t {DataClass Descriptor DimensionalUnits \
        DiscreteDataArray GridLocation Rind UserDefinedData}
      Elements_t {Descriptor ElementConnectivity ElementRange \
        ParentData UserDefinedData}
      Family_t {Descriptor FamilyBC GeometryReference Ordinal UserDefinedData}
      FlowEquationSet_t {ChemicalKineticsModel DataClass Descriptor \
        DimensionalUnits EquationDimension GasModel GoverningEquations \
        ThermalConductivityModel ThermalRelaxationModel TurbulenceClosure \
        TurbulenceModel UserDefinedData ViscosityModel}
      FlowSolution_t {DataClass Descriptor DimensionalUnits \
        GridLocation Rind SolutionData UserDefinedData}
      GasModel_t {DataArray DataClass Descriptor DimensionalUnits \
        UserDefinedData}
      GeometryReference_t {Descriptor GeometryEntity GeometryFile \
        GeometryFormat UserDefinedData}
      GridConnectivity1to1_t {Descriptor Ordinal PointRange PointRangeDonor \
        Transform UserDefinedData}
      GridCoordinates_t {CoordinateData DataClass Descriptor DimensionalUnits \
        Rind UserDefinedData}
      GoverningEquations_t {Descriptor DiffusionModel UserDefinedData}
      IntegralData_t {DataClass Descriptor DimensionalUnits \
        IntegralDataValue UserDefinedData}
      OversetHoles_t {Descriptor GridLocation PointList PointRange \
        UserDefinedData}
      ReferenceState_t {DataClass Descriptor DimensionalUnits \
        ReferenceStateDescription ReferenceStateValue UserDefinedData}
      RigidGridMotion_t {DataArray DataClass Descriptor DimensionalUnits \
        OriginLocation RigidRotationAngle RigidRotationRate \
        RigidVelocity UserDefinedData}
      ThermalConductivityModel_t {DataArray DataClass Descriptor \
        DimensionalUnits UserDefinedData}
      ThermalRelaxationModel_t {DataArray DataClass Descriptor \
        DimensionalUnits UserDefinedData}
      TurbulenceClosure_t {DataArray DataClass Descriptor \
        DimensionalUnits UserDefinedData}
      TurbulenceModel_t {DataArray DataClass Descriptor DiffusionModel \
        DimensionalUnits UserDefinedData}
      ViscosityModel_t {DataArray DataClass Descriptor DimensionalUnits \
        UserDefinedData}
      ZoneBC_t {BC DataClass Descriptor DimensionalUnits ReferenceState \
        UserDefinedData}
      ZoneGridConnectivity_t {Descriptor GridConnectivity \
        GridConnectivity1to1 OversetHoles UserDefinedData}
      ZoneIterativeData_t {ArbitraryGridMotionPointers DataArray DataClass \
        Descriptor DimensionalUnits FlowSolutionPointers \
        GridCoordinatesPointers RigidGridMotionPointers UserDefinedData}
    }
  }

  if {$version < 2000} {
    array set CGNSnodeChildren {
      CGNSBase_t {DataClass Descriptor \
        DimensionalUnits Family FlowEquationSet GlobalConvergenceHistory \
        IntegralData ReferenceState Zone}
      BC_t {BCDataSet DataClass Descriptor DimensionalUnits \
        ElementList ElementRange FamilyName GridLocation InwardNormalIndex \
        InwardNormalList Ordinal PointList PointRange ReferenceState}
      GridConnectivity_t {CellListDonor Descriptor \
        GridConnectivityType GridLocation InterpolantsDonor Ordinal \
        PointList PointListDonor PointRange}
      Zone_t {DataClass Descriptor \
        DiscreteData DimensionalUnits Elements FamilyName FlowEquationSet \
        FlowSolution GridCoordinates IntegralData Ordinal ReferenceState \
        ZoneBC ZoneConvergenceHistory ZoneGridConnectivity ZoneType}
    }
  } elseif {$version < 2100} {
    array set CGNSnodeChildren {
      CGNSBase_t {BaseIterativeData DataClass Descriptor \
        DimensionalUnits Family FlowEquationSet GlobalConvergenceHistory \
        IntegralData ReferenceState SimulationType Zone}
      BC_t {BCDataSet DataClass Descriptor DimensionalUnits \
        FamilyName GridLocation InwardNormalIndex \
        InwardNormalList Ordinal PointList PointRange ReferenceState}
      GridConnectivity_t {CellListDonor Descriptor \
        GridConnectivityType GridLocation InterpolantsDonor Ordinal \
        PointList PointListDonor PointRange}
      Zone_t {ArbitraryGridMotion DataClass Descriptor \
        DiscreteData DimensionalUnits Elements FamilyName FlowEquationSet \
        FlowSolution GridCoordinates IntegralData Ordinal ReferenceState \
        RigidGridMotion ZoneBC ZoneConvergenceHistory ZoneGridConnectivity \
        ZoneIterativeData ZoneType}
    }
  } elseif {$version < 2200} {
    array set CGNSnodeChildren {
      CGNSBase_t {BaseIterativeData DataClass Descriptor \
        DimensionalUnits Family FlowEquationSet GlobalConvergenceHistory \
        IntegralData ReferenceState SimulationType UserDefinedData Zone}
      BC_t {BCDataSet DataClass Descriptor DimensionalUnits \
        FamilyName GridLocation InwardNormalIndex \
        InwardNormalList Ordinal PointList PointRange \
        ReferenceState UserDefinedData}
      GridConnectivity_t {CellListDonor Descriptor \
        GridConnectivityType GridLocation InterpolantsDonor Ordinal \
        PointList PointListDonor PointRange UserDefinedData}
      Zone_t {ArbitraryGridMotion DataClass Descriptor \
        DiscreteData DimensionalUnits Elements FamilyName FlowEquationSet \
        FlowSolution GridCoordinates IntegralData Ordinal ReferenceState \
        RigidGridMotion UserDefinedData ZoneBC ZoneConvergenceHistory \
        ZoneGridConnectivity ZoneIterativeData ZoneType}
    }
  } else {
    array set CGNSnodeChildren {
      CGNSBase_t {Axisymmetry BaseIterativeData DataClass \
        Descriptor DimensionalUnits Family FlowEquationSet \
        GlobalConvergenceHistory Gravity IntegralData ReferenceState \
        RotatingCoordinates SimulationType UserDefinedData Zone}
      BC_t {BCDataSet BCProperty DataClass Descriptor DimensionalUnits \
        ElementList ElementRange FamilyName GridLocation InwardNormalIndex \
        InwardNormalList Ordinal PointList PointRange \
        ReferenceState UserDefinedData}
      GridConnectivity_t {CellListDonor Descriptor GridConnectivityProperty \
        GridConnectivityType GridLocation InterpolantsDonor Ordinal \
        PointList PointListDonor PointRange UserDefinedData}
      Zone_t {ArbitraryGridMotion DataClass Descriptor \
        DiscreteData DimensionalUnits Elements FamilyName FlowEquationSet \
        FlowSolution GridCoordinates IntegralData Ordinal ReferenceState \
        RigidGridMotion RotatingCoordinates UserDefinedData ZoneBC \
        ZoneConvergenceHistory ZoneGridConnectivity ZoneIterativeData ZoneType}
    }
  }

  if {$version > 2300} {
    array set CGNSnodeChildren {
      BCDataSet_t {DataClass Descriptor DimensionalUnits DirichletData \
        GridLocation NeumannData PointList PointRange ReferenceState \
        UserDefinedData}
      DimensionalUnits_t {AdditionalUnits}
      DimensionalExponents_t {AdditionalExponents}
      EMConductivityModel_t {DataArray DataClass Descriptor \
        DimensionalUnits UserDefinedData}
      EMElectricFieldModel_t {DataArray DataClass Descriptor \
        DimensionalUnits UserDefinedData}
      EMMagneticFieldModel_t {DataArray DataClass Descriptor \
        DimensionalUnits UserDefinedData}
      Family_t {Descriptor FamilyBC GeometryReference Ordinal \
        RotatingCoordinates UserDefinedData}
      FamilyBC_t {BCDataSet}
      FlowEquationSet_t {ChemicalKineticsModel DataClass Descriptor \
        DimensionalUnits EMConductivityModel EMElectricFieldModel \
        EMMagneticFieldModel EquationDimension GasModel GoverningEquations \
        ThermalConductivityModel ThermalRelaxationModel TurbulenceClosure \
        TurbulenceModel UserDefinedData ViscosityModel}
      GridConnectivity1to1_t {Descriptor GridConnectivityProperty Ordinal \
        PointRange PointRangeDonor Transform UserDefinedData}
      UserDefinedData_t {DataArray DataClass Descriptor DimensionalUnits \
        FamilyName GridLocation Ordinal PointList PointRange UserDefinedData}
    }
  }

  if {$version >= 2500} {
    set CGNSnodeChildren(Elements_t) {Descriptor ElementConnectivity \
      ElementRange ParentData Rind UserDefinedData}
  }

  if {$version >= 2530} {
    array set CGNSdataValues {
      DimensionalUnits_t {\
        {Null UserDefined Kilogram Gram Slug PoundMass} \
        {Null UserDefined Meter Centimeter Millimeter Foot Inch} \
        {Null UserDefined Second} \
        {Null UserDefined Kelvin Celsius Rankine Fahrenheit} \
        {Null UserDefined Radian Degree}}
      TemperatureUnits_t {Null UserDefined Kelvin Celsius Rankine Fahrenheit}
    }
  }

  if {$version >= 3100} {
    array set CGNSnodeDesc {
      ZoneGridConnectivity_t {\
       {ZoneGridConnectivity or user defined} \
       ZoneGridConnectivity_t {0,N} MT {} {} {}}
    }
    array set CGNSnodeChildren {
      DiscreteData_t {DataClass Descriptor DimensionalUnits \
        DiscreteDataArray GridLocation PointList PointRange Rind \
        UserDefinedData}
      Elements_t {Descriptor ElementConnectivity ElementRange \
        ParentElements ParentElementsPosition Rind UserDefinedData}
      FamilyBC_t {FamilyBCDataSet}
      FlowSolution_t {DataClass Descriptor DimensionalUnits \
        GridLocation PointList PointRange Rind SolutionData \
        UserDefinedData}
      ZoneIterativeData_t {ArbitraryGridMotionPointers DataArray DataClass \
        Descriptor DimensionalUnits FlowSolutionPointers \
        GridCoordinatesPointers RigidGridMotionPointers \
        ZoneGridConnectivityPointers ZoneSubRegionPointers UserDefinedData}
    }

    if {$version >= 3200} {
      if {$version >= 3220} {
        array set CGNSnodeDesc {
          Elements_t {{user defined} Elements_t {0,N} I4 1 2 \
            {ElementType, ElementSizeBoundary

element types are:
0:Null, 1:UserDefined, 2:NODE, 3:BAR_2, 4:BAR_3,\
5:TRI_3, 6:TRI_6, 7:QUAD_4, 8:QUAD_8, 9:QUAD_9, 10:TETRA_4, 11:TETRA_10,\
12:PYRA_5, 13:PYRA_14, 14:PENTA_6, 15:PENTA_15, 16:PENTA_18, 17:HEXA_8,\
18:HEXA_20, 19:HEXA_27, 20:MIXED, 21:PYRA_13, 22:NGON_n, 23:NFACE_n,\
24:BAR_4, 25:TRI_9, 26:TRI_10, 27:QUAD_12, 28:QUAD_16, 29:TETRA_16,\
30:TETRA_20, 31:PYRA_21, 32:PYRA_29, 33:PYRA_30, 34:PENTA_24,\
35:PENTA_38, 36:PENTA_40, 37:HEXA_32, 38:HEXA_56, 39:HEXA_64,\
40:BAR_5, 41:TRI_12, 42:TRI_15, 43:QUAD_P4_16, 44:QUAD_25, 45:TETRA_22,\
46:TETRA_34, 47:TETRA_35, 48:PYRA_P4_29, 49:PYRA_50, 50:PYRA_55,\
51:PENTA_33, 52:PENTA_66, 53:PENTA_75, 54:HEXA_44, 55:HEXA_98,\
56:HEXA_125}}
      }} else {
        array set CGNSnodeDesc {
          Elements_t {{user defined} Elements_t {0,N} I4 1 2 \
            {ElementType, ElementSizeBoundary

element types are:
0:Null, 1:UserDefined, 2:NODE, 3:BAR_2, 4:BAR_3,\
5:TRI_3, 6:TRI_6, 7:QUAD_4, 8:QUAD_8, 9:QUAD_9, 10:TETRA_4, 11:TETRA_10,\
12:PYRA_5, 13:PYRA_14, 14:PENTA_6, 15:PENTA_15, 16:PENTA_18, 17:HEXA_8,\
18:HEXA_20, 19:HEXA_27, 20:MIXED, 21:PYRA_13, 22:NGON_n, 23:NFACE_n,\
24:BAR_4, 25:TRI_9, 26:TRI_10, 27:QUAD_12, 28:QUAD_16, 29:TETRA_16,\
30:TETRA_20, 31:PYRA_21, 32:PYRA_29, 33:PYRA_30, 34:PENTA_24,\
35:PENTA_38, 36:PENTA_40, 37:HEXA_32, 38:HEXA_56, 39:HEXA_64}}
      }}
      array set CGNSnodeChildren {
        BC_t {AdditionalFamilyName BCDataSet BCProperty DataClass Descriptor \
          DimensionalUnits FamilyName GridLocation InwardNormalIndex \
          InwardNormalList Ordinal PointList PointRange \
          ReferenceState UserDefinedData}
        Family_t {Descriptor FamilyBC FamilyNameReference GeometryReference \
          Ordinal RotatingCoordinates UserDefinedData}
        UserDefinedData_t {AdditionalFamilyName DataArray DataClass Descriptor \
          DimensionalUnits FamilyName GridLocation Ordinal PointList \
          PointRange UserDefinedData}
        Zone_t {AdditionalFamilyName ArbitraryGridMotion DataClass Descriptor \
          DiscreteData DimensionalUnits Elements FamilyName FlowEquationSet \
          FlowSolution GridCoordinates IntegralData Ordinal ReferenceState \
          RigidGridMotion RotatingCoordinates UserDefinedData ZoneBC \
          ZoneConvergenceHistory ZoneGridConnectivity ZoneIterativeData \
          ZoneSubRegion ZoneType}
        ZoneSubRegion_t {AdditionalFamilyName BCRegionName DataArray DataClass \
          DimensionalUnits Descriptor FamilyName GridConnectivityRegionName \
          GridLocation PointList PointRange Rind UserDefinedData}
      }
    } else {
      array set CGNSnodeDesc {
        Elements_t {{user defined} Elements_t {0,N} I4 1 2 \
          {ElementType, ElementSizeBoundary

element types are:
0:Null, 1:UserDefined, 2:NODE, 3:BAR_2, 4:BAR_3,\
5:TRI_3, 6:TRI_6, 7:QUAD_4, 8:QUAD_8, 9:QUAD_9, 10:TETRA_4, 11:TETRA_10,\
12:PYRA_5, 13:PYRA_14, 14:PENTA_6, 15:PENTA_15, 16:PENTA_18, 17:HEXA_8,\
18:HEXA_20, 19:HEXA_27, 20:MIXED, 21:PYRA_13, 22:NGON_n, 23:NFACE_n}}
      }
      array set CGNSnodeChildren {
        BC_t {BCDataSet BCProperty DataClass Descriptor DimensionalUnits \
          FamilyName GridLocation InwardNormalIndex \
          InwardNormalList Ordinal PointList PointRange \
          ReferenceState UserDefinedData}
        Zone_t {ArbitraryGridMotion DataClass Descriptor DiscreteData \
          DimensionalUnits Elements FamilyName FlowEquationSet FlowSolution \
          GridCoordinates IntegralData Ordinal ReferenceState RigidGridMotion \
          RotatingCoordinates UserDefinedData ZoneBC ZoneConvergenceHistory \
          ZoneGridConnectivity ZoneIterativeData ZoneSubRegion ZoneType}
      }
    }
  } else {
    array set CGNSnodeDesc {
      Elements_t {{user defined} Elements_t {0,N} I4 1 2 \
        {ElementType, ElementSizeBoundary

element types are:
0:Null, 1:UserDefined, 2:NODE, 3:BAR_2, 4:BAR_3,\
5:TRI_3, 6:TRI_6, 7:QUAD_4, 8:QUAD_8, 9:QUAD_9, 10:TETRA_4, 11:TETRA_10,\
12:PYRA_5, 13:PYRA_14, 14:PENTA_6, 15:PENTA_15, 16:PENTA_18, 17:HEXA_8,\
18:HEXA_20, 19:HEXA_27, 20:MIXED, 21+:NGON_n}}
      ZoneGridConnectivity_t {ZoneGridConnectivity \
       ZoneGridConnectivity_t {0,1} MT {} {} {}}
    }
  }
}

#----- popup windows for node data

proc cgns_data {} {
  global ProgData Node CGNSdataValues CGNSnodeDesc
  set label [string trim $Node(label)]
  if {$label != "" && [info exists CGNSdataValues($label)] &&
      [$ProgData(text) cget -state] == "normal"} {
    if {$label == "DimensionalUnits_t" || $label == "AdditionalUnits_t"} {
      cgns_units $label
    } else {
      cgns_string $label
    }
    return
  }
  set name [string trim $Node(name)]
  if {$name == "" || ![info exists CGNSnodeDesc($name)]} {
    if {$label == "" || ![info exists CGNSnodeDesc($label)]} return
    set name $label
  }
  set data [string trim [lindex $CGNSnodeDesc($name) 6]]
  if {$data != ""} {
    popup_message $data -pos $ProgData(text)
  }
}

proc cgns_units {label} {
  global ProgData Node CGNSdataValues
  set data $CGNSdataValues($label)
  set cur [split [string trim [$ProgData(text) get 1.0 end]] "\n"]
  if {$label == "DimensionalUnits_t"} {
    set units {mass length time temp angle}
    set names {Mass Length Time Temperature Angle}
  } else {
    set units {current amount intensity}
    set names {ElectricCurrent SubstanceAmount LuminousIntensity}
  }

  set w .unitlist
  catch {destroy $w}

  toplevel $w -relief flat -bd 0
  wm overrideredirect $w 1
  wm transient $w .
  wm group $w .
  wm protocol $w WM_DELETE_WINDOW {set ProgData(done) 0}

  frame $w.outer -relief solid -bd 1
  pack $w.outer -side top -fill both -expand 1

  set top [frame $w.outer.top]
  pack $top -side top -padx 3 -pady 3 -fill x -expand 1
  set n 0
  foreach i $units {
    FrameCreate $top.$i -text [lindex $names $n] -pady 0 -padx 0 -width 15
    pack $top.$i -side left -fill y -padx 2
    set f [FrameGet $top.$i]
    foreach v [lindex $data $n] {
      set j [string tolower $v]
      radiobutton $f.$j -text $v -variable ProgData(units,$i) \
        -value $v -highlightthickness 0 -bd 0
      pack $f.$j -side top -anchor w
    }
    set v [string trim [lindex $cur $n]]
    if {$v != "" && [lsearch [lindex $data $n] $v] >= 0} {
      set ProgData(units,$i) $v
    }
    incr n
  }

  set b [frame $w.outer.but]
  pack $b -side top -pady 3
  button $b.accept -text Accept -default active \
    -command {set ProgData(done) 1}
  button $b.cancel -text Cancel -command {set ProgData(done) 0}
  pack $b.accept $b.cancel -side left -padx 5

  bind $w <Return> {set ProgData(done) 1}

  center_window $w $ProgData(text)
  set oldFocus [focus]
  set oldGrab [grab current $w]
  if {$oldGrab != ""} {
    set grabStatus [grab status $oldGrab]
  }
  catch {grab $w}
  tkwait visibility $w
  focus $w
  tkwait variable ProgData(done)
  destroy $w
  catch {focus $oldFocus}
  if {$oldGrab != ""} {
    if {$grabStatus == "global"} {
      grab -global $oldGrab
    } else {
      grab $oldGrab
    }
  }

  if {$ProgData(done)} {
    set cnt [llength $units]
    set Node(type) C1
    set Node(dim) "32 $cnt"
    set Node(size) [expr 32 * $cnt]
    $ProgData(text) delete 1.0 end
    incr cnt -1
    for {set n 0} {$n < $cnt} {incr n} {
      set i [lindex $units $n]
      $ProgData(text) insert end "$ProgData(units,$i)\n"
    }
    set i [lindex $units end]
    $ProgData(text) insert end "$ProgData(units,$i)"
  }
}

proc cgns_string {label} {
  global ProgData Node CGNSdataValues
  set data $CGNSdataValues($label)
  set width 0
  foreach i $data {
    set len [string length $i]
    if {$width < $len} {set width $len}
  }
  set cnt [llength $data]

  set w .datalist
  catch {destroy $w}

  toplevel $w -relief flat -bd 0 -cursor left_ptr
  wm overrideredirect $w 1
  wm transient $w .
  wm group $w .
  wm protocol $w WM_DELETE_WINDOW {set ProgData(done) 0}

  bind $w <ButtonRelease-1> {set ProgData(done) 0}
  bind $w <ButtonRelease-3> {set ProgData(done) 0}
  bind $w <KeyRelease> {set ProgData(done) 0}
  bind $w <FocusOut> {set ProgData(done) 0}

  set top [frame $w.top -relief solid -bd 1]
  pack $top -side top -fill both -expand 1
  label $top.lab -text $label
  pack $top.lab -side top -fill x
  frame $top.sep -height 2 -bd 1 -relief sunken
  pack $top.sep -side top -fill x

  if {$cnt > 10} {
    listbox $top.list -relief flat -bd 0 -highlightthickness 0 \
      -exportselection 0 -width $width -height 10 \
      -yscroll "$top.scroll set" -takefocus 0 -cursor hand2
    scrollbar $top.scroll -highlightthickness 0 -takefocus 0 \
      -orient vertical -command "$top.list yview"
    pack $top.scroll -side right -fill y
    bind $top.scroll <ButtonRelease-1> break
  } else {
    listbox $top.list -relief flat -bd 0 -highlightthickness 0 \
      -exportselection 0 -width $width -height $cnt \
      -takefocus 0 -cursor hand2
  }
  pack $top.list -side left -fill both -expand 1
  bind $top.list <ButtonRelease-1> {set ProgData(done) 1; break}

  foreach i $data {
    $top.list insert end $i
  }
  set n [lsearch $data [string trim [$ProgData(text) get 1.0 end]]]
  if {$n >= 0} {
    $top.list selection set $n $n
    $top.list see $n
  }

  center_window $w $ProgData(text)
  set oldFocus [focus]
  set oldGrab [grab current $w]
  if {$oldGrab != ""} {
    set grabStatus [grab status $oldGrab]
  }
  catch {grab $w}
  tkwait visibility $w
  focus $w
  tkwait variable ProgData(done)

  set sel [$top.list curselection]
  if {$sel == ""} {
    set data ""
  } else {
    set data [$top.list get $sel]
  }

  destroy $w
  catch {focus $oldFocus}
  if {$oldGrab != ""} {
    if {$grabStatus == "global"} {
      grab -global $oldGrab
    } else {
      grab $oldGrab
    }
  }

  if {$data != "" && $ProgData(done)} {
    $ProgData(text) delete 1.0 end
    $ProgData(text) insert end $data
    set Node(type) C1
    set Node(dim) [string length $data]
    set Node(size) $Node(dim)
  }
}

proc cgns_info {} {
  global ProgData Node CGNSnodeDesc Font
  set name [string trim $Node(name)]
  if {$name == "" || ![info exists CGNSnodeDesc($name)]} {
    set name [string trim $Node(label)]
    if {$name == "" || ![info exists CGNSnodeDesc($name)]} return
  }

  set labw 10
  set wrap 30

  set w .datainfo
  catch {destroy $w}
  toplevel $w -bg black
  wm overrideredirect $w 1
  wm transient $w .

  frame $w.f -bg #ffffcc
  pack $w.f -side top -padx 1 -pady 1

  set n 0
  foreach i {"Node Name" "Node Label" Cardinality "Data Type"} {
    set f [frame $w.f.n$n -bg #ffffcc]
    pack $f -side top -padx 5 -anchor w
    label $f.lab -text "$i:" -width $labw -anchor w -font $Font(normal) \
      -bg #ffffcc -fg black
    label $f.ent -font $Font(fixed) -bg #ffffcc -fg black \
      -text [lindex $CGNSnodeDesc($name) $n]
    pack $f.lab $f.ent -side left
    incr n
  }

  if {[lindex $CGNSnodeDesc($name) 3] != "MT"} {
    foreach i {Dimension "Dim Values"} {
      set f [frame $w.f.n$n -bg #ffffcc]
      pack $f -side top -padx 5 -anchor w
      label $f.lab -text "$i:" -width $labw -anchor w -font $Font(normal) \
        -bg #ffffcc -fg black
      label $f.ent -font $Font(fixed) -bg #ffffcc -fg black \
        -text [lindex $CGNSnodeDesc($name) $n]
      pack $f.lab $f.ent -side left
      incr n
    }
    set data ""
    foreach line [split [lindex $CGNSnodeDesc($name) 6] "\n"] {
      if {$data != ""} {append data "\n"}
      set len 0
      foreach word $line {
        set n [string length $word]
        if [expr {$len + $n + 1 > $wrap}] {
          append data "\n"
          set len 0
        }
        if {$len} {
          append data " $word"
          incr n
        } else {
          append data $word
        }
        incr len $n
      }
    }

    set f [frame $w.f.data -bg #ffffcc]
    pack $f -side top -padx 5 -anchor w
    label $f.lab -text "Data:" -width $labw -anchor w -font $Font(normal) \
      -bg #ffffcc -fg black
    label $f.ent -justify left -font $Font(fixed) -bg #ffffcc -fg black \
      -text $data
    pack $f.lab $f.ent -side left -anchor n
  }

  center_window $w .

  bind $w <ButtonPress> {catch {destroy .datainfo};break}
  bind $w <KeyPress> {catch {destroy .datainfo};break}
  bind $w <FocusOut> {catch {destroy .datainfo}}

  set oldFocus [focus]
  set oldGrab [grab current $w]
  if {$oldGrab != ""} {
    set grabStatus [grab status $oldGrab]
  }
  catch {grab $w}
  focus $w
  tkwait window $w
  catch {focus $oldFocus}
  if {$oldGrab != ""} {
    if {$grabStatus == "global"} {
      grab -global $oldGrab
    } else {
      grab $oldGrab
    }
  }
}

proc cgns_tree {{top ""}} {
  global Font CGNSlibraryVersion CGNSnodes CGNSnodeChildren
  global CGNSdataValues CGNSdataDesc CGNSdata

  if {$top == ""} {
    set top .cgnstree
  }
  if {$top == "."} {
    set w ""
  } else {
    if {[winfo exists $top]} {
      wm deiconify $top
      return
    }
    toplevel $top
    set w $top
  }
  wm title $top "CGNS $CGNSlibraryVersion Node Reference"

  array set CGNSdata {
    node ""
    name ""
    label ""
    count ""
    type ""
    ndim ""
    dims ""
    sids ""
    midlevel  ""
  }

  FrameCreate $w.tree -text "Node Tree" -font $Font(bold)
  pack $w.tree -side left -fill both -expand 1
  set tree [FrameGet $w.tree]

  scrollbar $tree.ys -orient vertical -command "$tree.tree yview"
  pack $tree.ys -side right -fill y

  scrollbar $tree.xs -orient horizontal -command "$tree.tree xview"
  pack $tree.xs -side bottom -fill x

  TreeCreate $tree.tree -width 200 -height 300 -relief sunken \
    -bd 2 -yscrollcommand "$tree.ys set" -xscrollcommand "$tree.xs set" \
    -font $Font(normal)
  set CGSNdata(tree) $tree.tree
  pack $tree.tree -side left -fill both -expand 1

  bind $tree.tree <1> {cgns:show_node %W [TreeAt %W %x %y]}
  bind $tree.tree <Double-1> {TreeToggle %W [TreeAt %W %x %y]}
  bind $tree.tree <Shift-1> {cgns:tree %W %x %y open}
  bind $tree.tree <Control-1> {cgns:tree %W %x %y close}
  bind $tree.tree <Shift-3> {cgns:tree %W %x %y expand}
  bind $tree.tree <Control-3> {cgns:tree %W %x %y collapse}

  TreeInsert $tree.tree /
  foreach n $CGNSnodeChildren(/) {
    cgns:add_node $tree.tree "" $n
  }

  set labw 10
  set entw 32

  FrameCreate $w.prop -text "Node Properties" -font $Font(bold)
  pack $w.prop -side right -fill y
  set prop [FrameGet $w.prop]

  foreach {i j} {name "Node Name" label "Node Label" count Cardinality \
    type "Data Type" ndim Dimensions dims "Dim Values"} {
    set f [frame $prop.$i]
    pack $f -side top
    label $f.lab -width $labw -text $j -anchor w
    entry $f.ent -width $entw -textvariable CGNSdata($i) \
      -state disabled -cursor {}
    pack $f.lab $f.ent -side left
  }

  set f [frame $prop.data]
  pack $f -side top -fill both -expand 1
  label $f.lab -text "Data"
  pack $f.lab -side top -anchor w
  set CGNSdata(text) [text $f.text -width $entw -height 15 \
    -wrap word -cursor {}]
  pack $CGNSdata(text) -side top -fill both -expand 1

  frame $prop.sep -relief groove -bd 1 -height 2
  pack $prop.sep -side top -fill x -pady 3

  set f [frame $prop.but]
  pack $f -side top -fill x

  button $f.midlevel -text "MLL Doc..." -state disabled \
    -command {cgns:help midlevel}
  button $f.sids -text "SIDS Doc.." -state disabled \
    -command {cgns:help sids}
  pack $f.midlevel $f.sids -side left -expand 1
  if {$top == "."} {
    button $f.setup -text "Setup..." -command help_setup
    pack $f.setup -side left -expand 1
  }
  button $f.exit -text Exit -command "destroy $top" -width 6
  pack $f.exit -side left -expand 1
  set CGNSdata(buts) $f
}

proc cgns:add_node {tree parent child} {
  global CGNSnodes CGNSnodeChildren

  set node $parent/$child
  TreeInsert $tree $node
  set type [lindex $CGNSnodes($child) 1]
  if {[info exists CGNSnodeChildren($type)]} {
    foreach n $CGNSnodeChildren($type) {
      if {$n == $child} {
        TreeInsert $tree $node/$n
      } else {
        cgns:add_node $tree $node $n
      }
    }
  }
}

proc cgns:show_node {w node} {
  global CGNSnodes CGNSnodeDesc CGNSnodeRef CGNSdata

  TreeSelectionSet $w $node
  $CGNSdata(text) delete 1.0 end
  if {$node == "" || $node == "/"} {
    array set CGNSdata {
      node ""
      name ""
      label ""
      count ""
      type ""
      ndim ""
      dims ""
      sids ""
      midlevel ""
    }
  } else {
    set name [file tail $node]
    if {![info exists CGNSnodeDesc($name)]} {
      set name [lindex $CGNSnodes($name) 1]
    }
    set n 0
    foreach i {name label count type ndim dims} {
      set CGNSdata($i) [lindex $CGNSnodeDesc($name) $n]
      incr n
    }
    $CGNSdata(text) insert end [lindex $CGNSnodeDesc($name) 6]

    set name [file tail $node]
    if {![info exists CGNSnodeRef($name)]} {
      set name [lindex $CGNSnodes($name) 1]
    }
    if {[info exists CGNSnodeRef($name)]} {
      set CGNSdata(sids) [lindex $CGNSnodeRef($name) 0]
      set CGNSdata(midlevel) [lindex $CGNSnodeRef($name) 1]
    } else {
      set CGNSdata(sids) ""
      set CGNSdata(midlevel) ""
    }
  }

  foreach i {sids midlevel} {
    if {$CGNSdata($i) == {}} {
      $CGNSdata(buts).$i configure -state disabled
    } else {
      $CGNSdata(buts).$i configure -state normal
    }
  }
}

proc cgns:tree {w x y mode} {
  set node [TreeAt $w $x $y]
  if {$node == ""} return
  if {$node != [TreeSelectionGet $w]} {
    cgns:show_node $w $node
  }
  switch $mode {
    expand {TreeExpand $w $node}
    collapse {TreeCollapse $w $node}
    open {TreeOpenLevel $w $node}
    close {TreeCloseLevel $w $node}
  }
}

proc cgns:format {text width} {
  if {[string trim $text] == ""} {return ""}
  return $data
}

proc cgns:help {type} {
  global CGNSdata
  set html [lindex $CGNSdata($type) 0]
  if {$html == ""} return
  help_show "$type/$html.html" [lindex $CGNSdata($type) 1]
}