forked from Unidata/netcdf-c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ncf345.cdl
1743 lines (1500 loc) · 66.3 KB
/
ncf345.cdl
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
// -*-C++-*-
// Purpose: CDL file to generate netCDF test file for NCO
// Usage:
// netCDF4: ncgen arguments depend on version:
// "-k netCDF-4" for netCDF >= 3.6.3, "-k hdf5" for netCDF < 3.6.3
// "-k netCDF-4 classic model" for netCDF >= 3.6.3, "-k hdf5-nc3" for netCDF < 3.6.3
// /usr/local/bin/ncgen -k netCDF-4 -b -o in_4.nc in.cdl
// /usr/local/bin/ncgen -k netCDF-4 -b -o ${HOME}/nco/data/in_4.nc ${HOME}/nco/data/in.cdl
// NB: netCDF-classic files will be enormous unless/until _ChunkSizes attributes added to time
// /usr/local/bin/ncgen -k hdf5-nc3 -b -o in_4c.nc in.cdl
// /usr/local/bin/ncgen -k hdf5-nc3 -b -o ${HOME}/nco/data/in_4c.nc ${HOME}/nco/data/in.cdl
// URL:
// http://dust.ess.uci.edu/nco/in.nc
// http://dust.ess.uci.edu/nco/in_4.nc
// http://thredds-test.ucar.edu/thredds/dodsC/testdods/in.nc
// http://thredds-test.ucar.edu/thredds/dodsC/testdods/in_4.nc
// netCDF3:
// ncgen -b -o in.nc in.cdl
// ncgen -b -o ${HOME}/nco/data/in.nc ${HOME}/nco/data/in.cdl
// scp ~/nco/data/in.cdl ~/nco/data/in_4.nc dust.ess.uci.edu:nco/data
// scp ~/nco/data/in.nc ~/nco/data/in_4.nc dust.ess.uci.edu:/var/www/html/nco
// scp ~/nco/data/in.nc ~/nco/data/in_4.nc dust.ess.uci.edu:/var/www/html/dodsdata
// mswrite -t 365 ~/nco/data/in.nc /ZENDER/tmp/in.nc
// mswrite -t 365 ~/nco/data/in.nc /ZENDER/tmp/h0001.nc
// mswrite -t 365 ~/nco/data/in.nc /ZENDER/tmp/h0002.nc
// mswrite -t 365 ~/nco/data/in.nc /ZENDER/tmp/h0003.nc
// mswrite -t 365 ~/nco/data/in.nc /ZENDER/tmp/h0004.nc
// msrcp -period 365 ~/nco/data/in.nc mss:/ZENDER/tmp/in.nc
// msrcp -period 365 ~/nco/data/in.nc mss:/ZENDER/tmp/h0001.nc
// msrcp -period 365 ~/nco/data/in.nc mss:/ZENDER/tmp/h0002.nc
// msrcp -period 365 ~/nco/data/in.nc mss:/ZENDER/tmp/h0003.nc
// msrcp -period 365 ~/nco/data/in.nc mss:/ZENDER/tmp/h0004.nc
// WARNING: Changing values of variables below, especially coordinate variables, affects outcome of nco_tst.pl test script
// Other programs, e.g., ~/f/fff.F90, ~/c++/ccc.cc, ~/c/c.c may also break
// In particular, do not change number of elements in record coordinate, time, without simultaneously changing number of data in all record variables
// My (and NCO's) convention is that the _FillValue, if any, of any packed variable should be of the same type as the expanded variable. Hence _FillValue, add_offset, and scale_factor should all be of the same type. Variables that do not adhere to this convention are not supported.
// Bugs:
// Some triggering bugs were moved to buggy.cdl to prevent non-builds
// ncgen 4.0.0--4.3.2 crashes on 'l' or 'L' syntax when generating netCDF4-classic (but not netCDF3 or netCDF4) files until 20141010 (NCF-318)
// CDL Data constants:
// http://www.unidata.ucar.edu/software/netcdf/docs/netcdf/CDL-Syntax.html
// byte: 'a'
// char: "a"
// short: 1s
// int: 1 (no decimal point)
// long: 1 (_not_ 1l;) (long is synonym for int in netCDF3)
// float: 1.f (decimal point is required, f is required to distinguish from double)
// double: 1.0, 1.d, 1.0e-20 (decimal point is required, d is not required)
// CDL complex types:
// roulee:/data/zender/tmp/netcdf-4.2.1/nc_test/ref_tst_diskless2.cdl
// NCL usage:
// id_in=addfile("/home/zender/nco/data/in.nc","r")
// print(id_in)
// list_filevars(id_in)
netcdf ncf345 {
dimensions:
dgn=1,bnd=2,lat=2,lat_grd=3,lev=3,rlev=3,ilev=4,lon=4,lon_grd=5,char_dmn_lng80=80,char_dmn_lng26=26,char_dmn_lng04=4,date_dmn=5,fl_dmn=3,lsmlev=6,wvl=2,time_udunits=3;lon_T42=128,lat_T42=64,lat_times_lon=8,gds_crd=8,gds_ncd=8,vrt_nbr=2,lon_cal=10,lat_cal=10,Lon=4,Lat=2,time=unlimited;
variables:
:Conventions = "CF-1.5";
:history = "History global attribute.\nTextual attributes like history often have embedded newlines like this.\nSuch newlines should serve as linebreaks on the screen to enhance legibility like this.\nFriendly CDL converters print a single NC_CHAR attribute as a comma-separated list of strings where each embedded delimiter marks a linebreak. This makes poetry embedded in CDL much nicer to read:\n\nA POET by Hafiz\n\nA poet is someone\nWho can pour light into a cup,\nThen raise it to nourish\nYour beautiful parched, holy mouth\n";
:lorem_ipsum = "The Lorem Ipsum attribute demonstrates the legibility of text without embedded linebreaks:\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lady Gaga amat indueris vestimento laetus. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
:julian_day = 200000.04;
:RCS_Header = "$Header$";
int date_int(date_dmn);
date_int:long_name = "Date (as array of ints: YYYY,MM,DD,HH,MM)";
float dgn(dgn);
dgn:long_name = "degenerate coordinate (dgn means degenerate, i.e., of size 1)";
float dgn_var(dgn);
dgn_var:long_name = "degenerate variable (dgn means degenerate, i.e., of size 1)";
float lat(lat);
lat:long_name = "Latitude (typically midpoints)";
lat:units = "degrees_north";
lat:bounds = "lat_bnd";
float lat_bnd(lat,vrt_nbr);
lat_bnd:purpose = "Cell boundaries for lat coordinate";
float lat_grd(lat_grd);
lat_grd:long_name = "Latitude grid (typically interfaces)";
lat_grd:units = "degrees_north";
float lat_cpy(lat);
float lev_cpy(lev);
float lat_var(lat);
float lat_wgt(lat);
float lon_T42(lon_T42);
float lat_T42(lat_T42);
float lat_1D_rct(lat_times_lon);
lat_1D_rct:long_name = "Latitude for 2D rectangular grid stored as 1D arrays";
lat_1D_rct:units = "degrees_north";
float lon_1D_rct(lat_times_lon);
lon_1D_rct:long_name = "Longitude for 2D rectangular grid stored as 1D arrays";
lon_1D_rct:units = "degrees_east";
float lat_1D_rrg(lat_times_lon);
lat_1D_rrg:long_name = "Latitude for 2D irregular grid stored as 1D arrays";
lat_1D_rrg:units = "degrees_north";
float lon_1D_rrg(lat_times_lon);
lon_1D_rrg:long_name = "Longitude for 2D irregular grid stored as 1D arrays";
lon_1D_rrg:units = "degrees_east";
int lat_times_lon(lat_times_lon);
lat_times_lon:long_name = "Element index (i.e., C-based storage order) for 2D coordinate grids stored as 1D arrays";
float lat_2D_rct(lat,lon);
lat_2D_rct:long_name = "Latitude for 2D rectangular grid stored as 2D array";
lat_2D_rct:units = "degrees_north";
float lon_2D_rct(lat,lon);
lon_2D_rct:long_name = "Longitude for 2D rectangular grid stored as 2D array";
lon_2D_rct:units = "degrees_east";
float lat_2D_rrg(lat,lon);
lat_2D_rrg:long_name = "Latitude for 2D irregular grid stored as 2D array";
lat_2D_rrg:units = "degrees_north";
float lon_2D_rrg(lat,lon);
lon_2D_rrg:long_name = "Longitude for 2D irregular grid stored as 2D array";
lon_2D_rrg:units = "degrees_east";
int lat_times_lon_nbr;
lat_times_lon_nbr:long_name = "Number of elements in 2D coordinate grids. Rectangular and irregular test grids have this many total elements. The coordinates and elements are stored as 1D or 2D arrays for grid types 1D and 2D respectively.";
float lev(lev);
lev:purpose = "Monotonically increasing coordinate pressure";
lev:long_name = "hybrid level at midpoints (1000*(A+B))";
lev:units = "hPa";
lev:positive = "down";
lev:A_var = "hyam";
lev:B_var = "hybm";
lev:P0_var = "P0";
lev:PS_var = "PS";
lev:bounds = "lev_bnd";
lev:standard_name = "atmosphere_hybrid_sigma_pressure_coordinate";
lev:formula_terms = "a: hyam b: hybm p0: P0 ps: PS";
lev:formula_readable = "prs_mdp[time,lat,lon,lev]=P0*hyam+PS*hybm";
float ilev(ilev);
ilev:purpose = "Monotonically increasing coordinate pressure";
ilev:long_name = "hybrid level at interfaces (1000*(A+B))";
ilev:units = "hPa";
ilev:positive = "down";
ilev:A_var = "hyai";
ilev:B_var = "hybi";
ilev:P0_var = "P0";
ilev:PS_var = "PS";
ilev:standard_name = "atmosphere_hybrid_sigma_pressure_coordinate";
ilev:formula_terms = "a: hyai b: hybi p0: P0 ps: PS";
ilev:formula_readable = "prs_ntf[time,lat,lon,ilev]=P0*hyai+PS*hybi";
float lev_bnd(lev,vrt_nbr);
lev_bnd:purpose = "Cell boundaries for lev coordinate";
float rlev(rlev);
rlev:purpose = "Monotonically decreasing coordinate pressure";
float lon(lon);
lon:long_name = "Longitude (typically midpoints)";
lon:units = "degrees_east";
double Lon(Lon);
Lon:long_name = "Longitude";
Lon:units = "degrees";
Lon:purpose = "Longitude coordinate originally stored as -180 to 180";
Lon:notes = "Longitude = [-180.0,180.0) is not CF-compliant, yet is common";
double LatLon(Lat,Lon);
LatLon:long_name = "2D variable originally stored on -180 to 180 longitude grid";
LatLon:units = "fraction";
LatLon:purpose = "Demonstrate remapping of [-180,180) to [0,360) longitude-grid data";
double Lat(Lat);
Lat:long_name = "Latitude";
Lat:units = "degrees_north";
Lat:purpose = "Latitude paired with Longitude coordinate originally stored as -180 to 180.";
double lond(lon);
lond:long_name = "Longitude (typically midpoints), double precision";
lond:units = "degrees_east";
float lonf(lon);
lonf:long_name = "Longitude (typically midpoints), single precision";
lonf:units = "degrees_east";
float lon_grd(lon_grd);
lon_grd:long_name = "Longitude grid (typically interfaces)";
lon_grd:units = "degrees_east";
double time(time);
time:long_name = "time";
time:units = "days since 1964-03-12 12:09:00 -9:00";
time:calendar = "gregorian";
time:bounds = "time_bnds";
time:climatology = "climatology_bounds";
float time_bnds(time,vrt_nbr);
time_bnds:purpose = "Cell boundaries for time coordinate";
float climatology_bounds(time,vrt_nbr);
climatology_bounds:purpose = "Variable containing CF-compliant climatology bounds for time dimension";
double lon_cal(lon_cal);
lon_cal:long_name = "lon_cal";
lon_cal:units = "days since 1964-2-28";
lon_cal:calendar = "365_day";
double lat_cal(lat_cal);
lat_cal:long_name = "lat_cal";
lat_cal:units = "days since 1964-2-28";
lat_cal:calendar = "360_day";
double tm_std;
tm_std:units = "days since 2013-01-01";
double tm_grg;
tm_grg:units = "days since 2013-01-01";
tm_grg:calendar = "gregorian"; // Same as "standard"
double tm_jln;
tm_jln:units = "days since 2013-01-01";
tm_jln:calendar = "julian";
double tm_360;
tm_360:units = "days since 2013-01-01";
tm_360:calendar = "360_day";
double tm_365;
tm_365:units = "days since 2013-01-01";
tm_365:calendar = "365_day"; // Same as "noleap"
double tm_366;
tm_366:units = "days since 2013-01-01";
tm_366:calendar = "366_day"; // Same as "all_leap"
float lsmlev(lsmlev);
lsmlev:purpose = "Homebrew level coordinate for LSM";
lsmlev:long_name = "Soil depth";
lsmlev:units = "meter";
float wvl(wvl);
wvl:long_name = "Wavelength";
wvl:units = "meter";
int od(time);
float area(lat);
area:long_name = "area";
area:units = "meter2";
float area2(lat);
area2:long_name = "area version 2";
area2:units = "meter2";
float area_asm(lat);
area_asm:long_name = "area asymmetric";
area_asm:units = "meter2";
float hyam(lev);
hyam:long_name = "hybrid A coefficient at layer midpoints";
float hybm(lev);
hybm:long_name = "hybrid B coefficient at layer midpoints";
float hyai(ilev);
hyai:long_name = "hybrid A coefficient at layer interfaces";
float hybi(ilev);
hybi:long_name = "hybrid B coefficient at layer interfaces";
float P0;
P0:long_name = "reference pressure";
P0:units = "pascal";
float cnv_CF_crd(gds_crd);
cnv_CF_crd:long_name = "test CF coordinates conventions";
cnv_CF_crd:coordinates = "lat_gds lon_gds ";
cnv_CF_crd:reason = "Test whether coordinates attribute strings that end with a space break after nco_var_lst_crd_ass_add() call to nco_lst_prs_2d()";
float cnv_CF_ncl(time);
cnv_CF_ncl:long_name = "test CF ancillary_variables convention";
cnv_CF_ncl:standard_name = "specific_humidity";
cnv_CF_ncl:ancillary_variables = "cnv_CF_ncl_var_1 cnv_CF_ncl_var_2";
cnv_CF_ncl:purpose = "Main variable that has ancillary variables named cnv_CF_ncl_var_1 and cnv_CF_ncl_var_2";
float cnv_CF_ncl_var_1(time);
cnv_CF_ncl_var_1:long_name = "test CF ancillary_variables convention";
cnv_CF_ncl_var_1:standard_name = "specific_humidity standard_error";
cnv_CF_ncl_var_1:purpose = "Ancillary variable for cnv_CF_ncl. Other ancillary variable is cnv_CF_ncl_var_2.";
float cnv_CF_ncl_var_2(time);
cnv_CF_ncl_var_2:long_name = "test CF ancillary_variables convention";
cnv_CF_ncl_var_2:standard_name = "specific_humidity detection_limit";
cnv_CF_ncl_var_2:purpose = "Ancillary variable for cnv_CF_ncl. Other ancillary variable is cnv_CF_ncl_var_1.";
float PS(time,lat,lon);
PS:long_name = "surface pressure";
PS:units = "pascal";
char fl_dmn(fl_dmn);
fl_dmn:long_name = "Character coordinate";
fl_dmn:units = "[chr]";
double lat_gds(gds_crd);
lat_gds:long_name = "Latitude";
lat_gds:standard_name = "latitude";
lat_gds:units="degree";
lat_gds:purpose = "1-D latitude coordinate referred to by geodesic grid variables";
double lon_gds(gds_crd);
lon_gds:long_name = "Longitude";
lon_gds:standard_name = "longitude";
lon_gds:units="degree";
lon_gds:purpose = "1-D longitude coordinate referred to by geodesic grid variables";
float gds_crd(gds_crd);
gds_crd:long_name = "Geodesic coordinate";
gds_crd:units = "degree";
gds_crd:purpose = "enumerated coordinate like those that might define points in a geodesic grid";
gds_crd:coordinates = "lat_gds lon_gds";
float gds_var(gds_crd);
gds_var:long_name = "Geodesic variable";
gds_var:units = "meter";
gds_var:purpose = "Test auxiliary coordinates like those that define geodesic grids";
gds_var:coordinates = "lat_gds lon_gds";
float gds_3dvar(time,gds_crd);
gds_3dvar:long_name = "Geodesic variable";
gds_3dvar:units = "meter";
gds_3dvar:coordinates = "lat_gds lon_gds";
gds_3dvar:purpose = "Test auxiliary coordinates like those that define geodesic grids";
float gds_var_ncd(gds_ncd);
gds_var_ncd:long_name = "Geodesic variable on non-coordinate grid";
gds_var_ncd:units = "meter";
gds_var_ncd:purpose = "Test auxiliary coordinates like those that define geodesic grids but where underlying dimension is a non-coordinate dimension";
gds_var_ncd:coordinates = "lat_gds_ncd lon_gds_ncd";
double lat_gds_ncd(gds_ncd);
lat_gds_ncd:long_name = "Latitude";
lat_gds_ncd:standard_name = "latitude";
lat_gds_ncd:units="degree";
lat_gds_ncd:purpose = "1-D latitude coordinate referred to by \"non-coordinate\" (ncd) geodesic grid variables";
double lon_gds_ncd(gds_ncd);
lon_gds_ncd:long_name = "Longitude";
lon_gds_ncd:standard_name = "longitude";
lon_gds_ncd:units="degree";
lon_gds_ncd:purpose = "1-D longitude coordinate referred to by \"non-coordinate\" (ncd) geodesic grid variables";
int nbdate;
nbdate:long_name = "base date as 6- or 8-digit integer (YYMMDD or YYYYMMDD)";
int date(time);
date:long_name = "current date as 6- or 8-digit integer (YYMMDD or YYYYMMDD)";
float lon_wgt(lon);
lon_wgt:long_name = "Gaussian weights";
lon_wgt:purpose = "Gaussian weights which sum to two for n = 4. These weights are all have floor of 0.0 so should cause SIGFPE when applied to integer types in weighted average.";
double ppc_dbl(time);
ppc_dbl:long_name = "Precision-Preserving Compression, double precision";
ppc_dbl:purpose = "test --ppc switches";
ppc_dbl:original_values="0.0,0.1,0.12,0.123,0.1234,0.12345,0.123456,0.1234567,0.12345678,0.123456789";
float ppc_flt(time);
ppc_flt:long_name = "Precision-Preserving Compression, single precision";
ppc_flt:purpose = "test --ppc switches";
ppc_flt:original_values="0.0,0.1,0.12,0.123,0.1234,0.12345,0.123456,0.1234567,0.12345678,0.123456789";
double ppc_big(time);
ppc_big:long_name = "Precision-Preserving Compression, big numbers";
ppc_big:purpose = "test --ppc switches";
ppc_big:original_values="123456789e-10,123456789e-9,123456789e-8,123456789e-7,123456789e-6,123456789e-5,123456789e-4,123456789e-3,123456789e-2,123456789e-1";
float ppc_bgr(time);
ppc_bgr:long_name = "Precision-Preserving Compression, bigger numbers";
ppc_bgr:purpose = "test --ppc switches";
ppc_bgr:original_values="1234567890e20,1234567890e19,1234567890e18,1234567890e17,1234567890e16,1234567890e15,1234567890e14,1234567890e13,1234567890e12,1234567890e11";
float ppc_bgr_scl;
ppc_bgr_scl:long_name = "Precision-Preserving Compression, bigger numbers, scalar";
ppc_bgr_scl:purpose = "test --ppc switches";
ppc_bgr_scl:original_value="1234567890e11";
double ppc_hgh(time);
ppc_hgh:long_name = "Precision-Preserving Compression, high precision";
ppc_hgh:purpose = "test --ppc switches";
double ppc_hgr(time);
ppc_hgr:long_name = "Precision-Preserving Compression, higher precision";
ppc_hgr:purpose = "test --ppc switches";
char md5_a;
md5_a:long_name = "the letter a";
md5_a:purpose = "String with known MD5 digest";
md5_a:MD5_known_checksum = "0cc175b9c0f1b6a831c399e269772661";
char md5_abc(lev);
md5_abc:long_name = "the letters abc";
md5_abc:purpose = "String with known MD5 digest";
md5_abc:MD5_known_checksum = "900150983cd24fb0d6963f7d28e17f72";
float msk_prt_mss_prt(lon);
msk_prt_mss_prt:long_name = "partial mask, partial missing value example";
msk_prt_mss_prt:_FillValue = 1.0e36f;
float mss_val(lon);
mss_val:long_name = "partial missing value example";
mss_val:_FillValue = 1.0e36f;
float mss_val_scl;
mss_val_scl:long_name = "scalar missing value";
mss_val_scl:_FillValue = 1.0e36f;
float mss_val_fst(lon);
mss_val_fst:long_name = "offset partial missing value example";
mss_val_fst:_FillValue = -999.0f;
float fll_val(lon);
fll_val:long_name = "_FillValue example";
fll_val:_FillValue = -999.0f;
float fll_val_mss_val(lon);
fll_val_mss_val:long_name = "_FillValue example";
fll_val_mss_val:_FillValue = -999.0f;
fll_val_mss_val:missing_value = -999.0f;
float nan_arr(lat);
nan_arr:long_name = "Intended for array representation of IEEE NaN";
nan_arr:note = "20120308 Apparently netCDF ncgen chokes on variable names of nan and NaN";
nan_arr:note2 = "20120330 netCDF ncgen on AIX/bluefire chokes on variable/attribute values of nan";
nan_arr:note3 = "20120625 netCDF ncgen on netCDF 4.1.1 on apparently chokes on variable/attribute values of nan";
nan_arr:note4 = "If your NCO build fails because your version of netCDF does not support nan, then cd to the directory that contains the file nco/data/in.cdl and run the command in note5 first and then try to build again";
nan_arr:note5 = "sed -e 's/nan;/1.0f;/' in.cdl > foo.cdl;ncgen -b -o in.nc foo.cdl";
nan_arr:note6 = "It is too troublesome to distribute in.cdl with references to NaNs because users always build with old netCDF versions that do not support it. So just comment out nan's for now.";
// nan_arr:_FillValue = nan;
nan_arr:_FillValue = 1.0f;
float nan_scl;
nan_scl:long_name = "Intended for scalar representation of IEEE NaN";
nan_scl:note = "20120308 Apparently netCDF ncgen chokes on variable names of nan and NaN";
nan_scl:note2 = "20120330 netCDF ncgen on AIX/bluefire chokes on variable/attribute values of nan";
nan_scl:note3 = "20120625 netCDF ncgen on netCDF 4.1.1 on apparently chokes on variable/attribute values of nan";
nan_scl:note6 = "It is too troublesome to distribute in.cdl with references to NaNs because users always build with old netCDF versions that do not support it. So just comment out nan's for now.";
// nan_scl:_FillValue = nan;
nan_scl:_FillValue = 1.0f;
float nm_spc;
nm_spc:long_name = "Variable name with space (invalid)";
float nm_pnd;
nm_pnd:long_name = "Variable name with pound symbol (invalid)";
float no_mss_val(lon);
no_mss_val:long_name = "no missing value";
float val_one_mss(lat);
val_one_mss:long_name = "one regular value, one missing value";
val_one_mss:_FillValue = 1.0e36f;
short rec_var_pck_scale_factor_only(time);
rec_var_pck_scale_factor_only:long_name = "Array packed with scale factor only";
rec_var_pck_scale_factor_only:note = "Original packed value was 1s..10s with scale_factor = 10.0d no add_offset. Unpacked value should be 10.0 = 10.0d*1s + 0.0d through 100 = 10.0d*1s + 0.0d. Average value should be 55.";
rec_var_pck_scale_factor_only:scale_factor = 10.0d;
short pck;
pck:long_name = "Scalar variable, double, packed as short";
pck:note = "Original packed value was 1s with scale_factor = 2.0d and add_offset = 1.0d. Unpacked value (netCDF convention) should be 3.0 = 2.0d*1s + 1.0d. Unpacked value (HDF convention) should be 0.0 = 2.0d*(1s-1.0d). NCO algorithms would pack this variable as scale_factor = 0.0d and add_offset = 3.0d.";
pck:scale_factor = 2.0d;
pck:add_offset = 1.0d;
short pck_3;
pck_3:long_name = "Scalar variable, double, packed as short";
pck_3:note = "Original packed value was 1s with scale_factor = 2.0d and add_offset = 1.0d. Unpacked value (netCDF convention) should be 3.0 = 2.0d*1s + 1.0d. Unpacked value (HDF convention) should be 0.0 = 2.0d*(1s-1.0d). NCO algorithms would pack this variable as scale_factor = 0.0d and add_offset = 3.0d.";
pck_3:scale_factor = 2.0d;
pck_3:add_offset = 1.0d;
short pck_5;
pck_5:long_name = "Scalar variable, double, packed as short";
pck_5:note = "Original packed value was 2s with scale_factor = 2.0d and add_offset = 1.0d. Unpacked value (netCDF convention) should be 5.0 = 2.0d*2s + 1.0d. Unpacked value (HDF convention) should be 2.0 = 2.0d*(2s-1.0d). NCO algorithms would pack this variable as scale_factor = 0.0d and add_offset = 5.0d.";
pck_5:scale_factor = 2.0d;
pck_5:add_offset = 1.0d;
short pck_7;
pck_7:long_name = "Scalar variable, double, packed as short";
pck_7:note = "Original packed value was 1s with scale_factor = 4.0d and add_offset = 3.0d. Unpacked value (netCDF convention) should be 7.0 = 4.0d*1s + 3.0d. Unpacked value (HDF convention) should be -8.0 = 4.0d*(1s-3.0d). NCO algorithms would pack this variable as scale_factor = 0.0d and add_offset = 7.0d.";
pck_7:scale_factor = 4.0d;
pck_7:add_offset = 3.0d;
short pck_arr(lon);
pck_arr:long_name = "Array variable, double, packed as short";
pck_arr:note = "Packed value is -32767s, 0s, 1s, 32767s, unpacked is same in double";
pck_arr:scale_factor = 1.0d;
pck_arr:add_offset = 0.0d;
double upk;
upk:long_name = "Unpacked scalar variable";
upk:note = "Unpacked value is 3.0d0, upk=unpack(pck)= 2.0d0*1s + 1.0d0 = 3.0d0. Packing this variable should create an NC_SHORT scalar = 0s with packing attribute add_offset=3.0d and either no scale_factor (ncap) or scale_factor = 0.0d (ncpdq).";
double upk_arr(lon);
upk_arr:long_name = "Unpacked array";
upk_arr:note = "Unpacked value is -32767.d, 0.d, 1.d, 32767.d, packed is same in short. Packing algorithm should yield an NC_SHORT array = [] with packing attributes scale_factor=1.0d, add_offset=0.0d";
float val_eminusten;
val_eminusten:long_name = "Floating point number with exponent ending in zero to test sng_trm_trl_zro()";
val_eminusten:att_eminusten = 1.1e-10f;
int val_one_int;
val_one_int:long_name = "scalar integer equal to 1";
val_one_int:_FillValue = -99l;
int val_one_one_int(lat);
val_one_one_int:long_name = "1, 1";
val_one_one_int:_FillValue = -99l;
short val_max_max_sht(lat);
val_max_max_sht:long_name = "17000, 17000";
val_max_max_sht:_FillValue = -99s;
int val_one_mss_int(lat);
val_one_mss_int:long_name = "1, mss_val";
val_one_mss_int:_FillValue = -99l;
float val_half;
val_half:long_name = "Scalar with value 0.5";
val_half:_FillValue = 1.0e36f;
float val_half_half(lat);
val_half_half:long_name = "0.5,0.5";
val_half_half:_FillValue = 1.0e36f;
float wgt_one(lat);
wgt_one:long_name = "all values are one";
float mss_val_all(lon);
mss_val_all:long_name = "all missing values example";
mss_val_all:_FillValue = 1.0e36f;
float scalar_var;
scalar_var:long_name = "scalar variable";
scalar_var:units = "fraction";
float float_var;
float_var:long_name = "float";
double double_var;
double_var:long_name = "double";
double double_var2;
double_var2:long_name = "double";
double_var2:_FillValue = 1.0e36;
double pi;
pi:long_name = "Pi";
pi:units = "fraction";
int int_var;
int_var:long_name = "int";
long long_var;
long_var:long_name = "long";
long_var:purpose = "Variable of CDL type=long, which is deprecated for int. Included to test back-compatibility";
short short_var;
short_var:long_name = "short";
char char_var;
char_var:long_name = "char";
char char_var_space;
char_var_space:long_name = "Character variable with whitespace on ends";
char char_var_nul;
char_var_nul:long_name = "Character variable containing one NUL";
// 20131015: This confuses the XML parser. Omit it for now.
// char char_var_multinul(lev);
// char_var_multinul:long_name = "Character variable containing multiple NULs";
char fl_nm(char_dmn_lng80);
fl_nm:long_name = "Variable contains a file name";
char fl_nm_arr(fl_dmn,char_dmn_lng80);
fl_nm_arr:long_name = "Variable that contains a short array of file names";
fl_nm_arr:units = "[sng]";
char fl_nm_rec(time,char_dmn_lng80);
fl_nm_rec:long_name = "A record variable of file names";
fl_nm_rec:units = "[sng]";
char date_rec(time,char_dmn_lng26);
date_rec:long_name = "A record variable of date strings";
date_rec:units = "[sng]";
char non_nul_trm_char_one_dmn(char_dmn_lng04);
non_nul_trm_char_one_dmn:long_name = "Variable contains a one-dimensional array of characters that is not NUL-terminated";
non_nul_trm_char_one_dmn:units = "[chr]";
char non_nul_trm_char_two_dmn(fl_dmn,char_dmn_lng04);
non_nul_trm_char_two_dmn:long_name = "Variable contains a two-dimensional array of characters that are not NUL-terminated";
non_nul_trm_char_two_dmn:units = "[chr]";
byte byt_arr(lat,lon);
byt_arr:long_name = "byte array";
byte byt_2D(lat,lon);
byte byt_3D(lat,lev,lon);
byte byt_3D_rec(time,lat,lon);
byte byte_var;
byte_var:long_name = "byte";
byte byte_var_neg;
byte_var_neg:long_name = "negative byte";
float zero;
zero:long_name = "zero";
float ppc_zro_flt(time);
zero:long_name = "array of single precision floating point zeros";
double ppc_zro_dbl(time);
zero:long_name = "array of double precision floating point zeros";
int ppc_zro_int(time);
zero:long_name = "array of integer zeros";
float one;
one:long_name = "one";
float two;
two:long_name = "two";
double e_dbl;
e_dbl:long_name = "e, natural logarithm base";
float e_flt;
e_flt:long_name = "e, natural logarithm base";
float three;
three:long_name = "three";
float four;
four:long_name = "four";
float negative_one;
negative_one:long_name = "negative one";
float lev_var(lev);
lev_var:long_name = "lev_var";
float lev_wgt(lev);
lev_wgt:long_name = "lev_wgt";
float g;
g:long_name = "g";
float dps_dry;
dps_dry:long_name = "Dry Deposition";
float dps_wet;
dps_wet:long_name = "Wet Deposition";
float dps_ttl;
dps_ttl:long_name = "Total Deposition";
float z(lev);
z:long_name = "Height";
z:units = "meter";
z:purpose = "Height stored with a monotonically increasing coordinate";
float rz(rlev);
rz:long_name = "Height";
rz:units = "meter";
rz:purpose = "Height stored with a monotonically decreasing coordinate";
float one_dmn_var(bnd);
int one_dmn_int_val_one(lat);
int one_dmn_int_val_two(lat);
float att_var(time);
att_var:byte_att = '\000','\001','\002','\177','\200','\201','\376','\377';
att_var:char_att = "Sentence one.\nSentence two.\n";
att_var:short_att = 37s;
att_var:int_att = 73;
att_var:long_att = 73l;
att_var:float_att = 73.0f,72.0f,71.0f,70.010f,69.0010f,68.010000f,67.01000100f;
att_var:double_att = 73.0,72.0,71.0,70.010,69.0010,68.010000,67.01000100;
int bnd_var(lev,bnd);
bnd_var:byte_att = '\0';
bnd_var:char_att = "Sentence one.\nSentence two.\n";
bnd_var:short_att = 37s;
bnd_var:int_att = 73;
bnd_var:long_att = 73l;
bnd_var:float_att = 73.f;
bnd_var:double_att = 73.d;
float three_dmn_var(lat,lev,lon);
three_dmn_var:long_name = "three dimensional variable with CCM coordinate convention C=[lat,lev,lon], Fortran=(lon,lev,lat)";
three_dmn_var:units = "fraction";
float three_dmn_var_crd(lev,lat,lon);
three_dmn_var_crd:long_name = "three dimensional variable with COORDS coordinate convention C=[lev,lat,lon], Fortran=(lon,lat,lev)";
three_dmn_var_crd:units = "fraction";
float prs_sfc(time,lat,lon);
prs_sfc:long_name = "Surface pressure";
prs_sfc:units = "pascal";
float H2O;
float H2OH2O;
float H2SO4;
float H2O_lqd;
float H2O_ice;
float Q;
float Q1;
float AQ01;
float QQ01;
float QA01;
float Q01Q;
float Q01;
float Q02;
float Q03;
float Q04;
float Q05;
float Q06;
float Q07;
float Q08;
float Q09;
float Q10;
float Q11;
float Q12;
float Q13;
float Q14;
float Q15;
float Q16;
float Q17;
float Q18;
float Q19;
float Q20;
float Q21;
float Q22;
float Q23;
float Q24;
float Q25;
float Q26;
float Q27;
float Q28;
float Q29;
float Q30;
float Q31;
float Q32;
float Q33;
float Q34;
float Q35;
float Q36;
float Q37;
float Q38;
float Q39;
float Q40;
float Q41;
float Q42;
float Q43;
float Q44;
float Q45;
float Q46;
float Q47;
float Q48;
float Q49;
float Q50;
float Q51;
float Q52;
float Q53;
float Q54;
float Q55;
float Q56;
float Q57;
float Q58;
float Q59;
float Q60;
float Q61;
float Q62;
float Q63;
float Q64;
float Q65;
float Q66;
float Q67;
float Q68;
float Q69;
float Q70;
float Q71;
float Q72;
float Q73;
float Q74;
float Q75;
float Q76;
float Q77;
float Q78;
float Q79;
float Q80;
float Q81;
float Q82;
float Q83;
float Q84;
float Q85;
float Q86;
float Q87;
float Q88;
float Q89;
float Q90;
float Q91;
float Q92;
float Q93;
float Q94;
float Q95;
float Q96;
float Q97;
float Q98;
float Q99;
float Q100;
float two_dmn_var(lat,lev);
two_dmn_var:long_name = "two dimensional variable";
two_dmn_var:units = "fraction";
float var_msk(lat,lon);
var_msk:long_name = "Float field for testing masks and wheres";
var_msk:units = "fraction";
float mask(lat,lon);
mask:long_name = "Purpose is to mask a variable like ORO";
mask:units = "fraction";
float ORO(lat,lon);
ORO:long_name = "Orography, an enumerated yet continuous type: ocean=0.0, land=1.0, sea ice=2.0";
ORO:units = "fraction";
float weight(lat);
weight:long_name = "Gaussian weight";
weight:units = "fraction";
float gw(lat);
gw:long_name = "gw variable like gw";
gw:units = "fraction";
float gw_T42(lat_T42);
gw_T42:long_name = "gw variable like gw_T42";
gw_T42:units = "fraction";
float rec_var_flt(time);
rec_var_flt:long_name = "record variable, float";
double rec_var_dbl(time);
rec_var_dbl:long_name = "record variable, double";
int one_dmn_rec_var(time);
one_dmn_rec_var:long_name = "one dimensional record variable";
one_dmn_rec_var:coordinates = "time";
one_dmn_rec_var:units = "kelvin";
double one_dmn_rec_wgt(time);
one_dmn_rec_wgt:long_name = "one dimensional record variable weight";
int one_dmn_rec_var_mdn(time);
one_dmn_rec_var_mdn:long_name = "one dimensional record variable to test median";
int one_dmn_rec_var_mdn__FillValue(time);
one_dmn_rec_var_mdn__FillValue:long_name = "one dimensional record variable to test median with _FillValue";
one_dmn_rec_var_mdn__FillValue:_FillValue = -999;
int one_dmn_rec_var_unsorted(time);
one_dmn_rec_var_unsorted:long_name = "one dimensional record variable, unsorted";
float one_dmn_rec_var_flt(time);
one_dmn_rec_var_flt:long_name = "one dimensional record variable, single precision";
float one_dmn_rec_var_flt_mss(time);
one_dmn_rec_var_flt_mss:long_name = "one dimensional record variable, single precision, missing values";
one_dmn_rec_var_flt_mss:_FillValue = 1.0e36f;
float one_dmn_rec_var_flt_scl(time);
one_dmn_rec_var_flt_scl:long_name = "one dimensional record variable, single precision, scaled";
one_dmn_rec_var_flt_scl:scale_factor = 1.0f;
float one_dmn_rec_var_flt_mss_scl(time);
one_dmn_rec_var_flt_mss_scl:long_name = "one dimensional record variable, single precision, missing values, scaled";
one_dmn_rec_var_flt_mss_scl:scale_factor = 1.0f;
one_dmn_rec_var_flt_mss_scl:_FillValue = 1.0e36f;
float one_dmn_rec_var_dbl(time);
one_dmn_rec_var_dbl:long_name = "one dimensional record variable, double precision";
one_dmn_rec_var_dbl:units = "second";
float one_dmn_rec_var_missing_value(time);
one_dmn_rec_var_missing_value:long_name = "One dimensional record variable with missing data indicated by missing_value attribute only. No _FillValue attribute exists.";
one_dmn_rec_var_missing_value:missing_value = 1.0e36f;
float one_dmn_rec_var_mss_val(time);
one_dmn_rec_var_mss_val:long_name = "One dimensional record variable with all missing data.";
one_dmn_rec_var_mss_val:_FillValue = 1.0e36f;
float one_dmn_rec_var__FillValue(time);
one_dmn_rec_var__FillValue:long_name = "One dimensional record variable with missing data indicated by _FillValue attribute only. No missing_value attribute exists.";
one_dmn_rec_var__FillValue:_FillValue = 1.0e36f;
float one_dmn_rec_var_unsorted__FillValue(time);
one_dmn_rec_var_unsorted__FillValue:long_name = "Unsorted, one dimensional record variable with missing data indicated by _FillValue attribute only. No missing_value attribute exists.";
one_dmn_rec_var_unsorted__FillValue:_FillValue = 1.0e36f;
float one_dmn_rec_var_mss_val_arr(time);
one_dmn_rec_var_mss_val_arr:long_name = "One dimensional record variable with missing data indicated by a _FillValue attribute that is an array. This can be tested with ncrcat. 20120905: ncgen chokes on _FillValue arrays and produces this error: _FillValue: must be a single (possibly compound) value. Deprecate the array for normal use since it prevents ncgen from completing. Uncomment following line when testing for compatibility with software changes.";
// one_dmn_rec_var_mss_val_arr:_FillValue = 1.0f,2.0f,3.0f;
one_dmn_rec_var_mss_val_arr:_FillValue = 1.0f;
int RDM(time);
float tpt(time);
tpt:long_name = "Temperature";
tpt:units = "kelvin";
tpt:hieght = "Leave hieght mispelled for NCO User's guide example";
double tpt_dbl(time);
tpt_dbl:long_name = "Temperature stored as double precision floating point";
tpt_dbl:units = "kelvin";
float tpt_flt(time);
tpt_flt:long_name = "Temperature stored as single precision floating point";
tpt_flt:units = "kelvin";
double rec_var_dbl_mss_val_dbl_upk(time);
rec_var_dbl_mss_val_dbl_upk:long_name = "record variable, double, with double missing values";
rec_var_dbl_mss_val_dbl_upk:purpose = "This variable is used to generate the packed variable rec_var_dbl_mss_val_dbl_pck, so its _FillValue should not be out of range, i.e., it should be representable by a short. However, the _FillValue should itself be the same type as the unpacked variable, NC_DOUBLE in this case.";
rec_var_dbl_mss_val_dbl_upk:_FillValue = -999.;
rec_var_dbl_mss_val_dbl_upk:missing_value = -999.;
double rec_var_dbl_mss_val_sht_upk(time);
rec_var_dbl_mss_val_sht_upk:long_name = "record variable, double, with double missing values";
rec_var_dbl_mss_val_sht_upk:purpose = "This variable is used to generate the packed variable rec_var_dbl_mss_val_sht_pck, so its _FillValue should not be out of range, i.e., it should be representable by a short. However, the _FillValue should itself be the same type as the unpacked variable, NC_DOUBLE in this case.";
// Using intended _FillValue type breaks ncgen (with "_FillValue type mismatch")in netCDF 4.1.1 so comment-out for simplicity
// rec_var_dbl_mss_val_sht_upk:_FillValue = -999s;
rec_var_dbl_mss_val_sht_upk:_FillValue = -999.0;
rec_var_dbl_mss_val_sht_upk:missing_value = -999s;
short rec_var_dbl_mss_val_dbl_pck(time);
rec_var_dbl_mss_val_dbl_pck:long_name = "record variable, double, packed as short, with double missing values";
rec_var_dbl_mss_val_dbl_pck:purpose = "Packed version of rec_var_dbl_mss_val_dbl_upk";
// Using intended _FillValue type breaks ncgen (with "_FillValue type mismatch")in netCDF 4.1.1 so comment-out for simplicity
// rec_var_dbl_mss_val_dbl_pck:_FillValue = -999.;
rec_var_dbl_mss_val_dbl_pck:_FillValue = -999s;
rec_var_dbl_mss_val_dbl_pck:missing_value = -999.;
rec_var_dbl_mss_val_dbl_pck:scale_factor = -9.15541313801785e-05;
rec_var_dbl_mss_val_dbl_pck:add_offset = 5.;
short rec_var_dbl_mss_val_sht_pck(time);
rec_var_dbl_mss_val_sht_pck:long_name = "record variable, double, packed as short, with short missing values";
rec_var_dbl_mss_val_sht_pck:purpose = "Packed version of rec_var_dbl_mss_val_sht_upk";
rec_var_dbl_mss_val_sht_pck:_FillValue = -999s;
rec_var_dbl_mss_val_sht_pck:missing_value = -999s;
rec_var_dbl_mss_val_sht_pck:scale_factor = -9.15541313801785e-05;
rec_var_dbl_mss_val_sht_pck:add_offset = 5.;
short scl_dbl_pck;
scl_dbl_pck:long_name = "scalar variable, double, packed";
scl_dbl_pck:purpose = "Packed version of number with ncdiff subtraction bug";
scl_dbl_pck:scale_factor = -9.15541313801785e-05;
scl_dbl_pck:add_offset = 5.;
float rec_var_flt_mss_val_flt(time);
rec_var_flt_mss_val_flt:long_name = "record variable, float, with float missing values";
rec_var_flt_mss_val_flt:_FillValue = 1.0e36f;
float rec_var_flt_mss_val_flt_all(time);
rec_var_flt_mss_val_flt_all:long_name = "record variable, float, with float missing values in every position";
rec_var_flt_mss_val_flt_all:_FillValue = 1.0e36f;
float rec_var_flt_mss_val_flt_all_but_one(time);
rec_var_flt_mss_val_flt_all_but_one:long_name = "record variable, float, with float missing values in every position but one";
rec_var_flt_mss_val_flt_all_but_one:_FillValue = 1.0e36f;
float rec_var_flt_mss_val_flt_all_but_two(time);