class NetCDF::Variable
- NetCDF::Variable
- Reference
- Object
Defined in:
netcdf/types/variable.crConstructors
Instance Method Summary
- #add_attribute(name, type_str, value)
- #attributes
-
#checksum_mode
Checksum mode: "none" or "fletcher32"
-
#chunk_mode
Chunk mode: "contiguous", or "chunked"
-
#chunk_sizes
Array of chunk sizes, one size per dimension
-
#compression_deflate
Boolean switch for compression
-
#compression_level
Compression level (1-9)
-
#compression_shuffle
Boolean switch for shuffle
-
#endianness
Endianness: "little", "big", or "native"
-
#fill_mode
Boolean switch for fill mode
-
#fill_value
Fill value
- #id : Int32
- #id=(id : Int32)
- #name : String
- #name=(name : String)
- #ndims : Int32
- #ndims=(ndims : Int32)
- #parent_id : Int32
- #parent_id=(parent_id : Int32)
-
#read(*args)
Reads and returns a single value at positions given as for
#write
-
#read_slice(*args)
Reads and returns an array of values (cf.
- #var_type : Int32
- #var_type=(var_type : Int32)
-
#write(*args)
Write a value at positions given
write(2, 3, "a")
writes "a" at position 2 along the first dimension and position 3 along the second one -
#write_slice(*args)
Write values from an array (array must be of same type) at positions and sizes given for each dimension
writeSlice(2, 3, 4, 2, [0, 1, 2, 3, 4, 5])
writes the array at position 2 for 3 steps along the first dimension and position 4 for 2 step along the second one
Constructor Detail
Instance Method Detail
Reads and returns an array of values (cf. "Specify a Hyperslab")
at positions and sizes given for each dimension, readSlice(pos1, size1, pos2, size2, ...)
e.g. readSlice(2, 3, 4, 2)
gives an array of the values at position 2 for 3 steps along the
first dimension and position 4 for 2 steps along the second one.
Write a value at positions given
write(2, 3, "a")
writes "a" at position 2 along the first dimension and position 3 along the second one
Write values from an array (array must be of same type) at positions and sizes given for each dimension
writeSlice(2, 3, 4, 2, [0, 1, 2, 3, 4, 5])
writes the array at position 2 for 3 steps along the first dimension and position 4 for 2 step along the second one