// 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)
: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";
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.";
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.";
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: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.";
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.
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_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_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.";
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_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
one_dmn_rec_var_sng:long_name = "one dimensional record variable of string";
one_dmn_rec_var_sng:NB = "20131222: HDF4 ncgen fails on this variable: /usr/bin/hncgen -b -o ~/in.hdf ~/nco/data/in.cdl produces error message that \"string won't fit in this variable\"";
float time_lon(time,lon);
time_lon:long_name = "Record variable of longitude coordinate";
char two_dmn_rec_var_sng(time,lev);
two_dmn_rec_var_sng:long_name = "two dimensional record variable of string";
float two_dmn_rec_var(time,lev);
two_dmn_rec_var:long_name = "two dimensional record variable";
two_dmn_rec_var:units = "watt meter-2";
float three_dmn_rec_var(time,lat,lon);
three_dmn_rec_var:long_name = "three dimensional record variable";
three_dmn_rec_var:units = "watt meter-2";
three_dmn_rec_var:coordinates = "time lat lon";
double three_dmn_var_dbl(time,lat,lon);
three_dmn_var_dbl:long_name = "three dimensional record variable of type double";
three_dmn_var_dbl:units = "watt meter-2";
three_dmn_var_dbl:_FillValue = -99.;
int three_dmn_var_int(time,lat,lon);
three_dmn_var_int:long_name = "three dimensional record variable of type int";
three_dmn_var_int:units = "watt meter-2";
three_dmn_var_int:_FillValue = -99;
short three_dmn_var_sht(time,lat,lon);
three_dmn_var_sht:long_name = "three dimensional record variable";
three_dmn_var_sht:units = "watt meter-2";
three_dmn_var_sht:_FillValue = -99s;
int th(time,lat,lon);
th:long_name = "three dimensional record variable";
th:units = "watt meter-2";
th:_FillValue = -99;
float td(time,dgn);
td:long_name = "two dimensional record variable stored in td (time,dgn) order (dgn means degenerate, i.e., of size 1)";
float tx(time,lon);
tx:long_name = "two dimensional record variable stored in tx (time,lon) order";
float ty(time,lat);
ty:long_name = "two dimensional record variable stored in ty (time,lat) order";
float tz(time,lev);
tz:long_name = "two dimensional record variable stored in tz (time,lev) order";
float txyz(time,lon,lat,lev);
txyz:long_name = "four dimensional record variable stored in txyz (time,lon,lat,lev) order";
float four_dmn_rec_var(time,lat,lev,lon);
four_dmn_rec_var:long_name = "four dimensional record variable";
four_dmn_rec_var:units = "watt meter-2";
four_dmn_rec_var:coordinates = "time lat lev lon";
// double three_double_dmn(time,lon,lon);
double time_udunits(time_udunits);
time_udunits:units = "hours since 1900-01-01 00:00:0.0";
time_udunits:delta_t = "0000-00-00 06:00:0.0";
time_udunits:purpose = "The dates specified in this variable are ~1999-12-08";
float u(time);
u:long_name = "Zonal wind speed";
u:units = "meter second-1";
float v(time);
v:long_name = "Meridional wind speed";
v:units = "meter second-1";
float var_1D_rct(lat_times_lon);
var_1D_rct:long_name = "Variable for 2D rectangular grid stored as 1D arrays";
float var_1D_rrg(lat_times_lon);
var_1D_rrg:long_name = "Variable for 2D irregular grid stored as 1D arrays";
float var_2D_rct(lat,lon);
var_2D_rct:long_name = "Variable for 2D rectangular grid stored as 2D array";
float var_2D_rrg(lat,lon);
var_2D_rrg:long_name = "Variable for 2D irregular grid stored as 2D array";
float var_nm-dash;
var_nm-dash:long_name = "Variable and attribute names include dash characters";
var_nm-dash:att_nm-dash = 1.0e36f;
float vld_rng(time);
vld_rng:long_name = "Temperature";
vld_rng:purpose = "Array containing _FillValue at some locations, out-of-range values at other locations, and valid data in the remainder";
vld_rng:_FillValue = -999.0f;
vld_rng:valid_min = 180.f;
vld_rng:valid_max = 360.f;
// float var_nm.dot;
// var_nm.dot:long_name = "Variable and attribute names include dot characters";
// 20070102: Periods in attribute names choke OPeNDAP from FC7 RPM TODO nco911
// 20091105: Periods in attribute names choke ncgen from RHEL5 TODO nco911