mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-21 08:39:46 +08:00
6abaab967b
re: PR https://github.com/Unidata/netcdf-c/pull/2492 re: Issue https://github.com/Unidata/netcdf-c/issues/2494 This PR fixes some problems with the pull request https://github.com/Unidata/netcdf-c/pull/2492 in response to Issue https://github.com/Unidata/netcdf-c/issues/2494. * Found and fixed more scalar handling problems and add a test case for scalars. * Cleanup nczarr_test/run_string.sh test * Document *_nczarr_default_maxstrlen* and *_nczarr_maxstrlen*. * Support both "Nan" and *Nan* as being floating point constants for attributes. It is unclear from the Zarr V2 spec if unquoted *Nan* is legal or not, but support for reading. Write the quoted versions when writing an attribute. Similar for Infinity constants. So NCZarr supports the following constants for use in Attributes * *Nan*, "Nan", *-Nan*, "-Nan" * *Nanf*, "Nanf", *-Nanf*, "-Nanf" * *Infinity*, "Infinity", *-Infinity*, "-Infinity" * *Infinityf*, "Infinityf", *-Infinityf*, "-Infinityf"
22 lines
338 B
Plaintext
22 lines
338 B
Plaintext
netcdf ref_string {
|
|
dimensions:
|
|
d2 = 2 ;
|
|
variables:
|
|
char c(d2);
|
|
string v(d2) ;
|
|
string truncated ;
|
|
truncated:_nczarr_maxstrlen = 4 ;
|
|
|
|
// global attributes:
|
|
string :stringattr = "abc", "def" ;
|
|
:charattr = "ghi", "jkl" ;
|
|
:_nczarr_default_maxstrlen = 6 ;
|
|
data:
|
|
|
|
c = "a", "b" ;
|
|
|
|
v = "uvw", "xyz" ;
|
|
|
|
truncated = "0123456789" ;
|
|
}
|