netcdf-c/ncdump/ref_tst_special_atts.cdl
Dennis Heimbigner 2ea1cf5f1b There was a request to extend the provenance information
stored in the _NCProperties attribute to allow two things:
1. capture of additional library dependencies (over and above
   hdf5)
2. Recognition of non-netcdf libraries that create netcdf-4 format
   files.

To this end, the _NCProperties format has been extended to be
and arbitrary set of key=value pairs separated by commas.
This new format has version = 2, and uses commas as the pair separator.
Thus the general form is:
    _NCProperties = "version=2,key1=value,key2=value2..." ;

This new version is accompanied by a new ./configure option of the form
    --with-ncproperties="key1=value1,key2=value2..."
that specifies pairs to add to the _NCProperties attribute for all
files created with that netcdf library.

At this point, what is missing is some programmatic way to
specify either all the pairs or additional pairs
to the _NCProperties attribute. Not sure of the best way
to do this.

Builders using non-netcdf libraries can specify
whatever they want in the key value pairs (as long
as the version=2 is specified first).

By convention, the primary library is expected to be the
the first pair after the leading version=2 pair, but this
is convention only and is neither required nor enforced.

Related changes:
1. Fixed the tests that check _NCProperties to properly operate with version=2.
2. When reading a version 1 _NCProperties attribute, convert it to look
   like a version 2 attribute.
2. Added some version 2 tests to ncdump/tst_fileinfo.c and
   ncdump/tst_fileinfo.sh

Misc Changes:
1. Fix minor problem in ncdap_test/testurl.sh where a parameter to
   buildurl needed to be quoted.
2. Minor fix to ncgen to swap switches -H and -h to be consistent
   with other utilities.
3. Document the -M flag in nccopy usage() and the nccopy man page.
4. Modify a test case to use the nccopy -M flag.
2018-08-25 21:44:41 -06:00

54 lines
1.2 KiB
Plaintext

netcdf tst_special_atts {
types:
compound obs_t {
byte day ;
short elev ;
int count ;
float relhum ;
double time ;
ubyte category ;
ushort id ;
uint particularity ;
int64 attention_span ;
}; // obs_t
dimensions:
dim1 = 10 ;
dim2 = 20 ;
dim3 = 30 ;
variables:
int var1(dim1) ;
var1:_Storage = "contiguous" ;
var1:_Endianness = "little" ;
int var2(dim1, dim2) ;
var2:_Storage = "chunked" ;
var2:_ChunkSizes = 6, 7 ;
var2:_Fletcher32 = "true" ;
var2:_Endianness = "big" ;
int var3(dim1, dim2, dim3) ;
var3:_Storage = "chunked" ;
var3:_ChunkSizes = 6, 7, 8 ;
var3:_DeflateLevel = 2 ;
var3:_Endianness = "little" ;
int var4(dim1, dim2, dim3) ;
var4:_Storage = "chunked" ;
var4:_ChunkSizes = 6, 7, 8 ;
var4:_DeflateLevel = 2 ;
var4:_Shuffle = "true" ;
var4:_Endianness = "little" ;
var4:_NoFill = "true" ;
obs_t var5(dim1) ;
var5:_Storage = "chunked" ;
var5:_ChunkSizes = 6 ;
var5:_DeflateLevel = 2 ;
var5:_Shuffle = "true" ;
var5:_Fletcher32 = "true" ;
var5:_NoFill = "true" ;
// global attributes:
:_NCProperties = "version=2,netcdf=4.6.2-development,hdf5=1.10.1" ;
:_SuperblockVersion = 0 ;
:_IsNetcdf4 = 1 ;
:_Format = "netCDF-4" ;
data:
}