Documentation
¶
Overview ¶
Package netcdf is a Go binding for the netCDF C library.
This package supports netCDF version 3, and 4 if netCDF 4 support is enabled in the C library. The C library interface used is documented here: http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-c/
Example ¶
package main import ( "fmt" "log" "github.com/CrapsJeroen/go-netcdf/netcdf" ) // CreateExampleFile creates an example NetCDF file containing only one variable. func CreateExampleFile(filename string) error { // Create a new NetCDF 4 file. The dataset is returned. ds, err := netcdf.CreateFile("gopher.nc", netcdf.CLOBBER|netcdf.NETCDF4) if err != nil { return err } defer ds.Close() // Add the dimensions for our data to the dataset dims := make([]netcdf.Dim, 2) ht, wd := 5, 4 dims[0], err = ds.AddDim("height", uint64(ht)) if err != nil { return err } dims[1], err = ds.AddDim("width", uint64(wd)) if err != nil { return err } // Add the variable to the dataset that will store our data v, err := ds.AddVar("gopher", netcdf.UBYTE, dims) if err != nil { return err } // Add a _FillValue to the variable's attributes // From C++ netCDF documentation: // With netCDF-4 files, nc_put_att will notice if you are writing a _FillValue attribute, // and will tell the HDF5 layer to use the specified fill value for that variable. With // either classic or netCDF-4 files, a _FillValue attribute will be checked for validity, // to make sure it has only one value and that its type matches the type of the associated // variable. if err := v.Attr("_FillValue").WriteUint8s([]uint8{255}); err != nil { return err } // Add an attribute to the variable if err := v.Attr("year").WriteInt32s([]int32{2012}); err != nil { return err } // Create the data with the above dimensions and write it to the file. gopher := make([]uint8, ht*wd) i := 0 for y := 0; y < ht; y++ { for x := 0; x < wd; x++ { gopher[i] = uint8(x + y) i++ } } return v.WriteUint8s(gopher) } // ReadExampleFile reads the data in NetCDF file at filename and prints it out. func ReadExampleFile(filename string) error { // Open example file in read-only mode. The dataset is returned. ds, err := netcdf.OpenFile(filename, netcdf.NOWRITE) if err != nil { return err } defer ds.Close() // Get the variable containing our data and read the data from the variable. v, err := ds.Var("gopher") if err != nil { return err } // Print variable attribute year, err := netcdf.GetInt32s(v.Attr("year")) if err != nil { return err } fmt.Printf("year = %v\n", year[0]) // Read data from variable gopher, err := netcdf.GetUint8s(v) if err != nil { return err } // Get the length of the dimensions of the data. dims, err := v.LenDims() if err != nil { return err } // Print out the data i := 0 for y := 0; y < int(dims[0]); y++ { for x := 0; x < int(dims[1]); x++ { fmt.Printf(" %d", gopher[i]) i++ } fmt.Printf("\n") } return nil } func main() { // Create example file filename := "gopher.nc" if err := CreateExampleFile(filename); err != nil { log.Fatalf("creating example file failed: %v\n", err) } // Open and read example file if err := ReadExampleFile(filename); err != nil { log.Fatalf("reading example file failed: %v\n", err) } }
Output: year = 2012 0 1 2 3 1 2 3 4 2 3 4 5 3 4 5 6 4 5 6 7
Index ¶
- Constants
- func GetBytes(r BytesReader) (data []byte, err error)
- func GetFloat32s(r Float32sReader) (data []float32, err error)
- func GetFloat64s(r Float64sReader) (data []float64, err error)
- func GetInt16s(r Int16sReader) (data []int16, err error)
- func GetInt32s(r Int32sReader) (data []int32, err error)
- func GetInt64s(r Int64sReader) (data []int64, err error)
- func GetInt8s(r Int8sReader) (data []int8, err error)
- func GetUint16s(r Uint16sReader) (data []uint16, err error)
- func GetUint32s(r Uint32sReader) (data []uint32, err error)
- func GetUint64s(r Uint64sReader) (data []uint64, err error)
- func GetUint8s(r Uint8sReader) (data []uint8, err error)
- func UnravelIndex(idx uint64, shape []uint64) ([]uint64, error)
- func Version() string
- type Attr
- func (a Attr) Len() (n uint64, err error)
- func (a Attr) Name() string
- func (a Attr) ReadBytes(val []byte) (err error)
- func (a Attr) ReadFloat32s(val []float32) (err error)
- func (a Attr) ReadFloat64s(val []float64) (err error)
- func (a Attr) ReadInt16s(val []int16) (err error)
- func (a Attr) ReadInt32s(val []int32) (err error)
- func (a Attr) ReadInt64s(val []int64) (err error)
- func (a Attr) ReadInt8s(val []int8) (err error)
- func (a Attr) ReadUint16s(val []uint16) (err error)
- func (a Attr) ReadUint32s(val []uint32) (err error)
- func (a Attr) ReadUint64s(val []uint64) (err error)
- func (a Attr) ReadUint8s(val []uint8) (err error)
- func (a Attr) Type() (t Type, err error)
- func (a Attr) WriteBytes(val []byte) error
- func (a Attr) WriteFloat32s(val []float32) error
- func (a Attr) WriteFloat64s(val []float64) error
- func (a Attr) WriteInt16s(val []int16) error
- func (a Attr) WriteInt32s(val []int32) error
- func (a Attr) WriteInt64s(val []int64) error
- func (a Attr) WriteInt8s(val []int8) error
- func (a Attr) WriteUint16s(val []uint16) error
- func (a Attr) WriteUint32s(val []uint32) error
- func (a Attr) WriteUint64s(val []uint64) error
- func (a Attr) WriteUint8s(val []uint8) error
- type BytesReader
- type Dataset
- func (ds Dataset) AddDim(name string, len uint64) (d Dim, err error)
- func (ds Dataset) AddVar(name string, t Type, dims []Dim) (v Var, err error)
- func (ds Dataset) Attr(name string) (a Attr)
- func (ds Dataset) AttrN(n int) (a Attr, err error)
- func (ds Dataset) Close() (err error)
- func (ds Dataset) Dim(name string) (d Dim, err error)
- func (ds Dataset) EndDef() (err error)
- func (ds Dataset) NAttrs() (n int, err error)
- func (ds Dataset) NVars() (n int, err error)
- func (ds Dataset) Sync() error
- func (ds Dataset) Var(name string) (v Var, err error)
- func (ds Dataset) VarN(id int) Var
- type Dim
- type Error
- type FileMode
- type Float32sReader
- type Float64sReader
- type Int16sReader
- type Int32sReader
- type Int64sReader
- type Int8sReader
- type Type
- type Uint16sReader
- type Uint32sReader
- type Uint64sReader
- type Uint8sReader
- type Var
- func (v Var) Attr(name string) (a Attr)
- func (v Var) AttrN(n int) (a Attr, err error)
- func (v Var) Compression() (shuffle, deflate bool, deflateLevel int, err error)
- func (v Var) Dims() (dims []Dim, err error)
- func (v Var) Len() (uint64, error)
- func (v Var) LenDims() ([]uint64, error)
- func (v Var) NAttrs() (n int, err error)
- func (v Var) Name() (name string, err error)
- func (v Var) ReadBytes(data []byte) error
- func (v Var) ReadBytesAt(idx []uint64) (val byte, err error)
- func (v Var) ReadBytesSlice(data []byte, start, count []uint64) error
- func (v Var) ReadBytesStridedSlice(data []byte, start, count []uint64, stride []int64) error
- func (v Var) ReadFloat32At(idx []uint64) (val float32, err error)
- func (v Var) ReadFloat32Slice(data []float32, start, count []uint64) error
- func (v Var) ReadFloat32StridedSlice(data []float32, start, count []uint64, stride []int64) error
- func (v Var) ReadFloat32s(data []float32) error
- func (v Var) ReadFloat64At(idx []uint64) (val float64, err error)
- func (v Var) ReadFloat64Slice(data []float64, start, count []uint64) error
- func (v Var) ReadFloat64StridedSlice(data []float64, start, count []uint64, stride []int64) error
- func (v Var) ReadFloat64s(data []float64) error
- func (v Var) ReadInt16At(idx []uint64) (val int16, err error)
- func (v Var) ReadInt16Slice(data []int16, start, count []uint64) error
- func (v Var) ReadInt16StridedSlice(data []int16, start, count []uint64, stride []int64) error
- func (v Var) ReadInt16s(data []int16) error
- func (v Var) ReadInt32At(idx []uint64) (val int32, err error)
- func (v Var) ReadInt32Slice(data []int32, start, count []uint64) error
- func (v Var) ReadInt32StridedSlice(data []int32, start, count []uint64, stride []int64) error
- func (v Var) ReadInt32s(data []int32) error
- func (v Var) ReadInt64At(idx []uint64) (val int64, err error)
- func (v Var) ReadInt64Slice(data []int64, start, count []uint64) error
- func (v Var) ReadInt64StridedSlice(data []int64, start, count []uint64, stride []int64) error
- func (v Var) ReadInt64s(data []int64) error
- func (v Var) ReadInt8At(idx []uint64) (val int8, err error)
- func (v Var) ReadInt8Slice(data []int8, start, count []uint64) error
- func (v Var) ReadInt8StridedSlice(data []int8, start, count []uint64, stride []int64) error
- func (v Var) ReadInt8s(data []int8) error
- func (v Var) ReadUint16At(idx []uint64) (val uint16, err error)
- func (v Var) ReadUint16Slice(data []uint16, start, count []uint64) error
- func (v Var) ReadUint16StridedSlice(data []uint16, start, count []uint64, stride []int64) error
- func (v Var) ReadUint16s(data []uint16) error
- func (v Var) ReadUint32At(idx []uint64) (val uint32, err error)
- func (v Var) ReadUint32Slice(data []uint32, start, count []uint64) error
- func (v Var) ReadUint32StridedSlice(data []uint32, start, count []uint64, stride []int64) error
- func (v Var) ReadUint32s(data []uint32) error
- func (v Var) ReadUint64At(idx []uint64) (val uint64, err error)
- func (v Var) ReadUint64Slice(data []uint64, start, count []uint64) error
- func (v Var) ReadUint64StridedSlice(data []uint64, start, count []uint64, stride []int64) error
- func (v Var) ReadUint64s(data []uint64) error
- func (v Var) ReadUint8At(idx []uint64) (val uint8, err error)
- func (v Var) ReadUint8Slice(data []uint8, start, count []uint64) error
- func (v Var) ReadUint8StridedSlice(data []uint8, start, count []uint64, stride []int64) error
- func (v Var) ReadUint8s(data []uint8) error
- func (v Var) SetCompression(shuffle, deflate bool, deflateLevel int) error
- func (v Var) Type() (t Type, err error)
- func (v Var) WriteBytes(data []byte) error
- func (v Var) WriteBytesAt(idx []uint64, val byte) (err error)
- func (v Var) WriteBytesSlice(data []byte, start, count []uint64) error
- func (v Var) WriteBytesStridedSlice(data []byte, start, count []uint64, stride []int64) error
- func (v Var) WriteFloat32At(idx []uint64, val float32) (err error)
- func (v Var) WriteFloat32Slice(data []float32, start, count []uint64) error
- func (v Var) WriteFloat32StridedSlice(data []float32, start, count []uint64, stride []int64) error
- func (v Var) WriteFloat32s(data []float32) error
- func (v Var) WriteFloat64At(idx []uint64, val float64) (err error)
- func (v Var) WriteFloat64Slice(data []float64, start, count []uint64) error
- func (v Var) WriteFloat64StridedSlice(data []float64, start, count []uint64, stride []int64) error
- func (v Var) WriteFloat64s(data []float64) error
- func (v Var) WriteInt16At(idx []uint64, val int16) (err error)
- func (v Var) WriteInt16Slice(data []int16, start, count []uint64) error
- func (v Var) WriteInt16StridedSlice(data []int16, start, count []uint64, stride []int64) error
- func (v Var) WriteInt16s(data []int16) error
- func (v Var) WriteInt32At(idx []uint64, val int32) (err error)
- func (v Var) WriteInt32Slice(data []int32, start, count []uint64) error
- func (v Var) WriteInt32StridedSlice(data []int32, start, count []uint64, stride []int64) error
- func (v Var) WriteInt32s(data []int32) error
- func (v Var) WriteInt64At(idx []uint64, val int64) (err error)
- func (v Var) WriteInt64Slice(data []int64, start, count []uint64) error
- func (v Var) WriteInt64StridedSlice(data []int64, start, count []uint64, stride []int64) error
- func (v Var) WriteInt64s(data []int64) error
- func (v Var) WriteInt8At(idx []uint64, val int8) (err error)
- func (v Var) WriteInt8Slice(data []int8, start, count []uint64) error
- func (v Var) WriteInt8StridedSlice(data []int8, start, count []uint64, stride []int64) error
- func (v Var) WriteInt8s(data []int8) error
- func (v Var) WriteUint16At(idx []uint64, val uint16) (err error)
- func (v Var) WriteUint16Slice(data []uint16, start, count []uint64) error
- func (v Var) WriteUint16StridedSlice(data []uint16, start, count []uint64, stride []int64) error
- func (v Var) WriteUint16s(data []uint16) error
- func (v Var) WriteUint32At(idx []uint64, val uint32) (err error)
- func (v Var) WriteUint32Slice(data []uint32, start, count []uint64) error
- func (v Var) WriteUint32StridedSlice(data []uint32, start, count []uint64, stride []int64) error
- func (v Var) WriteUint32s(data []uint32) error
- func (v Var) WriteUint64At(idx []uint64, val uint64) (err error)
- func (v Var) WriteUint64Slice(data []uint64, start, count []uint64) error
- func (v Var) WriteUint64StridedSlice(data []uint64, start, count []uint64, stride []int64) error
- func (v Var) WriteUint64s(data []uint64) error
- func (v Var) WriteUint8At(idx []uint64, val uint8) (err error)
- func (v Var) WriteUint8Slice(data []uint8, start, count []uint64) error
- func (v Var) WriteUint8StridedSlice(data []uint8, start, count []uint64, stride []int64) error
- func (v Var) WriteUint8s(data []uint8) error
Examples ¶
Constants ¶
const (
NC_UNLIMITED uint64 = C.NC_UNLIMITED
)
Unlimited size for dimension
Variables ¶
This section is empty.
Functions ¶
func GetBytes ¶
func GetBytes(r BytesReader) (data []byte, err error)
GetBytes reads the entire data in r and returns it.
func GetFloat32s ¶
func GetFloat32s(r Float32sReader) (data []float32, err error)
GetFloat32s reads the entire data in r and returns it.
func GetFloat64s ¶
func GetFloat64s(r Float64sReader) (data []float64, err error)
GetFloat64s reads the entire data in r and returns it.
func GetInt16s ¶
func GetInt16s(r Int16sReader) (data []int16, err error)
GetInt16s reads the entire data in r and returns it.
func GetInt32s ¶
func GetInt32s(r Int32sReader) (data []int32, err error)
GetInt32s reads the entire data in r and returns it.
func GetInt64s ¶
func GetInt64s(r Int64sReader) (data []int64, err error)
GetInt64s reads the entire data in r and returns it.
func GetInt8s ¶
func GetInt8s(r Int8sReader) (data []int8, err error)
GetInt8s reads the entire data in r and returns it.
func GetUint16s ¶
func GetUint16s(r Uint16sReader) (data []uint16, err error)
GetUint16s reads the entire data in r and returns it.
func GetUint32s ¶
func GetUint32s(r Uint32sReader) (data []uint32, err error)
GetUint32s reads the entire data in r and returns it.
func GetUint64s ¶
func GetUint64s(r Uint64sReader) (data []uint64, err error)
GetUint64s reads the entire data in r and returns it.
func GetUint8s ¶
func GetUint8s(r Uint8sReader) (data []uint8, err error)
GetUint8s reads the entire data in r and returns it.
func UnravelIndex ¶
UnravelIndex calculates coordinate position based on index
Types ¶
type Attr ¶
type Attr struct {
// contains filtered or unexported fields
}
Attr represents an attribute associated with a variable.
func (Attr) ReadFloat32s ¶
ReadFloat32s reads the entire attribute value into val.
func (Attr) ReadFloat64s ¶
ReadFloat64s reads the entire attribute value into val.
func (Attr) ReadInt16s ¶
ReadInt16s reads the entire attribute value into val.
func (Attr) ReadInt32s ¶
ReadInt32s reads the entire attribute value into val.
func (Attr) ReadInt64s ¶
ReadInt64s reads the entire attribute value into val.
func (Attr) ReadUint16s ¶
ReadUint16s reads the entire attribute value into val.
func (Attr) ReadUint32s ¶
ReadUint32s reads the entire attribute value into val.
func (Attr) ReadUint64s ¶
ReadUint64s reads the entire attribute value into val.
func (Attr) ReadUint8s ¶
ReadUint8s reads the entire attribute value into val.
func (Attr) WriteBytes ¶
WriteBytes sets the value of attribute a to val.
func (Attr) WriteFloat32s ¶
WriteFloat32s sets the value of attribute a to val.
func (Attr) WriteFloat64s ¶
WriteFloat64s sets the value of attribute a to val.
func (Attr) WriteInt16s ¶
WriteInt16s sets the value of attribute a to val.
func (Attr) WriteInt32s ¶
WriteInt32s sets the value of attribute a to val.
func (Attr) WriteInt64s ¶
WriteInt64s sets the value of attribute a to val.
func (Attr) WriteInt8s ¶
WriteInt8s sets the value of attribute a to val.
func (Attr) WriteUint16s ¶
WriteUint16s sets the value of attribute a to val.
func (Attr) WriteUint32s ¶
WriteUint32s sets the value of attribute a to val.
func (Attr) WriteUint64s ¶
WriteUint64s sets the value of attribute a to val.
func (Attr) WriteUint8s ¶
WriteUint8s sets the value of attribute a to val.
type BytesReader ¶
BytesReader is a interface that allows reading a sequence of values of fixed length.
type Dataset ¶
Dataset represents a netCDF dataset.
func CreateFile ¶
CreateFile creates a new netCDF dataset. Mode is a bitwise-or of FileMode values.
func OpenFile ¶
OpenFile opens an existing netCDF dataset file at path. Mode is a bitwise-or of FileMode values.
func (Dataset) AddDim ¶
AddDim adds a new dimension named name of length len. The new dimension d is returned.
func (Dataset) AddVar ¶
AddVar adds a new a variable named name of type t and dimensions dims. The new variable v is returned.
func (Dataset) Attr ¶
Attr returns global attribute named name. If the attribute does not yet exist, it'll be created once it's written.
func (Dataset) EndDef ¶
EndDef leaves define mode and enters data mode, so variable data can be read or written. Calling this method is not required for netCDF-4 files.
type Dim ¶
type Dim struct {
// contains filtered or unexported fields
}
Dim represents a dimension.
type FileMode ¶
FileMode represents a file's mode.
const ( NOWRITE FileMode = C.NC_NOWRITE // set read-only access WRITE FileMode = C.NC_WRITE // set read-write access )
File modes for Open
const ( CLOBBER FileMode = C.NC_CLOBBER // destroy existing file NOCLOBBER FileMode = C.NC_NOCLOBBER // don't destroy existing file CLASSIC_MODEL FileMode = C.NC_CLASSIC_MODEL // enforce classic model NETCDF4 FileMode = C.NC_NETCDF4 // use netCDF-4/HDF5 format OFFSET_64BIT FileMode = C.NC_64BIT_OFFSET // use large (64-bit) file offsets )
File modes for Create
type Float32sReader ¶
type Float32sReader interface { Len() (n uint64, err error) ReadFloat32s(val []float32) (err error) }
Float32sReader is a interface that allows reading a sequence of values of fixed length.
type Float64sReader ¶
type Float64sReader interface { Len() (n uint64, err error) ReadFloat64s(val []float64) (err error) }
Float64sReader is a interface that allows reading a sequence of values of fixed length.
type Int16sReader ¶
Int16sReader is a interface that allows reading a sequence of values of fixed length.
type Int32sReader ¶
Int32sReader is a interface that allows reading a sequence of values of fixed length.
type Int64sReader ¶
Int64sReader is a interface that allows reading a sequence of values of fixed length.
type Int8sReader ¶
Int8sReader is a interface that allows reading a sequence of values of fixed length.
type Type ¶
Type is a netCDF external data type.
const ( BYTE Type = C.NC_BYTE // signed 1 byte integer CHAR Type = C.NC_CHAR // ISO/ASCII character SHORT Type = C.NC_SHORT // signed 2 byte integer INT Type = C.NC_INT // signed 4 byte integer LONG Type = C.NC_LONG // deprecated, but required for backward compatibility. FLOAT Type = C.NC_FLOAT // single precision floating point number DOUBLE Type = C.NC_DOUBLE // double precision floating point number UBYTE Type = C.NC_UBYTE // unsigned 1 byte int USHORT Type = C.NC_USHORT // unsigned 2-byte int UINT Type = C.NC_UINT // unsigned 4-byte int INT64 Type = C.NC_INT64 // signed 8-byte int UINT64 Type = C.NC_UINT64 // unsigned 8-byte int STRING Type = C.NC_STRING // string )
Type declarations according to C standards
type Uint16sReader ¶
Uint16sReader is a interface that allows reading a sequence of values of fixed length.
type Uint32sReader ¶
Uint32sReader is a interface that allows reading a sequence of values of fixed length.
type Uint64sReader ¶
Uint64sReader is a interface that allows reading a sequence of values of fixed length.
type Uint8sReader ¶
Uint8sReader is a interface that allows reading a sequence of values of fixed length.
type Var ¶
type Var struct {
// contains filtered or unexported fields
}
Var represents a variable.
func (Var) Attr ¶
Attr returns attribute named name. If the attribute does not yet exist, it'll be created once it's written.
func (Var) Compression ¶
Compression returns the deflate settings for a variable in a NetCDF-4 file.
func (Var) ReadBytes ¶
ReadBytes reads the entire variable v into data, which must have enough space for all the values (i.e. len(data) must be at least v.Len()).
func (Var) ReadBytesAt ¶
ReadBytesAt returns a value via index position
func (Var) ReadBytesSlice ¶
ReadBytesSlice reads a slice of variable v into data, which must have enough space for all the values. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadBytesStridedSlice ¶
ReadBytesStridedSlice reads a strided slice of variable v into data, which must have enough space for all the values. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadFloat32At ¶
ReadFloat32At returns a value via index position
func (Var) ReadFloat32Slice ¶
ReadFloat32Slice reads a slice of variable v into data, which must have enough space for all the values. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadFloat32StridedSlice ¶
ReadFloat32StridedSlice reads a strided slice of variable v into data, which must have enough space for all the values. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadFloat32s ¶
ReadFloat32s reads the entire variable v into data, which must have enough space for all the values (i.e. len(data) must be at least v.Len()).
func (Var) ReadFloat64At ¶
ReadFloat64At returns a value via index position
func (Var) ReadFloat64Slice ¶
ReadFloat64Slice reads a slice of variable v into data, which must have enough space for all the values. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadFloat64StridedSlice ¶
ReadFloat64StridedSlice reads a strided slice of variable v into data, which must have enough space for all the values. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadFloat64s ¶
ReadFloat64s reads the entire variable v into data, which must have enough space for all the values (i.e. len(data) must be at least v.Len()).
func (Var) ReadInt16At ¶
ReadInt16At returns a value via index position
func (Var) ReadInt16Slice ¶
ReadInt16Slice reads a slice of variable v into data, which must have enough space for all the values. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadInt16StridedSlice ¶
ReadInt16StridedSlice reads a strided slice of variable v into data, which must have enough space for all the values. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadInt16s ¶
ReadInt16s reads the entire variable v into data, which must have enough space for all the values (i.e. len(data) must be at least v.Len()).
func (Var) ReadInt32At ¶
ReadInt32At returns a value via index position
func (Var) ReadInt32Slice ¶
ReadInt32Slice reads a slice of variable v into data, which must have enough space for all the values. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadInt32StridedSlice ¶
ReadInt32StridedSlice reads a strided slice of variable v into data, which must have enough space for all the values. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadInt32s ¶
ReadInt32s reads the entire variable v into data, which must have enough space for all the values (i.e. len(data) must be at least v.Len()).
func (Var) ReadInt64At ¶
ReadInt64At returns a value via index position
func (Var) ReadInt64Slice ¶
ReadInt64Slice reads a slice of variable v into data, which must have enough space for all the values. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadInt64StridedSlice ¶
ReadInt64StridedSlice reads a strided slice of variable v into data, which must have enough space for all the values. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadInt64s ¶
ReadInt64s reads the entire variable v into data, which must have enough space for all the values (i.e. len(data) must be at least v.Len()).
func (Var) ReadInt8At ¶
ReadInt8At returns a value via index position
func (Var) ReadInt8Slice ¶
ReadInt8Slice reads a slice of variable v into data, which must have enough space for all the values. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadInt8StridedSlice ¶
ReadInt8StridedSlice reads a strided slice of variable v into data, which must have enough space for all the values. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadInt8s ¶
ReadInt8s reads the entire variable v into data, which must have enough space for all the values (i.e. len(data) must be at least v.Len()).
func (Var) ReadUint16At ¶
ReadUint16At returns a value via index position
func (Var) ReadUint16Slice ¶
ReadUint16Slice reads a slice of variable v into data, which must have enough space for all the values. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadUint16StridedSlice ¶
ReadUint16StridedSlice reads a strided slice of variable v into data, which must have enough space for all the values. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadUint16s ¶
ReadUint16s reads the entire variable v into data, which must have enough space for all the values (i.e. len(data) must be at least v.Len()).
func (Var) ReadUint32At ¶
ReadUint32At returns a value via index position
func (Var) ReadUint32Slice ¶
ReadUint32Slice reads a slice of variable v into data, which must have enough space for all the values. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadUint32StridedSlice ¶
ReadUint32StridedSlice reads a strided slice of variable v into data, which must have enough space for all the values. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadUint32s ¶
ReadUint32s reads the entire variable v into data, which must have enough space for all the values (i.e. len(data) must be at least v.Len()).
func (Var) ReadUint64At ¶
ReadUint64At returns a value via index position
func (Var) ReadUint64Slice ¶
ReadUint64Slice reads a slice of variable v into data, which must have enough space for all the values. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadUint64StridedSlice ¶
ReadUint64StridedSlice reads a strided slice of variable v into data, which must have enough space for all the values. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadUint64s ¶
ReadUint64s reads the entire variable v into data, which must have enough space for all the values (i.e. len(data) must be at least v.Len()).
func (Var) ReadUint8At ¶
ReadUint8At returns a value via index position
func (Var) ReadUint8Slice ¶
ReadUint8Slice reads a slice of variable v into data, which must have enough space for all the values. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadUint8StridedSlice ¶
ReadUint8StridedSlice reads a strided slice of variable v into data, which must have enough space for all the values. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) ReadUint8s ¶
ReadUint8s reads the entire variable v into data, which must have enough space for all the values (i.e. len(data) must be at least v.Len()).
func (Var) SetCompression ¶
SetCompression sets the deflate parameters for a variable in a NetCDF-4 file.
func (Var) WriteBytes ¶
WriteBytes writes data as the entire data for variable v.
func (Var) WriteBytesAt ¶
WriteBytesAt sets a value via its index position
func (Var) WriteBytesSlice ¶
WriteBytesSlice writes data as a slice of variable v. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteBytesStridedSlice ¶
WriteBytesStridedSlice writes data as a slice of variable v. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteFloat32At ¶
WriteFloat32At sets a value via its index position
func (Var) WriteFloat32Slice ¶
WriteFloat32Slice writes data as a slice of variable v. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteFloat32StridedSlice ¶
WriteFloat32StridedSlice writes data as a slice of variable v. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteFloat32s ¶
WriteFloat32s writes data as the entire data for variable v.
func (Var) WriteFloat64At ¶
WriteFloat64At sets a value via its index position
func (Var) WriteFloat64Slice ¶
WriteFloat64Slice writes data as a slice of variable v. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteFloat64StridedSlice ¶
WriteFloat64StridedSlice writes data as a slice of variable v. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteFloat64s ¶
WriteFloat64s writes data as the entire data for variable v.
func (Var) WriteInt16At ¶
WriteInt16At sets a value via its index position
func (Var) WriteInt16Slice ¶
WriteInt16Slice writes data as a slice of variable v. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteInt16StridedSlice ¶
WriteInt16StridedSlice writes data as a slice of variable v. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteInt16s ¶
WriteInt16s writes data as the entire data for variable v.
func (Var) WriteInt32At ¶
WriteInt32At sets a value via its index position
func (Var) WriteInt32Slice ¶
WriteInt32Slice writes data as a slice of variable v. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteInt32StridedSlice ¶
WriteInt32StridedSlice writes data as a slice of variable v. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteInt32s ¶
WriteInt32s writes data as the entire data for variable v.
func (Var) WriteInt64At ¶
WriteInt64At sets a value via its index position
func (Var) WriteInt64Slice ¶
WriteInt64Slice writes data as a slice of variable v. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteInt64StridedSlice ¶
WriteInt64StridedSlice writes data as a slice of variable v. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteInt64s ¶
WriteInt64s writes data as the entire data for variable v.
func (Var) WriteInt8At ¶
WriteInt8At sets a value via its index position
func (Var) WriteInt8Slice ¶
WriteInt8Slice writes data as a slice of variable v. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteInt8StridedSlice ¶
WriteInt8StridedSlice writes data as a slice of variable v. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteInt8s ¶
WriteInt8s writes data as the entire data for variable v.
func (Var) WriteUint16At ¶
WriteUint16At sets a value via its index position
func (Var) WriteUint16Slice ¶
WriteUint16Slice writes data as a slice of variable v. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteUint16StridedSlice ¶
WriteUint16StridedSlice writes data as a slice of variable v. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteUint16s ¶
WriteUint16s writes data as the entire data for variable v.
func (Var) WriteUint32At ¶
WriteUint32At sets a value via its index position
func (Var) WriteUint32Slice ¶
WriteUint32Slice writes data as a slice of variable v. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteUint32StridedSlice ¶
WriteUint32StridedSlice writes data as a slice of variable v. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteUint32s ¶
WriteUint32s writes data as the entire data for variable v.
func (Var) WriteUint64At ¶
WriteUint64At sets a value via its index position
func (Var) WriteUint64Slice ¶
WriteUint64Slice writes data as a slice of variable v. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteUint64StridedSlice ¶
WriteUint64StridedSlice writes data as a slice of variable v. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteUint64s ¶
WriteUint64s writes data as the entire data for variable v.
func (Var) WriteUint8At ¶
WriteUint8At sets a value via its index position
func (Var) WriteUint8Slice ¶
WriteUint8Slice writes data as a slice of variable v. The slice is specified by start and count: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteUint8StridedSlice ¶
WriteUint8StridedSlice writes data as a slice of variable v. The slice is specified by start, count and stride: https://www.unidata.ucar.edu/software/netcdf/docs/programming_notes.html#specify_hyperslab.
func (Var) WriteUint8s ¶
WriteUint8s writes data as the entire data for variable v.